tableBASE tables are a collection of fixed-length data rows. Each row contains a key and unstructured data.
tableBASE tables provide a great performance advantage over disk-based tables for many types of data.
Applications such as tablesONLINE that access tableBASE tables can apply the column definitions to the table data. In tablesONLINE the column definitions themselves (or metadata) are contained in tables called Views.
Besides data rows, a tableBASE table also includes a table definition that defines such attributes as row length, key location, key size, organization, and search method.
Although tableBASE tables are usually loaded from and ultimately stored on a hard disk, tableBASE tables are entirely resident in memory during processing. All memory-resident tables have indexes that are created dynamically when loaded from the library (see Indexes and Alternate Indexes). Table data is compact; however, the table index(es) may not be (see Table organization).
tableBASE tables can be created in three ways:
- programmatically through a call to tableBASE
- online using tablesONLINE
- using utilities supplied with tableBASE.
In this guide we describe creating tables programmatically. You may create tables that exist only in memory for the duration of a particular job (temporary tables) or you may create tables that reside permanently in a tableBASE library on disk.
Each table that is stored in a tableBASE library must have a unique name. A valid table name is a string of 8 bytes that are not all spaces, all low values, all high values, or :TMPNAME.
There are certain classes of table names which are normally reserved for use by tablesONLINE. These names begin with a special character or lower-case alphabetic. For this reason, user-defined Data Table names should begin with an upper-case alphabetic; the remaining characters may be alphabetic, numeric, or special symbols. Although tableBASE will correctly process table names containing embedded spaces, e.g., “ABC 12”, these names are not recommended. In some utilities, e.g. TBCOMP, such table names must have quotation marks around them.
A linked table (also known as a “remote table”) is created when a user issues a command to open a table from a VTS-TSR by accessing the VTS-TSR like a tableBASE library. Use of the tableBASE run-time options VTSFIRST and VTSLAST or the ML command to supply the VTS name as part of the library search list (LIB-LIST) allows for the opening of linked tables.
- The use of linked tables has limitations. Most significantly, if you open a linked table within your local TSR, there will be no indication to you in cases where the actual table is changed, deleted or replaced.
- When a linked table is modified in the VTS-TSR, nothing is updated in the local TSR entry and subsequent access to the linked table may fail or produce inconsistent results if the table has been updated.