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

5- 6
Figure 5-4. Using a Preexecution-Time Table
Comments
1 This line defines the ORDER file containing the items to be
printed on the invoices.
2 This line defines the WGHRATE table file on disc. The File
Extension Specification on line 4 describes the table in detail.
3 This line defines the INVOICE file. It is a report file
assigned to the printer.
4 This line defines the WGHRATE table.
Columns 11-18 contain WGHRATE to identify the table file.
WGHRATE is loaded into the program before it is executed.
Columns 27-32 contain TABWGT to define the weight table.
Columns 33-35 contain 1 to specify that there is one weight
table entry and one rate table entry per record.
Columns 36-39 contain 30 to specify that there are 30 elements
in each table.
Columns 40-42 contain 3 to specify that the length of each
weight table element is 3 positions.
Column 44 contains 1 to specify that each weight table element
has one decimal place (fractions of a pound are possible).
Columns 46-51 contain TABRAT to define the rate table as an
alternating table.
Columns 52-54 contain 3 to specify the length of the rate table
element.
Column 56 contains 2 to specify that each rate table element has
2 decimal places.
5 This line begins the description of record 01 in the ORDER file.