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 beginning 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
LPSAMP01 Sample Program - LRSAMP01 - HLASM                                                                     Page    3
  Active Usings: None
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2015/02/23 09.31
                                               2 ***********************************************************************
                                               3 *                                                                     *
                                               4 *  Licensed Materials - Property of IBM                               *
                                               5 *                                                                     *
                                               6 *  5696-234                                                           *
                                               7 *                                                                     *
                                               8 *  Copyright IBM Corporation 2008, 2015 All Rights Reserved.          *
                                               9 *                                                                     *
                                              10 *  US Government Users Restricted Rights - Use, duplication           *
                                              11 *  or disclosure restricted by GSA ADP Schedule Contract              *
                                              12 *  with IBM Corp.                                                     *
                                              13 *                                                                     *
                                              14 ***********************************************************************
LPSAMP01 The Program code title                                                                                Page    4
  Active Usings: None
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2015/02/23 09.31
00000000                00000000 00000004     16 LPSAMP01 CSECT
                        0000000C              17 R12     EQU 12
                        0000000E              18 R14     EQU 14
                        0000000F              19 R15     EQU 15
                    R:C 00000000              20   USING LPSAMP01,R12 Assign the base register
LPSAMP01 The Next Heading                                                                                      Page    5
  Active Usings: LPSAMP01,R12
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2015/02/23 09.31
00000000 18CF                                 22         LR R12,R15 Load the base address
                                              23 &VARSYM SETC 'Value from Variable Symbol'
                                              24         TITLE 'The &VARSYM' 
LPSAMP01 The Value from Variable Symbol                                                                        Page    6
  Active Usings: LPSAMP01,R12
  Loc    Object Code      Addr1    Addr2    Stmt  Source Statement                          HLASM R6.0  2015/02/23 09.31 
00000002 07FE                                 25         BR R14 Return 
                                              26         END