Download IBM Application System/400 System/38-Compatible

Transcript
SPECIFIC COBOL FILE PROCESSING
Characteristic
Control
Select/omit level keywords cannot be used for
the file.
DDS
For a COBOL file with an organization of RELATIVE, the Reorganize Physical File
Member (RGZPFM) CL command can:
Remove all deleted records from the file. Since COBOL initializes all relative file
records to deleted records, any record that has not been explicitly written will
be removed from the file. This causes the relative record numbers of all
records after the first deleted record in the file to change.
Change the relative record numbers if the file has a key and the arrival
sequence is changed to match a key sequence (with the KEYFILE parameter).
Either result of the CL command RGZPFM causes the COBOL concept of a relative file
to change.
COBOL Sequential File
A COBOL sequential file is a file in which records are processed in the order in
which they were placed in the file; that is, in arrival sequence. For example, the
tenth record placed in the file occupies the tenth record position and is the tenth
record to be processed. To process a file as a sequential file, ORGANIZATION IS
SEQUENTIAL must be specified in the SELECT clause, or the ORGANIZATION clause can
be omitted. A sequential file can only be accessed sequentially.
To write standard ANS COBOL X3.23-1974 to access a sequential file, the file must
be created with certain characteristics. The following table lists these characteristics and what controls them.
Characteristic
Control
The file must be a physical file.
The CL command CRTPF
The file cannot be a shared file.
The CL command CRTPF
The device specified in the assignment-name
must match the actual device to which the file
is assigned.
No key can be specified for the file.
DDS
The file must have a file-type of data.
The CL command CRTPF
Field editing cannot be used.
DDS
Line and position information cannot be specified.
DDS
Spacing and shipping keywords cannot be
specified.
DDS
Indicators cannot be used.
DDS
System-supplied functions such as date, time,
and page number cannot be used.
DDS
Select/omit level keywords cannot be used for
the file.
DDS
Chapter 7. System/38-Compatible COBOL Programming Considerations
243