Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
XREF Details (↑ Compiler Control)
◄Key► ◄Summary► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
This directive has no effect if the LIST directive is not specified.
Specifying XREF sets RESEQ.
To produce the cross-reference listing the compiler needs extra
work space on the disk. The space needed depends on the number of
data items and procedure names and the number of times they are
referenced.
When the XREF directive is specified, extra information is added to
the end of the .LST file produced:
the name of the data item
the type of the data item
the line number where the data item was defined, shown as n#
the line numbers where the data item was updated, shown as n*
the line numbers where the data item was tested, shown as n?
the number of times the data item appeared in the cross-reference
listing, shown as (X n)
procedure name
type of procedure
The following is an extract from a .LST file for a simple program:
1 WORKING-STORAGE SECTION.
2 01 A PIC 9(2).
3
4 PROCEDURE DIVISION.
5 main section.
6 MOVE 1 TO A
7 IF A = 1 DISPLAY "HELLO" END-IF
8 stop run.
...
* A Numeric DISPLAY
* 2# 6* 7? (X 3)
*
* 1 data-names
*
* MAIN Section
* 5# (X 1)
*
*
* 1 procedure-names
* End of cross reference listing
The cross-referencing information shows that there is one data item,
A, of type numeric display, which is defined on line 2, updated on
line 6, and tested on line 7. The (X 3) at the end of the line
refers to the number of times the data item appears in the
cross-reference listing. The procedure name Main also appears in the
listing, as a Section which is referenced only once.
See also ◄RESEQ►
-♦-