Simple- and multiple-format logical files in DDS
You must specify the PFILE keyword at the record level for simple- and multiple-format logical files. In a multiple-format logical file, a record format can use only the fields common to all the physical files specified on the PFILE keyword for that record format.
Specify the entries in the following order to define
a simple- or multiple-format logical file:
- Optional: File-level entries
- Record-level entries
- Optional: Field-level entries
- Optional: Key field-level entries
- Optional: Select/omit field-level entries
Repeat steps 2 through 5 for each record format in the file.
The following example shows the code for a multiple-format logical file.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A* LOGICAL FILE EXAMPLE
00020A* INVENTORY FORMAT
00030A R INVFMT PFILE(INVENTORY)
00040A K ITEM
00050A*
00060A* ORDER FORMAT
00070A R ORDFMT PFILE(ORDER)
00080A TEXT('ORDER ANALYSIS')
00090A ITEM
00100A ORDER 10
00110A SUPPLY +2
00120A SHPDAT CONCAT(SHPMO SHPDA SHPYR)
00130A QTY 5P RENAME(QTYDUE)
00140A K ITEM
00150A K SHPYR
00160A K SHPMO
00170A K SHPDA
00180A O QTYDUE CMP(LT 1)
00190A*
00200A* ACCOUNTING FORMAT
00210A R ACTFMT PFILE(ACCOUNTS)
00220A FORMAT(ACCOUNTL)
00230A K ITEM
A