REMOVE Verb - Delete Key from Keyed File
Syntax
REMOVE (channelno,KEY=string{,ERR=lineref}{,DOM=lineref})
Description
For BBj-specific information, see REMOVE Verb - BBj.
The REMOVE statement deletes a key from a keyed file.
Parameter |
Description |
channelno |
Valid channel number. |
KEY=string |
Key to be removed. |
ERR=lineref |
Branch to be taken if an error occurs during execution. |
DOM=lineref |
Error branch to use if the key is not found. |
The KEY=, ERR=, and DOM= clauses can appear in any order.
PRO/5 fills the associated data record with nulls ($00$) and leaves the
file pointer at the key that alphabetically follows the removed key, or
at end-of-file. If the desired key does not exist, PRO/5 leaves the file
pointer where it was and reports a missing key error, !ERROR=11. A failed
REMOVE releases any record locks. REMOVE may be performed on keyed files
only.
All C-ISAM files created by INFORMIX4GL and ISQL are created without a
primary key. The REMOVE verb will not remove a record that has no primary
key from a file. Also, for C-ISAM files, a locked record is released after
any successful REMOVE operation, even if the record removed was not the
locked record.
Examples
1000 REMOVE(1,KEY="TEST KEY",ERR=9500)