Purge. DORIC 9.65, INFO-Text software
Werbung
Werbung
PURGE
PURG
E [
Y]
[
N
]
permanently deletes all currently selected records.
arguments
An unqualified PURGE command permanently deletes all selected records from the selected datafile and selects all the previously unselected records.
Y (INFO-Text only) purges all text files for A-type items.
In an interactive session, PURGE Y suppresses the
DELETE TEXT ITEM FILES ? prompt.
N (INFO-Text only) does not purge text files for A- type items. In an interactive session PURGE N suppresses the
DELETE TEXT ITEM FILES? prompt.
notes
n
If you use the PURGE command in a program, INFO deletes the selected records without prompting you to verify the request.
n
When you use the PURGE command interactively, INFO issues the following prompt(s):
DELETE TEXT ITEM FILES? (Y OR N)>
INFO-Text only
THIS COMMAND WILL DELETE SELECTED RECORDS. OK?>
This allows you to check your purge request before INFO executes the purge. Respond as follows:
Y (Yes) to perform the purge.
<RETURN> or any character except 'Y' to return immediately to the ENTER COMMAND> level without executing the purge.
n
The existing file protections are maintained.
INFO Reference Manual Commands 407
PURGE
ISAM files
When records from a ISAM set are purged, then that set is packed and all other sets, including SET 1 (the NDX file) are deleted. The file relationships are always retained on the current set regardless of the set number.
Where a record(s) is locked by another user on an ISAM file and default record locking is being used, if a user attempts to purge, the message 'RECORD LOCKED DO
YOU WANT TO TRY AGAIN?' appears. If the user responds with 'N' or the record remains locked, then this record(s) will not be removed from the current set.
The variables $SETMIN and $SETMAX, $NOSEL and
$NOREC are set correctly to the number of records remaining in the set following the attempted purge. By checking the value of $NOSEL immediately after a purge, it will be possible to determine whether all records were successfully deleted or not.
To summarize: n
PURGE on SET 1 removes all sets apart from the current one, but leaves the current one compacted.
n
PURGE on SET > 1 removes all sets apart from the current one and set 1. Set 1 contains zero records and the current set is compacted.
In all cases existing read-write lock settings will be maintained on compacted set files.
example
ENTER COMMAND >SELECT D.EMP.MASTER
267 RECORD(S) SELECTED
ENTER COMMAND >RESELECT FOR STATUS = 'T'
13 RECORD(S) SELECTED
ENTER COMMAND >PURGE
THIS COMMAND WILL DELETE SELECTED RECORDS. OK?Y
254 RECORD(S) SELECTED
see also
$PURGE-LOCAL
RESELECT BY
SET
408 Commands INFO Reference Manual
Herunterladen
Werbung