tableBASE Command Summary

The following is a summary of the commands available to the programmer using the tableBASE Application Programming Interface. Commands are categorized into the following groups: Retrieval commands, Update commands, Table control commands, Library maintenance commands, and System control commands.

The parameters mentioned in the tables below are in addition to the TB-PARM and COMMAND AREA. Parameters within parentheses “(…)” are optional and may be omitted, but if a programmer needs to use a parameter that is preceded in this table by an optional parameter, the preceding parameter must be present, even if it is a dummy placeholder. If an optional KEY AREA parameter is omitted (commands FK, FG, FN, DK), the table key is extracted from the ROW-AREA. If other parameters are omitted, the defaults are used.

The meaning of the “Open Status” column is as follows:

  • Implicit Open 1: An OR command is performed implicitly with these commands if the ‘Allow Implicit Open of Tables’ setting in the SWITCHES run time option is Y.
  • Implicit Open 2: In batch, an OR command is performed implicitly for these commands if the ‘Allow Implicit Open of Tables’ setting in the SWITCHES run time option is Y. With online interfaces, an OW command must be issued before these commands.
  • Open: The table must be open when issuing these commands.
  • Open for Read: The table can be open for read when issuing the OW command. The RF command is performed on a table that is open for read.
  • Open for Write: The table must be open for write to perform these commands.
  • Closed: The table must be closed when issuing these commands.
  • Any Time: These commands may be performed at any time.
  • Note 1: CA command defines an alternate index on a tableBASE library.
  • Note 2: For backward compatibility with earlier releases, the base table must be open and the alternate index must be closed, unless the system alternate open option MULTIPLE-OPEN-INDEXES is set at installation time or in TBOPT to remove this restriction.

Each command is further classified by its TSR access type: read, write or none. This information is useful when implementing applications with VTS Gate, where security restrictions may limit the type of access allowed on a VTS-TSR. With the latest release, a VTS-TSR has a generation number associated with it and commands that actually access a VTS-TSR must have the START-TBUOW field set in order to access the current generation of the VTS.

The meaning of the “TSR Access Category” column is as follows:

  • Direct TSR Read: Performs read access to a local or VTS-TSR. For a VTS-TSR, the VTS name is in the TB-PARM.
  • Direct TSR Write: Performs write or update access to a local or VTS-TSR. For a VTS-TSR, the VTS name is in the TB-PARM.
  • Direct TSR None: Does not access a local or VTS-TSR. For a VTS-TSR, the VTS name is in the TB-PARM.
  • Linked VTS Read: Performs read access to a linked VTS-TSR, where the VTS name is in any or all of: LIB-LIST parameter, VTSFIRST, VTSLAST run time options.
  • Linked VTS Write: Performs write or update access to a linked VTS-TSR, where the VTS name is in any or all of: LIB-LIST parameter, VTSFIRST, VTSLAST run time options.
  • Linked VTS None: Does not access a linked VTS-TSR, where the VTS name is any or all of: LIB-LIST parameter, VTSFIRST, VTSLAST run time options.
  • Note 3: This is true only if the table is not open in the TSR of record and the ‘Allow Implicit Open of Tables’ setting for the SWITCHES run time option is Y. The TSR of record is a VTS-TSR with its name in the TB-PARM; if there is no VTS name in the TB-PARM, then the TSR of record is the local TSR.
  • Note 4: This is true only if the table is not open in the local TSR and the ‘Allow Implicit Open of Tables’ setting for the SWITCHES run time option is Y.
  • Note 5: This is true only if the table is not open in the local TSR.
Table 107. Retrieval Commands

Commands

Parameters

Open Status

TSR Access Category

SK – Search by Key

KEY AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

FK – Fetch by Key

ROW-AREA

(KEY-AREA)

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

FC – Fetch by Count

ROW-AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

FG – Fetch Generic

ROW-AREA

(KEY-AREA)

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

FN – Fetch Next by Key

ROW-AREA

(KEY-AREA)

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

GF – Get First

ROW-AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

GL – Get Last

ROW-AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

GN – Get Next

ROW-AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

GP – Get Previous

ROW-AREA

Implicit Open 1

Direct TSR Read, Direct TSR Write – Note 3, Linked VTS Read – Note 4

Table 108. Update Commands

Commands

Parameters

Open Status

TSR Access Category

DK – Delete by Key

ROW-AREA

(KEY-AREA)

Implicit Open 2

Direct TSR Write, Linked VTS Write

IK – Insert by Key

ROW-AREA

(KEY-AREA)11

Implicit Open 2

Direct TSR Write, Linked VTS Write

RK – Replace by Key

ROW-AREA

(KEY-AREA)11

Implicit Open 2

Direct TSR Write, Linked VTS Write

DC – Delete by Count

ROW-AREA

Implicit Open 2

Direct TSR Write, Linked VTS Write

IC – Insert by Count

ROW-AREA

Implicit Open 2

Direct TSR Write, Linked VTS Write

RC – Replace by Count

ROW-AREA

Implicit Open 2

Direct TSR Write, Linked VTS Write

MT – Empty the Table

Implicit Open 2

Direct TSR Write, Linked VTS Write

Table 109. Table Control Commands

Commands

Parameters

Open Status

TSR Access Category

OR – Open for Read

(PASSWORD)

(GENERATION)

Any Time

Direct TSR Write, Linked VTS Read – Note 5

OW – Open for Write

(PASSWORD)

(GENERATION)

Closed, Open for Read

Direct TSR Write, Linked VTS Write

CL – Close Table

Open

Direct TSR Write, Linked VTS None

RL – Release Table

Open for Write

Direct TSR Write, Linked VTS Write

RF – Refresh Table

Open for Read

Direct TSR Write, Linked VTS Write

ST – Store Table

Open for Write

Direct TSR Write, Linked VTS Write

GD – Get Table Definition

DEFINITION-BLOCK

(GENERATION)

Any Time

Direct TSR Read if there is no GENERATION parameter, Linked VTS Read – Note 5

DD – Dump Definition

DEFINITION-BLOCK

(GENERATION)

Any Time

Direct TSR Read if there is no GENERATION parameter, Linked VTS Read – Note 5

DT – Define Table

DEFINITION-BLOCK

Closed

Direct TSR Write, Linked VTS None

CD – Change Table Definition

DEFINITION-BLOCK

Implicit Open 2

Direct TSR Write, Linked VTS Write

DV – Divert Table to a library where it doesn’t exist

DDNAME

Open

Direct TSR Write, Linked VTS Write

DW – Divert Table to a library where it does exist

DDNAME

Open

Direct TSR Write, Linked VTS Write

CN – Change Name (in region)

NEW-TABLE-NAME

Implicit Open 1

Direct TSR Write, Linked VTS Write

DU – Dump Table Contents

TBACC-DEF

TABLE-AREA

Implicit Open 1

Direct TSR Read, Linked VTS Read – Note 5

CA – Create Alternate Index Definition

DATA-TABLE-NAME

ALT-DEFINITION

Note 1

Direct TSR Read, Linked VTS None

IA – Invoke Alternate Index

(DATA-TABLE-NAME)

(ALT-DEFINITION)

Note 2

Direct TSR Write, Linked VTS None

Table 110. Library Maintenance Commands

Commands

Parameters

Open Status

TSR Access Category

DG – Delete Generation

(PASSWORD)

(GENERATION)

Closed

Direct TSR Read, Linked VTS None

XT – Eliminate Table (on library)

(PASSWORD)

Closed

Direct TSR Read, Linked VTS None

CG – Change Generations to be kept

(PASSWORD)

NEW-GEN-NO

Closed

Direct TSR Read, Linked VTS None

RN – Rename Table (on library)

NEW-TABLE-NAME

(PASSWORD)

Closed

Direct TSR Read, Linked VTS None

NX – Get Next Table Name

(DDNAME)

(LIB-SPACE)

Any Time

Direct TSR None, Linked VTS None

LD – List Directory

(DDNAME)

(DIR-SPEC)

Any Time

Direct TSR Write, Linked VTS None

DL – Define New tableBASE Library

DDNAME

(LIB-SPACE)

Any Time

Direct TSR None, Linked VTS None

Table 111. System Control Commands

Commands

Parameters

Open Status

TSR Access Category

ML – Modify Library Search Order

LIB-LIST

Any Time

Direct TSR None, Linked VTS None

LL – List Library

LIB-LIST

Any Time

Direct TSR None, Linked VTS None

CS – Change Status

STATUS-SWITCHES

Any Time

Direct TSR None, Linked VTS None

LS – List Status

STATUS-SWITCHES

Any Time

Direct TSR None, Linked VTS None

LT – List Open Tables

LIST-BLOCK

(TABLE-STATS)

Any Time

Direct TSR Read, Linked VTS None

LV – List VTS Settings

VTS-DATA

Any Time

Direct TSR None, Linked VTS None

BN – Banner Retrieval

NAME-AREA

(RELEASE-LEVEL)

Any Time

Direct TSR None, Linked VTS None

DE – Disengage Libraries

Any Time

Direct TSR None, Linked VTS None

AL – Allocate

DDNAME

LIBRARY-ALLOC

Any Time

Direct TSR None, Linked VTS None

UL – Un-allocate

DDNAME

Any Time

Direct TSR None, Linked VTS None

SI – Set Indirect

INDIRECT-OPEN-CRITERION

Any Time

Direct TSR None, Linked VTS None

VS – Virtual Subsystem

VTS-NAME

Any Time

Direct TSR Read, Linked VTS Read

VV – Vary VTS

Any Time

Direct TSR Write, Linked VTS None

XX – Terminate tableBASE in Region

Any Time

Direct TSR None, Linked VTS None

11 For backward compatibility, the table key is extracted from the ROW-AREA. If KEY-AREA is supplied, it is ignored.