Previous Topic: Prevent a Storage ViolationNext Topic: Resume Program Execution


Inspect the FREEMAIN Statement

  1. Page back to find out what caused the error.
  2. Press PF7.

    The following screen appears.

    CA InterTest for CICS Release 9.1.00 - PROTSYM FILE ABEND DETECTED BREAKPOINT COMMAND ===> Program= PLIDEMO Option # Stmt # Margin= 01 Search= ------------------------------------------------------------------------------- _____ CKPTNAME | PROTCPF _____ NUP_AREA | THIS IS NOT A NAME PRIME THE _____ REC_LEN | +00681. _____ INPUT_REC_2 | ......................... _____ OUTPUT_REC_2 | ......................... ---------+--------------------------------------------------------------------- _ 1416.1 1 STORVIOL: _ 1417.1 /* EXEC CICS GETMAIN SET(INPUT_REC_PTR) _ 1418.1 LENGTH(6144) */ _ 1419.1 DO; _ 1420.1 1 1 DCL DFHENTRY_BF6577CC_B36530EB BASED(ADDR(DFHEI0) _ 1421.1 ASSEMBLER) ENTRY(*,POINTER,FIXED BIN(15)); _ 1422.1 1 1 CALL DFHENTRY_BF6577CC_B36530EB('. {. ..ð.0462000 _ 1423.1 00 03 00 00 8C 00 F0 F4 F6 F2 F0 F0 F0 F0 'X */,INPUT_R _ 1424.1 1 1 END; _ 1425.1 /* EXEC CICS FREEMAIN DATA(INPUT_REC) */ _ 1426.1 1 DO; _ 1427.1 1 1 DCL DFHENTRY_BF6577CC_B36C7BE6 BASED(ADDR(DFHEI0) _ 1428.1 ASSEMBLER) ENTRY(*,*);

    Look at the FREEMAIN statement that releases the storage for INPUT_REC.

    Now it is clear why the storage violation occurred. The demo program released the storage for INPUT_REC. After releasing the storage, the program tried to move data to INPUT_REC_2, which is part of INPUT_REC.

    To correct the problem, you have to remove the FREEMAIN statement or change its location, and then recompile the program. However, one of the benefits of CA InterTest for CICS is that you do not have to correct a problem when you discover it. Instead, you can go around the problem and continue testing the program.

    Now we will redisplay the breakpoint.

  3. Press Clear.

    CA InterTest for CICS redisplays the automatic breakpoint.