Create a new tableBASE library

To create a new tableBASE library:

  1. Allocate the library dataset either by JCL for BDAM or by IDCAMS for VSAM.
  2. Format the dataset with a TBEXEC DEFINE NEWLIB operation.

Below is JCL to create both a VSAM and BDAM tableBASE library:

Figure 114. JCL to create both a VSAM and BDAM tableBASE library
JCL to create both a VSAM and BDAM tableBASE library

An equally valid variation is to allocate BDAMLIB as DISP=(,CATLG) in Step 1 (above) and reference it as DISP=OLD in Step 2 (above). If your installation uses only BDAM, only STEP2 is required.

Note:
Experience has shown that the control interval size cannot be set as desired using JCL to allocate a VSAM dataset. Although tableBASE VSAM supports control intervals of any allowable size, a size of 3584 bytes is recommended, thus the allocation of VSAM libraries by an IDCAMS step (as shown above) is also recommended.

The library size (nnnn) may be estimated by summing the following:

  • Nine blocks (of 3120) for the space directory, larger for libraries greater than 168K blocks.
  • Space to hold the contents of all generations of all tables. This value can be computed from the number of records and the size of each record in each table.
  • One block per table to hold the contents of all generations (step 2) for overhead for definitions of the tables.
  • Space for one generation of the largest table. This is needed when updating a table, because the new generation is stored on the library prior to deletion of the oldest generation.
  • Room for short-term growth.
  • An average of one block per 20 tables for the tables directory.
Note:
In the JCL example above, the DDNAMES BDAMLIB and, NEWLIB, and OLDLIB can be any name satisfying normal JCL rules. The names actually chosen are communicated to TBEXEC in the control statements.