Positions 71-76 (Resulting Indicators)
These positions can be used, for example, to test the value of a result
field after the completion of an operation, or to indicate conditions like
end-of-file, error, or record-not-found. For some operations, you can control
the way the operation is performed by specifying different combinations of
the three resulting indicators (for example, LOOKUP). The resulting indicator
positions have different uses, depending on the operation code specified.
See the individual operation codes in Operation Codes for a description
of the associated resulting indicators. For arithmetic operations, the result
field is tested only after the field is truncated and half-adjustment is done
(if specified). The setting of indicators depends on the results of the tests
specified.
- Entry
- Explanation
- Blank
- No resulting indicator specified
- 01-99
- General indicators
- KA-KN, KP-KY
- Function key indicators
- H1-H9
- Halt indicators
- L1-L9
- Control level indicators
- LR
- Last record indicator
- OA-OG, OV
- Overflow indicators
- U1-U8
- External indicators
- RT
- Return indicator.
Resulting indicators cannot be used when the result field uses a non-indexed array.
If the same indicator is used as a resulting indicator on more than one calculation specification, the most recent specification processed determines the status of that indicator.
Remember the following points when specifying resulting indicators:
- When the calculation operation is done, the specified resulting indicators are set off, and, if a condition specified by a resulting indicator is satisfied, that indicator is set on.
- When a control level indicator (L1 through L9) is set on, the lower level indicators are not set on.
- When a halt indicator (H1 through H9) is set on, the program ends abnormally at the next *GETIN point in the cycle, or when a RETURN operation is processed, unless the halt indicator is set off before the indicator is tested.