The COBOL OPEN
statement initiates file processing. File resources in COBOL are defined in the ENVIRONMENT DIVISION
, named in FD
(File Descriptor) paragraphs. These fd names are used to access physical disk files and various options are specified in a SELECT
clauses in the FILE-CONTROL
paragraph of the INPUT-OUTPUT SECTION
. A programmer is expected to test a FILE STATUS
identifier for status and error codes.
Modes include INPUT
, OUTPUT
, I-O
and EXTEND
.