XREF
Use XREF
to produce a sorted cross-reference
listing.
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)
will be in effect.
A section of the listing shows all the program-names, data-names, and procedure-names that are referenced in your program, and the line numbers where those names are defined. External program-names are identified.
Example: XREF output: data-name cross-references
Example: XREF output: program-name cross-references
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.
Example: XREF output: COPY/BASIS cross-references
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; they are
shown before the EBCDIC data-names and procedure-names unless the DBCSXREF
installation
option is selected with a DBCS ordering program. In that case, DBCS
data-names and procedure-names are in the order 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
- Group names used in a
MOVE CORRESPONDING
statement are in theXREF
listing. The elementary names in those groups are also listed. - In the data-name
XREF
listing, line numbers that are preceded by the letterM
indicate that the data item is explicitly modified by a statement on that line. XREF
listings take additional storage.- If there is more than one data set in
your SYSLIB concatenation, in some cases the
COPY/BASIS
cross-reference might be incomplete or missing. This loss can occur ifXREF
is set only in aCBL
orPROCESS
statement, andXREFOPT=NO
is set as an installation default orNOXREF
is coded in your JCLPARM
parameter.To ensure that the
COPY/BASIS
cross-reference is complete, either verify with your system programmer thatXREFOPT=FULL
orXREFOPT=SHORT
is your installation default, or code theXREF
option in your JCLPARM
parameter.
Language Environment® Debugging Guide (COBOL compiler options)