Select Keep Legacy Copybooks in the General extraction options for COBOL if you want Component Maker not to generate modified copybooks for the component. Component Maker issues a warning if including the original copybooks in the component would result in an error.
Example 1:
[COBOL] 01 A PIC X. PROCEDURE DIVISION. COPY CP. [END-COBOL] [COPYBOOK CP.CPY] STOP RUN. DISPLAY A. [END-COPYBOOK CP.CPY]
For this example, Component Maker issues a warning for an undeclared identifier after Dead Code Elimination.
Example 2:
[COBOL] PROCEDURE DIVISION. COPY CP. STOP RUN. P. [END-COBOL] [COPYBOOK CP.CPY] DISPLAY "QA is out there" STOP RUN. PERFORM P. [END-COPYBOOK CP.CPY]
For this example, Component Maker issues a warning for an undeclared paragraph after Dead Code Elimination.
Example 3:
[COBOL] working-storage section. copy file. PROCEDURE DIVISION. p1. move 1 to a. p2. display b. display a. p3. stop run. [END-COBOL] [COPYBOOK file.cpy] 01 a pic 9. 01 b pic 9. [END-COPYBOOK file.cpy]
For this example, the range component on paragraph p2 looks like this:
[COBOL] WORKING-STORAGE SECTION. COPY FILE1. LINKAGE SECTION. PROCEDURE DIVISION USING A. [END-COBOL] while, with the option turned off, it looks like this: [COBOL] WORKING-STORAGE SECTION. COPY FILE1-A$RULE-0. LINKAGE SECTION. COPY FILE1-A$RULE-1. [END-COBOL]
That is, turning the option on overrides the splitting of the copybook file into two files. Component Maker issues a warning if that could result in an error.