The FREE STORAGE statement instructs the system to release all or a part of a variable-storage area. The storage to be released must have been acquired by means of a GET STORAGE request in the issuing task or by another task running on the same terminal as the issuing task. A partial release is valid only for user storage; shared storage must be freed in its entirety.
►►─── FREE STORAGE ───────────────────────────────────────────────────────────► ►─┬─ STGID (storage-id) ──────────────────────────────────────────────┬─ ; ──►◄ └─ FOR (storage-location) ─┬──────────────────────────────────────┬─┘ └─ FROM (start-free-storage-location) ─┘
Specifies the 4-character identifier of the variable storage area to be released. Storage-id is either the symbolic name of a user-defined field that contains the ID or the ID itself enclosed in single quotation marks.
Specifies the variable-storage entry of the storage area to be released.
Releases a portion of the variable-storage area defined as user storage. Start-free-storage-location is the symbolic name of a user-defined field that contains the starting point of the storage area to be released. The system releases storage from the specified location to the end of the storage area.
The following example releases the storage area identified as 09PA:
FREE STORAGE STGID ('09PA');
Upon completion of the FREE STORAGE function, the ERROR_STATUS field in the IDMS DC communications block indicates the outcome of the operation:
The request has been serviced successfully.
The requested storage ID cannot be found.
The derived length of the variable-storage area is zero or negative.
|
Copyright © 2014 CA.
All rights reserved.
|
|