INPUT = 'T.TCS.CR.KALYAN.TEMP'
X = OUTTRAP(MEMS.)
/* TO GET THE MEMBER LIST FROM THE INPUT PDS */
"LISTDS '"INPUT"' MEM"
X = OUTTRAP(OFF)
DO I=7 TO MEMS.0
MEMS.I = STRIP(MEMS.I)
In the above code mentioned which lists the members of a PDS, Can any one explain me why we use OUTTRAP for??
I did a QW but failed to understand the exact reason.
Joined: 26 Apr 2004 Posts: 4650 Location: Raleigh, NC, USA
A few notes about OUTTRAP:
In general, the OUTTRAP function traps all output from a TSO/E command. For example, OUTTRAP traps broadcast messages from LISTBC, the list of allocated data sets from LISTALC, catalog entries from LISTCAT, and so on.
If you plan to write your own command processors for use in REXX execs, and you plan to use the OUTTRAP external function to trap command output, note the OUTTRAP function does not trap command output that is sent to the terminal by:
messages issued by TSO/E REXX (that is, messages beginning with IRX)
messages issued by TRACE output
However, OUTTRAP does trap output from the PUTLINE macro with DATA or INFOR keywords.