WEBSITE FOR SYNON DEVELOPERS
Synon Mainframe Refresher
 

Retrieve object

The CA 2E 'Retrieve object' function defines a routine to retrieve one or more records from a database file. Processing may be specified for each record read, by modifying the action diagram for the function. The 'Retrieve object' function may be attached to a Retrieval (RTV) or a Resequence (RSQ) access path.

Effect of restrictor parameters:-
a. If all the keys of the access path to which a 'Retrieve object' function attaches are supplied as restrictor parameters, then only the record with the given key or keys will be read.
b. If only some of the keys (i.e. the major keys) are supplied as restrictor parameters, then all of the records with the given key will be read.
c. If none of the keys of the access path are supplied as restrictor parameters, then all of the records in the access path will be read.

Effect of positioner parameters:-
a. If all the keys of the access path to which a 'Retrieve object' function attaches are supplied as positioner parameters to the function, then only the records with a key value greater than or equal to the given key or keys will be read.
b. If only some of the keys (i.e. the major keys) are supplied as restrictor parameters, but some or all of the remaining keys are passed as positioner values, then only those records with keys equal to the restrictor values and greater than or equal to the positioner values will be read.
c. If none of the keys of the access path are supplied as positioner parameters, then all of the records in the access path within the specified restrictor group will be read.

Action diagram user exit points
- Initialisation
- USER: Initialise routine
- No record found
- USER: Processing if DBF record not found
- Record found
- USER: Process DBF record
- Closedown
- USER: Exit processing