COBCH1873 Nested COPY REPLACING not supported

The program includes a copy file that has been copied in using a COPY REPLACING statement that itself contains another COPY REPLACING. This is not allowed when compiling for an IBM dialect.

Resolution:

Correct the code and recompile as before, or recompile for a dialect other than an IBM dialect.

Example:

In the following example, the dialect is set for IBM ENTCOBOL, and the PROCEDURE DIVISION copies in a copy file using COPY REPLACING. In this example, assume that the COPY1 copy file also contains a COPY REPLACING.

      $set dialect(entcobol)
       id division.
       program-id err1873.
       data division.
       working-storage section.
       01 x1 pic x(10).
       procedure division.
           copy "copy1" replacing ==move== by ==mov==.