RPG Indicators [ HP RPG/XL Programmer's Guide ] MPE/iX 5.0 Documentation
HP RPG/XL Programmer's Guide
RPG Indicators
RPG turns indicators on and off during the RPG logic cycle to indicate
that certain processing events have occurred. You can use the settings
of the indicators to select the specifications to perform in your
program. For instance, control fields trigger total operations such as
printing total lines on a report. To define a control field, you assign
a control-level indicator (L1-L9) to it on the Input Specification. When
this input field changes, RPG turns on the control-level indicator.
Then, at the proper time in the logic cycle, RPG performs those
specifications conditioned by the indicator you selected. Figure 1-2
shows how control-level indicators fit into the RPG logic cycle.
Figure 1-2. Control-Level Indicators and Total/Detail Processing
The control-level indicators, as well as the other RPG indicators, are
described below. The last section in this chapter titled "More About the
RPG Logic Cycle" explains when these indicators are turned on and off and
how they are used in the logic cycle. The RPG indicators are:
Indicator Description
Command Key (KA-KN, Lets you control read and write operations on
KP-KY) the terminal when using RSI terminal files.
Control-Level (L1-L9) Lets you sense and perform total operations,
such as printing part number totals on a
report.
First-Page (1P) Lets you sense when the first record is
processed and lets you perform first record
processing.
Function Key (F1-F9) Lets you use function keys with VPLUS and with
the Calculation Specification operations, SET,
DSPLY and DSPLM.
General (01-99) Lets you control operations on Input,
Calculation and Output Specifications.
Field indicators are a special kind of general
indicator used with Input Specifications. They
test input fields for plus, minus, zero or
blanks. Field indicators are turned on after
total-time processing and remain on until after
the next total-time cycle.
Halt (H1-H9) Stops an RPG program at the end of the current
logic cycle. You can stop an RPG program based
on record codes, field and result values. Once
the program is stopped, the operator can resume
it by entering an appropriate error response.
To avoid halts, you can enter pre-responses to
individual errors using the Header
Specification.
Last-Record (LR) Lets you sense when the last record is
processed and lets you perform last record
processing.
Overflow (OA-OG, OV) Signals the logical end of the printed page.
Overflow indicators are turned on when the
overflow line is printed. Sensing overflow
lets you perform output operations at the
bottom of the current page or at the top of the
next page.
Matching Record (MR) Lets you select the processing order of input
records when using more than one input file.
This indicator is turned on after total-time
processing in the logic cycle is performed.
User (U1-U8) Allows communication between RPG programs.
User indicators are read into the program when
it starts and are passed to the next RPG
program upon termination. For more information
on user indicators see the "Communicating
Switches" section of Chapter 8.
MPE/iX 5.0 Documentation