RELEASE Statement COBOL

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

RELEASE Statement

A RELEASE statement may be used only 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.

record-name-1 must be the name of a logical record in the associated sort-merge file description entry and may be qualified.

record-name-1 and identifier-1 must not refer to the same storage area.

The execution of a RELEASE statement causes the record named by record-name-1 to be released to the initial phase of a sort operation.

When control passes from the input procedure, the file consists of all those records that were placed in it by the execution of RELEASE statements.

FROM Phrase

FROM Phrase

If the FROM phrase is used, literal-1 or the contents of identifier-1 are moved to record-name-1, then the contents of record-name-1 are released to the sort file. Moving 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-1 is available.

RELEASE Statement Example


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics