SELECT PRINTFILE1
ASSIGN TO UPDPRINT2
ORGANIZATION IS SEQUENTIAL3
ACCESS IS SEQUENTIAL.4
|
SELECT COMMUTER-FILE1
ASSIGN TO COMMUTER2
ORGANIZATION IS INDEXED3
ACCESS IS RANDOM4
RECORD KEY IS COMMUTER-KEY5
FILE STATUS IS5
COMMUTER-FILE-STATUS
COMMUTER-VSAM-STATUS.
|
SELECT PRINTFILE1
ASSIGN TO UPDPRINT2
ORGANIZATION IS LINE SEQUENTIAL3
ACCESS IS SEQUENTIAL.4
|
- The SELECT clause chooses a file in the COBOL program to be
associated with an external data set.
- The ASSIGN clause associates the program's name for the file
with the external name for the actual data file. You can define the
external name with a DD statement or an environment variable.
- The ORGANIZATION clause describes the file's organization. For
QSAM files, the ORGANIZATION clause is optional.
- The ACCESS MODE clause defines the manner in which the records
are made available for processing: sequential, random, or dynamic.
For QSAM and line-sequential files, the ACCESS MODE clause is optional. These files always have
sequential organization.
- For VSAM files, you might have additional statements in the FILE-CONTROL paragraph depending on the type of VSAM file
you use.
|