COBOL/400 Language Help
Format 3 (Sort/Merge Files)
->->--I-O-CONTROL.----------------------------------------------------------->
->-*---------------------------------------------------------------------*-><-
+ *---------------------------------------------------------------* +
+ + *-------------* + +
+ V V + + +
*-SAME-*------------*-*------**-----*-file-name-3-*-------------*-*---*
*-RECORD-----* *-AREA-**-FOR-* *-file-name-4-*
*-SORT-------*
*-SORT-MERGE-*
- The RERUN clause specifies that checkpoint records are to be taken.
Subject to the restrictions given with each phrase, you can specify more than
one RERUN clause.
The MULTIPLE FILE TAPE clause specifies that two or more files share the
same physical reel of tape.
This clause is syntax-checked, but it has no effect on the running of the
program. The function is provided by the system through the CRTTAPF,
CHGTAPF, and OVRTAPF CL commands.
Assignment-name-1 can be any user defined word.
- A checkpoint record is to be written for every integer-1 record
in file-name-2 that is processed.
- When you specify multiple integer-1 RECORDS phrases, no two of
them may specify the same file-name-2.
The SAME AREA clause specifies that two or more files, that do not
represent sort or merge files, are to use the same main storage area during
processing.
The files named in a SAME AREA clause need not have the same organization
or access.
You must specify file-name-3 and file-name-4 in the
FILE-CONTROL paragraph of the same program.
- The SAME RECORD AREA clause specifies that two or more files are to use
the same main storage area for processing the current logical record.
All the files may be open at the same time. A logical record in the
shared storage area is considered to be both of the following:
- A logical record of each opened output file in the SAME RECORD AREA clause
- A logical record of the most recently read input file in the SAME RECORD
AREA clause.
- The SAME RECORD AREA clause allows you to transfer data from one file to
another with no explicit data manipulation because the input/output record
areas of the files are identical, and all are available to you.
You must specify file-name-3 and file-name-4 in the
FILE-CONTROL paragraph of the same program.
The SAME SORT-MERGE AREA clause is equivalent to the SAME SORT AREA
clause. The SAME SORT-MERGE AREA clause is syntax-checked, but has no
effect on the execution of the program.
When you specify the SAME SORT-MERGE AREA clause, at least one file-name
specified must name a sort or merge file.
The SAME SORT AREA clause is equivalent to the SAME SORT-MERGE AREA
clause. The SAME SORT AREA clause is syntax-checked, but has no effect
on the execution of the program.
When you specify the SAME SORT AREA clause, at least one file-name
specified must name a sort file.
File-name-2 must be a sequentially organized file.
- The COMMITMENT CONTROL clause specifies the files placed under commitment
control when they are opened. Files under commitment control are
affected by the COMMIT and ROLLBACK statements.
- The COMMIT statement allows the synchronization of changes to database
records while preventing other jobs from modifying those records until the
COMMIT is complete.
- The ROLLBACK statement provides a method of canceling changes made to
database files when those changes should not be made permanent.
- You can only specify files assigned to a device type of DATABASE with the
COMMITMENT CONTROL clause.
- Files under commitment control may have sequential, relative, or indexed
organization, and may have any access mode for a particular
organization.
- The system locks records contained in files under commitment control when
the records are accessed. Records remain locked until released by a
COMMIT or ROLLBACK statement.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.