The macro used is a simple assembler WTO macro with text, nothing fancy.  It is 
unfortunately not feasible to permanently change to a PUTLINE since the primary 
usage of the WTO output is in existing production batch processes, not TSO or 
Rexx usage.

I guess I could cobble up a temporary version for my immediate need though.  
Thanks for the url's.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
ITschak Mugzach
Sent: Tuesday, May 9, 2023 1:46 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Can REXX OUTTRAP trap WTO's?

It depends on the macro used to create the message. See below snippet from the 
manual:

However, OUTTRAP does trap output from the PUTLINE macro with DATA or INFOR 
keywords. Therefore, if you write any command processors, you may want to use 
the PUTLINE macro rather than the TPUT or WTO macros. z/OS TSO/E Programming 
Guide 
<https://www.ibm.com/docs/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikja300/ikj2k200htm*ikj2k200
 > describes how to write a TSO/E command processor. For information about the 
PUTLINE macro, see z/OS TSO/E Programming Services 
<https://www.ibm.com/docs/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ikja300/ikj2b200htm*ikj2b200
 > .


בתאריך יום ג׳, 9 במאי 2023 ב-20:37 מאת Seymour J Metz <sme...@gmu.edu>:

> See the CONSOLE facility in TSO. I don't know whether it is available 
> in System Rexx.
>
> ________________________________________
> 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
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.


----------------------------------------------------------------------
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