Macro and copy code cross-reference

This section of the listing shows the names of macros and copy code members and the statements where the macro or copy code member was called. You can use the assembler option MXREF(XREF) or MXREF(FULL) to generate this section of the listing.
Figure 1. Macro and copy code cross-reference
                                          Macro and Copy Code Cross Reference                                  Page   12
 1         2     3                4       5 
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2015/02/20 18.42
ASMDREG    L3  PRIMARY INPUT       -  25
MACSAMP    L1  PRIMARY INPUT       -  127
MEMSAMP    L2  PRIMARY INPUT       -  138C   6 
RETURN     L4  PRIMARY INPUT       -  157
SYSSTATE   L4  RETURN              -  158
 1 
The macro or copy code member name.
 2 
Shows the value that represents the input source concatenation, as listed in the Macro and Copy Code Source Summary (refer to Figure 1) and under the subheading Datasets Allocated for this Assembly in the Diagnostic Cross Reference and Assembler Summary (refer to Figure 1).
 3 
Shows either the name of the macro that calls this macro or copy code member, or the words PRIMARY INPUT indicating the macro or copy code member was called directly from the primary input source. If you use the COPY instruction to copy a macro definition, then references to the macro are shown as called by “PRIMARY INPUT”.
 4 
One of these:
  • The statement number for macros defined in the primary input file,
  • A dash (-) indicating the macro or copy code member was retrieved from a library.
 5 
The statement number that contains the macro call or COPY instruction.

Lookahead Processing: If a COPY instruction is encountered during lookahead, this is the number of the statement that causes lookahead processing to commence.

PCONTROL(MCALL) Assembler Option: If you specify the PCONTROL(MCALL) assembler option, and you copy a macro definition from an inner macro, the number that is shown against the copied member is one less than the statement number containing the inner macro call instruction. See Effects of LIBMAC and PCONTROL(MCALL) options for examples of assemblies that use different combinations of the LIBMAC and PCONTROL(MCALL) options.

 6 
Statement numbers have a suffix of C when the reference is to a member named on a COPY instruction.
Figure 2 shows the format of the Macro and Copy Code Cross Reference when you specify the assembler option, LIBMAC.
Figure 2. Macro and copy code cross-reference—with LIBMAC option
                                          Macro and Copy Code Cross Reference                                  Page   38
                                    1 
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2015/04/14 08.16
ASMDREG    L3  PRIMARY INPUT      26X 226
MACSAMP    L1  PRIMARY INPUT     333X 345
MEMSAMP    L2  PRIMARY INPUT       -  356C
RETURN     L4  PRIMARY INPUT     376X 463
SYSSTATE   L4  RETURN            669X 1026
 1 
The X flag indicates that the macro was read from a macro library and embedded in the input source program immediately preceding the invocation of that macro. For example, in Figure 2, you can see that MACSAMP was called by the PRIMARY INPUT stream from LIBRARY L1, at statement number 345, after being embedded in the input stream at statement number 333. See Effects of LIBMAC and PCONTROL(MCALL) options for examples of assemblies that use different combinations of the LIBMAC and PCONTROL(MCALL) options.

You can suppress this section of the listing by specifying the NOMXREF assembler option.