Directives
INSERT 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 Supported file options (see also, File Options):
BSY=stmtref Traps Error #0: Record/file busy
DOM=stmtref Missing record transfer
END=stmtref End-Of-File transfer (File full)
ERR=stmtref Error transfer
IND=num Record index
KEY=string$/num Record key
REC=name$ Record prefix (REC=VIS(string$) can also be used)
RTY=num Number of retries (one second intervals). This overrides the value defined by the 'WT' system parameter.
SIZ=num Number characters to read
TBL=stmtref Data translation table
TIM=num Maximum time-out value in integer seconds.
stmtref Program line number or statement label to which to transfer control.
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 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