5-50 Command Reference
INSERT
Purpose Inserts data from one buffer into another.
Syntax INSERT
overwrite-flag , buffer-field1 , buffer-field2 , position
[
,
[
invalid label
] [
, valid label
] ]
Process The INSERT command inserts data from
buffer-field1
into
bufferfield2
at a specified
position
.
Overwrite-flag
can be one of the following:
Overwrite-flag
Description
I Insert data into field, pushing
existing data over
O Overwrite existing data in field
The
buffer-field
fields can be one of the following:
Buffer Field1
and
position
Description
INPUT Input Buffer
Logical Field Name
(TEMP1)
Temporary Buffer
Field
Logical Field Name (LU1) Lookup Buffer Field
Logical Field Name (PR1) Printer Buffer Field
Logical Field Name
(Field1) [Index]
Array Buffer Field
Buffer-field1
and
position
only:
Number
Number prefixed by a
number sign (#)
Buffer-field1
only:
String
ASCII string delimited
by double quotes
Rule:
Position
must be numeric.
Optional Fields If there is not enough room in
buffer-field2
, control passes to
invalid label
.
Invalid
and
valid labels
are discussed in “Script Flow" at the beginning of this
chapter.
Example
This example inserts "This text will be inserted" into ASZPRICE at position
POSNUM.
INSERT I,"This text will be inserted",ASZPRICE,POSNUM
See Also VALIDATE