VSAM files in CICS -- Batch report help

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?

    Requires Free Membership to View

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.

This was first published in December 2007

Join the conversationComment

Share
Comments

    Results

    Contribute to the conversation

    All fields are required. Comments will appear at the bottom of the article.