Introduction to Navigational Programming › Retrieving Data › Retrieval Functions
Retrieval Functions
Data retrieval is performed by the following navigational DML functions:
- FIND- Locates a record in the database. The located record becomes current of run unit, current of its record type, current of its area, and current of all sets in which it participates.
- GET- Retrieves the most recently located record (that is, the record that is current of run unit) by transferring its contents from the database to the program's variable storage.
- OBTAIN- Combines the FIND and GET functions so data is located and retrieved in one operation.
- RETURN- Retrieves the database key and/or symbolic key values from an index set without accessing the database record.
The following figure illustrates how information on John Done's health coverage at Commonweather is made available to the user program using a combination of OBTAIN, FIND, and GET functions. The following steps are taken:
- John Done's health coverage record is located and separately transferred to the variable storage area to which the COVERAGE record type is bound.
- The next record in this occurrence of the COVERAGE-CLAIMS set is located and transferred in a single operation.
- Step 2 is repeated until all the claim records are processed.
Locating a record through either the FIND or OBTAIN function uses a technique identified by one of the following options:
- CALC- Locates a record directly, based on a symbolic key value, the CALC key, in the record.
- WITHIN SET- Locates a record based on its logical relationships with other records.
- WITHIN AREA- Locates a record directly or relatively, based on its physical location in the database.
- DB-KEY- Locates a record directly based on its database key.
- CURRENT- Locates a record directly based on existing currencies.
Copyright © 2013 CA.
All rights reserved.
|
|