This page outlines the conditions under which various RPG indicators are set on or off and the times during the execution of each iteration of the RPG object module at which the indicators are set.
The condition of any indicator may be governed by SETON and SETOF operations included among the calculation specifications. The RPG object module will turn indicators on only if the conditions specified in the RPG specifications are met, that is, last record (LR), matching record (MR), and overflow (OV or OA, OB, ... OG). In addition, certain conditions may arise that will cause the RPG object module to set on the halt indicator HO. These conditions are listed below. Unless the HO indicator is turned off by a SETOF operation (entered in the calculation specifications), the object module will terminate before the next input record is read. The RPG object module will turn on indicator HO whenever the program:
Indicators |
Where Specified |
Where Used |
Turned On |
Turned Off |
Notes |
Resulting Indicator 00 | Internal | Output Indicators on Output Specifications (columns 24-25, 27-28, 30-31) | This Indicator is always ON | Can never be turned OFF | |
Resulting Indicators (01 - 99) |
Input Specifications (columns 19-20) | Indicators on Calculation Specifications
(columns 10-11, 13-14, 16-17)
Output Indicators on Output Specifications (columns 24-25, 27-28, 30-31) |
When specified record type has been read and is ready for processing | Before the first record is read on the next processing cycle | Turning OFF and ON can also be accomplished by using SETON and SETOF operation codes |
Calculation Specifications (columns 54-55, 56-57, 58-59) | Same as above | Whenever the specified field status condition is satisfied | The next time that this field status is to be tested | Same as above | |
Field Indicators (01 - 99) | Input Specifications (columns 65-66, 67-68, 69-70) | Same as above | Same as above | Same as above | Same as above |
Halt Indicators (H0 - H9) | Input Specifications (columns 65-66,
67-68, 69-70)
Calculation Specifications (columns 54-55, 56-57, 58-59) |
Same as above | Same as above
H0 is automatically turned on for the conditions listed in the text above |
Can only be turned OFF by SETOF operation code (see note at right) | If these indicators remain ON, the object program will terminate before reading the next record |
LR | Internal | Same as above and Calculation Specifications (columns 7-8) | After processing the last record of the last file | All Control Level Indicators (L1 - L9) are also turned ON when the LR is turned ON | |
Control Level Indicators (L1 - L9) |
Input Specifications (columns 59-60) | Same as above and Calculation Specifications (columns 7-8) | When the value in a control field changes. All indicators of the lower levels are also turned ON | Before the first record is read on the next processing cycle | Turning OFF and ON can be accomplished by using SETON and SETOF operation codes |
L0 | Internal | Indicators on Calculations Specifications
(columns 10-11, 13-14, 16-17)
Output Indicators on Output Specifications (columns 24-25, 27-28, 30-31) |
This indicator is always ON | Can never be turned OFF | |
MR | Internal | Same as above | When multiple input files and the matching fields specification are used, this indicator is turned ON if a secondary file record matches the primary file record | Before the first record is read on the next processing cycle | |
Overflow Indicators (OA, OB, OC, OD, OE, OF, OG, OV) | File Description (columns 33-34) | Same as above | One line after channel 12 of the carriage control tape is sensed | After the detail and heading records are written | These indicators remain ON for one complete processing cycle |
1P | Internal | Output Indicators on Output Secifications (columns 24-25, 27-28, 30-31) | This indicator is ON at the beginning of processing before any records are read | Before the first record is read | This indicator is used to govern printing of the first page of the report |
This page was last updated on January 17, 2015.