COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Of course, with either EDIT or PS Text Edit (TEDIT), you could easily change all instances of
reserved words in a source program to another word; but if your data dictionary contains any
fields whose names have become reserved words, you might find the REPLACE statement a
handy tool. The REPLACE operation occurs conceptually after the COPY operation, but before
the remainder of the compilation.
Example 146 REPLACE Statement
DATA DIVISION.
REPLACE ==OFFICES== BY ==10==
==SQ-FT-SIZE== BY ==5==.
...
01 OFFS.
03 OFFICE-INFO OCCURS OFFICES TIMES.
05 DISTRICT PICTURE 99.
05 SQUARE-FEET PICTURE S9(SQ-FT-SIZE).
...
PROCEDURE DIVISION.
...
PERFORM REPORT-OFFICE OFFICES TIMES.
...
REPLACE Statement 511










