DELETE request processing

The course of DELETE request processing depends on whether a RIDFLD has been specified. The processing for user-maintained data tables differs from that for CICS-maintained data tables. DELETE requests are not valid for VSAM ESDS or for BDAM files.

VSAM processing (including CICS-maintained data tables)

  1. If a RIDFLD has been specified:
    1. If a KEYLENGTH has been specified, it is checked for validity.
    2. If the GENERIC option has been specified, and the file is not a KSDS, condition INVREQ is raised.
    3. A VSWA is created.
  2. If no RIDFLD was specified, the SERVREQ attribute of the file is checked to ensure that DELETE requests are valid for this file. If not, the INVREQ condition is raised.
  3. If a RIDFLD has been specified and GENERIC is not specified, the following actions are performed once. If a RIDFLD has been specified and GENERIC is specified, the following actions are repeated until there are no more records that contain the generic key.
    1. VSAM is requested to GET for UPDATE a record with the specific or generic key. GET UPDATE processing requires exclusive control of the CI. The record is read into an internal buffer.

      The generic key value, if supplied, is checked against the key contained in the record. If it does not match, there are no more records containing the generic key in the file.

    2. If the file is recoverable:
      1. A CICS record lock is obtained for the record. This will be held until the next syncpoint.
      2. The VSAM GET UPDATE request is recorded synchronously on the system log.
      3. A CICS range lock is obtained for the record to be deleted if a MASSINSERT is in progress. This is to prevent an end-of-range record from being deleted while the range is in use for a MASSINSERT sequence.
    3. If there is a data table (which will be CICS-maintained) associated with the base cluster, a record lock is acquired if the file is nonrecoverable, and a data table pre-update call is issued to invalidate the record before the VSAM update.
    4. A VSAM ERASE request is issued, to delete the record from the file.
    5. If there is a data table associated with the base cluster, the record is deleted from the table by issuing a call to data table services. If the file is nonrecoverable, the record lock is released.
    6. If a range lock was acquired, it is released.
    7. If the file is recoverable, a WRITE DELETE record is written in the system log for forward recovery.
    8. If required, a WRITE DELETE record is written to a user-specified journal.
  4. The VSWA is released.


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