RPG/400 Help

Position 31 (Record Address Type)

Entry
Explanation

Blank
Relative record numbers are used to process the file.

Records are read consecutively.

Record address file contains relative-record numbers.

Keys in record-address-limits file are in the same format as keys in the file being processed.

A
Character keys (valid only for program-described files specified as indexed files or as a record-address-limits file).

P
Packed keys (valid only for program-described files specified as indexed files or as a record-address-limits file).

K
Key values are used to process the file. This entry is valid only for externally described files.

Blank = Non-keyed Processing

A blank indicates that the file is processed without the use of keys, that the record-address file contains relative-record numbers (a T in position 32), or that the keys in a record-address-limits file are in the same format as the keys in the file being processed.

A file processed without keys can be processed consecutively or randomly by relative-record number.

Input processing by relative-record number is determined by a blank in position 31 and by the use of the CHAIN, SETLL, or SETGT operation code. Output processing by relative-record number is determined by a blank in position 31 and by the use of the RECNO keyword on the file description specifications.

A = Character Keys

The indexed file (I in position 32) defined on this line is processed by character-record keys. (A numeric field used as the search argument is converted to zoned decimal before chaining.) The A entry must agree with the data format of the field identified as the key field (length in positions 29 and 30 and starting position in positions 35 through 38).

The record-address-limits file (R in position 16) defined on this line contains character keys. The file being processed by this record address file can have an A, P, or K in position 31.

P = Packed Keys

The indexed file (I in position 32) defined on this line is processed by packed-decimal-numeric keys. The P entry must agree with the data format of the field identified as the key field (length in positions 29 and 30 and starting position in positions 35 through 38).

Note:
The sign of all decimal numeric input fields is forced to F or D. All numeric result fields specified by calculation specifications also have an F or D sign. Therefore, if the sign of the key field in the file is not F or D, a record-not-found error occurs when you retrieve that file.

The record-address-limits file defined on this line contains record keys in packed decimal format. The file being processed by this record address file can have an A, P, or K in position 31.

K = Key

A K entry indicates that the externally described file is processed on the assumption that the access path is built on key values. If the processing is random, key values are used to identify the records.

If this position is blank for a keyed file, the records are retrieved in arrival sequence.

For more information on record address type, refer to the RPG/400* User's Guide.


[ Top of Page | Previous Page | Next Page | Table of Contents ]