Programming errors that can cause storage violations

The purpose of this section is to outline a number of commonly occurring programming errors that can cause storage violations.

  1. Failing to GETMAIN sufficient storage. This is often caused by failure to recompile all the programs for a transaction after a common storage area has been redefined with a changed length.
  2. Runaway subscript. Make sure that your tables can only grow to a finite size.
  3. Writing data to an area after it has been FREEMAINed.

    When a task FREEMAINs an area that it has been addressing, it can no longer write data to the area without the risk of overwriting some other data that might subsequently be there.

  4. Hand posting an ECB for a canceled task.

    If a task waiting on a CICS® ECB is canceled, and then a transaction attempts to hand post the ECB when the resource being waited on becomes available, it may corrupt data belonging to some unrelated activity if the area once occupied by the ECB has been reused.

Related concepts
Avoiding storage violations
Overview of CICS storage protection and transaction isolation
Related tasks
Using transaction isolation
[[ Contents Previous Page | Next Page Index ]]