Types of Subpools

There are three types of subpools you can create:

Table 1. Types of Subpools
Subpool Description Exists until:
PRIVATE Satisfy only the subpool creator's requests for free storage. A program can do any manipulations it wants to a PRIVATE subpool without affecting other programs.

Only one PRIVATE subpool with the same name can be active at a time; therefore, a single program can create several subpools with the same name. When CMS activates a new PRIVATE subpool with the same name as an existing subpool, it pushes the previous subpools back on the LIFO stack. When CMS deletes the current subpool, the previous one is popped from the stack and becomes active again.

  • The program that created it explicitly deletes it,
  • SVC 202/CMSCALL termination, or
  • CMS performs abend recovery.
SHARED Allow you to share free storage or data with other programs. Unlike PRIVATE subpools, SHARED subpools can be used by any program that the subpool creator calls, or that the called program calls, and so on. For example, assume PROGA creates a SUBPOOL named MINE. PROGA calls PROGB, PROGB calls PROGC, and PROGC calls PROGD. All of the programs in the calling chain (PROGA, PROGB, PROGC, and PROGD) can request free storage from MINE.
  • Any program on the calling chain explicitly deletes it,
  • SVC 202/CMSCALL termination of the program that obtained the storage, or
  • CMS performs abend recovery.
GLOBAL Allow you to organize storage by its intended function (any program running in the virtual machine can use a global subpool) and to save data across program invocations (GLOBAL subpools still exist after SVC 202/CMSCALL termination).

To retain GLOBAL subpools during abend recovery, specify SYSTEM=YES on the SUBPOOL macro. Using storage from GLOBAL subpools is useful when you create nucleus extensions that must retain data across invocations or abend processing.

  • A program issues the SUBPOOL DELETE macro, or
  • CMS performs abend recovery if SYSTEM=NO is specified on the SUBPOOL macro.