How to check the response of a WTOR issued by OPS/REXX?
Release : 13.5
Component : OPS/MVS
The keyword "REPLY" of the ADDRESS WTO statement causes the message to be a WTOR.
The reply of the WTOR can be retrieved using the PULL REXX instruction.
Sample code below:
/* REXX TO ISSUE WTOR AND TAKING DIFFERENT ACTIONS */
/* DEPENDING ON THE RESPONSE */
/* Re-issues the WTOR if the response is not Y or N */
text = 'TESTING WTOR - REPLY (Y/N)'
address WTO "TEXT('"text"') HILITE REPLY MSGID('U00001')"
pull prefix response .
if wordpos(response,'Y N') = 0 then signal ask /* re-issues the WTO if not Y or N */
if response = 'Y' then
say 'Actions when response=Y'
if response = 'N' then
say 'Actions when response=N'