Previous Topic Next topic Print topic


The RELEASE Statement

The RELEASE statement transfers records to the initial phase of a SORT operation.

General Format


*

Syntax Rules

  1. A RELEASE statement can only be used within the range of an input procedure associated with a SORT statement for a file whose sort-merge file description entry contains record-name. (See the topic The SORT Statement.)
  2. Record-name must be the name of a logical record in the associated sort-merge file description entry and can be qualified.
  3. ANS85 If identifier is a function-identifier, it must reference an alphanumeric function. When identifier is not a function-identifier,

    record-name and identifier must not reference the same storage area.

  4. OSVSVSC2MF Record-name can be defined as a floating-point item.
  5. OSVSVSC2MF Identifier can be a floating-point item.

General Rules

  1. The execution of a RELEASE statement causes the record named by record-name to be released to the initial phase of a sort operation.
  2. If the FROM phrase is used, the contents of the identifier data area are moved to record-name, then the contents of record-name are released to the sort file. Moving records takes place according to the rules specified for the MOVE statement without the CORRESPONDING phrase. The information in the record area is no longer available, but the information in the data area associated with identifier is available.
  3. After the execution of the RELEASE statement, the logical record is no longer available in the record area unless the associated sort-merge file is named in a SAME RECORD AREA clause. The logical record is also available as a record of other files referenced in the same SAME RECORD AREA clause as the associated sort-merge file, as well as the file associated with record-name. When control passes from the input procedure, the file consists of all those records which were placed in it by the execution of RELEASE statements.
Previous Topic Next topic Print topic