SELECT job step using automatic checkpoint
You can run the select processing logic with CHKPT=LAST
to specify
automatic checkpoint location, automatic log selection, and dynamic allocation.
The command format is shown as follows:
CHKPT LAST,IMSID,FUNCTION,D=yyyy.ddd,T=hh:mm:ss
where the following values are true:
- LAST
- Specifies that QCF should use the last valid checkpoint for the function type.
- IMSID
- Specifies the 4-byte IMS id.
- FUNCTION
- Specifies either AB for RECOVERAB or DM for RECOVERDM.
- D=yyyy.ddd
- Specifies the start date for LIST.LOG.RECON command. D=yyyy.ddd is optional. If omitted, the date defaults to the current date minus 7 days.
- T=hh:mm:ss
- Specifies the start time for LIST.LOG RECON command T=hh:mm:ss is optional. If omitted, the time defaults to 00:00:00.
Using this format, SELECT calls DSPURX00 and analyzes the output to find the last valid checkpoint for the function type and all PRIOLDs with log records for the function type.
For RECOVERAB, the last valid checkpoint is the last DUMPQ or PURGE or DSNAPQ. The log DSNs are all PRIOLDs containing the selected checkpoints and the next PRIOLDs.
For RECOVERDM, the last valid checkpoint is DUMPQ or PURGE. The log DSNs are all PRISLDs containing the selected checkpoints and the next PRISLDs.
SELECT dynamically allocates all necessary PRISLD data sets and concatenates them when building the //LOGIN DD.
You can run the SELECT job step in batch mode by submitting JCL job streams.
Example JCL for SELECT job step
Sample JCL for processing select logic is shown in the following figure. Add the DD statements to the IQCSELCT step in the RECOVERAB and RECOVERDM functions that are necessary for automatic checkpoint location, log selection, and allocation.
//***************************************************************************/
//* */
//* SELECT STEP */
//* */
//***************************************************************************/
//SELECT EXEC PGM=IQCSELCT,REGION=0M
//STEPLIB DD DISP=SHR,DSN=hlqual.SIQCLINK
// DD DISP=SHR,DSN=IMS.RESLIB
//IMSDABLIB DD DISP=SHR,DSN=&ismdalib
//SYSIN DD DSN=&sysin,UNIT=SYSDA,
// DISP=SHR,
// SPACE=(TRK,(1,1))
//RECON1 DD DISP=SHR,DSN=&recon1
//RECON2 DD DISP=SHR,DSN=&recon2
//QCFIN DD *
CHKPT LAST,IMA8,AB,D=2024.018
FUNCTION RECOVERAB
//*
//MSGQ DD DSN=QCF.MSGQ,
// AMP=('BUFND=20,BUFNI=10'),
// DISP=(OLD,KEEP,KEEP)
//SCRAPSEL DD DUMMY
//SNAPDUMP DD DUMMY
//*
//*THE LRECL AND BLKSIZE FOR SNAPQ DATA SET SHOULD EQUAL LOGINS.
//*
//SNAPQ DD UNIT=systda,DISP=NEW,SPACE=(CYL,(5,5)),
// DCB=(LRECL=4000,BLKSIZE=4004)
//*
//*THE LRECL OF THE LOGOUT DATA SET MUST BE AT LEAST 256
//*BYTES LONGER THEN THE LRECL OF THE LOGIN DATA SETS,
//*TO ACCOMMODATE MRPREFIX.
//*
//*
//LOGOUT DD DSN=&&LOGOUT,UNIT=systda,SPACE=(CYL,(5,5)),
// DCB=(LRECL=4066,BLKSIZE=4070,RECFM=VB),
// DISP=(NEW,PASS)
//SORTINA DD DSN=&&SORTINA,UNIT=systda,SPACE=(TRK,(1,1)),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// DISP(NEW,PASS)
//SORTINB DD DSN=&&SORTINB,UNIT=systda,SPACE=(trk,(1,1)),
// DCB=(LRECL=80,BLKSIZE=800,RECFM=FB),
// DISP(NEW,PASS)
//QCFPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//*
DD statements for SELECT job step
- CHKPT
- The format of the CHKPT control statement does not require //LOGIN DD; //LOGIN DD is ignored if present. //STEPLIB DD should point to QCF and IMS load module libraries.
- IMSDALIB DD
- Specifies dynamic allocation of RECON data sets.
- SYSIN DD
- The standard input data set for DBRC commands; if not provided, SYSIN is dynamically allocated.
- SYSPRINT DD
- The standard output data set for DBRC commands; if not provided, SYSPRINT is dynamically allocated.
- RECON1/RECON2 DD
- If not provided, RECON1 and RECON2 are dynamically allocated.
- SYSOUT DD
- Contains information from allocation/look up for the checkpoint
process:
- List of checkpoints on the first PRISLD
- List of dynamically allocated LOGs
Example output from specifying //SYSOUT DD in the SELECT job step
____ **************************************************************************
____ * START LOGIN DSN:
____ * VND0442.PM25358.NFTPFILE.SLDSCKPT.T084312
____ * CHECKPOINTS ON START LOGIN DSN:
____ * CHKPT D=2024.018,T=07:40:20.172581,z=+01:00
____ * CHKPT D=2024.018,T=08:50:07.962918,z=+01:00
____ * END OF CHECKPOINTS ON START LOGIN DSN
____ **************************************************************************
____ **************************************************************************
____ * LOGIN DSNS IN USE-DYNAMIC ALLOCATION
____ * VND0442.PM25385.NFTPFILE.SLDSCKPT.T084312
____ * VND0442.PM05309.NFTPFILE
____ * END OF DYNAMIC ALLOCATION
____ **************************************************************************