161
INSERT Directive
Insert New Record in File
Formats
INSERT (chan[,fileopt])varlist
Where:
chan
Channel or logical file number of the file to which to write.
fileopt
BSY=stmtref Traps Error #0: Record/file busy
DOM=stmtref Missing record transfer
END=stmtref END-OF-FILE transfer
ERR=stmtref Error transfer
IND=num Record index
KEY=string$ Record key
REC=name$ Record prefix (REC=VIS(string$) can also be used)
RTY=num Number of retries (one second intervals)
TIM=num Maximum time-out value (support write operations for
TCP channels).
stmtref
Program line number or label to transfer control to.
Comma-separated list of variables, literals, and IOL= options.
varlist
Description
The INSERT directive is used to write a new record to a file (channel/logical file
however, INSERT only writes a record if 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