COBOL Manual for TNS and TNS/R Programs

Source Text Manipulation
HP COBOL Manual for TNS and TNS/R Programs522555-006
10-15
REPLACE Statement
pseudo-text-2
can be null. A character-string within pseudo-text-2 can continue on the next
line, but both characters of the pseudo-text delimiter (==) must be on the same
line.
text-word
is any character-string or separator except space. It cannot be a concatenation
expression.
OFF
marks the end of the scope of replacement of the most recent REPLACE
statement.
Usage Considerations:
Comment Lines and Directive Lines in Pseudo-Text
Pseudo-text can contain comment lines and directive lines (that is, the text-words
in pseudo-text can be organized as comment lines and directive lines).
Where REPLACE Statements Can Be Used
With these exceptions, a REPLACE statement can occur anywhere in the source
text that a character-string can occur:
°
A REPLACE statement cannot appear within the body of another REPLACE
statement.
°
A REPLACE statement cannot appear within source text introduced by another
REPLACE statement.
°
If the word REPLACE appears either in a comment-entry or in a place where a
comment-entry can appear, it is considered part of the comment-entry, not as
the keyword that begins a REPLACE statement.
°
The keyword REPLACE must be preceded by a period separator, except when
it begins the first statement of a separately compiled program.
°
A REPLACE statement cannot appear on the same line as an SQL/MP or
SQL/MX statement.
All seven characters of the keyword REPLACE must appear on the same source
text line. The remainder of the statement can continue across additional program
text lines, in accordance with the continuation conventions of the reference format.
text-word
====
VST251.vsd