The following is a summary of the commands and parameters available when using the tableBASE API, TBLBASE. Chapters 3 and 4 describe the commands and parameters in detail. The parameters listed in Tables 2-2 through 2-6 are in addition to the TB-PARM and COMMAND-AREA parameters. Commands are categorized into the following groups:
- Retrieval commands (Table 61).
- Update commands (Table 62).
- Table control commands (Table 63).
- Library maintenance commands (Table 64).
- System control commands (Table 65).
A typical call to tableBASE may look like:
CALL 'TBLBASE' USING TB-PARM
COMMAND-AREA
PARAMETER-3
PARAMETER-4
The first parameter, TB-PARM, is optional for all commands; the second parameter, COMMAND-AREA, is mandatory for all commands. tableBASE can determine whether the first parameter specified is the TB-PARM communications area or the COMMAND-AREA. The third parameter must be present if the fourth is used. This is indicated by the notation:
[PARAMETER-3 [PARAMETER-4]]
If KEY-AREA is omitted (commands FK, DK, etc.), the table key is extracted from the ROW-AREA. If other parameters are omitted, default values are used.
Although the TB-PARM parameter is optional, using TB-PARM is highly recommended as it provides significant performance benefits.
Command |
Description |
Parameters |
Open status |
|
---|---|---|---|---|
SK |
Search for Matching Key |
KEY-AREA |
— |
Implicit Open 1 |
FK |
Fetch by Key |
ROW-AREA |
[KEY-AREA] |
Implicit Open 1 |
FC |
Fetch by Count |
ROW-AREA |
— |
Implicit Open 1 |
FG |
Fetch Generic |
ROW-AREA |
[KEY-AREA] |
Implicit Open 1 |
FN |
Fetch Next by Key |
ROW-AREA |
[KEY-AREA] |
Implicit Open 1 |
GF |
Get First |
ROW-AREA |
— |
Implicit Open 1 |
GL |
Get Last |
ROW-AREA |
— |
Implicit Open 1 |
GN |
Get Next |
ROW-AREA |
— |
Implicit Open 1 |
GP |
Get Previous |
ROW-AREA |
— |
Implicit Open 1 |
Command |
Description |
Parameters |
Open status |
|
---|---|---|---|---|
DK |
Delete by Key if found |
ROW-AREA |
[KEY-AREA] |
Implicit Open 2 |
IK |
Insert by Key if not found |
ROW-AREA |
[KEY-AREA]5 |
Implicit Open 2 |
RK |
Replace by Key if found |
ROW-AREA |
[KEY-AREA]5 |
Implicit Open2 |
DC |
Delete by Count |
ROW-AREA |
— |
Implicit Open 2 |
IC |
Insert by Count |
ROW-AREA |
— |
Implicit Open 2 |
RC |
Replace by Count |
ROW-AREA |
— |
Implicit Open 2 |
MT |
EMpty Table |
— |
Implicit Open 2 |
Command |
Description |
Parameters |
Open status |
|
---|---|---|---|---|
OR |
Open for Read |
[PASSWORD [GENERATION]] |
Any Time |
|
OW |
Open for Write |
[PASSWORD [GENERATION]] |
Not Open, Open for Read |
|
CL |
Close Table |
— |
— |
Open |
RL |
ReLease table |
— |
— |
Open for Write |
RF |
ReFresh table |
— |
— |
Open for Read |
ST |
STore table |
— |
— |
Open for Write |
DT |
Define Table |
DT-BLOCK |
— |
Not Open |
GD |
Get table Definition |
DT-BLOCK |
[GENERATION] |
Any Time |
DD |
Dump Definition |
truncated DT-BLOCK |
[GENERATION] |
Any Time |
CD |
Change table Definition |
DT-BLOCK |
— |
Implicit Open 2 |
DV |
DiVert table to Another library |
DDNAME |
— |
Open |
DW |
Divert Table to Another library Where it Exists |
DDNAME |
— |
Open |
CN |
Change Name in TSR |
NEW-TABLE-NAME |
— |
Implicit Open 1 |
DU |
DUmp table Contents |
TBACC-DEF |
TABLE-AREA |
Implicit Open 1 |
CA |
Create Alternate Index definition |
DATA-TABLE-NAME |
ALT-DEFINITION |
Note 1 |
IA |
Invoke Alternate Index |
[DATA-TABLE-NAME [ALT-DEFINITION]] |
Open |
Command |
Description |
Parameters |
Open status |
|
---|---|---|---|---|
DG |
Delete Generation |
[PASSWORD [GENERATION]] |
Not Open |
|
XT |
Eliminate Table |
[PASSWORD] |
— |
Not Open |
CG |
Change Generations to keep |
[PASSWORD [NEW-GEN-NO]] |
Not Open |
|
RN |
ReName table In library |
NEW-TABLE-NAME |
[PASSWORD] |
Not Open |
NX |
Get NeXt table name |
[DDNAME [LIB-SPACE]] |
Any Time |
|
LD |
List Directory |
[DDNAME [DIR-SPEC]] |
Any Time |
|
DL |
Define new tableBASE Library |
DDNAME |
[LIB-SPACE] |
Any Time |
Command |
Description |
Parameters |
Open status |
|
---|---|---|---|---|
ML |
Modify Library search order |
LIB LIST |
Any Time |
|
LL |
List Library search order |
LIB LIST |
Any Time |
|
CS |
Change TBLBASE Status |
STATUS-SWITCHES |
Any Time |
|
LS |
List TBLBASE Status |
STATUS-SWITCHES |
Any Time |
|
LT |
List open Tables |
LIST-BLOCK |
[TABLE-STATS] |
Any Time |
LV |
List VTS settings |
VTS-DATA |
Any Time |
|
BN |
BaNner retrieval |
NAME-AREA |
[RELEASE-LEVEL] |
Any Time |
DE |
DisEngage |
Any Time |
||
AL |
Allocate Library |
DDNAME |
LIBRARY-ALLOC |
Any Time |
UL |
Un-allocate Library |
DDNAME |
Any Time |
|
SI |
Set Indirect |
INDIRECT |
Any Time |
|
VS |
Set Virtual System |
VTS-NAME |
Any Time |
|
VV |
Vary VTS |
Any Time |
||
XX |
tableBASE termination |
Any Time |
Open status notes
This section provides notes on the Open status of the above commands.
Implicit Open 1
A closed table is implicitly opened for read with any of these commands: SK, FK, FC, FG, FN, GF, GL, GN, GP, CN, and DU.
Implicit Open 2
A closed table is implicitly opened for read with any of these updating commands in batch when using a local TSR: DK, IK, RK, DC, IC, RC, MT, CD. With multi-tasking and multi-user environments, an OW, DT or CN command must be issued before using the commands.
Open
The table must be opened automatically or explicitly with an OR or OW command before issuing any of these commands: CL, ST, DV, DW, and RL.
Not Open
The table must be not open when issuing any of these commands: DT, DG, XT, CG, RN, IA, and CA.
Any Time
The following commands may be performed at any time: NX, LD, GD, ML, LL, CS, LS, BN, SI, DE, LT, and LV.
Note 1
The CA command defines an alternate index definition and saves it on a tableBASE library.