What is CICS VR VSAM batch logging?

CICS® VR VSAM batch logging provides logging for your batch changes to VSAM data sets that are not accessed in RLS-mode.

This means that your CICS transactions and your batch jobs that use CICS VR VSAM batch logging cannot update the same VSAM data set at the same time. Once you have disabled the file from CICS, you can use CICS VR VSAM batch logging to log your application's batch updates. The following types of VSAM batch logging are available:

CICS VR forward recovery logging records an after-image log record for every update made to the VSAM data set by a batch job. Therefore allowing you to run CICS VR forward recovery to recover the batch updates if the data set becomes corrupted.

Start of changeCICSVR undo logging records a copy of the data prior to any changes being made, so UNDO logging is always done when any indication is given of intent to update the data, therefore allowing you to run CICSVR batch backout to remove the batch updates if the batch job encounter an abend. End of change

Start of changeUNDO logging is done for the following VSAM commands in the application:
GET UPD
Get a record with the intent to update or erase it.
PUT ADD
Add a new record.
UNDO records are not written to the undo log for a PUT UPD or ERASE request because these operations modify existing records that are first obtained using GET UPD.End of change

Start of changeIf a batch job reads all records using GET UPD commands even though only a few records are actually updated, CICSVR undo logger will record every before-image record. However unless a record is updated, logging the before image is not necessary and it adds to the overhead and runtime of the batch job. Also batch backout will take longer when before-images are written back to a dataset but they only replace identical records.End of change

Start of changeThis unnecessary overhead could be avoided if the application were rewritten to use GET commands instead of GET UPD commands, and only use GET UPD commands when there is a definite intent to UPDATE a record. The alternate approach to avoid such overhead is to install the CICSVR APAR PM02913 and specify FRLOG(ALL) for the sphere. End of change

Start of changeAt VSAM batch logging with the FRLOG(ALL) parameter UNDO logging occurs for GET for UPDATE commands and if a subsequent PUT_UPDATE or ERASE is not done, CICS VR will remove the GET for UPDATE UNDO record if it is still present in the log buffer. End of change