Directives
REMOVE Delete Record from File
   
Format REMOVE (chan[,fileopt])
 
Where:
chan Channel or logical file number of the file from which to remove the record from.
fileopt Supported file options (see also, File Options):
BSY=stmtref Traps Error #0: Record/file busy
DOM=stmtref Missing record transfer
ERR=stmtref Error transfer
IND=num Record index
KEY=string$/num Record key
RTY=num Number of retries (one second intervals). This overrides the value defined by the 'WT' system parameter.
TIM=num Maximum time-out value in integer seconds.
stmtref Program line number or statement label to which to transfer control.
   
Description Use the REMOVE directive to delete a record from a file. The directive is only supported for fie types that have keys. (i.e., not for indexed files). The REMOVE directive and the specific options are dependent on the specific file type.

For Keyed, Direct, or Sort files, the KEY= option is mandatory to identify the record to be removed. The key specified must be the primary key for the file. With multi-keyed files, ProvideX removes all related alternate keys from the file automatically when executing this directive.

   
Example 0010 OPEN (20)"CSTFLE"
0020 INPUT "What customer do we delete? ",C$
0030 IF C$="" THEN STOP
0040 REMOVE (20,KEY=C$,DOM=0100)
0050 PRINT "Well that's gone.."
0060 GOTO 0020
0100 PRINT "Could not find ",C$
0110 GOTO 0020