Skip to content

Other directives used for input/output processing

There are Thoroughbred Basic directives to define each file type as well as the directives we have discussed to read and write data. The DIRECT directive is used to create DIRECT files; SORT directive, SORT files; and so on. Each of these, and all their options, are described in the Thoroughbred Basic Language Reference. There are some additional directives that are input/output directives:

LOCK
Prohibits access to an entire file by any other task while this task has it open and locked. The EXTRACT directive prohibits access to only a single record.
REMOVE
The directive used to eliminate a data record and its key from any random access or indexed sequential access file type.
ERASE
Remove an entire file, deleting its entry in its logical disk directory and making its physical disk space available for reallocation.
IOLIST
Defines a list of variables to be used with reading and writing records that make use of field separators between fields (see the IOL= option for read and write directives in the Thoroughbred Basic Language Reference.
TABLE
Defines a character conversion table which is to be used on data records after reading or before writing whenever the TBL= option is specified in the read or write operation.
It is also important to note that the
FINPUT, INPUT, and PRINT directives were designed for the

keyboard, terminal screen, and printers. They have special capabilities, such as the ability to set the cursor or print position that separates them from the other input/output directives. These capabilities are covered in depth in the Thoroughbred Basic Language Reference. These directives also make use of mnemonic codes, which allow such operations as clear screen, page eject, reverse video, turn off cursor, etc. Mnemonics are discussed later in this chapter.

From the Thoroughbred Basic Developer Guide, version 8.9.1. Open this page in the PDF