Thursday, November 26, 2009

IMS LOG File not closed properly

Problem: IMS IEFRDR Log file did not get closed properly. When we tried using it in the restart for IMSLOGR file, it failed.

Solution: Use DFSULTR0 --- IMS utility to close the LOG file which did not close properly.


Useful info on DFSULTR0 on how IMS log file can be closed.

The following example shows how to close an SLDS created by IMS batch, using DUP mode and ERRC=00000. The input data set is copied to, and closed in, the output data set. The input SLDS information in the DBRC RECON is replaced by the output data set information.
//EXAMPL09 JOB ........
//*
//DFSULTR0 EXEC PGM=DFSULTR0
//* (PARM NOT REQUIRED - SEE NOTES BELOW)
//*
//* NOTE - IMSID= is ignored
//* NOTE - Defaults are DBRC=YES
//*
//SYSPRINT DD SYSOUT=A
//IEFRDER DD ........ Primary SLDS to be closed
//IEFRDER2 DD ........ Secondary SLDS to be closed
//NEWRDER DD ........ Primary output SLDS
//NEWRDER2 DD ........ Secondary output SLDS
//RECONn DD ........ DBRC RECON data set(s)
//* (can be dynamically allocated)
//SYSIN DD *
DUP ERRC=00000
When ERRC=00000 is specified, NEWRDER (and NEWRDER2) is closed when EOF or the first error is encountered on IEFRDER (and IEFRDER2). If the execution is successful, REP mode is not required. If the execution is unsuccessful, DUP mode should be rerun with an ERRC value greater than zero and REP mode is required.


DBRC=YES|NO
Indicates that the DBRC= default is not established by the IMSCTRL macro during IMS system definition.
DBRC=NO (or N) can be specified to explicitly declare that DBRC is not to be used for this execution of this utility.
DBRC=YES (or Y) can be specified to explicitly declare that DBRC is to be used for this execution of this utility. DBRC=YES is required (and the default) for CLS mode. DBRC=YES is optional for DUP and REP modes.
Recommendation: If DUP mode is run with DBRC active, REP mode should also be run with DBRC active


IEFRDER DD
Defines the primary, or only, input SLDS. All input SLDS logs for DUP mode should have the same block size. IEFRDER is used to specify the concatenation of OLDS and SLDS logs for PSB mode. When specifying a concatenation of logs, the names of the logs must be provided in ascending order.
IEFRDER2 DD
Defines the secondary input SLDS. Include this statement only when dual logs are used. Omit this statement if you do not need the data sets. Do not use DD DUMMY or DSNAME=NULLFILE.

NEWRDER DD
Defines the primary, or only, output data set for the new or interim log.
NEWRDER2 DD
Defines the secondary output data set for the new or interim log. If DBRC is active and dual logs are used as input, this statement is required. If DBRC is not active, this statement is not required. Do not use DD DUMMY or DSNAME=NULLFILE.

No comments:

Post a Comment