Previous Topic: Display All the Fields in the SQLCANext Topic: DSNC Abends (z/OS Only)


Advanced Debugging Techniques

For specialized debugging tasks, you can instruct CA InterTest for CICS to halt your program at DB2 or SQL/DS calls other than an SQL application request. However, halting programs at these calls usually does not produce much useful information and might create problems.

To halt a program before selected DB2 or SQL/DS calls, use the CA InterTest for CICS request breakpoint capability, and follow these steps:

  1. Access the Request Breakpoint Selection menu, as explained in the chapter "Using Breakpoints."
  2. Enter X to the left of the CALLs field at the top of the menu. Press Enter.

CA InterTest for CICS displays the Request Breakpoint Selection menu for calls.

       CA InterTest MONITORING COMMAND BUILDER  REQUEST BREAKPOINT SELECTION                            Set  one or more types of CALLs in:                                   PROG=COBSQL         _ All CALLs            _ DSNHLI       _ DSNHADDR     _ DSNTIAR      _ ILBOINS0     _ COMDSTUB         _ TESTCONV                                    Enter 'n' to stop only every n'th time   ____                                                                                                                                                                                                                                                              PF1 Help       2            3 End        4 Return     5            6             PF7            8            9           10           11           12  

For DB2 this menu contains three relevant entries, as shown in the previous panel:

DSNHLI, DSNHADDR, and DSNTIAR.

DSNHLI—The call generated for all SQL application requests. To halt the program at these calls, set request breakpoints at all DB2 calls on the first Request Breakpoint Selection menu as described in Halt Programs Before and After Each SQL Request earlier in this chapter.

DSNHADDR—The call made to the SQL‑INITIAL routine that is inserted by the DB2 preprocessor in the COBOL Procedure Division to initialize the parameter lists needed for an SQL call.

The DB2 preprocessor generates structures identified at the 01-level by SQL‑PLISTn in COBOL Working‑storage. There is one structure for each EXEC SQL command in the program. The SQL‑PLISTns are parameter lists passed to DB2 at each SQL request. The values in the parameter lists are updated at application program initialization using a DSNHADDR call. The SQL‑INITIAL routine makes one call to DSNHADDR for each EXEC SQL command. Usually, setting a breakpoint at each DSNHADDR call will not produce much useful information.

DSNTIAR—The call made to the IBM‑provided DB2 subroutine that converts an SQL return code to a text message. The subroutine is approximately 32 KB in size and must be statically linked with your program. According to IBM, calling DSNTIAR dynamically from a CICS application program causes problems because of the GETMAINs issued by DSNTIAR.

Unless your application program needs the SQL return code text message, there is no need to set breakpoints at DSNTIAR calls. Instead, use the SQLRCODE command explained in the Handle SQL Return Codes section earlier in this chapter.