ProvideX V8.20 > Language Reference > 2. Directives
349
UPDATE Directive
               Update Existing Record in File
Formats
UPDATE (chan[,fileopt])varlist
Where:
chan
Channel or logical file number of the file to which to write.
Supported file options (see also, File Options, p.808):
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 in integer seconds (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 UPDATE directive is used to update an existing record to a file (logical file
number / channel). The syntax for this directive is identical to the WRITE Directive,
p.381; however, UPDATE only updates a record if it already exists and will return an
error if the record does not exist.
UPDATE may be used against Keyed, Memory, ODBC, and OCI files. When IND= is
used with *MEMORY*, this directive overwrites an existing index.
See Also
WRITE Add/Update Data in File, p.381
WRITE RECORD Write Record, p.384
INSERT Insert New Record in File, p.161