Use XREF to get a sorted cross-reference listing.
XREF option syntax .-XREF-+---------------+-. | | .-FULL--. | | | '-(-+-SHORT-+-)-' | >>-+------------------------+---------------------------------->< '-NOXREF-----------------'
Default is: XREF(FULL)
Abbreviations are: X|NOX
You can choose XREF, XREF(FULL), or XREF(SHORT). If you specify XREF without any suboptions, XREF(FULL) is in effect.
A section is included in the listing that lists all the program-names, data-names, and procedure-names that are referenced in your program and the line numbers where they are defined. External program-names are identified.
A section is also included that cross-references COPY or BASIS statements in the program with the data sets or files from which associated copybooks were obtained.
EBCDIC data-names and procedure-names are listed in alphanumeric order. DBCS data-names and procedure-names are listed based on their physical order in the program, and appear before the EBCDIC data-names and procedure-names unless the DBCSXREF installation option is selected with a DBCS ordering program. In this case, DBCS data-names and procedure-names are ordered as specified by the DBCS ordering program.
If you use XREF and SOURCE, data-name and procedure-name cross-reference information is printed on the same line as the original source. Line-number references or other information appears on the right-hand side of the listing page. On the right of source lines that reference an intrinsic function, the letters IFN are printed with the line number of the locations where the function arguments are defined. Information included in the embedded references lets you know if an identifier is undefined (UND) or defined more than once (DUP), if items are implicitly defined (IMP) (such as special registers or figurative constants), or if a program-name is external (EXT).
If you use XREF and NOSOURCE, you get only the sorted cross-reference listing.
XREF(SHORT) prints only the explicitly referenced data items in the cross-reference listing. XREF(SHORT) applies to DBCS data-names and procedure-names as well as to single-byte names.
NOXREF suppresses this listing.
Usage notes
related concepts
Debugging
related tasks
Getting listings
related references
Language Environment Debugging Guide (COBOL compiler options)