Specifying the TRAP option lets you control error trapping.
This option can be specified only in the following ways:
- The PARM string when the binder is invoked from JCL.
- The first parameter in the parameter list passed when calling
the binder from another program (IEWBLINK, IEWBLOAD, IEWBLODI, IDWBLDGO).
- The IEWBIND API FUNC=STARTD OPTIONS= or PARMS= parameters.
- ON
- Causes the binder to establish both an ESTAE and an ESPIE exit.
This will trap all abends and program checks that occur while the
binder is in control. A key aspect is that parameter validation done
by the binder API will return the documented results even if some
program in the binder calling sequence has a program check exit.
- ABEND
- The binder will establish an ESTAE exit but not an ESPIE exit.
This will trap all abends, but program checks will be caught by the
binder only if no program in the binder calling sequence has an ESPIE
exit.
Note: - Especially with the API interface, program checks may occur during
binder validation of its input. The binder will normally recover from
those and convert them into return codes. It will be unable to do
that if TRAP=ABEND was specified and some calling program has an ESPIE
exit.
- A Language Environment® will
normally include an ESPIE exit, so Language Environment-enabled programs
calling the binder should not use TRAP=ABEND unless they are being
debugged or have made special provision for this situation.
- Prior to z/OS® 1.5 there
was no TRAP option, but the binder behavior matched what is now defined
for TRAP=ABEND.
- OFF
- Prevents the binder from establishing any ESTAE or ESPIE exit.
This will allow callers of the binder to trap all abends and program
checks.
Note: Many data set related ABENDs are passed directly by
DFSMS to binder routines doing I/O. These do not go through binder
ESTAE processing and will continue to be caught even with TRAP=OFF.