Sample program using the TITLE instruction

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 23. The TITLE instruction at statement 7 is printed because it contains a variable symbol.

Figure 23. 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

[ Top of Page | Previous Page | Next Page | Contents | Index ]