This site uses cookies to store your information on your computer.
Read more
Accept
Deny
×
Close
Sign Up
Login
Member Login
Remember me
Forgot password?
Or using
Facebook
Google
Linkedin
Twitter
Sign Up
This site uses cookies to store your information on your computer.
Read more
Accept
Deny
Reg Harbeck
›
Cobol
on July 27 2020 at 12:20 AM
Edited
public
IDENTIFICATION DIVISION.
PROGRAM-ID. COBOL-JOKE.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ORIGINAL-PROGRAM PIC X(16) VALUE 'WRITTEN IN 1960.'.
01 NEW-PROGRAM REDEFINES ORIGINAL-PROGRAM.
05 FILLER PIC X(11).
05 NEW-PROGRAM-YEAR PIC 9(04).
05 FILLER PIC X.
01 FULL-DATE-TIME.
05 YEAR-NOW PIC 9(04).
05 FILLER PIC X(12).
PROCEDURE DIVISION.
DISPLAY "I HAD A COBOL JOKE "ORIGINAL-PROGRAM.
MOVE FUNCT...
more
IDENTIFICATION DIVISION.
PROGRAM-ID. COBOL-JOKE.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ORIGINAL-PROGRAM PIC X(16) VALUE 'WRITTEN IN 1960.'.
01 NEW-PROGRAM REDEFINES ORIGINAL-PROGRAM.
05 FILLER PIC X(11).
05 NEW-PROGRAM-YEAR PIC 9(04).
05 FILLER PIC X.
01 FULL-DATE-TIME.
05 YEAR-NOW PIC 9(04).
05 FILLER PIC X(12).
PROCEDURE DIVISION.
DISPLAY "I HAD A COBOL JOKE "ORIGINAL-PROGRAM.
MOVE FUNCTION CURRENT-DATE TO FULL-DATE-TIME.
MOVE YEAR-NOW TO NEW-PROGRAM-YEAR.
DISPLAY "I MODIFIED IT SO NOW IT IS "NEW-PROGRAM.
STOP RUN.
Finbar Burke
Haha, It still works Reg! you really should consider doing mainframe standup, niche I know but.....
PS you can indent on blogs, but on feeds you need to keep posts compact, hence the squeeze.
on July 27 2020 at 11:37 AM
Edited
thumb_up
1
thumb_down
0
comment
View all comments
Modal title
×
Modal title
×
Share