IAM journaling
IAM provides an optional automatic journaling capability on file updates for IAM files which assists in improving data availability, particularly for the very large multi-volume data sets. The improved availability of the data is accomplished by reducing the frequency of data set backups, and providing a speedier recovery facility for failing batch jobs.
IAM offers three different journal facilities available, z/OS System Logger journals, IAM/RLS and IAM/PLEX journals, and a basic journal capability in which each file being journaled has its own corresponding journal data set. To minimize the potential for excessive journaling overhead, only one type of IAM journal may be used for any specific data set at a time. Users can choose the facility that best meets their requirements.
IAM’s journal capabilities are primarily oriented to non-CICS applications use, such as batch jobs. This is due to the fact that CICS provides its own journaling capabilities that provide better functionality for the CICS environment, such as the dynamic transaction backout process. IAM provides a program to perform the recovery process and a general journal utility program that can handle any of the IAM supported journals.
z/OS system logger journals
This is a journal function offering undo or backout recoveries, redo or forward recoveries, and comprehensive journal records for data replication. The format of these journal records correspond to what is required for the IBM InfoSphere Data Replication for VSAM product and are compatible with the IBM CICS VSAM Recovery (CICS/VR) product.
The main requirement to use this function is that the data sets need to be on SMS managed volumes. Multiple files can be journaled to the same log stream. Specification for this type of journal processing is controlled by the IDCAMS DEFINE CLUSTER parameters of:
- FRLOG—Specifies type of journal records, such as UNDO, REDO, or ALL
- LOGREPLICATE—Specifies the comprehensive set of journal records required by the IIDR for VSAM product used by GDPS Active-Active.
- LOGSTREAMID—Specifies the name of the z/OS System Logger log stream to be used to contain the journal records. Either a DASD only or a Coupling Facility log stream can be used based on the application requirements.
IAM creates journal records for processing outside CICS, as CICS will handle the journals in its environment. With the FRLOG specification, CICS does not use the specified log stream for undo records, only redo records. If you need the undo records generated by CICS, then specification of LOGREPLICATE is recommended, which will write both undo and redo records.
The unique feature of IAM with the FRLOG specification is that IAM will write the UNDO records if they are requested to the specified log stream, which does not occur for real VSAM or by CICS. The IAMrecovery program IAMRREST will use those UNDO records written by IAM to perform undo processing, as will CICS/VR. You can optionally run an IAMLOGVR address space to act as a System Logger Server Address Space. Usage of the IAMLOGVR address space can be enabled with the IAM LOGVR Global Option. The IAMLOGVR address space makes setting up security access to your logstream data sets much simpler, because, you just have to provide write access to a single started task User ID rather than all the various batch job User IDs that might be used by your production jobs. The IAMLOGVR address space also decreases Logstream Connect and Disconnect overhead, because fewer Connects and Disconnects are necessary. Additionally, the IAMLOGVR address space has the ability to buffer newly created journal records while a Logstream error condition is being cleared, such as a Coupling Facility Logstream full condition.
IAM/RLS and IAM/PLEX journals
Use of these journals are for the data sets that are using either IAM/RLS or IAM/PLEX. The use of this journal facility is controlled by either the IDCAMS DEFINE CLUSTER LOG (ALL | UNDO | NONE) specification, the IAM CREATE JRNAD override, or the IAM ACCESS JRNAD override specified to the IAM/RLS or the IAM/PLEX address space. The journals used by IAM/RLS can be either a set up of to six sequential data sets or as a z/OS System Logger log stream. IAM/PLEX needs a z/OS System Logger coupling facility log stream.
IAM uses its own format for these records for use by the provided IAM utility programs, and can also be used by user provided programs. IAM/RLS and IAM/PLEX do have a dynamic job backout capability should a batch job abend, along with a separate utility to do a manually submitted backout or forward recovery. Users can provide their own recovery program if they want, or a program to do other processing with the journal records which may include, for example, a process that audits the record changes.
For more information about using these journals, see IAM-RLS-Journaling for IAM/RLS or IAM-PLEX-Journaling for IAM/PLEX.
Basic journal capability
Let’s say there is a multi-volume IAM data set that is updated every day, from both online and batch. Because of this, the data set is backed up every day. With IAM journaling AFTER images, the file may now need to be backed up only once a week; however, the smaller log data set containing the updates will be backed up daily. If a recovery is needed, the data set is first restored from the last backup, and subsequently all of the updates are reapplied from the IAM journal to the data set, using the IAM journal recovery program IAMJREST. The data availability is improved by elimination of the time spent backing up the data set every day, which may take over a couple of hours.
The other intended use is to provide a backout mechanism of updates performed by batch jobs. To utilize the backout capability, the user must indicate that the BEFORE images of updated records are to be included in the journal. Should a batch job abend, rather than restoring the file and rerunning prior batch updates, all that needs to be done is to backout the updates from the batch job step (or entire job, and other jobs). This is accomplished by using the IAM journal recovery program, IAMJREST.
TheIAM journaling feature is activated through the JRNAD override keyword, with the appropriate value of BOTH, BEFORE or AFTER indicated for the types of journal records required. As stated above, the AFTER images are necessary for performing a recovery from a data set that has been restored. BEFORE images are needed when backing out data set updates. The BOTH keyword enables collection of both the BEFORE and AFTER images. When specified on the CREATE override during a file definition or load, IAM will automatically journal all updates made to the data set. When specified during file updates on the ACCESS override card, the specified journal options are only applicable to that job step. Additionally, the user must allocate a sequential data set to contain the journal records, with an adequate amount of space. The name of the data set must be the same as the IAM data set name (that is, cluster name) appended with .LOG. If the data set name is over 40 characters long already, and if there is a ‘.’ in position 40, then the data set name will be 43 characters long, ending with the .LOG string. If the data set name is over 40 characters long, and position 40 is not a ‘.’, then the log file name will be 44 characters long, ending with the .LOG appendix. The user is also responsible for the management of the IAM journal data sets). They must be backed up as necessary, and also emptied out at various points. The log data set can be emptied by deleting and reallocating the data set, or by using an IEBGENER to copy into the log data set from a DD DUMMY.
IAM journaling is not intended as a substitute for CICS journaling and the CICS transaction backout capability. Those capabilities must still be utilized if required.
For more information and examples about using the IAM Journaling capability, see IAM Journal and Recovery.