Previous Topic: ERASE Instruction of the EDIT ClauseNext Topic: LIST Instruction of the EDIT Clause


REPLACE Instruction of the EDIT Clause

REPLACE removes the specified text lines from existing comment text or module source and adds new text beginning at the line vacated by the first removed line. If the SET OPTIONS statement specifies the AFTER IS ON or BEFORE IS ON option or if a SHOW ON instruction precedes the current REPLACE instruction, the DDDL compiler will list the results of the REPLACE operation (both the text removed and the existing text with additions) at the terminal or on the Integrated Data Dictionary Activity List.

Syntax: REPLACE Instruction of EDIT

►►─── REPlace ──┬─ FIRst ───────┬─┬────────────────────────┬──────────────────►
                └─ line-number ─┘ └─ TO ─┬─ LASt ────────┬─┘
                                         └─ line-number ─┘

 ►───┬───────────────────────────┬────────────────────────────────────────────►
     └─ increment BY increment ──┘

 ►─── user-text ──────────────────────────────────────────────────────────────►

 ►─── CEND ───────────────────────────────────────────────────────────────────►◄

Parameters

REPlace

Specifies a REPLACE operation.

FIRst

Removes the first line of existing text or begins the removal at the first line within the specified range of lines. The new text is added in place of the first deleted line.

line-number

Removes the specified line of existing text or begins the removal at the first text line within the specified range of lines. The first line of new text is added at the specified location.

TO LASt

Continues the removal and replacement of existing text through the last existing line.

TO line-number

Continues the removal and replacement of existing text through the specified line.

increment BY increment

Specifies the starting line number for the REPLACE FIRST instruction and the interline increment to be applied to replaced lines. Increment must be a 1- through 8-digit integer. If used, this optional clause must appear on the same input line as the REPLACE keyword. For this clause only, increment becomes the current line-increment value, overriding the SET OPTIONS SEQUENCE default or the temporary default established by the SEQUENCE instruction.

The RESEQUENCE option of the SET OPTIONS statement affects REPLACE operations as follows:

user-text

Specifies one line of text to be inserted, beginning in column 1. Each additional line of text must be coded on a separate input line.

CEND

Terminates the REPLACE instruction. If CEND is omitted, the DDDL compiler will issue the END OF FILE BEFORE QUIT message.