Control Data Corporation 3300 Reference Manual page 145

Computer systems usasi cobol/ master
Table of Contents

Advertisement

60229400
INPUT PROCEDURE consists of one or more sections written consecutively
which must not be a part of any output procedure. An input procedure can
include any procedures needed to select, create, or modify records, and at
least one RELEASE statement to transfer a record to the sort file. Control
may be passed to an input procedure only when a related SORT statement is
being executed.
If
INPUT PROCEDURE is specified, control is passed to the
input procedure before file-name-l is sequenced by the SORT statement.
The compiler inserts a return mechanism at the end of the last section; and
when the last statement in the input procedure has been executed, the records
that have been released to the sort file are sorted.
OUTPUT PROCEDURE consists of one or more sections written consecutively
which must not be a part of any input procedure. An output procedure may
consist of any procedures required to select, modify, or copy the records
that are returned one at a time
1.'1
sorted order from the sort file. At least
one RETURN statement must be included in an output procedure to make the
sorted records available for processing. Control must not be passed to an
output procedure unless a related SORT statement is being executed. Control
passes to the output procedure after file-name-l has been sequenced by the
SORT statement. The compiler inserts a return mechanism at the end of the
last section. When the last statement has been executed, this mechanism
terminates the sort and transfers control to the statement following the SORT
statement.
The procedural statements in an INPUT PROCEDURE or an OUTPUT
PROCEDURE are subject to the following restrictions:
• The procedure must not contain any SORT statements.
• The procedure must not transfer control to points outside the
procedure.
• The remainder of the Procedure Division must not contain any
transfers of control to points inside an input or output procedure.
If USING is specified, the SORT statement automatically performs the functions
of the OPEN, READ, USE, and CLOSE statements for file-name-2. All the
records in file-name-2 are transferred automatically to file-name-l for
sorting. File-name-2 must not be open at the time of execution of the SORT
statement.
If GIVING is specified, all the sorted records in file-name-l are transferred
automatically to file-name-3. File-name-3 must not be open when the SORT
statement is executed. Execution of the SORT statement automatically opens
file-name-3 before the records are transferred and closes it after the last
record in the sort file is returned.
4-65

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 3300 and is the answer not in the manual?

This manual is also suitable for:

3500

Table of Contents