Technical data

Format 2—Keeplist Access
OFFSET integer-exp
FIRST
LAST
WITHIN keeplist-name
General Rules
Format 1
1. Record-name references a database record in the subschema.
2. Set-name references a database set in the subschema.
3. Realm-name references a subschema realm.
4. Use this format to select a record whose database key value is in a currency
indicator.
5. The referenced currency indicator is the currency indicator for the record, set,
or realm you specify in record-name, set-name,orrealm-name.
6. If you do not specify the WITHIN phrase, the referenced currency indicator is
the currency indicator of the current record of the run unit.
7. An exception condition occurs if the referenced currency indicator is null:
a. Run-unit currency indicator (DB-CONDITION is set to DBM$_CRUN_
NULL).
b. Record type currency indicator (DB-CONDITION is set to DBM$_CRTYP_
NULL).
c. Set type currency indicator (DB-CONDITION is set to DBM$_CSTYP_
NULL).
d. Realm currency indicator (DB-CONDITION is set to DBM$_CRELM_
NULL).
See the USE statement for information on USE FOR DB-EXCEPTION.
8. Other exception conditions occur if the referenced currency indicator points to
a vacant position in the database collection:
a. Run-unit currency indicator (DB-CONDITION is set to DBM$_CRUN_
POS).
b. Set type currency indicator (DB-CONDITION is set to DBM$_CSTYP_
POS).
c. Realm currency indicator (DB-CONDITION is set to DBM$_CRELM_
POS).
See the USE statement for information on USE FOR DB-EXCEPTION.
Format 2
9. Integer-exp is an arithmetic expression or integer. It refers to a position in
keeplist-name. Integer-exp cannot be zero.
10. Keeplist-name is a keeplist defined in the Subschema Section.
11. Use this format to select a record whose database key value is in a keeplist.
Because a keeplist can contain more than one entry, you must specify which
keeplist entry you want.
Procedure Division 4–5