Amlan wrote:
As per the latest COBOL Version:
"COPY statements can be nested. However, nested COPY statements cannot
contain the REPLACING phrase, and a COPY statement with the REPLACING
phrase cannot contain nested COPY statements."
We have a requirement to have nested COPY starements with REPLACING
otherwise we will need major reqork in the system. Any suggestions or ideas
please.
I think I've run in to this before and the way I resolved it was to use
the REPLACE statement by itself at the beginning of the outermost
module. For example:
ID DIVISION.
PROGRAM-ID. PROGA.
REPLACE ==:SOMETHING:== BY ==SOMETHING-ELSE==
==:ANOTHER-THING:== BY ==YET-ANOTHER-THING==.
DATA DIVISION.
WORKING-STORAGE SECTION.
COPY COPYBOOK.
...
COPYBOOK can have the :SOMETHING: that needs replacing and can contain a
COPY statement for a copybook that has the :ANOTHER-THING: that needs
replacing.
Frank
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html