INSERT Insert New Record in File
Format
INSERT (chan[,fileopt])varlist
Where:
chan | Channel or logical file number of the file to which to write. | ||||||||||||||||||||||||
fileopt | Supported file options (see File Options):
| ||||||||||||||||||||||||
varlist | Comma-separated list of variables, literals, or IOL= options. |
Description
The INSERT directive is used to write a new record to a file (channel/logical file number). The syntax for this directive is identical to the WRITE directive; however, INSERT only writes a record if it does not exist and will return an error if the record already exists.
INSERT may be used against keyed, memory, ODBC and OCI files. When IND= is used with *MEMORY*, this directive inserts a new index.
See Also
WRITE RECORD Write Record
WRITE Add/Update Data in File
UPDATE Update Existing Record in File