Before a table can be used, it must be defined. You can do so online using tablesONLINE (or the DK1TEXEC or DK1TDRV utilities), or you may define a table in your program via tableBASE. In this latter case, you actually specify the definition in a data structure known as a DEFINITION-BLOCK and then tell tableBASE to create the table (albeit an empty table) by use of the DT (Define Table) command:
MOVE 'TESTTBL' TO NEW-TABLE-NAME.
MOVE 'DT' TO NEW-TABLE-COMMAND.
CALL 'DK1TCALL' USING TB-PARM
NEW-TABLE-COMMAND-AREA
DEFINITION-BLOCK.
In the DEFINITION-BLOCK you supply such information as table organization, search method, passwords, row size, and key location. The table name is taken from the COMMAND-AREA. For the best performance, it is advisable to use a separate COMMAND-AREA for each open table.