Using the SORT and MERGE Statements
9.3 Sample Programs Using the SORT and MERGE Statements
Example 9–9 Using the INPUT PROCEDURE and OUTPUT PROCEDURE
Phrases
IDENTIFICATION DIVISION.
PROGRAM-ID. SORTC.
*********************************************************
*
This program shows how to use the INPUT
*
*
PROCEDURE and OUTPUT PROCEDURE phrases of the
*
*
SORT statement. Input to the sort is two files
*
*
containing the same type of data. Records with
*
*
a "D" status-code are not released to the sort.
*
*
The program eliminates duplicate records by
*
*
adding their amounts to the amount in the first
*
*
record with the same account number. Only records
*
*
with unique account numbers are written to
*
*
the output file. The fields to be sorted are
*
*
S-KEY-1 and S-KEY-2. The sort sequence is amount
*
*
within account number.
*
Содержание COBOL AAQ2G1FTK
Страница 22: ......
Страница 30: ......
Страница 94: ......
Страница 110: ......
Страница 146: ......
Страница 180: ......
Страница 194: ...Processing Files and Records 6 1 Defi...
Страница 300: ......
Страница 490: ......
Страница 516: ......
Страница 517: ......
Страница 530: ......
Страница 534: ......
Страница 590: ......
Страница 620: ......