Closed GoogleCodeExporter closed 9 years ago
Actually, if I try to compile your statement with IBM Enterprise COBOL for z/OS
3.3.0, I get these warnings:
000518C 88 CUST-NFE-ENABLED value 1,2,9.
==000518==> IGYDS0001-W A blank was missing before character "2" in column 57. A blank was assumed.
==000518==> IGYDS0001-W A blank was missing before character "9" in column 59. A blank was assumed.
The Language Reference manual confirms this, even for the more recent Version 4
Release 2 of Enterprise COBOL for z/OS (page 48):
Period {.b}, Comma {,b}, Semicolon {;b}
A separator comma is composed of a comma followed by a space. A
separator period is composed of a period followed by a space. A separator
semicolon is composed of a semicolon followed by a space.
What COBOL compiler are you using?
Original comment by fady.mou...@gmail.com
on 4 Aug 2012 at 11:07
This is Alpha VMS COBOL. Not sure if that compiler gives warnings or not for
this statement.
Even if it would result in compiler warnings, it should still parse in your
grammar, right, since it's not an actual error.
Original comment by franc...@gmail.com
on 4 Aug 2012 at 2:17
IBM compiler warnings usually mean that some other combination of compiler
options will result in errors.
In this case, if I specify the "DECIMAL-POINT IS COMMA" option for instance,
the same line of code now gives errors:
000520C 88 CUST-NFE-ENABLED value 1,2,9.
==000520==> IGYDS0001-W A blank was missing before character "," in column 58. A blank was
assumed.
==000520==> IGYGR1240-E The number of digit positions or the position of the decimal point in
level-88 "VALUE" literal "1,2" was not compatible with the "PICTURE"
definition of the conditional variable. The literal was discarded.
==000520==> IGYGR1240-E The number of digit positions or the position of the decimal point in
level-88 "VALUE" literal ",9" was not compatible with the "PICTURE"
definition of the conditional variable. The literal was discarded.
If I put back space characters after the commas, the code compiles fine.
I guess the VMS COBOL lexer is smarter.
Original comment by fady.mou...@gmail.com
on 4 Aug 2012 at 3:52
Well I think we can live this with this, it's pretty easy to change the code to
fix it.
Original comment by franc...@gmail.com
on 6 Aug 2012 at 3:27
Original comment by fady.mou...@gmail.com
on 31 May 2013 at 7:42
Original issue reported on code.google.com by
franc...@gmail.com
on 3 Aug 2012 at 9:18