Updated version of AL7BKUP to avoid leaving the LOCKs in place.

Document ID : KB000018504
Last Modified Date : 14/02/2018
Show Technical Document Details

Descriprtion:

The AL7BKUP job contains LOCK and UNLOCK statements in the DBUTLTY step.

If for some reason the BACKUP job does not complete successfully (i.e., the BACKUP portion failed) then the UNLOCK doesn't execute leaving the LOCKs in place. Please utilize this version of the AL7BKUP job to prevent this from happening.

Solution:

The AL7BKUP job contains LOCK and UNLOCK statements in the DBUTLTY step.

If for some reason the BACKUP job does not complete successfully (i.e., the BACKUP portion failed) then the UNLOCK doesn't execute leaving the LOCKs in place. This is because the LOCK/BACKUP/UNLOCK are in the same DBUTLTY step.

An adjusted version of AL7BKUP, which is included below separating the LOCK and BACKUP statements into one step, and the UNLOCK statements into a second step with a COND=EVEN which will allow it to run regardless of what happens prior.

Please utilize this version of the AL7BKUP job to prevent this from happening. The permanently updated version of this is upcoming and will be available later for CA 11.


//L7B0BKUP JOB ...
//*********************************************************************
//*                                                                   *
//*  PERFORM A BACKUP OF THE CA-11 DATABASE WITH DBAS ACTIVE          *
//*                                                                   *
//*  ADD A JOBCARD                                                    *
//*                                                                   *
//*  CHANGE THE JCL STATEMENTS (DATACOM AND CA11) TO MEET YOUR        *
//*  INSTALLATION STANDARDS.                                          *
//*                                                                   *
//*  VERIFY THE DATABASE ID                                           *
//*                                                                   *
//*  NOTE: CA-DATACOM LIBRARIES MAY BE USING DIFFERENT DATASET        *
//*        HIGH LEVEL QUALIFIERS (HLQS) FOR DIFFERENT DATASET TYPES.  *
//*                                                                   *
//*                                                                   *
//*                                                                   *
//*********************************************************************
//*
//BKUP   EXEC PGM=DBUTLTY,REGION=4M
//STEPLIB  DD DISP=SHR,DSN=DATACOM.THLQ.CAILIB    CA-DATACOM CAILIB
//         DD DISP=SHR,DSN=DATACOM.CHLQ.CUSLIB    CA-DATACOM CUSLIB
//CXX      DD DISP=SHR,DSN=DATACOM.CXX            CA-DATACOM CXX
//BACKUP   DD DSN=CA11.DCOM.HLQ.BACKUP(+1),DISP=(,CATLG),UNIT=TAPE BACKUP FILE
//SYSIN    DD *
LOCK OPTION=MOVER,DBID=601,AREA=JOB
LOCK OPTION=MOVER,DBID=601,AREA=STP
LOCK OPTION=MOVER,DBID=601,AREA=DSN
LOCK OPTION=MOVER,DBID=601,AREA=JHF
BACKUP DBID=601,
       RECID=YES,
       SEQ=PHYSICAL,
       UPDATE=NO,
       SEQBUFS=128,
       DDNAME=BACKUP
/*
//UNLCK   EXEC PGM=DBUTLTY,REGION=4M,COND=EVEN
//STEPLIB  DD DISP=SHR,DSN=DATACOM.THLQ.CAILIB    CA-DATACOM CAILIB
//         DD DISP=SHR,DSN=DATACOM.CHLQ.CUSLIB    CA-DATACOM CUSLIB
//CXX      DD DISP=SHR,DSN=DATACOM.CXX            CA-DATACOM CXX
//BACKUP   DD DSN=CA11.DCOM.HLQ.BACKUP(+1),DISP=(,CATLG),UNIT=TAPE BACKUP FILE
//SYSIN    DD *
UNLOCK OPTION=MOVER,DBID=601,AREA=JOB
UNLOCK OPTION=MOVER,DBID=601,AREA=STP
UNLOCK OPTION=MOVER,DBID=601,AREA=DSN
UNLOCK OPTION=MOVER,DBID=601,AREA=JHF
//