COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 117 OPEN Statements
?NONSTOP
IDENTIFICATION DIVISION.
...
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT EMPLOYEE-MASTER ASSIGN TO "EMPMAST"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC.
...
SELECT LISTING-FILE ASSIGN TO "LISTOUT"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
...
PROCEDURE DIVISION.
...
OPEN I-O EMPLOYEE-MASTER WITH TIME LIMITS SYNCDEPTH 1
OPEN OUTPUT LISTING-FILE
PERFORM
PERFORM executes one or more procedures in a program, simply or with looping. When a
procedure-name is a section-name, PERFORM executes all the paragraphs in that section.
Unconditional PERFORM
Unconditional PERFORM executes a procedure, group of procedures, or imperative statement one
time. When execution reaches the end of the procedure, group of procedures, or imperative
statement, control returns to the statement following the PERFORM statement.
procedure-group
proc-1
is a paragraph-name or section-name. Without THROUGH or THRU, proc-1 identifies
the only procedure that is to be executed. With THROUGH or THRU, proc-1 identifies
the first procedure of a group.
THROUGH, THRU
indicate that a group of procedures is to be executed.
proc-2
identifies the last procedure in the group.
imperative-statement
is defined under Imperative Statement (page 230).
PERFORM 389










