I need this information: I have a Cobol 6.3 program “PROGRAM1” that includes a copy statement COPY1. COPY1 contains only data definition, it can be included in WORKING STORAGE or LINKAGE SECTION. I need to tailor the copy in the inclusion process. I need to include only the statement between two eye-catchers. It doesn’t matter the content of the eye-catcher, but it must be a comment, because COPY1 is included In a lot of other COBOL programs, that must include the copy as is without significant modification.
Below an example:
PROGRAM1:
IDENTIFICATION DIVISION.
PROGRAM-ID. PROGRAM1.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY COPY1 from eye-catcher 1 to eye-catcher 2**.
... Rest of program data definition ...
PROCEDURE DIVISION.
... Rest of program logic ...
STOP RUN.
** This isn’t a valid COBOL statement. It’s only for clarity.
COPY1:
01 AREA1 PIC X (10).
...eye-catcher 1...
01 AREA2 PIC X (10).
...eye-catcher 2...
01 AREA3 PIC X (10).
I need to include only :
01 AREA2 PIC X (10).
I've searched but found nothing. any idea?
If you are not allowed to modify COPY1 as @BruceMartin suggests, try...