IO INPUT-CUSTFILE ASSIGN TO EXTERNAL GARYDD ORGANIZATION IS LINE SEQUENTIAL IO OUTPUT-FILE ASSIGN TO EXTERNAL GARYOUT ORGANIZATION IS LINE SEQUENTIAL
FD INPUT-CUSTFILE RECORD CONTAINS 80 CHARACTERS.
01 INPUT-REC. 05 INP-ACTION-CODE PIC X(1). 05 INP-CUSTOMER-NO PIC X(6). 05 INP-CUSTOMER-NAME PIC X(20). 05 INP-CUSTOMER-ADDR PIC X(20). 05 INP-CUSTOMER-CITY PIC X(20). 05 INP-CUSTOMER-ZIP PIC X(9). 05 FILLER PIC X(4).
REC INPUT-REC INP-ACTION-CODE X1 INP-CUSTOMER-NO X6 INP-CUSTOMER-NAME X20 INP-CUSTOMER-ADDR X20 INP-CUSTOMER-CITY X20 INP-CUSTOMER-ZIP X9 FILLER X4
DS INREC
FD OUTPUT-FILE RECORD CONTAINS 80 CHARACTERS.
01 OUTPUT-REC. 05 OUTPUT-STATUS PIC X(2). 05 OUTPUT-CUSTOMER-NO PIC X(6). 05 OUTPUT-CUSTOMER-NAME PIC X(20). 05 OUTPUT-CUSTOMER-ADDR PIC X(20). 05 OUTPUT-CUSTOMER-CITY PIC X(20). 05 OUTPUT-CUSTOMER-ZIP PIC X(9). 05 OUTPUT-FILLER PIC X(3).
SD SORT-FILE RECORD CONTAINS 80 CHARACTERS DATA RECORD IS SORT-RECORD.
01 SORT-RECORD. 05 SORT-CUSTOMER-NAME PIC X(8). 05 FILLER PIC X(72).