Determining which exit type is invoking a common user exit
A user exit can be invoked by Fault Analyzer
options (Exits or DumpRegistrationExits) or by the IDIUTIL Exits control statement. The Fault Analyzer options and the IDIUTIL control statement determine
which user exit is invoked and under what conditions:
- Exits option (Control, Listing, Msgxpl, Format, End, Notify)
- DumpRegistrationExits option (Control, Notify)
- IDIUTIL Exits control statement (ListHF, Delete, Import)
You can use a different REXX user exit or load module user exit for each user exit type, or you can use the same REXX user exit or load module user exit across different user exit types.
If you use the same REXX user exit or load module user exit across different user exit types, the user exit can check which exit type it's being invoked for.
For example, a single REXX user exit is specified as a normal Analysis Control user exit,
an End Processing user exit, and a dump registration Analysis Control user exit using
the options:
Exits(Control(REXX(myexit)),End(REXX(myexit)))
DumpRegistrationExits(Control(REXX(myexit)))
In this case, the user exit can include code like the following to check which exit type
is calling the user exit:
If ENV.EXIT_CALL_TYPE = 'C' then do
"IDIWTO 'Normal Analysis Control user exit called'"
/* Perform normal Analysis Control user exit processing... */
else if ENV.EXIT_CALL_TYPE = 'E' then do
"IDIWTO 'End Processing user exit called'"
/* Perform End Processing user exit processing... */
else if ENV.EXIT_CALL_TYPE = 'X' then do
"IDIWTO 'Dump registration Analysis Control user exit called'"
/* Perform dump registration Analysis Control user exit processing... */
else do
"IDIWTO 'User exit unexpectedly called'"
end