The colon (:) character
With CMPR2, the colon character was a non-COBOL character that
COPY ... REPLACING allowed as part of its operands. This character
is a legal COBOL separator under Enterprise COBOL.
COPY A REPLACING == A == BY == X ==
== B == BY == Y ==
== A:B == BY == Z ==.
If member A contains:
MOVE A:B TO ID2.
These
are the differences between CMPR2 and Enterprise COBOL after COPY
... REPLACING has been performed.
CMPR2 NOCMPR2
MOVE Z TO ID2. MOVE X:Y TO ID2.
Because ":" is a separator under Enterprise COBOL, "A:B" is broken up into three separate tokens: "A" ":" and "B." The replacements for A and B are made first.