MDWAIT - wait for a job to finish running

Function of the utility

This can be used in a batch job to wait until a program (or STC) have finished running. I use it in my batch jobs to avoid job deadlocking (yes my batch has got so complicated (well busy, since I automated my tape mounts) I needed this).

It issued status messages to let you know it's doing something, JJJJJJJJ replaced by the batch job running MDWAIT, the _______ replaced by the job it is waiting on
    JJJJJJJJ: WAITING ON JOB ________ (CHECK INTVL=1MIN)
    JJJJJJJJ: WAIT COMPLETE ON JOB ________

Example useage

//WAITSTEP EXEC PGM=MDWAIT,PARM='TSO'

Program Source

If you think this may be useful to you this is the source code. You are free to copy and customise for your own use.
It is not supported; it works fine for my own use, and no enhancements are intended or should be requested.