INSERT statement
The INSERT statement is a library statement that adds COBOL statements to a source program that was included by a BASIS statement.
- sequence-number
- Can optionally appear in columns 1 through 6, followed by a space. The content of this field is ignored.
- INSERT
- Can appear anywhere within columns 1 through 72 in fixed source format, or columns 1 through 252 in extended source format, followed by a space and the sequence-number-field. There must be no other text in the statement.
- sequence-number-field
- A
number that must be equal to a sequence-number in
the BASIS source program. This sequence-number is
a six-digit number that the programmer assigns in columns 1 through
6 of the COBOL source line.
The numbers referenced in the sequence-number-field of INSERT or DELETE statements must always be specified in ascending numeric order.
The sequence-number-field must be a single number (for example, 000130). At least one new source program statement must follow the INSERT statement for insertion after the statement number specified by the sequence-number-field.
New source program statements following the INSERT statement can include any COBOL syntax.
Usage note: If INSERT or DELETE statements are used to modify the COBOL source program provided by a BASIS statement, the sequence field of the COBOL source program must contain numeric sequence numbers in ascending order. The source file remains unchanged. Any INSERT or DELETE statements referring to these sequence numbers must occur in ascending order.