Page 1 of 1

Trapping command output issued via TSO server

PostPosted: Fri Sep 07, 2007 11:17 pm
by vsiano
Hello,
I'm trying to figure out how to trap a tso command response issued from my rexx code which is run in a netview on a z/os 1.8 box. The code logic follows:

1. <start a tso server>

2. issue a the command via PIPE:
"PIPE TSO "invoke_type" "xsid" "etype,
" | CORR 10",
" | STEM OUTPUT."

3. <stop the tso server>

i the output stem merely contains a "command accepted" message, not the output of the command itslef.

Any help would be appreciated.

Re: Trapping command output issued via TSO server

PostPosted: Tue Sep 18, 2007 8:26 pm
by marso
I'm not sure about how TSO server works, but under TSO mainframe, this is what we do:

Call OUTTRAP('OUT.')              /* trap TSO output in stem OUT. */
Address TSO "LISTUSER"            /* run any TSO command */
Call OUTTRAP('OFF')               /* stop trapping */

Do Ix = 1 To OUT.0                /* sample loop to display */
   Say "Received: " OUT.Ix        /* trapped result */
End