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:
  1. Optional: File-level entries
  2. Record-level entries
  3. Optional: Field-level entries
  4. Optional: Key field-level entries
  5. Optional: Select and omit-field level entries

Repeat steps 2 through 5 for each record format in the file.

The following example shows a multiple format logical file coding example.

|...+....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
Related concepts
DDS logical files with more than one record format
Related reference
Positional entries for physical and logical files (positions 1 through 44)
Name for physical and logical files (positions 19 through 28)
Length for physical and logical files (positions 30 through 34)
Data type for physical and logical files (position 35)