FIFO (First-In First-Out) keyword for physical and logical files

You can use this file-level keyword to specify that if records with duplicate key values are retrieved from the same physical or logical file member, they are to be retrieved in a first-in first-out (FIFO) order.

This keyword has no parameters.

FIFO is not allowed with an first-changed first-out (FCFO), last-in first-out (LIFO), UNIQUE, or REFACCPTH keyword.

If you do not specify FCFO, LIFO, FIFO, or UNIQUE, records with duplicate key values are retrieved in FIFO, LIFO, or FCFO order, but the order in which they are retrieved is not guaranteed.

At least one key field must be specified in a file containing the FIFO keyword. The FIFO keyword is not valid when you specify FILETYPE(*SRC) on the Create Physical File (CRTPF) or Create Logical File (CRTLF) command.

Example

The following example shows how to specify the FIFO keyword for a physical file.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A                                      FIFO
00020A          R CUSREC                    TEXT('CUSTOMER RECORD')
00030A            CUSNAMEF      10A
00040A            CUSNAMEM       1A
00050A            CUSNAMEL      10A
00060A          K CUSNAMEL
     A