Closed ghost closed 9 years ago
There are several COBOL syntax errors in this program:
*
" for a comment must be in column 7 of the card. The first line of the program is treated as a comment, since it comes before IDENTIFICATION DIVISION
.ENVIRONMENT DIVISION
is required, as is its subordinate CONFIGURATION SECTION
, SOURCE-COMPUTER
, and OBJECT-COMPUTER
paragraphs. Also the INPUT-OUTPUT SECTION
is required with its FILE-CONTROL
paragraph (which may be empty, however). I think the reason for this is that it was difficult to conceive of a COBOL program at that time that wouldn't have files or local data. It wasn't until (I think) the COBOL-85 standard that those elements became completely optional.END-OF-JOB.
"The following deck compiles and executes:
? USER=PAUL
? COMPILE 0COB/PAUL WITH COBOL FOR LIBRARY
? DATA CARD
000100 * HELLO WORLD PROGRAM 00100
000200 IDENTIFICATION DIVISION. 00200
000300 PROGRAM-ID. HELLO. 00300
000400 ENVIRONMENT DIVISION. 00400
000410 CONFIGURATION SECTION.
000420 SOURCE-COMPUTER. B-5500.
000430 OBJECT-COMPUTER. B-5500.
000450 INPUT-OUTPUT SECTION.
000460 FILE-CONTROL.
000500 DATA DIVISION. 00500
000600 WORKING-STORAGE SECTION.
000610 77 W-NOTHING PIC 9(4) COMP.
000700 PROCEDURE DIVISION. 00700
000750 MAIN-LINE.
000800 DISPLAY "HELLO, WORLD" 00800
001000 STOP RUN. 99999999
999900 END-OF-JOB.
? END
COBOL program gets EOF NO LABEL during batch compile under TSS:
Submitted by Terry Heidelberg on 2015-05-10.