Developer for System z, Version 7.6.x

# Limitation: Creating templates with COBOL copybooks containing a COPY command with a REPLACING clause

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.

To successfully create a template with a COBOL copybook containing a COPY command with a REPLACING clause:

1. Be sure to place the copybook and nested copybooks into the same PDS.
2. Choose "Advanced copybook template" in the Create Template" wizard.
3. Edit the copybook selection to specify a range (specifying a "From statement" of 1 and leaving the "To statement" blank selects the entire contents of the copybook).

Terms of use | Feedback
This information center is powered by Eclipse technology. (http://www.eclipse.org)