Error executing a REXX program that contains the OUTTRAP instruction:
OPS0903E ERROR 43 COMPILING pgmname, LINE n: ROUTINE OUTTRAP NOT FOUND
OPS/MVS
The OUTTRAP instruction can't be used with OPS/REXX, only TSO/E REXX.
There are 2 solutions:
1) Call the REXX as a TSO/REXX instead of OPS/REXX. If calling the REXX from a rule use:
ADDRESS OSF 'pgmname' (instead of ADDRESS OSF "OI pgmname")
2) Read directly the REXX EDQ. For example:
/* rexx */
dsnname = 'SAMPLE.CNTL.JCL'
say '***************** start listc *******************'
clearedq=OPSCLEDQ()
address TSO
"Listcat entries('"dsnname"')"
listclines = QUEUED()
do l = 1 to listclines
pull listcatinfo
say listcatinfo
parse var listcatinfo 'VOLSER------------' volser .
say 'lines pulled: ' listcatinfo ' is at volser: ' volser
end
say '***************** end listc *******************'
return
NOTE: This STEPLIB cannot be allocated in the REXX.