Invoking Z Abend Investigator from Java dump events

The Java™ -Xdump environment switch can be used to take a TDUMP when an exception occurs and pass that TDUMP on to Z Abend Investigator to generate an analysis report. For general detail about using the -Xdump settings, go to This reference describes the Java internal events that can trigger a dump and the filters that can be applied.

The following setup is an example of using -Xdump to get a Z Abend Investigator report for a NullPointerException or a SocketException:

java -Xdump:system:events=throw+catch+uncaught,filter=*NullPointerException*,opts=IEATDUMP
       exec="tso 'hfzda dsn(%last) datasets(hfzhist(da.test.gui.hist))' "
       exec="tso 'hfzda dsn(%last) datasets(hfzhist(da.test.gui.hist))' " Java-program-name

The 'system' dump agent with opts=IEATDUMP is used to capture a raw TDUMP, and then the 'tool' dump agent for the same event using the exec= option calls Z Abend Investigator, passing the TDUMP via the dsn(%last) token.

The "exec" in the Xdump:tool options provides Java with a command to invoke when the requested events are triggered. Because the "exec" string needs to be double quoted and the resulting -Xdump strings are long, it can be easier if the entire sequence is provided through the STDPARM DD in the BPXBATCH job that is used to run the Java program.

The range suboption can be used to limit the number of dumps generated for a specific exception. In the above example, providing a range 1..4 means that dumps are only generated for four NullPointerException or SocketException throw events, and any more are ignored. This option is especially useful in cases where exceptions are caught and rethrown, but it does mean future Exceptions are not processed.

The priority suboption can be used to make sure dumps are created in a specific order. So, if a Java dump or Heap dump is also required, then to prevent Z Abend Investigator being called on those dumps, make sure the non-TDUMPs either have lower or higher priority than BOTH the Xdump system and Xdump tool together.