Importing a COBOL Copybook with REDEFINES Statements - Example
Importing a COBOL Copybook with REDEFINES Statements - Example
You can add a
multiple-record
data map and import a complex COBOL copybook with REDEFINES statements into it.
This example shows how to complete the following tasks:
Add a data map and import a COBOL copybook into it.
When you add the data map, you use a fixed-length binary data file of EBCDIC data with 58320 records. Each record is 57 bytes long. This EBCDIC data file simulates reading data from an IBM mainframe system.
In the
Add Data Map
dialog box, you set the skip records option to skip a header record in the data file.
You import a COBOL copybook with line numbers in columns 1 through 6 and comments in columns 73 through 80. The COBOL copybook also contains REDEFINES statements.
PowerExchange ignores the comment lines in the copybook.
Apply a date mask to a GROUP field in the data map.
This example uses the train5.dat and train5.cob files.