0

I'm trying to alter a vsam file for write logs for any update operation. I perform the updates through a cics transaction. Can anyone give me an idea, how can i save immediately all updates in logstream file?

neo
  • 33
  • 1
  • 8

1 Answers1

1

To get update log records written by CICS for VSAM file updates you will need to configure the recovery attributes for that VSAM file. Depending upon the type of file, how the file is accessed (RLS or non-RLS) and the types of log records required will determine what options can be set and where to set them.

To keep it simple, if you set the recovery attributes in the ICF catalog definition for the VSAM data set with RECOVERY(ALL) and LOGSTREAMID(your_logstream_name) then before and after images will be written. Depending upon what the log records are needed for also consider using the LOGREPLICATE(YES) option instead or as well.

Be careful turning recovery on, records (or CIs) in the file will be locked until the transaction making the updates completes. This could lead to deadlocks and rollbacks if multiple transactions make multiple updates to the file concurrently. Also if the file is an ESDS then there are further complexities.

Make sure the general log stream or model log stream has been created so CICS has or can create somewhere to write the log records to.

I'd also recommend reading more on the recovery options available so that only the log records needed are written. You can find more info on CICS logging here