In the Models accordion, right click your File Model and select New Datastore. In the editor toolbar, click Reverse-Engineer. From the File main menu, select Save.

Files 3-7

6. In the editor toolbar, click Reverse-Engineer.The Columns Setup Wizard is

launched. The Columns Setup Wizard displays the first records of your file. 7. Click on the ruler above the file contents to create markers delimiting the columns. You can right-click within the ruler to delete a marker. 8. Columns are created with pre-generated names C1, C2, and so on. You can edit the column name by clicking in the column header line below the ruler. 9. In the properties panel on the right, you can edit all the parameters of the selected column. You should set at least the Column Name, Datatype, and Length for each column.

10. Click OK when the columns definition is complete.

11. From the File main menu, select Save.

3.5.2.3 COBOL Copybook reverse-engineering

COBOL Copybook reverse-engineering allows you to retrieve a legacy file structure from its description contained in a COBOL Copybook file. To reverse-engineer a fixed file using a COBOL Copybook:

1. In the Models accordion, right click your File Model and select New Datastore.

The Datastore Editor opens.

2. In the Definition Tab, enter the following fields:

■ Name : Name of this datastore ■ Resource Name : Sub-directory if needed and name of the file. You can browse for the file using the ... button

3. Go to the Files tab to describe the type of file. Set the fields as follows:

■ File Format : Fixed ■ Header Number of Lines : Enter the number of lines of the header. ■ Select a Record Separator. 4. From the File main menu, select Save. 5. In the Datastore Editor, go to the Columns tab. 6. Create or open a File datastore that has a fixed format. 7. In the Datastore Editor, go to the Columns tab.

8. In the toolbar menu, click Reverse Engineer COBOL CopyBook.

9. In the Reverse Engineer Cobol CopyBook Dialog, enter the following fields: ■ File : Location of the Copybook file ■ Character set : Copybook file charset. ■ Description format EBCDIC | ASCII: Copybook file format ■ Data format EBCDIC | ASCII: Data file format

10. Click OK.

The columns described in the Copybook are reverse-engineered and appear in the column list.