Calling protocol

Standard IBM protocols are used to invoke tableBASE. Two parameters are common to all tableBASE calls:

  • TB-PARM passes environmental and release-specific information to tableBASE. For more information see TB-PARM V5 (64 bytes).
  • COMMAND-AREA provides key information to tableBASE such as the name of the table to be acted upon, the action to perform, and parameters to use. The xxxx-COMMAND-AREA is dynamic; normally, parts of it are updated with each call to tableBASE. For more information see COMMAND-AREA (72 bytes).
Note:
The “xxxx” in xxxx-COMMAND-AREA is a programmer-defined variable prefix in the application program code. xxxx-COMMAND-AREA may also be referred to as COMMAND-AREA in this manual.

Other parameters may be required by specific commands, for example, row data to be given to TBLBASE or optional data items used by the commands.

The last parameter must be marked with a high-order bit, and must be set. This is automatic in COBOL, but must be done explicitly in Assembler. It may also need to be explicitly set in C and other languages.

In addition to defining data structures to house the required and optional parameters (including those mentioned above), if you are using retrieval or update commands, space needs to be allocated for at least one row of the table data.

The general form of a C call to invoke the common tableBASE interface is:

#pragma linkage( TBLBASE, OS )
TBLBASE( TB-PARM, xxxx-COMMAND-AREA, parameter-1, parameter-2 );

The general form of a C++ call to invoke the common tableBASE interface is:

extern "OS" void TBLBASE( void * TB-PARM,
                          void * xxxx-COMMAND-AREA,
                          void * parameter-1,
                          void * parameter-2 );
TBLBASE( TB-PARM, xxxx-COMMAND-AREA, parameter-1, parameter-2 );

The general form of a COBOL call to invoke the common tableBASE interface is:

CALL 'TBLBASE' USING TB-PARM
                     xxxx-COMMAND-AREA
                     parameter-1
                     parameter-2.

The general form of an ASSEMBLER call to invoke the common tableBASE interface is:

Call  tblBase,(TBparm,Command_Area,Row_Area),VL

References to entities with variable length names such as libraries or VTS-TSRs must contain eight characters, whether the actual name contains eight characters or not.

Requirements for parameter-1 and parameter-2 vary, depending on the type of command to be processed. For a full explanation of parameters, see tableBASE parameter description.

Non-standard calls to tableBASE

Non-standard calls to tableBASE in existing applications (e.g., assembler calls without the VL parameter) can cause incorrect output or abends as of Version 6. Enhancements to tableBASE commands to accept additional parameters or implement reserved fields in TB-PARM and COMMAND-AREA rely on standard MVS CALLs as implemented in High Level Languages (HLLs).