HYPER-REMOVE
Removes a specific section, or all sections, from a hyper file by updating the lookup table in the hyper file definition item (H-pointer) and removing any applicable update locks from the sections; optionally, it deletes the data sections themselves.
Command class
TCL-I command.
Syntax
HYPER-REMOVE hyper-file-name {key-value|entry-no|*} {(options}
Syntax elements
hyper-file-name The file-specifier of the hyper file.
key-value Selects a hyper section by its corresponding key value in the lookup table.
entry-no Selects a hyper section by the offset of its entry in the lookup table. Entry numbers start at 1.
* Selects all hyper sections.
Options
L Suppress file locking on the hyper file (not recommended).
R Deletes the removed data section(s).
Operation
If you use the command with * as the second parameter, all hyper sections are selected. This enables a complete hyper file and its sections to be deleted. If the hyper sections have update locks this is not possible with DELETE-FILE, without first removing the locks.
If you use the command with a second parameter other than * the command first assumes that this is a key-value. If there no such key value in the lookup table, the command then tries it as an entry-no.
If the second parameter is neither a key value nor a valid entry number, or if you use the command without any second parameter, the lookup table is displayed and you are prompted for an entry number:
File table specified as: 1) key-value1 hyper-section-name1 2) key-value2 hyper-section-name2 3) key-value3 hyper-section-name3 ... Enter entry number of section ?
The command takes a lock on the hyper file (unless this is suppressed by the L option) and removes the selected section or sections from the lookup table, and therefore the hyper file. The command also removes the update lock from all removed sections.
Finally, if the R option is specified, the command also deletes the data sections.