Documente Academic
Documente Profesional
Documente Cultură
Date 19-Sep-2005
Manu Soman
Contents
What are Indicators Part I
Indicators on RPG/400
Part II
More on Indicators
Part III
Usage of Indicators
Part IV
Indicators Referred to As Data
provide information about the result of an instruction performed in by the program. itself.
1 ON True 0 OFF False
More ..
Indicators are defined either by an entry on the specification or
Types of Indicators
General Indicators 01 to 99 These indicators can be used for any purpose for controlling I/O
LR 1P QA QG, QV H1 to H9 KA to KY L1 to L9 M1 to M9, MR U1 to U8
Last Record First Page Overflow indicators Halt Indicators Function Keys Level Break Indicators Matching Records External Indicators
Indicator Example
Types
Overflow Indicators Record Identifying Indicators Control Level Indicators Field Indicators Resulting Indicators
Overflow Indicators
Overflow Indicators are used to check whether the last line of a
PRINTER files.
for processing.
This is defined on input specifications from positions 19 to 20.
The valid record identifying Indicators are
01 - 99
H1 - H9
L1 - L9 LR
U1 - U9
RT
10
11
Field Indicators
Field Indicators are used to determine if the specified element is
to check for an error condition in the field or array element as it is read into the program.
12
Resulting Indicators
The purpose of the resulting indicators depends on the Operation
after an arithmetic operation, to identify a record-not-found condition, to indicate an exception/error condition for a file operation, or to indicate an end-of-file condition.
You can specify resulting indicators in three places (positions
13
Example
14
15
Types
External Indicators Internal Indicators Return indicator
16
External Indicators
External indicators are through U1 and U8 and these can be set
up in a CL or RPG program.
The status of the external indicators can be changed in the
program by specifying them as resulting indicators on the calculation specifications or as field indicators on the input specifications.
Setting the external indicators on or off in the program has no
17
Internal Indicators
Internal indicators are of 3 types First Page Indicator Last Record Indicator Matching Record Indicator
18
Return Indicator
Return Indicator is used to indicate to the internal RPG/400 logic
indicator, or a field indicator and can also be used as a conditioning indicator for calculation or output operations.
19
20
Types
Indicators are also used to represent a certain condition, which
are as follows..
File Conditioning Indicators Function Key Indicators
Halt Indicators
Indicators conditioning Calculations
21
program is called, the file is not opened and file operations for that file are ignored while the program is running.
A file conditioning entry can be made for input, output, update,
or combined files.
..FFilenameIPEAF........L..I........Device+......KExit++Entry+A....U1.. FADDDSP CF E WORKSTN UC
22
device if associated function keys are specified in the data description specifications.
The function key indicators correspond to function keys 1
through 24. Function key indicator KA corresponds to function key 1, KB to function key 2 . . . KY to function key 24.
Function key indicators that are set on can then be used to
condition calculation or output operations and can also be set off by the SETOF operation.
23
Halt Indicators
Halt indicators are used to indicate errors during the running of the program.
If a halt indicator is on, a message is issued to the user of which the following responses are valid:
If a halt indicator is on when a RETRN operation is processed or when the LR indicator is on, the called program ends abnormally.
24
calculation is done.
Indicators to condition calculations can be specified in positions
25
26
*IN
The array *IN is a predefined array of 99 one-position, character
elements representing the indicators 01 through 99. The elements of the array should contain only the character values '0' (zero) or '1' (one).
Moving a character '0'or '1' or *OFF or *ON to any of these
27
*INxx
The field *INxx is a predefined one-position character field
to *INxx.
28
Quiz
29
Thank You
30