HP RPG/XL Programmer's Guide (30318-90001)

6-: 9
compiler listing page. You can use it to print the program name on each
page, for example, or you can alter it from page to page to print
subroutine names.
To alter the title for the entire compiler listing, place a $TITLE
statement at the beginning of the program after the $CONTROL statement,
if there is one. When you use $TITLE, the top line of each page (except
the first) looks like this:
PAGE nnnn ($TITLE text)
Figure 6-10 shows how to use $TITLE to print a description of a program,
along with its name, at the top of each page of a compiler listing.
Figure 6-10. Using $TITLE to Change the Compiler Listing Title
Comments
1 This line specifies that the title, Calculate State Tax -
PAYRL5, appear at the top of each compiler listing page.
Using the RPG Compiler Listings
When you compile a program, one or more of the following listings is
produced:
* A listing of the source program. (Optionally, you can print just
those statements containing errors.)
* A Symbol Table listing.
* A Cross-Reference listing.
Each of these listings is discussed in detail in the following sections.
The Source Program Listing
When you compile a program, a full source listing is printed
automatically. It is printed using the device assigned to $STDLIST (or
RPGLIST). Source lines that contain errors are stamped with error
numbers. If the source lines contain potential errors, they are stamped
with a warning numbers. These warning and error numbers are printed
after the Symbol Table (or Cross-Reference listing, if there is one)
along with short explanations (see "Understanding RPG Compiler
Messages"). At the end of the source listing, indicators that are
defined but not referenced in the program, are listed.
You can turn off the source program listing anywhere in the program by
entering a $CONTROL statement with the NOLIST option. (see "$CONTROL").