>From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>Farley, Peter [0000031df298a9da-dmarc-requ...@listserv.ua.edu]
>Sent: Tuesday, May 9, 2023 1:30 PM
>To: IBM-MAIN@LISTSERV.UA.EDU
>Subject: Can REXX OUTTRAP trap WTO's?
>
>Cross-posted to IBM-MAIN and TSO-REXX lists.
>
>Is there any way for  Rexx script to capture WTO output?  This is a simple 
>case, a one-line WTO, no multiline possible.
>
>I only recently found a need to do this, and my tests so far say "no it can't".
>
>/* Rexx */
>/* Capture WTO from BATCHPGM */
>xtrp = outtrap("zdsp.")
>address attchmvs "BATCHPGM"
>xtrp = outtrap("OFF")
>say "ZDSP.1="zdsp.1
>
>Execution result online in TSO:
>
>*** WTO OUTPUT FROM BATCHPGM ***
>ZDSP.1=ZDSP.1
>
>Peter

Since you can't trap the WTO Message, does "BATCHPGM" by any chance set a 
non-zero Return Code if the WTO is issued?  If not, could it be modified to do 
so without affecting anything else?  That way you could just test the Return 
Code from "BATCHPGM" in your REXX code and do what needs to be done.

-- 
Dale R. Smith

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to