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


INSERT Instruction of the EDIT Clause

INSERT adds one or more text lines before or after existing text or at a specified line in the existing text. If the SET OPTIONS statement specifies the AFTER IS ON option or if a SHOW instruction (described under a later instruction heading) precedes the current INSERT instruction, the results of the insert operation are listed at the terminal or on the Integrated Data Dictionary Activity List.

Syntax: INSERT Instruction of EDIT

►►─── INSert ──┬─ FIRst ───────┬─┬───────────────────────────┬────────────────►
               ├─ LASt ────────┤ └─ increment BY increment ──┘
               └─ line-number ─┘

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

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

Parameters

INSert

Inserts the specified text.

FIRst

Adds the new text before the existing text; the starting line number is equal to the current increment.

LASt

Adds the new text after the existing text, beginning at the last line number plus the current increment.

line-number

Adds the first line of new text at the specified unused line number within the existing text; line-number must be a 1- through 8-digit integer.

increment BY increment

Specifies the starting line number and the interline increment to be applied to new lines. Increment must be a 1- through 8-digit integer. If used, this clause must appear on the same input line as the INSERT keyword. For this clause only, the specified increment value 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 INSERT 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 INSERT instruction. If CEND is omitted, the DDDL compiler issues the END OF FILE BEFORE QUIT message.