共通のユーザー出口を呼び出している出口タイプの判別
ユーザー出口は、Fault Analyzer オプション (Exits または DumpRegistrationExits) や IDIUTIL Exits 制御ステートメントによって呼び出すことができます。Fault Analyzer オプションと IDIUTIL 制御ステートメントでは、どのユーザー出口がどのような条件の下で呼び出されるのかを決定します:
- Exits オプション (Control、Listing、Msgxpl、Format、End、Notify)
- DumpRegistrationExits オプション (Control、Notify)
- IDIUTIL Exits 制御ステートメント (ListHF、Delete、Import)
ユーザー出口タイプごとに異なる REXX ユーザー出口またはロード・モジュール・ユーザー出口を使用したり、さまざまなユーザー出口タイプで同一の REXX ユーザー出口またはロード・モジュール・ユーザー出口を使用したりすることが可能です。
さまざまなユーザー出口タイプで同一の REXX ユーザー出口またはロード・モジュール・ユーザー出口を使用する場合、当該のユーザー出口がどの出口タイプに呼び出されているのかを確認することができます。
例えば、単一の REXX ユーザー出口は、通常の分析制御ユーザー出口、終了処理ユーザー出口、オプションを使用したダンプ登録分析制御ユーザー出口として指定されます:
Exits(Control(REXX(myexit)),End(REXX(myexit)))
DumpRegistrationExits(Control(REXX(myexit)))
この場合、ユーザー出口がどの出口タイプに呼び出されているのか確認する際に使用するコードには、次が含まれます:
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