The UNIQUE keyword is important in this example. The example specifies a record format different from the associated physical file.
The following logical file (called CUSMSTL2 for customer master logical file two) uses some of the fields in the physical file CUSMSTP. Another logical file can name all fields, name fields in other physical files as well, concatenate fields, change the order of fields, rename fields, or choose different key fields. In this logical file, the programmer merely omitted some fields from the physical file.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A* 00020A* SAMPLE LOGICAL FILE (CUSMSTL2) 00030A* 00040A (1)UNIQUE 00050A R CUSREC (2)PFILE(CUSMSTP) 00060A TEXT('Logical File Master Record') 00070A ACTNUM (3) 00080A NAME (3) 00090A ADDR (3) 00100A (4)K ACTNUM A