ASKOPER - issue a WTOR and expect one of two replies
Function of the utility
This can be used in a batch job to issue a WTOR to the console,
that requires one of two keywords to be accepted as a valid reply.
Replying with keywork one returns RC=0000 and keyword two returns RC=0004.
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 template for this program was the CBT249 overflow tape file 131 ASKOPER program. I modified that program as below
- if a (optional) SYSIN DD card exists then the first 50 bytes of each card image is WTO'ed to give additional info to the operator as to what the WTOR is for
- as I run "lights out" I have also added an extra parm which is a timer (in minutes), if there is no reply by an operator within parm minutes option two (RC=0004) will be used as the answer; if no timeout value is provided it defaults to 10 minutes. This is a change specific to my needs, as if my automation is running it can reply to the wtor with the first option, the second option in most cases would be a no/cancel which is the desired default if automation is not running as if it is not running the last thing you want is to start a job(s) that need automation
- Changed the program entry/exit code blocks to standard entry/exit code to stop SOC4 abends on program exit
Program Source
On the assumption this may be useful to someone, this is the source code for my modified version.