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. |
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
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
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
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
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
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 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
WORKING-STORAGE SECTION. | |
01 OLD-DATE PIC X(6) | |
01 NEW-DATE PIC X(8). | |
PROCEDURE-DIVISION. | |
CONVERT-DATE. | |
MOVE OLD-DATE (5:2) TO NEW-DATE (3:2) | |
MOVE OLD-DATE (1:4) TO NEW-DATE (5:4). | |
MOVE "20" TO NEW-DATE (1:2). |
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. CALCULATOR. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
01 NUM1 PIC 9(3) VALUE 0. | |
01 NUM1-TXT PIC X(3) VALUE SPACES. | |
01 NUM2 PIC 9(3) VALUE 0. | |
01 NUM2-TXT PIC X(3) VALUE SPACES. | |
01 RESULT PIC S9(6)V9(2) VALUE 0. | |
01 RESULT-EDIT PIC -ZZZ,ZZ9.99. |
OlderNewer