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. CRAZY_CODE_CAFE. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
PROCEDURE DIVISION. | |
ENTER-ROUTINE. | |
PERFORM APPETIZER THRU MAIN-COURSE. | |
DISPLAY "PAY CHECK". | |
STOP RUN. | |
APPETIZER. |
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. CRAZY_CODE_CAFE. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
PROCEDURE DIVISION. | |
ENTER-ROUTINE. | |
PERFORM APPETIZER. | |
DISPLAY "PAY CHECK". | |
STOP RUN. | |
APPETIZER. |
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
PROCEDURE DIVISION. | |
OPEN-ROUTINE. | |
OPEN INPUT EMPLOYEE-INPUT-FILE. | |
OPEN OUTPUT EMPLOYEE-OUTPUT-FILE. | |
READ-ROUTINE. | |
READ EMPLOYEE-INPUT-FILE | |
AT END GO TO CLOSE-ROUTINE. | |
MOVE EMPLOYEE-INPUT-LASTNAME TO EMPLOYEE-OUTPUT-LASTNAME. | |
MOVE EMPLOYEE-INPUT-LASTNAME TO EMPLOYEE-OUTPUT-LASTNAME. | |
MOVE EMPLOYEE-INPUT-HOURLY-RATE TO EMPLOYEE-OUTPUT-HOURLY-RATE. |
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
DATA DIVISION. | |
FILE SECTION. | |
FD EMPLOYEE-INPUT-FILE RECORD CONTAINS 80 CHARACTERS | |
VALUE OF FILE-ID IS WS-INPUT-FILE. | |
01 EMPLOYEE-INPUT-RECORD. | |
05 EMPLOYEE-INPUT-LASTNAME PIC X(30). | |
05 EMPLOYEE-INPUT-FIRSTNAME PIC X(20). | |
05 EMPLOYEE-INPUT-HOURLY-RATE PIC 9(3)V99. | |
05 FILLER PIC X(25). |
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
ENVIRONMENT DIVISION. | |
INPUT-OUTPUT SECTION. | |
FILE-CONTROL. | |
SELECT EMPLOYEE-INPUT-FILE | |
ASSIGN TO DISC | |
ORGANIZATION IS LINE SEQUENTIAL | |
ACCESS MODE IS SEQUENTIAL. | |
SELECT EMPLOYEE-OUTPUT-FILE |
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. DOES_NOTHING. | |
ENVIRONMENT DIVISION. | |
DATA DIVISION. | |
PROCEDURE DIVISION. | |
FIRST-PARAGRAPH. |
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. HELLO_WORLD. | |
ENVIRONMENT DIVISION. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
PROCEDURE DIVISION. | |
010-DISPLAY. | |
DISPLAY "Hello World". | |
STOP RUN. |
NewerOlder