Page 1 of 1
Compiler option to avoid comments in the COBOL program.
Posted: Fri May 25, 2018 9:34 am
by Akshya Chopra
Hi,
Is there any Compiler option to avoid comments in the COBOL program? I ask so because there is a program in the baseline library of our programs where some lines are left un-commented in between the description of the program but program compiles.
Re: Compiler option to avoid comments in the COBOL program.
Posted: Fri May 25, 2018 11:58 am
by enrico-sorichetti
why not look Yourself at the manual ?

Re: Compiler option to avoid comments in the COBOL program.
Posted: Fri Aug 24, 2018 10:17 pm
by trudeaun
COBOL (IBM's anyway) only has single line comments and no mechanism for extending them to cover multiple lines. If you have uncommented lines between comment lines, the compiler will be attempting to compile the uncommented lines.
Debug lines, which have a D rather than an * in column 7, can be compiled or not depending on whether "WITH DEBUGGING MODE" is specified in the SOURCE COMPUTER paragraph. There's no option to compile comments with a * in column 7.
Re: Compiler option to avoid comments in the COBOL program.
Posted: Sat Aug 25, 2018 1:43 am
by Robert Sample
Prior to Enterprise COBOL, there was REMARKS paragraph that was part of the IDENTIFICATION DIVISION. Also, if there is a DATE-COMPILED. clause in the IDENTIFICATION DIVISION, anything written until the next COBOL language element will be treated as a comment.
There is no compiler option to avoid comments, however. Review the Programming Guide manual for compiler options.