The -XREF Option

The -XREF option produces an alphabetical cross-reference listing of every label and variable name used in the program. The listing is saved in a file whose name is made up of the source filename and a suffixed .L . The record ID of the program listing in the listing file is the same as the record ID in the program file.

Consider the following example:

>BASIC BP DATE.INT -XREFCompiling: Source = 'PB/DATE.INT', Object = 'BP.O/DATE.NT'


Compilation Complete.
>ED BP.L DATE.INT13 lines long.

----: P0001: BP.L/DATE.INT Source Listing
0002: 
0003: 
0004: Cross Reference Listing
0005: 
0006: Variable....... Type.......... 
References........................
 ............
0007: 
0008: DATE            Local Scalar   0003=    0004    
0009: 
0010: *  Definition of symbol
0011: =  Assignment of variable
0012: !  Dimension
0013: @  Argument to CALL

The listing shows three columns: Variable, Type, and References. Variable is the name of the variable or symbol. Type is one of the following symbol types:

Local Scalar
Local Array
Common Scalar
Common Array
Argument
Variable used in SUBROUTINE statement
Array Arg
Variable used in MAT clause
@variable
One of the system @variables
Label
A program label, as in GOTO FOO
Named Common
Name of a named common segment
Predefined EQU
Predefined equate like @FM, @VM, and so on
Equate
User-defined equate

References shows the numbers of all lines in the program that refer to the symbol. Each line number can have a symbol after it to indicate what the line contains:

*
Definition of symbol
=
Assignment of variable
!
Dimension of array
@
Argument to CALL statement