When you create a template from a COBOL copybook, File Manager must compile the copybook as one step in the process of creating the template. When your COBOL copybook has a COPY command with a REPLACING clause, you might see a compile failure when attempting to create the template.
This compile failure is caused by, in most cases, File Manager inserting your COBOL copybook into a simple COBOL program using a COPY statement. The COPY command with a REPLACING clause in your copybook becomes nested in another COPY statement. Nested COPY commands with REPLACING clauses are illegal in COBOL, and the compile error results. However, when you specify a range in advanced copybook selection, the selected portion of the copybook is copied inline into the simple COBOL program, rather than being inserted using a COPY statement. Therefore, the COPY command with the REPLACING clause would not be nested and the compile would complete successfully.