Entries in positions 21 through 41 identify each record type in the input file. One to three identification codes can be entered on each specification line. More than three record identification codes can be specified on additional lines with the AND/OR relationship. If the file contains only one record type, the identification codes can be left blank; however, a record identifying indicator entry (positions 19 and 20) and a sequence entry (positions 15 and 16) must be made.
Three sets of entries can be made in positions 21 through 41: 21 through 27, 28 through 34, and 35 through 41. Each set is divided into four groups: position, not, code part, and character.
The following table shows which categories use which positions in each set.
*------------*----------*----------*--------* | CATEGORY | 21-27 | 28-34 | 35-41 | *------------*----------*----------*--------* | Position | 21-24 | 28-31 | 35-38 | *------------*----------*----------*--------* | Not | 25 | 32 | 39 | *------------*----------*----------*--------* | Code Part | 26 | 33 | 40 | *------------*----------*----------*--------* | Character | 27 | 34 | 41 | *------------*----------*----------*--------*
Entries in these sets need not be in sequence. For example, an entry can be made in positions 28 through 34 without requiring an entry in positions 21 through 27. Entries for record identification codes are not necessary if input records within a file are of the same type. An input specification containing no record identification code defines the last record type for the file, thus allowing the handling of any record types that are undefined. If no record identification codes are satisfied, control passes to the RPG/400 exception/error handling routine.
In these positions enter the position that contains the record identification code in each record. The position containing the code must be within the record length specified for the file. This entry must be right-adjusted, but leading zeros can be omitted.
Enter an N in this position if the code described must not be present in the specified record position.
This entry specifies what part of the character in the record identification code is to be tested.
The C entry indicates that the complete structure (zone and digit) of the character is to be tested.
The Z entry indicates that the zone portion of the character is to be tested. The zone entry causes the four high-order bits of the character entry (position 27) to be compared with the zone portion of the character in the record position specified in the position entry (positions 21 through 24). The following three special cases are exceptions:
The D entry indicates that the digit portion of the character is to be tested. The four low-order bits of the character are compared with the character specified by the position entry.
In this position enter the identifying character that is to be compared with the character in the position specified in the input record.
The check for record type always starts with the first record type specified. If data in a record satisfies more than one set of record identification codes, the first record type satisfied determines the record types.
When more than one record type is specified for a file, the record identification codes should be coded so that each input record has a unique set of identification codes.
The AND relationship is used when more than three record identification codes identify a record.
To use the AND relationship, enter at least one record identification code on the first line and enter the remaining record identification codes on the following lines with AND coded in positions 14 through 16 for each additional line used. Positions 7 through 13, 17 through 20, and 42 through 74 of each line with AND in positions 14 through 16 must be blank. Sequence, and record-identifying-indicator entries are made in the first line of the group and cannot be specified in the additional lines.
An unlimited number of AND/OR lines can be used on the input specifications.
The OR relationship is used when two or more record types have common fields.
To use the OR relationship, enter OR in positions 14 and 15. Positions 7 through 13, 16 through 18, and 42 through 74 must be blank. A record identifying indicator can be entered in positions 19 and 20. If the indicator entry is made and the record identification codes on the OR line are satisfied, the indicator specified in positions 19 and 20 on that line is set on. If no indicator entry is made, the indicator on the preceding line is set on.
An unlimited number of AND/OR lines can be used on the input specifications.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.