Using a BMP program to manage IMS subsystem inactivity automatically
To avoid halting change data capture or increasing latency in a data sharing environment when an IMS subsystem becomes inactive, generate activity in that subsystem to flush the log buffers for the online data sets (OLDS).
About this task
To replicate data in the correct order across multiple DB/DC or DBCTL subsystems, all subsystems that are active at the source site must generate continuous activity. Otherwise, your deployment is unable to track whether an inactive subsystem has records to capture in the buffers for the online data sets (OLDS).
Use these approaches to manage subsystem inactivity automatically:
- Run a batch message processing (BMP) program to flush the log buffers when a subsystem becomes inactive.
- If you want to save space in your system log data sets (SLDS), ensure that the IMS Log Archive utility does not archive the records that the BMP generates.
- Notification of inactive subsystems
The CECZ0400W message provides information about IMS subsystems that become inactive:
CECZ0400W IMS change capture halted due to lack of activity from sub-system subsystem-id. No new log data has been received since: time-stamp. Current inactivity message threshold value: threshold-value.Exception: If all participating subsystems are inactive, the source server does not issue the CECZ0400W message.Threshold-value indicates the time interval at which the source server issues the CECZ0400W message. By default, the CECZ0400W message is displayed at 30-second intervals, but you can adjust this by changing the value of the INACTTHRESHOLD parameter in the IMS log reader service.
Tip: If a participating IMS subsystem fails and you are not running fast database recovery (FDBR), you must manually close the log for the failed subsystem. A failed IMS subsystem with an open log is equivalent to an inactive IMS subsystem.- The BMP program
Using the first sample in the Examples section as a guide, run the IMS-supplied DFSDDLT0 utility to issue LOG DL/I calls that generate logging activity and flush the OLDS buffers. Create enough copies of the DATA lines to generate sufficient data to flush the buffers. The logged data must equal or exceed the size of the OLDS buffer that you specified in the BLKSZ DCB parameter when you allocated the OLDS data sets.
A single LOG call in the program DFSDDLT0 can never be greater than 9999 bytes, and cannot exceed the IOASIZE parameter in the IMS Program Specification Block (PSB) generation utility. If the IOAREA for this job is too large, IMS issues an AT status code.
Tip: The log records that the BMP program writes have an ID in the first two bytes of data (x'D3D6'in these examples). If your applications or tools access IMS log records, ensure that this log record ID does not conflict with these operations.- Save SLDS space
Use the second sample in the Examples section to help you customize the job control language (JCL) for the IMS Log Archive utility to exclude records that the BMP generates from archiving activities.
Set the NOLOG parameter to the hexadecimal value of the log record ID by using this syntax:
SLDS NOLOG (D3)Use comma-separated values to specify additional IDs to exclude from logging:
SLDS NOLOG (D3,10,45,5F,67,69)Restriction: Do not exclude log records for data capture from the archive logs by adding '99' to this list. Classic change data capture requires these type0x99log records for data capture.
For more information about the IMS resource configuration parameters in the first example, see the IMS System Administration Guide. For more information about the Log Archive utility, see the IMS documentation for system utilities.
Procedure
- Create automation that intercepts the message CECZ0400W.
- Set up the automation to run a BMP program that flushes the OLDS buffers.
- Optional: Customize the JCL for the Log Archive utility (DFSUARC0).
Examples
In this example, you run the utility DFSDDLT0 as an IMS BMP. The control statements use LOG calls to generate 35224 bytes of log data by using a GPSB with the name STLGPSBB.
//* CECLRIFS PROVIDE VALID JOB CARD
//******************************************************************
//** EXAMPLE NOT INTENDED FOR EXECUTION
//**
//** Licensed Materials - Property of IBM
//**
//** 5655-R54, 5655-R55, 5655-R56, 5655-R57
//**
//** Copyright IBM Corp. 2008,2010 All Rights Reserved
//**
//** US Government Users Restricted Rights - Use, duplication or
//** disclosure restricted by GSA ADP Schedule contract with
//** IBM Corp.
//**
//******************************************************************
//**
//** JOB CONTROL STATEMENTS TO GENERATE SUFFICIENT ACTIVITY AND *
//** LOG RECORDS TO FLUSH THE OLDS BUFFERS. *
//** THIS WILL TEMPORARILY RESUME Data Replication for IMS LOG ORDERING *
//** OPERATIONS FOR THE SUBSYSTEM IDENTIFIED IN THE IMSID FIELD. *
//** SPECIFY THE FOLLOWING PARAMETERS ACCORDING TO SITE STANDARDS: *
//** o VALID JOBCARD *
//** o IMSID = IMS CONTROL REGION SUBSYSTEM ID *
//** o EXEC BMP PROCEDURE NAME *
//** o MBR = GPSBNAME *
//** *
//** APAR... ID PREREQ. DATE.... DESCRIPTION...................*
//** *
//******************************************************************
//BMP EXEC BMP8CSAM,MBR=DFSDDLT0,IMSID=IMS1,PSB=STLGPSBB
//BMP.SYSIN DD *
S22 2 2 2 2 TP 2
L LOG
L Z2516 DATA LOG FILL BUFF PART 1
L LOG
L Z2516 DATA LOG FILL BUFF PART 2
L LOG
L Z2516 DATA LOG FILL BUFF PART 3
L LOG
L Z2516 DATA LOG FILL BUFF PART 4
L LOG
L Z2516 DATA LOG FILL BUFF PART 5
L LOG
L Z2516 DATA LOG FILL BUFF PART 6
L LOG
L Z2516 DATA LOG FILL BUFF PART 7
L LOG
L Z2516 DATA LOG FILL BUFF PART 8
L LOG
L Z2516 DATA LOG FILL BUFF PART 9
L LOG
L Z2516 DATA LOG FILL BUFF PART 10
L LOG
L Z2516 DATA LOG FILL BUFF PART 11
L LOG
L Z2516 DATA LOG FILL BUFF PART 12
L LOG
L Z2516 DATA LOG FILL BUFF PART 13
L LOG
L Z2516 DATA LOG FILL BUFF PART 14
/*The next example shows customized JCL for the
Log Archive utility DFSUARC0. The NOLOG parameter
specifies that the utility does not write log records to your SLDS
if the log record ID begins with x'D3'.
/ARCHIVE2 JOB MSGCLASS=A,CLASS=A,MSGLEVEL=(1,1)
//*
//ARC2 EXEC PGM=DFSUARC0,PARM='SYSA'
//STEPLIB DD DSN=IMS.&SYS2..SDFSRESL,DISP=SHR
//* COPY FROM 2 OLDS TO DUAL SLDS */
//DFSOLP02 DD DSN=OLP902,DISP=SHR
//DFSOLP00 DD DSN=OLP900,DISP=SHR
//DFSOLS00 DD DSN=OLS900,DISP=SHR
//DFSOLS02 DD DSN=OLS902,DISP=SHR
//DFSSLOGP DD DSN=SLDSP.D82001.N001,DISP=(,KEEP),
// UNIT=TAPE,VOL=(,,,99),LABEL=(,SL)
//DFSSLOGS DD DSN=SLDSS.D82001.N001,DISP=(,KEEP),
// UNIT=TAPE,VOL=(,,,99),LABEL=(,SL)
//RECON1 DD DSN=RECON1,DISP=SHR
//RECON2 DD DSN=RECON2,DISP=SHR
//SYSPRINT DD SYSOUT=A
//SYSUDUMP DD SYSOUT=A
//SYSIN DD *
SLDS NOLOG (D3) FEOV (08000)
/* DFSUARC0 FORCES AN EOV FOR A DATA SET */
/* AFTER WRITING 8000 BLOCKS, AND WRITES NO */
/* D3 LOG RECORDS TO THE DATA SET THAT THE */
/* DFSLOGP DFSLOGS DD POINTS TO. */
/*What to do next
The SYSPRINT DD statement in DFSUARC0 points to the data set that contains a list of excluded records. Verify that records beginning with your log record ID are on the list.