Automating layout usage with XREF
File-AID provides a special function, option 7 XREF, for automating the selection and usage of record layouts for files with different record types. These files have different records that are described by more than one record layout. File-AID determines the record layout to use for each different record type by the value in one or more data fields in each record. These data fields are typically referred to as record type fields.
With the XREF function, you can create a permanent member of a PDS that contains the rules for selecting a record layout. The rules are based on the data conditions found in each record being processed by any of the following File-AID functions:
- Browse - formatted display mode and FPRINT command
- Edit - formatted display mode and FPRINT command
- Print - formatted data record printing
- Selection - formatted selection criteria specification
- Reformat - source layout and record selection
- Compare - formatted field comparison and differences reporting.
XREF layouts are compiled when needed by the function.
In addition to defining layout member selection rules for multi-record type files, the XREF function can also be used to describe the rules for selecting layouts for a file with records that require different layouts to define each of several possible segments of one record. The procedure for defining segmented record XREF members is discussed in Segmented Record File Layout Automation.
The XREF function uses the actual record layouts themselves to define the rules for selecting a layout when the formatted display of a data record is requested in any File-AID function. Using a formatted display of a record layout as a template, you establish layout selection rules by entering data value(s) in the record type field(s).
Optionally, you can specify layout selection conditions with unformatted criteria. XREF layout selection criteria specification is similar to defining record selection criteria in other functions of File-AID (for example, Selection and Search/Update).
This section provides information about the following topics: