You can create a record layout 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 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.
In order to create a record layout, you must create a structure file using the Classic Data File Tools editor.
The Classic Data File Tools editor is opened.
A Layout window appears, containing the Data Division of dfdstaff.cbl.
The default layout is displayed in the right-hand pane.
The MANAGER-REC conditional layout is displayed in the right-hand pane.
The Field Properties dialog box appears.
This M indicates a Manager record type.
The Save As dialog box appears.
The structure file containing three layouts is now created, which means you can now view the corresponding data file formatted. You can now close Classic Data File Tools.