tableBASE tables are processed in memory, but normally they are loaded into memory from disk-resident libraries, to which they may be stored after changes have been applied to the memory-resident version. A tableBASE library is a specialized dataset initialized in a special format by tableBASE. Each tableBASE library contains a directory of all the tables in the library, and the contents and definition for each table.
A company can utilize any number of libraries. To distinguish the libraries, each is given a name by which it may be referenced in an application program. The name used is the DDNAME which allocates the library dataset in the JCL for the application (or, in the case of CICS, the name of the CICS File definition that defines the library file to CICS). The delivered default library is MAINLIB. Additional libraries are defined through a call to tableBASE or by using the TBEXEC (DK1TEXEC) utility.
Libraries are allocated as VSAM, BDAM, or physical sequential (which will be used as if BDAM). Libraries are managed by the batch utility TBEXEC, or with tablesONLINE.
Library search order and uniqueness of table names
There may be many tableBASE libraries in existence. It is possible that more than one table may exist with the same name in different libraries. These tables may have completely different significance and contents. When a table is loaded into memory the named table is searched in all libraries where it might live (on the current LIB-LIST) by the application providing tableBASE with an ordered list of library names (LIB-LIST). tableBASE starts searching for the named table in the first library named in the LIB-LIST, then the second, and so on until the table is found or all libraries have been examined. If two tables with the same name, say, XXX, exist in more than one library, and the application requests a table named XXX is to be loaded into memory, the XXX table from the earliest library in the LIB-LIST will be loaded.
A tableBASE library will hold up to nine generations of each table, as specified in the table definition. For more information see GENERATION (fullword binary).