DISABLE
Prevent Logical Disk Access
This directive prevents access to a specified logical disk directory and the files it contains. This effectively removes the files contained on the specified logical disk directory from use until an ENABLE reverses this action.
Syntax
Section titled “Syntax”DISABLE disk-num [, LOCAL] [,ERR=line-ref|,ERC=error-code]disk-num- specifies the logical disk directory to DISABLE. Valid values are 0 through 35.
LOCAL- is an optional modifier that restricts this action to this task only. Other users on the same system are not restricted from using disk-num by this DISABLE.
line-ref- is the program line number or label to branch to if this directive produces an error.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”LOCAL is the effective value, even if it is not specified. No logical disk directory can truly be DISABLEd globally.
If the task is released (see RELEASE), all DISABLEs issued by that task are removed.
If an attempt is made to DISABLE a logical disk directory which still has files OPEN, an ERR=0 results.
If an attempt is made to DISABLE a logical disk directory which contains files that have been added to the File Control Table with the ADD or ADDR directives, an ERR=0 results.
If an attempt is made to DISABLE a logical disk directory which has already been DISABLEd, an ERR=14 results.
A DISABLE LOCAL must be removed by an ENABLE LOCAL; a DISABLE, by an ENABLE.
A logical disk directory may be DISABLEd both LOCALly and globally at the same time, requiring ENABLE LOCAL and ENABLE to reverse both.
DISABLE causes all unwritten cache buffer space to be written for the disk-num before designating it as DISABLEd.
Examples
Section titled “Examples”DISABLE 2removes the ability of this task to access the files on logical disk directory 2.
DISABLE AIf A = 2, has the same effect as the first example.
See also
Section titled “See also”From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF