HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Effects of LIBMAC and PCONTROL(MCALL) options

HLASM Programmer's Guide
SC26-4941-06

When you specify different combinations of the LIBMAC and PCONTROL(MCALL) assembler options to assemble the same source program, the definition statement and reference statement numbers can be different in each assembly listing.

The example that follows shows how these options affect the output from an assembly of the same source program. The source program is coded as follows:
          MACOUTER
          END
The assembly of this program uses the following library members:
MACOUTER:
A macro definition that issues a call to macro MACINNER.
MACINNER:
A macro definition that copies member COPYCODE.
COPYCODE:
A member containing an MNOTE instruction.
The following four figures illustrate the effects of using the various combinations of the LIBMAC and PCONTROL(MCALL) assembler options.
Figure 1 shows the output when you specify the LIBMAC and PCONTROL(MCALL) options.
Figure 1. Assembly with LIBMAC and PCONTROL(MCALL) options
                                                                                                               Page    2
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
                                      1          MACRO                                                          00001000
                                      2          MACOUTER                                                       00002000
                                      3          MACINNER                                                       00003000
                                      4          MEND                                                           00004000
                                      5          MACOUTER                                                       00001000
                                      6          MACRO                                                          00001000
                                      7          MACINNER                                                       00002000
                                      8          COPY COPYCODE                                                  00003000
                                      9          MNOTE *,'MNOTE FROM MEMBER COPYCODE'                           00001000
  ┌────────────────────────────┐     10          MEND                                                           00004000
  │ This line produced because ├────>11+         MACINNER                                                       01-00003
  │ PCONTROL(MCALL) specified  │     12+*,MNOTE FROM MEMBER COPYCODE                                            02-00008
  └────────────────────────────┘     13          END                                                            00002000

                                          Macro and Copy Code Source Summary                                   Page    3
 Con Source                                        Volume    Members                        HLASM R6.0  2008/07/11 17.48
  L1 TEST     MACLIB   A1                          ADISK     COPYCODE MACINNER MACOUTER

                                          Macro and Copy Code Cross Reference                                  Page    4
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2008/07/11 17.48
COPYCODE   L1  MACINNER            -  8C
MACINNER   L1  MACOUTER            7X 11
MACOUTER   L1  PRIMARY INPUT       2X 5
Figure 2 shows the output when you specify the LIBMAC and NOPCONTROL options.
Figure 2. Assembly with LIBMAC and NOPCONTROL options
                                                                                                               Page    2
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
                                      1          MACRO                                                          00001000
                                      2          MACOUTER                                                       00002000
                                      3          MACINNER                                                       00003000
                                      4          MEND                                                           00004000
                                      5          MACOUTER                                                       00001000
                                      6          MACRO                                                          00001000
                                      7          MACINNER                                                       00002000
                                      8          COPY COPYCODE                                                  00003000
                                      9          MNOTE *,'MNOTE FROM MEMBER COPYCODE'                           00001000
                                     10          MEND                                                           00004000
                                     11+*,MNOTE FROM MEMBER COPYCODE                                            02-00008
                                     12          END                                                            00002000

                                          Macro and Copy Code Source Summary                                   Page    3
 Con Source                                        Volume    Members                        HLASM R6.0  2008/07/11 17.48
  L1 TEST     MACLIB   A1                          ADISK     COPYCODE MACINNER MACOUTER

                                          Macro and Copy Code Cross Reference                                  Page    4
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2008/07/11 17.48
COPYCODE   L1  MACINNER            -  8C
MACINNER   L1  MACOUTER            7X 10
MACOUTER   L1  PRIMARY INPUT       2X 5
Figure 3 shows the output when you specify the NOLIBMAC and PCONTROL(MCALL) options.
Figure 3. Assembly with NOLIBMAC and PCONTROL(MCALL) options
                                                                                                               Page    2
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
   ┌────────────────────────────┐     1          MACOUTER                                                       00001000
   │ This line produced because ├────>2+         MACINNER                                                       01-MACOU
   │ PCONTROL(MCALL) specified  │     3+*,MNOTE FROM MEMBER COPYCODE                                            02-MACIN
   └────────────────────────────┘     4          END                                                            00002000

                                          Macro and Copy Code Source Summary                                   Page    3
 Con Source                                        Volume    Members                        HLASM R6.0  2008/07/11 17.48
  L1 TEST     MACLIB   A1                          ADISK     COPYCODE MACINNER MACOUTER

                                          Macro and Copy Code Cross Reference                                  Page    4
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2008/07/11 17.48
COPYCODE   L1  MACINNER            -  1C
MACINNER   L1  MACOUTER            -  2
MACOUTER   L1  PRIMARY INPUT       -  1
Figure 4 shows the output when you specify the NOLIBMAC and NOPCONTROL options.
Figure 4. Assembly with NOLIBMAC and NOPCONTROL options
                                                                                                               Page    2
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
                                      1          MACOUTER                                                       00001000
                                      2+*,MNOTE FROM MEMBER COPYCODE                                            02-MACIN
                                      3          END                                                            00002000

                                          Macro and Copy Code Source Summary                                   Page    3
 Con Source                                        Volume    Members                        HLASM R6.0  2008/07/11 17.48
  L1 TEST     MACLIB   A1                          ADISK     COPYCODE MACINNER MACOUTER

                                          Macro and Copy Code Cross Reference                                  Page    4
Macro     Con  Called By        Defn  References                                            HLASM R6.0  2008/07/11 17.48
COPYCODE   L1  MACINNER            -  1C
MACINNER   L1  MACOUTER            -  1
MACOUTER   L1  PRIMARY INPUT       -  1

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014