ADD
Add Filename
This directive is used to find a file and add its location information to the file control table. Memory is not allocated and a channel is not assigned. This speeds access to the file by performing the disk directory search prior to loading, but unlike the ADDR directive, does not take memory space.
Syntax
Section titled “Syntax”ADD file-name [,ERR=line-ref|,ERC=error-code]file-name- is any string of 8 characters or fewer used to name this file.
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”The ADD directive uses an entry in the file control table. The number of entries allowed in this table is system dependent. For more information on the maximum number of entries, please refer to the information on the IPLINPUT file CNF statement in the Thoroughbred Basic Customization and Tuning Guide.
Use ADD for files that are not public program files. Use ADDR for public programs.
ADD does not open the file or assign a channel number.
Files that are added to the File Control Table can be removed with the DROP directive.
If an attempt is made to DISABLE a logical disk directory which contains a file or program that has been added to the File Control Table with the ADD or ADDR directive, an ERR=0 results.
If an attempt is made to ADD a file, which already exists in, the File Control Table no error results.
If an attempt is made to ADD a file and the file cannot be found, an ERR=12 results.
Examples
Section titled “Examples”ADD "INDEX"finds the file “INDEX” and makes an entry in the File Control Table with its location information.
ADD A$,ERR=7999If A$=“INDEX”, has the same effect as the first example; in addition, branches to statement 7999 if the directive produces an error condition.
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