Releasing storage through the FREEMAIN and STORAGE macros

You release virtual storage by issuing a FREEMAIN macro or a STORAGE macro with the RELEASE parameter. Neither request releases the area from control of the job step but does make the area available to satisfy the requirements of additional requests for any task in the job step. The virtual storage assigned to a task is also released when the task terminates, except as indicated under Subpool handling. Implicit releasing of virtual storage is described under Freeing of virtual storage.

To release storage with the STORAGE macro, specify the amount, the address, and the subpool (SP parameter). If you are releasing all of the storage in a subpool, you can issue the SP parameter without specifying the length and the address. Releasing all of the storage in a subpool is called a subpool release.

Note: FREEMAIN can free a page that has been protected through the PGSER macro with the PROTECT option.