If it knows the layout of the fields, the Data File Editor can display file contents formatted. You create a record layout file from the Data Division of a COBOL program that uses the file. The program must be compiled for the Data File Editor to access the necessary information, which is why it was necessary to compile the demo application at the start of this tutorial.
Our data file, staff.dat, contains three record types: employee, manager, and executive. To differentiate between the types, you define the layout of each type of record, and how to identify the type. Of the three record types, you can define one type as the default; all others are defined as conditional.