Retrieving LRF-Based Records

To retrieve LR records, the adapter sends LRF calls to an access module named IDMS that invokes the Logical Record Facility program.

LRF-based records are retrieved when the Access File specifies MODE=LR in the subschema declaration, and the adapter constructs an LR call to IDMS with explicit or implicit selection criteria from the request. The LRF processes the request as generated by the adapter, selects the appropriate LR path, and constructs each flat view using the full set of selection criteria. The process is highly efficient in terms of I/O. Only those records that pass the selection tests are passed back to the adapter from IDMS.

The retrieval process for LRF records is identical to that of network record-types, but the Logical Record Facility maintains its own navigational information for the data source, selects the retrieval strategy most appropriate for a given request, and maintains its own set of currencies.

When the subschema mode is Logical Record (MODE=LR), the adapter analyzes the request and creates an LRF command to be sent to the Logical Record Facility. The LRF command has two formats. The first format is for an entry segment without selection criteria:

OBTAIN NEXT record 

The second format is for an entry with selection criteria or for a descendant segment:

OBTAIN NEXT record WHERE expression1 [AND expressionn]

As indicated by the brackets, this command is also used to pass compound selection criteria to IDMS.

IDMS processes the call and returns a record if two conditions are met:

The adapter continues to call IDMS for LRF records that correspond to a segment until IDMS returns LR-NOT-FOUND in the LR status field. Then the adapter retrieves records for other segments, or it terminates retrieval and the report is produced.


Information Builders