[Migrated content. Thread originally posted on 25 September 2009]
Hi,I don't understand how the COPY/REPLACING works in ACUCOBOL (v6 and v8). I expected this to work :
demo.cob:
identification division.
program-id. demo.
working-storage section.
copy "demo.cpy" replacing ==abc== by ==def==.
procedure division.
main section.
display def-var1
display def-var2
stop run
.
demo.cpy:
01 abc-misc.
03 abc-var1 pic x(05).
03 abc-var2 pic x(50).
But I am getting compile errors (undef DEF-var1 etc.). Does anybody see what is wrong here ? Do I need a specific compiler switch or so ?
Many thanks,
- Peter -



