Interesting. I wasn't aware of the REPLACE statements existence. Maybe I should read the manual more often.... :) Unfortunately it has all of the COPY REPLACING's limitations. (Except about "stacked" COPY's.)
Thomas _____________________________________________________________ Thomas Berg Specialist IT Utveckling Swedbank AB (Publ) > -----Ursprungligt meddelande----- > Från: IBM Mainframe Discussion List > [mailto:[EMAIL PROTECTED] För Bill Klein > Skickat: den 9 november 2007 05:15 > Till: IBM-MAIN@BAMA.UA.EDU > Ämne: COBOL COPY statement w REPLACING... > > The documented (and functional) way to do partial replacement > in current > COBOL is documented at: > > http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy > 3lr31/8.1.7.3 > > Int the part starting, > "The COPY statement with REPLACING phrase can be used to > replace parts of > words." > > However, a better "example" is later at the page in the > section labeled > Example 3 > > NOTE WELL: > If/when you use this, the COPY member may NOT be used without the > REPLACING option, so you can only use this technique for > structures that are > ALWAYS replaced. > > *** > > As I said in my original note, for those wanting to "combine" COPY > processing and REPLACING processing - with nested COPY's, the > thing to do is > to use the > REPLACE statement > which can be coded in either the "main" source (before the > COPY statement - > or within any nested COPY member. You should use the REPLACE > OFF variation > AFTER the "main" COPY statement to turn it off. > > *** > > P.S. BOTH the ":TAG:" approach to partial word replacement and using > REPLACE with nested COPY's are portable to any Standard > conforming COBOL > compiler. ---------------------------------------------------------------------- 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