Record ID Data Format

In order to allow different formats for different groups (or tables) of data, each of which have an unpredictable number of entries, a Record ID is assigned to each output record to identify the type of record and control layout formatting. An application can group data fields that are to be formatted together as an entity into Data Records with a specific Record ID. For example, in a bank statement, the data fields for a check transaction might be grouped together with a Record ID identifying that record as a check transaction. The PAGEDEF would then define a special layout format for a check transaction with a matching Record ID (see Record Formatting Examples for detailed examples).

Record formatting in PPFA is achieved by identifying each input record in the data file with a 10-byte ID, similar to an expanded carriage control (CC) (see Basic Controls in Record Format Line Data for additional information). Each record in the data file must contain a Record ID if record formatting is used. The Record ID must be the first 10 bytes in every print record in the data file.

Even though the Record ID is specified as a character string, the Record ID is treated as a hexadecimal string, not a character string. This means there is no translation from ASCII to EBCDIC or vice versa when the Record ID is processed. The Record ID in the input data must match exactly the string specified for the LAYOUT Record ID in the page definition in order for correct processing to occur.

When a record is read from the data file at print time, the print server uses the 10-byte Record ID to determine which LAYOUT command in the page definition should be used to format the record.

TRCs (Table Reference Characters) cannot be used with record format data. If you have TRCs in the data and tell the print server that TRCs are present at print time, the print server uses the TRC byte as the first byte of the Record ID, and the Record ID is not recognized as such.

Data files can contain both carriage controls and Record IDs. If your data file is mixed mode (line data plus MO:DCA structured fields), then you must have a CC byte in the data. The CC byte is not counted as part of the 10-byte Record ID. If your file is plain line data, then CCs are allowed but not required. (See Basic Controls in Record Format Line Data for additional information.)