Previous Topic: Shared Kept StorageNext Topic: Using Scratch Records


Storage Pool Summary

Acquired storage is associated with the TCE, the CSA, or both. Additionally, user storage with the keep attribute is linked to the LTE.

The table below shows the procedures and conditions under which CA IDMS maintains linkage when storage is released. This table assumes that the FREE STORAGE request releases the entire storage area.

Storage Attribute

After FREE STORAGE Request

After Task Termination

USER

Storage is released.

Storage is released.

USER KEEP

Storage is released.

Storage remains allocated; TCE linkage is transferred to the LTE.

SHARED

Storage is released only if the in-use counter is set to zero.

Storage is released only if the in-use counter is set to zero.

SHARED KEEP

Storage is released only if the in-use counter is set to zero.

Storage remains allocated.

How Storage Is Allocated and Released

The following diagrams illustrate how CA IDMS allocates and releases storage.

  1. Task 1, running on terminal B, establishes addressability to two variable areas of kept storage. WRK1 is designated shared keep; WRK3 is designated user keep. Because task 1 is the only task using WRK1, the in-use counter associated with WRK1 is set to 1.

  2. Task 1 terminates without issuing a FREE STORAGE request for either WRK1 or WRK3. CA IDMS automatically decrements the in-use counter and transfers linkage for WRK3 to the LTE for terminal B. Because WRK1 is shared, CA IDMS does not maintain linkage to the LTE. Although WRK1 has no users, it remains allocated because an explicit FREE STORAGE was not issued.

  3. Task 2 is initiated on terminal B and issues a GET STORAGE request for WRK1. Task 3 is initiated on terminal C and issues a GET STORAGE request for WRK1. The in-use counter for WRK1 indicates two users.

  4. Task 3 issues a FREE STORAGE request for WRK1; CA IDMS turns the keep flag off and decrements the in-use counter by 1.

  5. Task 2 terminates without issuing a FREE STORAGE request for WRK1; CA IDMS decrements the in-use counter by 1. Because the keep flag is off and the in-use counter is set to zero, CA IDMS releases the storage associated with WRK1.