You can create a structure file from the Data Division of a COBOL program that uses the data file. By using the .idy file from the compiled program, you can display the records in a structured way, where the fields are formatted to their intended size.
The datavseq.dat data file contains three types of record: employee, manager, and executive. You need to create a structure file that has a layout for each type of record, and then set criteria for when a particular layout is used. Of the three layouts, you define one as the default; all others are defined as conditional.
The Select an .idy file dialog box appears.
A new Structure tab is displayed in the Data File Tools window, containing the Data Division of dfdstaff.cbl in the Available Layouts pane, and the Selected Layouts pane on the right-hand side, where your layout(s) will be displayed.
The EMPLOYEE-REC layout appears in the Selected Layouts pane.
This is the layout that a record will be displayed using if there are no other layouts, or no other layouts that have criteria that matches with the record.
The MANAGER-REC layout appears in the Selected Layouts pane.
Right-click 05 MN-POSITION and select Add Condition.
The Edit Condition dialog box appears.
This M indicates a Manager record type.
The Save Layouts to File dialog box appears.