|
|||||||||||
|
Chicago-Soft
|
Quick Tip - TSOTRAP and TSOHELP by Lionel B. Dyck TSOTRAP has one purpose in life: to execute whatever TSO command the user passes it, trap the output, and then place the user in ISPF Browse on the results. TSOHELP is a variation of TSOTRAP that is specialized for the TSO HELP command. To make these commands easier to use by our users we have added them to the ISPF command table (ISPCMDS) so that they can be used from anywhere within the ISPF environment.
To speed the processing the temporary file used is on VIO for both applications. TSOTRAP REXX Exec Download this Exec in text format (SU95QT1-TRAP.TXT) /* Execute a TSO Command and Browse the Output */ Trace "OFF" Call on error Address ISPEXEC "CONTROL ERRORS RETURN" Call outtrap "LINE." Address TSO arg(1) Call outtrap "OFF" If line.0 > 0 Then do cmd_dd = "C"random() "ALLOCATE FILE("cmd_dd") REUSE UNIT(SYSVIO) SPACE(1 1) CYLINDER", "DSORG(PS) RECFM(V B) LRECL(255)" "EXECIO" line.0 "DISKW" cmd_dd "(STEM LINE. FINIS)" Address ISPEXEC "LMINIT DATAID(DATAID) DDNAME("cmd_dd")" Address ISPEXEC "BROWSE DATAID("dataid")" Address ISPEXEC "LMFREE DATAID("dataid")" "FREE FILE("cmd_dd")" End Exit Error: Zerrsm = "Return code" rc Zerrlm = "Return code from command is" rc Zerralrm = "YES" Zerrhm = "*" Address ISPEXEC "SETMSG MSG(ISRZ002)" Return TSOHELP REXX EXEC Download this Exec in text format (SU95QT1-HELP.TXT) /* Execute the TSO Help command for a specified command and browse it */ Trace "OFF" Call on error Address ISPEXEC "CONTROL ERRORS RETURN" Call outtrap "LINE." Address TSO "HELP" arg(1) Call outtrap "OFF" If line.0 > 0 Then do cmd_dd = "C"random() "ALLOCATE FILE("cmd_dd") REUSE UNIT(SYSVIO) SPACE(1 1) CYLINDER", "DSORG(PS) RECFM(V B) LRECL(255)" "EXECIO" line.0 "DISKW" cmd_dd "(STEM LINE. FINIS)" Address ISPEXEC "LMINIT DATAID(DATAID) DDNAME("cmd_dd")" Address ISPEXEC "BROWSE DATAID("dataid")" Address ISPEXEC "LMFREE DATAID("dataid")" "FREE FILE("cmd_dd")" End Exit Error: Zerrsm = "Return code" rc Zerrlm = "Return code from command is" rc Zerralrm = "YES" Zerrhm = "*" Address ISPEXEC 'SETMSG MSG(ISRZ002)' Return ISPF Command Table Additions: Download this Table in text format (SU95QT1-ISPF.TXT) Verb T Action Description TSOHELP 4 SELECT CMD(%TSOHELP &ZPARM) Browse captured tso help for specified entry TSOTRAP 4 SELECT CMD(%TSOTRAP &ZPARM) Browse captured results of specified command Lionel B. Dyck, Kaiser Permanente, Northern California
|
|
||||||||
home · current
articles
· archives · forums · |