The RELEASE statement makes records available to the initial phase of a sort operation.
RELEASE record [ FROM source-rec ]
- record is the name of a record of a sort file described in an SD entry in the File Section.
- source-rec is a data item.
- A RELEASE statement can appear only in an input procedure to a SORT verb.
- record and
source-rec may not have overlapping storage.
- The RELEASE statement makes record available to the input phase of a sort operation. See
SORT Statement for more information.
- The RELEASE statement may be executed only while the program is executing an input procedure for a SORT verb that is sorting
the file associated with record. Any other use causes a runtime error.
- If the FROM phrase is used,
source-rec is moved to record according to the rules of the MOVE statement before record is released to the sort operation.
- The size of the record released to the sort operation is determined by the size of record.
- If a RELEASE statement is executed in a wrong context, e.g., outside an input procedure, the runtime displays the error
Illegal RELEASE." This error belongs to the class of
intermediate runtime errors that, upon occurrence, call installed error procedures.