ILE RPG Language Reference
Rules for Assigning Record Identifying Indicators
When you assign record identifying indicators to records in a program
described file, remember the following:
- You can assign the same indicator to two or more different record
types if the same operation is to be processed on all record types.
To do this, you specify the record identifying indicator in positions
21 and 22, and specify the record identification codes for the various
record types in an OR relationship.
- You can associate a record identifying indicator with an AND relationship,
but it must appear on the first line of the group. Record identifying
indicators cannot be specified on AND lines.
- An undefined record (a record in a program described file that
was not described by a record identification code in positions 23
through 46) causes the program to halt.
- A record identifying indicator can be specified as a record identifying
indicator for another record type, as a field indicator, or as a resulting
indicator. No diagnostic message is issued, but this use of indicators
may cause erroneous results.
When you assign record identifying indicators to records in an
externally described file, remember the following:
- AND/OR relationships cannot be used with record format names;
however, the same record identifying indicator can be assigned to
more than one record.
- The record format name, rather than the file name, must be specified
in positions 7 through 16.
For an example of record identifying indicators, see Figure 14.
Figure 14. Examples of Record Identifying Indicators
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IFilename++SqNORiPos1+NCCPos2+NCCPos3+NCC................................
I........................Fmt+SPFrom+To+++DcField+++++++++L1M1FrPlMnZr....
*
I*Record identifying indicator 01 is set on if the record read
I*contains an S in position 1 or an A in position 1.
IINPUT1 NS 01 1 CS
I OR 1 CA
I 1 25 FLD1
* Record identifying indicator 02 is set on if the record read
* contains XYZA in positions 1 through 4.
I NS 02 1 CX 2 CY 3 CZ
I AND 4 CA
I 1 15 FLDA
I 16 20 FLDB
* Record identifying indicator 95 is set on if any record read
* does not meet the requirements for record identifying indicators
* 01 or 02.
I NS 95
*...1....+....2....+....3....+....4....+....5....+....6....+....7...
IRcdname+++....Ri........................................................
*
* For an externally described file, record identifying indicator 10
* is set on if the ITMREC record is read and record identifying
* indicator 20 is set on if the SLSREC or COMREC records are read.
IITMREC 10
ISLSREC 20
ICOMREC 20
[ Top of Page | Previous Page | Next Page | Contents |
Index ]