WTOR Handling demonstartion

The first question you ask is why ?. Everybody knows how to issue a WTOR and wait forever on the ECB for a reply don't they.

I had a slightly different need. I had a whizzy-bang little started task that used an ECB list to wait on COMM commands (F jobname,xxx and P jobname) as well as timer events and also wait for a WTOR response in the ECB list if it needed to issue a WTOR for any reason. It worked great.

Then I had a new requirement for a seperate WTOR (multiple WTORs could be outstanding for this program), but the difference for this new WTOR was that it had to timeout (and be cancelled) if it wasn't replied to within a certain time.

Easy you would think, just add another timer and wtor ECB field to the ECB list and when that specific timer expired kill off the WTOR. But could I find any documentation or examples that explained how to kill the WTOR, no. Well actually yes, the actual macros for WTOR and DOM themselves, but nothing in any manual.

So this DEMO is an example of how to DOM a WTOR on a timer event for a MVS 3.8J system, the DOM macro has changed in later MVS releases.

I also found the 'reply=yes' is required for a WTOR, or the DOM will do bugger all and a D R,L wil still show the WTOR as waiting a response. Using 'reply=yes' will DOM the WTOR and remove the outstanding reply, that was a trial/error process from reading the DOM macro contents. None of the currently online MVS manuals I could fine mention the reply option so it may have been obsoleted in later releases; so this DEMO really is just for a MVS 3.8J system.

Anyway. This is how to cancel a WTOR based on a timer on a MVS 3.8J system such as Turnkey3.