Hi GnuCOBOL team,
if you try to replace a statment beginning with a star we got several errors while compile.
F.e.:
COPY "tc2432A" REPLACING
==FD SCHL-DATEI== BY ==* SD SCHL-DATEI==.
From COBOL syntax view there is nothing, which should block this kind of replacing.
Please take a look in the attached testcase while using the script tc2432.sh:
cobc -x tc2432.cbl
./tc2432
Kind regards
Sebastian Steinweg
Easirun Europa GmbH
This is a nice edge case. The
REPLACINGstatement actually wants to "uncomment" a line, as only uncommented lines get into that stage of the preprocessor this currently does not work.COBOL 2002 says (emphasis by me):
This logical conversion also includes
Further on from
we see quite the same. Interestingly 7.2.1.3 Pseudo-text says:
So it seems this is actually a bug (at least in GC 2.2 which I had at hand, but I think this is identical in newer versions.