Problem solve Get help with specific problems with your technologies, process and projects.

VSAM files in CICS -- Batch report help

CICS expert Robert Crawford offers two different ways for a user to capture user information when creating a batch report on a VSAM file in CICS.

In my system, data is added (not modified) to a VSAM file in CICS. I need to create a batch report on the records added to the file, on a weekly basis. I also need to capture the employee ID of the person who added the data, but I should do so without introducing a new file. Can JOURNAL files be used for this or is there another, better solution for this?
There are a couple ways to skin this cat assuming you have a way to equate someone's logon ID with their employee ID:
  1. You can change the program writing the records to include a field holding the user's logon ID.
  2. As you mentioned in your question, you can enable journaling for the file in question. If this is a standard VSAM file you just have to change the file's RDO definition to specify what types of I/O's are to be logged and the log stream name. If it is a record level sharing (RLS) dataset, you should first redefine the file with LOG(ALL) and a valid log stream ID. Finally, you must create a journal model (JMODEL) definition for the target logstream.
Both options cause CICS to log activity against that file into the log stream. Then it's a matter of writing a batch process to read and report on the journal stream. The format of journal records is in the CICS Customization Guide.

Dig Deeper on IBM system z and mainframe systems

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.