To debug a user-exit routine, use the debugger on the main compiler module, not on COB2.EXE. (The main compiler module is a separate process started by cob2, and the debugger can debug only one process.)
Do these steps:
cob2 -q“EXIT(ADEXIT(IWZRMGUX))” pgmname.cbl
Modify this command as follows:
cob2 -# -q“EXIT(ADEXIT(IWZRMGUX))” pgmname.cbl
As a result, you will see this (igyccob2 calls your user exit):
igyccob2 -q“EXIT(ADEXIT(IWZRMGUX))” pgmname.cbl ilink /free /nol /pm:vio pgmname.obj
idebug igyccob2 -q“EXIT(ADEXIT(IWZRMGUX))” pgmname.cbl
The debugger automatically stops at the beginning of the user exit, provided that you built the exit with debug information.