Here is another simple version:

ADDRESS TSO                                          
  Arg info                                           
                                                     
  x = OUTTRAP(help.)                                 
 'ALLOC DD(LIST) UNIT(VIO) SPACE(1) CYLINDERS REUSE  
        RECFM (F B) LRECL (80) BLKSIZE (0)'          
 'HELP 'info''                                       
 'EXECIO * DISKW LIST (STEM help. FINIS)'            
  x = OUTTRAP('OFF')                                 
ADDRESS ISPEXEC                                      
 'LMINIT DATAID(LASTID) DDNAME(LIST)'                
 'BROWSE DATAID('lastid')'                           
 'LMFREE DATAID('lastid')'                           
ADDRESS TSO                                          
 'FREE DD(LIST)'                                     


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Bill Ashton
Sent: Wednesday, November 02, 2016 3:27 PM
To: [email protected]
Subject: Re: TSO Command to issue message to Outtrap

Here is a simple Listcat command that does an Outtrap, and then writes it to a 
file that is browsed...you could easily just do a bunch of "say"
commands with this, too.

/*========================>> REXX <<==============================*/
/* LCAT: Browse output from 'LISTCAT ENT(dsn) ALL' command           */
/*====================================================================*/
Trace ?i;
Parse Upper ARG dsn parm
x = OutTrap('LISTC_Output.',1500) /* up to 1500 lines */ If parm = '' Then parm 
= 'ALL'
Address TSO "LISTC ENT("DSN")" parm
listc_rc = rc
x = OutTrap('Off')
outds = "'"Userid()".TSO.LISTC'" /* output dataset name */ If Sysdsn(outds) = 
"OK"
Then alloc_info = "SHR REUSE"
Else alloc_info = "NEW UNIT(3390) SPACE(1 1) TRACKS", "RECFM(F B) LRECL(121) 
DSORG(PS)", "REUSE"
"ALLOC F(TSOLISTC) DATASET("outds")" alloc_info "EXECIO * DISKW TSOLISTC (STEM 
LISTC_Output. OPEN FINIS "
Address ISPEXEC "ISPEXEC BROWSE DATASET("outds")"
Return listc_rc

On Wed, Nov 2, 2016 at 3:13 PM, Dyck, Lionel B. (TRA) <[email protected]>
wrote:

> Does anyone know of any TSO command (or REXX function) that will let 
> me send text to the screen that can be captured by OUTTRAP?
>
> What I'm trying to do is have a rexx dialog that does something like 
> this (very simplified):
>
> Call outtrap 't.'
> Write 'starting xyz'
> 'xyz'    <=== tso command
> Call outtrap 'off'
> Do I = 1 to t.0;say t.i;end
>
>
> ----------------------------------------------------------------------
> ----
> Lionel B. Dyck (TRA Contractor)
> Mainframe Systems Programmer <AITC Mainframe Support> Enterprise 
> Infrastructure Support (Station 200) (005OP6.3.10) VA OI&T Service 
> Delivery & Engineering
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send 
> email to [email protected] with the message: INFO IBM-MAIN
>



--
Thank you and best regards,
*Billy Ashton*

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to