READ request processing

The course of READ request processing depends on the access method, and whether or not the UPDATE option is specified on the request:

VSAM processing:
  1. The supplied keylength is validated.
  2. A VSAM work area (VSWA) is created. This includes the request parameter list (RPL) that will be passed to VSAM.

    The processing that follows depends on whether the UPDATE option was specified on the READ request.

    UPDATE option not specified:
    1. The RPL is completed, and a call made to VSAM to get the record.
    2. If the request specifies INTO and the record is too large for the user-specified area, the request is reissued specifying a work area large enough to hold the record. The record is then copied to the user-specified area in truncated form, and the LENGERR condition is raised.
    3. The VSWA is freed.
    4. The read is journaled if specified in the resource definition.
    UPDATE option specified:
    1. The UPDATE flag is set in the RPL.
    2. An attempt is made to read the record by issuing the VSAM request. READ UPDATE requires exclusive control of the control interval (CI) containing the record. VSAM manages the locking mechanism for control intervals. If the CI is already locked, VSAM returns an error and the requesting task is forced to wait on resource type FCXCWAIT.
    3. CICS file control acquires a record lock on the record just read, using a CICS ENQUEUE request. The record lock prevents any other transaction from updating the record before the owning transaction has reached a syncpoint (for recoverable files), or before the REWRITE, DELETE, UNLOCK or syncpoint that completes the request sequence (non-recoverable files).
    4. Exclusive control of the CI is retained until the REWRITE, DELETE, or UNLOCK request that follows the READ UPDATE has been completed, or until the next syncpoint.

      The CICS record lock (if any) is retained until the next syncpoint, in case the transaction updating the record abends and dynamic transaction backout processing is necessary.

    5. If the file is recoverable the request is logged. If required, the request is also recorded in a user-specified journal.
    BDAM processing:
    1. A file I/O area (FIOA) is obtained.
    2. If the UPDATE option has been specified:
      1. The address of the RIDFLD is saved in the FIOA.
      2. If the data set is recoverable, the RIDFLD is ENQUEUEd on to lock the record against other updates. The ENQUEUE is retained until the next syncpoint.
    3. The KEYLENGTH is checked for validity.
    4. The key field is converted from character string format (TTTTTTRR) to binary format (TTR), if necessary.
    5. A BDAM READ request is issued. If the READ is successful, the required block is returned in the FIOA.
    6. The key field returned by BDAM is converted from binary format to character string format, if necessary.
    7. If the file is recoverable and UPDATE has been specified, the request is logged. If required, the request is also recorded in a user-specified journal.
    8. If deblocking is required, the required record is located in the block that has been returned by BDAM:
      1. If DEBREC has been specified, the record number is used to locate the record.
      2. If DEBKEY has been specified, the embedded key is used to locate the record.


dfhs3c00369.html | Timestamp icon Last updated: Monday, 5 June 2017