-
Notifications
You must be signed in to change notification settings - Fork 37
/
INTSORT
27 lines (27 loc) · 857 Bytes
/
INTSORT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
IDENTIFICATION DIVISION.
PROGRAM-ID. INTST.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT1 ASSIGN TO INP1.
SELECT OUTPUT1 ASSIGN TO OUT1.
SELECT WORK ASSIGN TO WRK.
DATA DIVISION.
FILE SECTION.
FD INPUT1.
01 INPUT-CUSTOMER.
05 CUSTOMER-ID-I PIC 9(5).
05 CUSTOMER-NAME-I PIC A(25).
FD OUTPUT1.
01 OUTPUT-CUSTOMER.
05 CUSTOMER-ID-O PIC 9(5).
05 CUSTOMER-NAME-O PIC A(25).
SD WORK.
01 WORK-CUSTOMER.
05 CUSTOMER-ID-W PIC 9(5).
05 CUSTOMER-NAME-W PIC A(25).
PROCEDURE DIVISION.
SORT WORK ON ASCENDING KEY CUSTOMER-ID-W
USING INPUT1 GIVING OUTPUT1.
DISPLAY 'SORT SUCCESSFUL'.
STOP RUN.