/* Rexx - browse tso -- run a tso command and show the outtrap'ed */ /* Output in browse */ /* */ /* This program is intended to be assigned a pf key: */ /* TSO %BTSO */ /* Place a tso command on the command line and press the key */ /* */ /*-------------------------------------------------------------------*/ Arg commandToRun If commandToRun = "" Then Do; Address ispexec "SETMSG MSG(ISPG054)" /* Parm required message */ Exit End Call outtrap trap.,"*","CONCAT" /* Turn output trapping on */ commandToRun /* Run the command */ Call outtrap "OFF" /* Turn output trapping on */ If trap.0 > 0 Then /* If we had results */ Do Call bpxwdyn , /* Get unique ddname for browse */ "ALLOC RTDDN(DDNAME) UNIT(VIO) ", "DSORG(PS) RECFM(V,B) LRECL(1255)", "NEW DELETE " "EXECIO" trap.0 "DISKW" ddname "(FINIS STEM TRAP."/* Write output*/ Address ispexec "LMINIT DATAID(TRAP) DDNAME(" || ddname || ") ENQ(SHR)" "BROWSE DATAID(" || trap || ")" /* Browse output ddname */ "LMFREE DATAID(" || trap || ")" Address oldMessageState = msg() /* Save message state */ Call msg "OFF" /* Turn off msg in case of failure */ "FREE FILE("ddname")" /* Free temp dd */ Call msg oldMessageState /* Restore message state */ End