WTORPGM - issue a WTOR and need U or C as a reply

Function of the utility

This can be used in a batch job to issue a WTOR to the console, that requires a U (continue) or C (cancel) to be provided, so ops can make a decision to determine whether the batch job should continue or not.
A reply of U exits the step with CC=0, a reply of C exists the step with CC=8, so your following batch job steps can make use of the COND=xxx statement to run or not run depending on the reply entered.

The WTOR is always "MID0001A jjjjjjjj Reply 'U' to proceed, or 'C' to cancel", where jjjjjjjj is replaced by the jobname of the batch job calling the program.

As thats not necessarily informative, as well as the WTOR being issued the first 60 bytes of every card provided via SYSIN are written out as WTOs prior to the WTOR itself being issued, this is to allow a little information to be displayed about what the WTOR is for (although you can dd dummy sysin if you don't want to use that).

This is probably of limited use to most of you, I wrote it specifically for may weekly backup job stream, as my weekly backup job stream shutd things like TSO down and I didn't want it whipped out from under me (again :-)).

Example useage

This is an example or how I use it to trigger, or cancel, my weekly batch stream.

//WK00RDY  JOB (0),'DAILY JOBS',MSGLEVEL=1,CLASS=A,MSGCLASS=A
//*
//* Issue a WTOR to get a U or C reply
//ISSUWTOR EXEC PGM=WTORPGM
//STEPLIB  DD  DSN=MARK.LIB.LOAD,DISP=SHR
//SYSIN    DD  *
***********************************
  WEEKLY BATCH STREAM IS AVAILABLE
***********************************
/*
//*
//* CANCEL reply - show what needs to be done to restart this
//*                jobstream when it is to be run.
//OPREPLYC EXEC PGM=WTOBATCH,COND=(8,NE,ISSUWTOR)
//SYSIN    DD   *
!!! -------------------------------------- !!!
!!!WEEKLY JOB STREAM CANCELLED BY OPERATOR !!!
       TO MANUALY START THE JOBSTEAM
   'S JOBDECK,J=WEEKLY' WHEN READY TO BEGIN
!!! -------------------------------------- !!!
/*
//*
//* Continue reply - Load all jobs onto JES2 input hold queue
//OPREPU01 EXEC PGM=IEBGENER,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=SYS9.JOBDECKS(WK01MKFL),DISP=SHR
//       DD DSN=SYS9.JOBDECKS(WK01SHUT),DISP=SHR
//       DD DSN=SYS9.JOBDECKS(WK02BKPS),DISP=SHR
...lots more...
//       DD DSN=SYS9.JOBDECKS(WK05SDLY),DISP=SHR
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY
//*
//* Continue reply - Release next job in batch stream
//OPREPU02 EXEC MDJOBREL,COND=(0,NE)
//

Program Source

On the assumption this may be useful to someone, 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.

Known Bugs

Only one, a cancel reply should issue a CC=4 (not 8), however it always issues CC=8 so I have documented it as that, basically...

         SLR   R15,R15                 , clear R15
         A     R15,=F'4'               , set return code
         BR    R14

...always leaves the return code as 8, I have given up, it works fine (documented) as 8.