Previous Topic: Redisplay the AbendNext Topic: Printing the Help File


Locate Where TASKNUM Was Initialized

To see where TASKNUM was initialized, enter TASKNUM in the Search= field and press Enter. This instructs CA InterTest for CICS to display the source statement defining TASKNUM. The following screen appears.

CA InterTest ‑ SOURCE LISTING DUMP ANALYSIS COMMAND ===> Program= COBDEMO Option # Stmt # Margin= 01 Search= ‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑‑ 00445 03 TASK‑SWITCH2 PIC 99. 00446 03 TASK‑SWITCH3 PIC X. 00447 03 TASKNUM PIC S9(5) COMP‑3. 00448 03 TASK‑TEXT. . . .

CA InterTest for CICS highlights statement number 447 in Working Storage, which defines TASKNUM as a COMP‑3 field. Notice that the VALUE clause needed to initialize TASKNUM is missing. Because TASKNUM never initialized, it does not contain a valid packed decimal value. When the program tries to add one to this field, a data exception occurs.

Using CA InterTest for CICS to determine the cause of the abend makes it easy to correct the error. For example, in this case you could initialize TASKNUM either by adding VALUE +0 to statement 447 or by coding the statement MOVE ZEROS TO TASKNUM in the Procedure Division. Then recompile the program.