HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Sample program using the TITLE instruction

HLASM Language Reference
SC26-4940-06

The following example shows three TITLE instructions:
PGM1     TITLE 'The First Heading'
PGM1     CSECT
         USING PGM1,12             Assign the base register
         TITLE 'The Next Heading'
         LR    12,15               Load the base address
&VARSYM  SETC 'Value from Variable Symbol'
         TITLE 'The &VARSYM'
         BR    14                  Return
         END
After the program is assembled, the characters PGM1 are placed in bytes 73 to 76 of all object records, and the heading appears at the top of each page in the listing as shown in Figure 1. The TITLE instruction at statement 7 is printed because it contains a variable symbol.
Figure 1. Sample program using TITLE instruction
PGM1     The First Heading                                                                                     Page    3
  Active Usings: None
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
000000                00000 00004     2 PGM1     CSECT                                                          LRM00020
                 R:C  00000           3          USING PGM1,12             Assign the base register
PGM1     The Next Heading                                                                                      Page    4
  Active Usings: PGM1,R12
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
000000 18CF                           5          LR    12,15               Load the base address
                                      6 &VARSYM  SETC 'Value from Variable Symbol'
                                      7          TITLE 'The &VARSYM'
PGM1     The Value from Variable Symbol                                                                        Page    5
  Active Usings: PGM1,R12
  Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
000002 07FE                           8          BR    14                  Return
                                      9          END                                                             LRM00090

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014