cdump()

If your routine is running under z/OS, you can generate useful diagnostic information by using the cdump() function. cdump() produces a main storage dump with the activation stack. When cdump() is invoked from a user routine, the C/C++ library issues an OS IEATDUMP macro to obtain a dump of virtual storage. You can use the Interactive Problem Control System (IPCS) to format and analyze IEATDUMP dumps.

The DD definition for CEESNAP must include the desired data set name and DCB information:
 LRECL=4160,  BLKSIZE=4160, and RECFM=FBS

If the data set is not defined, or is not usable for any reason, cdump() returns a failure code of 1. This occurs even if the call to CEE3DMP is successful.

Because cdump() returns a code of 0 only if the IEATDUMP was successful or 1 if it was unsuccessful, you cannot distinguish whether a failure of cdump() occurred in the call to CEE3DMP or IEATDUMP. A return code of 0 is issued only if both IEATDUMP and CEE3DMP are successful.

Support for IEATDUMP dumps using the _cdump function is provided only under z/OS. In addition to a IEATDUMP dump, a Language Environment formatted dump is also taken.