RELEASE Statement [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
RELEASE Statement
The RELEASE statement can be used in an input procedure of a SORT
statement to transfer records from your program to the initial phase of
the sort operation.
Syntax
RELEASE record-name-1 [FROM identifier-1]
Parameters
record-name-1 the name of a logical record in the sort/merge file
description entry of the file referenced in the
associated SORT statement. It may be qualified.
Record-name-1 must not refer to the same storage area as
identifier-1.
identifier-1 the name of a data item described in your program,[REV
BEG] or a function-identifier. If it is a function, it
must be an alphanumeric function. If it is not a
function,[REV END] identifier-1 and record-name-1 must
not refer to the same storage area.
Description
A RELEASE statement may 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-1.
When the RELEASE statement is executed, a single record is made
available, from record-name-1, to the initial phase of the sort
operation. After the execution of the RELEASE statement, the logical
record is no longer available in the record area named by record-name-1
unless the associated sort/merge file is named in a SAME RECORD AREA
clause. If the sort/merge file is named in the clause, the logical
record is available to the program as a record of the other files named
in the SAME AREA clause, as well as to the sort/merge file.
If the FROM phrase is used in a RELEASE statement, the contents of
identifier-1 are moved to record-name-1, then the contents of
record-name-1 are released to the sort file.
Although the logical record named by record-name-1 might no longer be
available, the data in identifier-1 remains available following execution
of the RELEASE statement (as stated in the preceding paragraph).
When control passes from the input procedure, the sort file consists of
all those records placed in it by the execution of RELEASE statements.
MPE/iX 5.0 Documentation