Debugging your programs

The main aids to debugging WebSphere MQ for z/OS application programs are the reason codes returned by each API call. See the WebSphere MQ Application Programming Reference for a list of these and for more information, including suggestions for corrective action.

This chapter also suggests other debugging tools that you may want to use in particular environments.

Debugging CICS programs

You can use the CICS Execution Diagnostic Facility (CEDF) to test your CICS programs interactively without having to modify the program or program-preparation procedure. For more information about EDF, see the CICS Transaction Server for z/OS CICS Application Programming Guide.

CICS trace

You will probably also find it helpful to use the CICS Trace Control transaction (CETR) to control CICS trace activity. For more information about CETR, see the CICS Transaction Server for z/OS CICS-Supplied Transactions manual.

To determine whether CICS trace is active, display connection status using the CKQC panel. This panel also shows the trace number.

To interpret CICS trace entries, see Table 31.

The CICS trace entry for these values is AP0xxx (where xxx is the trace number specified when the CICS adapter was enabled). All trace entries except CSQCTEST are issued by CSQCTRUE. CSQCTEST is issued by CSQCRST and CSQCDSP.

Table 31. CICS adapter trace entries

Name Description Trace sequence Trace data
CSQCABNT Abnormal termination Before issuing END_THREAD ABNORMAL to WebSphere MQ. This is due to the end of the task and therefore an implicit backout could be performed by the application. A ROLLBACK request is included in the END_THREAD call in this case. Unit of work information. You can use this information when finding out about the status of work. (For example, it can be verified against the output produced by the DISPLAY THREAD command, or the WebSphere MQ for z/OS log print utility.)
CSQCBACK Syncpoint backout Before issuing BACKOUT to WebSphere MQ for z/OS. This is due to an explicit backout request from the application. Unit of work information.
CSQCCCRC Completion code and reason code After unsuccessful return from API call. Completion code and reason code.
CSQCCOMM Syncpoint commit Before issuing COMMIT to WebSphere MQ for z/OS. This can be due to a single-phase commit request or the second phase of a two-phase commit request. The request is due to a explicit syncpoint request from the application. Unit of work information.
CSQCEXER Execute resolve Before issuing EXECUTE_RESOLVE to WebSphere MQ for z/OS. The unit of work information of the unit of work issuing the EXECUTE_RESOLVE. This is the last indoubt unit of work in the resynchronization process.
CSQCGETW GET wait Before issuing CICS wait. Address of the ECB to be waited on.
CSQCGMGD GET message data After successful return from MQGET. Up to 40 bytes of the message data.
CSQCGMGH GET message handle Before issuing MQGET to WebSphere MQ for z/OS. Object handle.
CSQCGMGI Get message ID After successful return from MQGET. Message ID and correlation ID of the message.
CSQCINDL Indoubt list After successful return from the second INQUIRE_INDOUBT. The indoubt units of work list.
CSQCINDO IBM use only

CSQCINDS Indoubt list size After successful return from the first INQUIRE_INDOUBT and the indoubt list is not empty. Length of the list. Divided by 64 gives the number of indoubt units of work.
CSQCINQH INQ handle Before issuing MQINQ to WebSphere MQ for z/OS. Object handle.
CSQCLOSH CLOSE handle Before issuing MQCLOSE to WebSphere MQ for z/OS. Object handle.
CSQCLOST Disposition lost During the resynchronization process, CICS informs the adapter that it has been cold started so no disposition information regarding the unit of work being resynchronized is available. Unit of work ID known to CICS for the unit of work being resynchronized.
CSQCNIND Disposition not indoubt During the resynchronization process, CICS informs the adapter that the unit of work being resynchronized should not have been indoubt (that is, perhaps it is still running). Unit of work ID known to CICS for the unit of work being resynchronized.
CSQCNORT Normal termination Before issuing END_THREAD NORMAL to WebSphere MQ for z/OS. This is due to the end of the task and therefore an implicit syncpoint commit may be performed by the application. A COMMIT request is included in the END_THREAD call in this case. Unit of work information.
CSQCOPNH OPEN handle After successful return from MQOPEN. Object handle.
CSQCOPNO OPEN object Before issuing MQOPEN to WebSphere MQ for z/OS. Object name.
CSQCPMGD PUT message data Before issuing MQPUT to WebSphere MQ for z/OS. Up to 40 bytes of the message data.
CSQCPMGH PUT message handle Before issuing MQPUT to WebSphere MQ for z/OS. Object handle.
CSQCPMGI PUT message ID After successful MQPUT from WebSphere MQ for z/OS. Message ID and Correlation ID of the message.
CSQCPREP Syncpoint prepare Before issuing PREPARE to WebSphere MQ for z/OS in the first phase of two-phase commit processing. This call can also be issued from the distributed queuing component as an API call. Unit of work information.
CSQCP1MD PUTONE message data Before issuing MQPUT1 to WebSphere MQ for z/OS. Up to 40 bytes of data of the message.
CSQCP1MI PUTONE message ID After successful return from MQPUT1. Message ID and correlation ID of the message.
CSQCP1ON PUTONE object name Before issuing MQPUT1 to WebSphere MQ for z/OS. Object name.
CSQCRBAK Resolved backout Before issuing RESOLVE_ROLLBACK to WebSphere MQ for z/OS. Unit of work information.
CSQCRCMT Resolved commit Before issuing RESOLVE_COMMIT to WebSphere MQ for z/OS. Unit of work information.
CSQCRMIR RMI response Before returning to the CICS RMI (resource manager interface) from a specific invocation. Architected RMI response value. Its meaning depends of the type of the invocation. These values are documented in the CICS Transaction Server for z/OS Customization Guide. To determine the type of invocation, look at previous trace entries produced by the CICS RMI component.
CSQCRSYN Resynchronization Before the resynchronization process starts for the task. Unit of work ID known to CICS for the unit of work being resynchronized.
CSQCSETH SET handle Before issuing MQSET to WebSphere MQ for z/OS. Object handle.
CSQCTASE IBM use only

CSQCTEST Trace test Used in EXEC CICS ENTER TRACE call to verify the trace number supplied by the user or the trace status of the connection. No data.
CSQCDCFF IBM use only

Debugging TSO programs

The following interactive debugging tools are available for TSO programs:



© IBM Corporation 1993, 2002. All Rights Reserved