简体   繁体   中英

does anyone know how to know if an sbmjob finished?

What I'm trying to do is execute 2 SBMJOBs, but first I need program A to finish, in order to execute program B. Does anyone know how to do it?

Program A: SBMJOB CMD(CALL PGM(PROGRAM1) PARM(PARM1 PARM2)) JOB(PROGRAM1)

Program B: To run this program, I need the A to finish first, but how can I validate that? SBMJOB CMD(CALL PGM(PROGRAM2) PARM(PARM1 PARM2)) JOB(PROGRAM2)

Thanks for the help

It would be easier to submit your two jobs on a JOBQ connected to a subsystem which let only one job process at a time.

Your second job will run naturally after the first is finished.

You can choose the JOBQ with the JOBQ parameter on the SBMJOB command.

QBATCH is by default a jobq with only one simultaneous job. But check before, it could have been changed on your system.

See the CHGJOBQE to change configuration on a jobq. General explanation on jobq and subsystem is here IBM doc JOBS and job queues

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM