Last active
August 29, 2015 14:12
-
-
Save pdemby/32db58cf8da94ada34e6 to your computer and use it in GitHub Desktop.
move-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IDENTIFICATION DIVISION. | |
PROGRAM-ID. ClearRecord. | |
ENVIRONMENT DIVISION. | |
INPUT-OUTPUT SECTION. | |
FILE-CONTROL. | |
SELECT INPUT-FILE | |
ASSIGN TO DISC | |
ORGANIZATION IS LINE SEQUENTIAL | |
ACCESS MODE IS SEQUENTIAL. | |
SELECT OUTPUT-FILE | |
ASSIGN TO DISC | |
ORGANIZATION IS LINE SEQUENTIAL | |
ACCESS MODE IS SEQUENTIAL. | |
DATA DIVISION. | |
FILE SECTION. | |
FD INPUT-FILE RECORD CONTAINS 50 CHARACTERS. | |
01 INPUT-RECORD PIC X(50). | |
FD OUTPUT-FILE RECORD CONTAINS 50 CHARACTERS. | |
01 OUTPUT-RECORD PIC X(50). | |
WORKING-STORAGE SECTION. | |
PROCEDURE DIVISION. | |
START-ROUTINE. | |
OPEN INPUT INPUT-FILE. | |
OUTPUT OUTPUT OUTPUT-FILE. | |
READ-ROUTINE. | |
MOVE SPACES TO INPUT-RECORD. | |
READ INPUT-FILE AT END GO TO END-ROUTINE. | |
MOVE SPACES TO OUTPUT-RECORD. | |
MOVE INPUT-RECORD TO OUTPUT-RECORD. | |
WRITE OUTPUT-RECORD. | |
GO TO READ-ROUTINE. | |
END-ROUTINE. | |
CLOSE INPUT-FILE. | |
CLOSE OUTPUT-FILE. | |
STOP RUN. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment