Use this record-level keyword to identify the physical file(s) containing the data to be accessed through the record format that you are defining.
PFILE([library-name/]physical-file-name [.32])
The PFILE keyword is required on every record format in a simple or multiple format logical file. This keyword is similar to the JFILE keyword except that it identifies this file as a simple or multiple format logical file; the PFILE keyword is not allowed with the JFILE keyword. Up to 32 physical file names can be specified on PFILE keywords in a logical file. If the maximum is being used, 32 physical file names can be specified on one record format (using one PFILE keyword) or 32 physical file names can be distributed among 32 record formats; or, file names can be unevenly distributed among record formats. In any case, the maximum number of physical file names allowed is 32. For restrictions on specifying multiple physical files when creating a logical file, see the appropriate high-level language manual.
For each physical-file-name, a library-name is optional. If the library-name is omitted, the library list (*LIBL) that is in effect at file creation time is used.
For instance, if FLD1 and FLD2 occur in physical files PF1, PF2, and PF3, but FLD3 occurs only in PF3, you cannot specify FLD3 in a logical file record format based on PF1 and PF2. To provide access to FLD3, either specify a second logical file record format that includes FLD3 or use a join logical file.
You cannot use a simple or multiple format logical file to bring together into one record format fields from separate physical files. Use a join logical file to accomplish this. A record read through the use of a record format in a simple or multiple format logical file can contain data from only one physical file, and a record written through the use of a record format in a logical file can be stored only in one physical file.
Distributed data management (DDM) files are allowed on the PFILE keyword only when the logical file is being created on a remote system.
The following examples show how to specify the PFILE keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R LOGRCD1 PFILE(PF1) A
In this example, LOGRCD1 can use fields only in PF1.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R LOGRCD2 PFILE(PF1 PF2) A : A : 00020A R LOGRCD3 PFILE(PF1 PF2 PF3) A : A : A
In this example, LOGRCD2 must use fields common to PF1, and PF2, and LOGRCD3 must use fields common to PF1, PF2, and PF3.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A R LOGRCD4 PFILE(PF1) A : A : 00020A R LOGRCD5 PFILE(PF2) A : A : 00030A R LOGRCD6 PFILE(LIB1/PF6) A
In this example, LOGRCD4, LOGRCD5, and LOGRCD6 can have unique fields. LOGRCD6 specifies a qualified physical-file name.