Other techniques
You can use the EXTRACT command to examine the contents of the registers and main storage, and if necessary you can use host environment commands to examine other parts of the programming environment that lie outside of IDF, for example to see if a given disk file has been created.
If you need to maintain a count of the number of times the exit routine has been entered, or other status information that must carry across its invocations, you can use the SET GLOBAL and EXTRACT GLOBAL commands to access an 80-byte area within IDF that is provided for this purpose.
Warning: Be careful when executing CMS
commands from within your exit routine. If you are debugging a user-area
program, and your exit routine invokes another program that runs in
the user-area, it will destroy your debugging environment. The same
care should be taken with routines that run in the transient area.