Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IDENTIFICATION DIVISION.
- PROGRAM-ID.CVADDR.
- AUTHOR.JELLE.
- ENVIRONMENT DIVISION.
- INPUT-OUTPUT SECTION.
- FILE-CONTROL.
- FD INVOER.
- 01 INPUT-REC PIC x(101).
- 88 EOF VALUE HIGH-VALUES.
- FD UITVOER.
- 01 OUTPUT-REC.
- 05 CLIENT-NAME PIC x(35).
- 05 CLIENT-ADDRESS PIC x(60).
- 05 CLIENT-NUMBER PIC x(4).
- 05 UNUSED PIC x(2).
- WORKING-STORAGE SECTION.
- PROCEDURE DIVISION.
- MAIN.
- OPEN INPUT INVOER
- PERFORM 1000-READ
- PERFORM UNTIL EOF
- PEFORM 2000-PROCESS-RECORD
- PERFORM 1000-READ
- END-PERFORM
- CLOSE INVOER
- UITVOER
- STOP RUN
- .
- 1000-READ.
- READ INVOER
- AT END
- SET EOF TO TRUE
- END READ
- .
- 2000-PROCESS-RECORD.
- UNSTRING INPUT-REC
- DELIMITED BY ","
- INTO
- CLIENT-NAME
- CLIENT-ADDRESS
- CLIENT-NUMBER
- MOVE SPACES TO UNUSED
- WRITE OUTPUT-REC
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement