Programming errors that can cause storage violations

A number of commonly occurring programming errors can cause storage violations.

  1. Failing to obtain sufficient storage when using a getmain request. 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 released by using a freemain request.

    When a task releases an area that it has been addressing by using a freemain request, 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 might corrupt data that belongs to an unrelated activity if the area that was once occupied by the ECB has been reused.



dfhs138.html | Timestamp icon Last updated: Monday, 5 June 2017