Closed alirezag closed 2 weeks ago
@alirezag
Please use the following program instead.
hello.cbl
IDENTIFICATION DIVISION.
PROGRAM-ID. hello.
PROCEDURE DIVISION.
DISPLAY "Hello World!".
STOP RUN.
COBOL compilers normally ignore the first 6 characters and 73th and succeeding characters of each line. If the seventh character of a line is '*', then the 8th and succeeding characters of that line are comments. Thus, the following program is equivalent to the one above.
IDENTIFICATION DIVISION.
*comment 1
PROGRAM-ID. hello.
PROCEDURE DIVISION.
*comment 2
DISPLAY "Hello World!".
STOP RUN.
If you run cobj -free hello.cbl
, then the compiler accepts the following program.
IDENTIFICATION DIVISION.
PROGRAM-ID. hello.
PROCEDURE DIVISION.
DISPLAY "Hello World!".
STOP RUN.
thanks yes that fixed it.
I am able to compile cobol4j but it seems like I can't compile a basic program. Not sure if it is a dilect compatibility or a encoding issue:
HELLO.cbl
cc @royxue