Removes the selected record from a collection, but does not
remove that record from the data file in which it resides.
Format
DROP [collection-name]
1 – Argument
collection-name
Is the name of a collection. If the DROP statement does not
contain this argument, it affects the CURRENT collection.
2 – Example
In the following example, a record is stored in YACHTS and
a series of collections is formed. The DROP statement is
illustrated using the SELECT, DROP, ERASE, and PRINT statements
and the SHOW collection-name command:
DTR> READY YACHTS WRITE
DTR> STORE YACHTS USING BUILDER = "HINKLEY",
DTR> FIND YACHTS WITH BUILDER = "HINKLEY"
[1 record found]
DTR> FIND A IN CURRENT
[1 record found]
DTR> FIND B IN YACHTS
[114 records found]
DTR> SELECT B; PRINT B.BOAT
LENGTH
OVER
MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE
ALBERG 37 MK II KETCH 37 20,000 12 $36,951
DTR> FIND C IN YACHTS
[114 records found]
DTR> SELECT LAST; PRINT
LENGTH
OVER
MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE
WRIGHT SEAWIND II SLOOP 32 14,900 00 $34,480
DTR> SHOW C
Collection C
Domain: YACHTS
Number of Records: 114
Selected Record: 114
DTR> DROP
DTR> SHOW C
Collection C
Domain: YACHTS
Number of Records: 114
Selected Record: 114 (Dropped)
DTR> PRINT
LENGTH
OVER
MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE
ALBERG 37 MK II KETCH 37 20,000 12 $36,951
DTR> DROP
Target record has already been dropped.
DTR> SHOW B
Collection B
Domain: YACHTS
Number of Records: 114
Selected Record: 1
DTR> DROP B
DTR> SHOW B
Collection B
Domain: YACHTS
Number of Records: 114
Selected Record: 1 (Dropped)
DTR> RELEASE C
DTR> DROP
Target record has already been dropped.
DTR> ERASE
No target record for ERASE.
DTR> RELEASE B
DTR> PRINT
No record selected, printing whole collection
LENGTH
OVER
MANUFACTURER MODEL RIG ALL WEIGHT BEAM PRICE
HINKLEY 0 00
DTR> DROP
No collection with selected record for DROP.
DTR> SHOW CURRENT
Collection A
Domain: YACHTS
Number of Records: 1
No Selected Record
DTR> SELECT; ERASE; SHOW CURRENT
Collection A
Domain: YACHTS
Number of Records: 1
Selected Record: 1 (Erased)
DTR> DROP
No collection with selected record for DROP.
DTR>