XREF Option

<xref control option>

──┬─ $ ──┬─┬─────────┬─ XREF ─────────────────────────────────────────┤
  └─ $$ ─┘ ├─ RESET ─┤
           └─ SET ───┘

Explanation

If set, the compiler generates cross-reference information containing an alphabetized list of identifiers that appear in the program. For each identifier, the compiler generates the type of the item named by that identifier, the sequence number of the source input record on which the identifier is declared, the sequence number of the source input record on which the identifier is referenced, and other relevant information.

The cross-reference information is written to a disk file in raw form. The compiler initiates SYSTEM/XREFANALYZER to process this file. This information is discarded if any syntax errors occur during compilation.

If used, this option should be SET before any source input has been processed. Once SET, attempts to RESET it are ignored.

Example

The following partial job sets the XREF option to generate a printer backup file containing cross-reference information:

$SET XREF
BEGIN JOB ZZZ;
...
END JOB