RELEASE Statement

The RELEASE statement makes records available to the initial phase of a sort operation.

General Format

RELEASE record  [ FROM source-rec ]

Syntax Rules

  1. record is the name of a record of a sort file described in an SD entry in the File Section.
  2. source-rec is a data item.
  3. A RELEASE statement can appear only in an input procedure to a SORT verb.
  4. record and source-rec may not have overlapping storage.

General Rules

  1. The RELEASE statement makes record available to the input phase of a sort operation. See SORT Statement for more information.
  2. 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.
  3. 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.
  4. The size of the record released to the sort operation is determined by the size of record.
  5. 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.