From: Michael Moschitta To: All
Our data center runs a weekly process that's dependent on an outside tape, so it can't be scheduled. However, the operators at the data center forget that Operational Assistant runs the daily backup automatically at 4:30 a.m. Each week, they start their job and it runs a while. Then the backup starts and eventually locks a file that the program tries to access. Of course, the CL program then blows up.
I want to add an exit program to the Operational Assistant backup to see if the data center's CL program is running. If it is not running, the backup should start; otherwise, the exit program needs to delay the backup and recheck periodically. The Check Active Program (CHKACTPGM) QUSRTOOL works great to check itself, but not another program-unless I'm doing it all wrong. Does someone have a better idea?
From: John Wagner To: Michael Moschitta
You can find out if a specific job is running by building logic into the job to let you know that it's there.
If the problem is contention for the tape drive, you could put something like the code in 3 in the front-end of all your jobs which might need to use the tape drive in question.
If the problem is contention for the tape drive, you could put something like the code in Figure 3 in the front-end of all your jobs which might need to use the tape drive in question.
Once past this bit of code, you are assured that the job containing it has control of the data area and, as a result, the tape drive. Other jobs containing this code will go into a five-minute wait state before retrying.
From: Matt Fulton To: Michael Moschitta
I suggest you create a data area. In the CL, change the data area to a known value, as shown below:
CHGDTAARA DTAARA(XXX) VALUE('ACTIVE')
As the last step in the CL, change the data area back to blanks:
CHGDTAARA DTAARA(XXX) VALUE('')
In the backup job, test the data area to determine if the CL program is running. This method has two advantages:
If the CL program terminates abnormally and you need to rerun it before the backup starts, the data area will still be "set" and the backup won't start. You can manually clear the data area or rerun the CL program.
The same data area can be used for all jobs that need to lock out the backup.
TechTalk: Avoid Tape Drive Conflicts
Figure 3 CL Code to Avoid Tape Drive Conflicts
ALCTAPE: CHKOBJ OBJ(QGPL/TAPEINUSE) OBJTYPE(*DTAARA) + AUT(*OBJEXIST) MONMSG MSGID(CPF9801) EXEC(DO) CRTDTAARA DTAARA(QGPL/TAPEINUSE) TYPE(*LGL) ENDDO ALCOBJ OBJ((QGPL/TAPEINUSE *DTAARA *EXCL)) WAIT(0) MONMSG MSGID(CPF1002) EXEC(DO) DLYJOB DLY(10) GOTO CMDLBL(ALCTAPE) ENDDO
LATEST COMMENTS
MC Press Online