Debugging your programs
Use this information to learn about debugging TSO and CICSĀ® programs, and an insight into CICS trace.
The main aids to debugging IBM MQ for z/OSĀ® application programs are the reason codes returned by each API call. For a list of these, including ideas for corrective action, see:- IBM MQ for z/OS messages, completion, and reason codes for IBM MQ for z/OS
- Reason codes for all other IBM MQ platforms
This topic also suggests other debugging tools to use in particular environments.
Debugging TSO programs
The following interactive debugging tools are available for TSO programs:- TEST tool
- VS COBOL II interactive debugging tool
- INSPECT interactive debugging tool for C and PL/I programs
Debugging CICS programs
We 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 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 1.
The CICS trace entry for these values is AP0 xxx (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.
Name | Description | Trace sequence | Trace data |
---|---|---|---|
CSQCABNT | Abnormal termination | Before issuing END_THREAD ABNORMAL to IBM MQ. This is because of the end of the task and 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. We 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 IBM MQ for z/OS log print utility.) |
CSQCBACK | Syncpoint backout | Before issuing BACKOUT to IBM 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 IBM 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 an explicit syncpoint request from the application. | Unit of work information. |
CSQCEXER | Execute resolve | Before issuing EXECUTE_RESOLVE to IBM 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 IBM 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 IBM MQ for z/OS. | Object handle. |
CSQCLOSH | CLOSE handle | Before issuing MQCLOSE to IBM MQ for z/OS. | Object handle. |
CSQCLOST | Disposition lost | During the resynchronization process, CICS informs the adapter that it has been restarted 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 IBM MQ for z/OS. This is due to the end of the task and therefore the application might perform an implicit syncpoint commit. 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 IBM MQ for z/OS. | Object name. |
CSQCPMGD | PUT message data | Before issuing MQPUT to IBM MQ for z/OS. | Up to 40 bytes of the message data. |
CSQCPMGH | PUT message handle | Before issuing MQPUT to IBM MQ for z/OS. | Object handle. |
CSQCPMGI | PUT message ID | After successful MQPUT from IBM MQ for z/OS. | Message ID and correlation ID of the message. |
CSQCPREP | Syncpoint prepare | Before issuing PREPARE to IBM 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 IBM 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 IBM MQ for z/OS. | Object name. |
CSQCRBAK | Resolved backout | Before issuing RESOLVE_ROLLBACK to IBM MQ for z/OS. | Unit of work information. |
CSQCRCMT | Resolved commit | Before issuing RESOLVE_COMMIT to IBM 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 IBM 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 |