VSAM files

CICS® file control supports three VSAM access modes: local shared resources (LSR), non-shared resources (NSR), and record-level sharing (RLS).

Sharing data sets with batch jobs

Sharing data sets directly between online CICS update transactions and batch update programs using VSAM share options (where available) or job control sharing is not recommended for non-RLS access modes. Sharing risks the integrity of the data with the result that application programs may appear to function correctly, but with incorrect data. Such loss of data integrity can occur, for example, if a CICS unit of work updates a record that is later updated by a non-CICS job while the CICS unit of work is still running. If the CICS unit of work abends, CICS backs out the record to the value it had at the start of the CICS unit of work, thus destroying the update from the non-CICS job.

File-owning regions and RLS access

To share data sets between more than one CICS region, use the RLS access mode or use a file-owning region (FOR) with function shipping from the application-owning regions (AORs). From a recovery point of view, RLS does not create distributed units of work, as happens between the AOR and FOR, because files accessed in RLS mode are all regarded as local to each CICS region. The SMSVSAM server takes the place of the FOR. However, there are special recovery considerations for data sets accessed in RLS mode, with the role of SMSVSAM and its lock management.

Forward recovery

For VSAM files, you can use a forward recovery utility, such as CICS VSAM Recovery for z/OS®, when online backout processing fails as a result of some physical damage to the data set. For forward recovery:
  • Create backup copies of data sets.
  • Record after-images of file changes in a forward recovery stream. CICS does this for you automatically if you specify that you want forward recovery support for the file.
  • Write a job to run a forward recovery utility, and keep control of backup data sets and log streams that might be needed as input. CICS VSAM Recovery for z/OS automatically constructs the forward recovery job for you, using an ISPF dialog interface.

Backward recovery

To ensure that VSAM files can be backward recoverable, you must consider the following points:
  • Key-sequenced data sets (KSDS) and both fixed- and variable-length relative record data sets (RRDS):
    • If the files referring to KSDS or RRDS data sets are designated as recoverable with LOG(ALL) specified, CICS can back out any updates, additions, and deletions made by an interrupted unit of work.
    • For information about backout failures, see Backout-failed recovery.
  • Entry-sequenced data sets (VSAM-ESDS):
    • New records are added to the end of a VSAM-ESDS. After they are added, records cannot be physically deleted. A logical deletion can be made only by modifying data in the record; for example, by flagging the record with a "logically deleted" flag, using an XFCLDEL global user exit program.

      See Transaction backout for more information.

Replication logging

VSAM files can take part in replication if the data set is defined with LOGREPLICATE. Defining LOGREPLICATE allows a replication facility to reproduce file updates on a second site.



dfht2c00168.html | Timestamp icon Last updated: Sunday, 4 June 2017