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

1: 6
first record with control level fields, the program performs
total-time calculations and output (including total-time
overflow output). Total-time operations are all those
calculations with L0-L9 or LR indicator entries in the Control
Level Field (columns 7-8) and output operations of record type
T. These operations are done after each control break occurs or
after the last input record is read, but before the information
on the input record selected in Step 4 is actually made
available for processing. The program also sets all resulting
indicators as specified. If there are no more records to
process in any of the files, the LR indicator is turned on,
output tables and arrays are written, all files are closed and
the program ends.
7 Data Movement
The program moves the data from the record selected into the
input fields for processing. If this is a matching record, it
sets the matching-record (MR) indicator. If this is a
look-ahead record, the program reads the look-ahead fields and
moves them into the input fields. If input chaining is used,
the chained file(s) are read, their records identified and their
fields moved to the data area.
8 Detail-Time Calculations
The program performs detail-time calculations for the record
specified, and returns to Step 2. Detail-time calculations are
those calculations not conditioned by control-level indicators
in the Control Level Field (columns 7-8.) Notice that these
calculations and the detail-time output, described in Step 2,
are both done after the information (from the record selected in
Step 4) becomes available. They are usually based on
information from this record. At this point, the program also
turns on resulting indicators used with these calculations.