Batch/TSO TBDRIVER (DK1TDRV) Command Descriptions

TBDRIVER (DK1TDRV) is the tableBASE driver command processor for Batch/TSO. DK1TDRV can be invoked in a batch job (see JCL for DK1TDRV), or interactively through the TSO CLIST TBDR, or the tablesONLINE/ISPF menu. The TBDRIVER (DK1TDRV) program accepts tableBASE-like commands from a terminal or a file and invokes tableBASE to execute them. TBDRIVER also has additional commands (referred to as macros) created to make long tasks easier such as PRINT TABLE (PR).

Table 117. TBDRIVER
(DK1TDRV) command descriptions

Command name

Format / Description

AB12

AB

Abend with 0C7 (Used to force a TBDRIVER dump)

AL

AL,ddname,DSNAME,disp
Allocate an existing library

  • disp is S for Shared (default) or O for exclusive

AR12,13

AR,tablename

Open base table and invoke all associated alternate indexes.

BN

BN

Display installation’s banner and display tableBASE version

CA

CA,​alttablename,​datatable,​org,​method,​keycount,​keyloc,​keysize
Create Alternate Index definition

  • keycount must be set to 1 if keyloc or keysize is specified

CD14

CD,​tablename,​org,​method,​type,​smc,​rpwsd,​wpswd,​rowsize,​keysize,​keyloc,​rowestimate,​numgens,​expandfactor,​lowdensity,​hidensity,​viewversion,​viewname,​comment,​locklatch

Change table definition

  • smc, rowestimate and numgens are not effective for the CD command
  • numgens can be changed using CG

CG

CG,tablename,wpswd,gennumber

Change number of table generations retained in library

CL14

CL,tablename,locklatch

Close table

CN

CN,tablename,newtablename,locklatch
Change table name in TSR

  • CN changes current tablename to newtablename

CS

CS,aweot

Change status switches

See the “Change Status (CS)” command in Chapter 3 of the tableBASE Programming Guide for a full description of status switches

DC

DC,tablename,count,locklatch

Delete row by count

DE

DE

Disengage libraries (Close all library files)

DG

DG,tablename,wpswd,gennumber
Delete a table generation

  • gennumber defaults to zero

DK

DK,tablename,key,rowlengthoverride,locklatch
Delete row by key

  • key defaults to spaces

DL

DL,ddname
Define library

  • ddname defaults to MAINLIB

DR12

DR,ddname

List next 10 library entries (uses NX and GD)

(For interactive, hit <RETURN>; for batch, enter a blank line.)

DT

DT,​tablename,​org,​method,​type,​smc,​rpswd,​wpswd,​rowsize,​keysize,​keyloc,​rowestimate,​numgens,​expandfactor,​lowdensity,​highdensity,​viewversion,​viewname,​comment,​locklatch

Define table

  • the only valid value for type is P
  • the only valid value for smc is R
  • viewversion and viewname are not applicable for your version

DV14

DV,tablename,DDNAME,locklatch

Divert table to a library where table does not exist

DW14

DW,tablename,DDNAME,locklatch

Divert table to a library where table exists

FC

FC,tablename,count,rowlengthoverride

Fetch row by count

FG

FG,tablename,KEY,rowlengthoverride,partialkeylength
FG,tablename,PARTIALKEY*,rowlengthoverride
FG,tablename,*,rowlengthoverride

Fetch row using generic key

  • KEY and PARTIALKEY default to spaces

FK

FK,tablename,key,rowlengthoverride
Fetch row by key

  • key defaults to spaces

FN

FN,tablename,key,rowlengthoverride
Fetch row or next highest (lowest) by key

  • key defaults to spaces
GD14,15
GD,tablename,gennumber

Get table definition

GF

GF,tablename,rowlengthoverride

Get first table row

GL

GL,tablename,rowlengthoverride

Get last table row

GN

GN,tablename,rowlengthoverride

Get next table row

GP

GP,tablename,rowlengthoverride

Get previous table row

HP12

HP – General Help info
HP,HP – Get list of commands
HP,xx – Get help on command xx

Help about command(s)

IA13

IA,​alttablename,​datatable,​org,​method,​keycount,​keyloc,​keysize,​locklatch
Invoke Alternate Index

  • Keycount must set to 1 if keyloc or keysize specified

IC

IC,tablename,count,rowdata,rowlengthoverride,locklatch
Insert row by count

  • rowdata defaults to spaces

IK

IK,tablename,rowdata,rowlengthoverride,locklatch
Insert row by key

  • rowdata defaults to spaces

LD16

LD,tablename,ddname,tablenamemask,dirtype

List directory (Create a table from directory contents)

  • dirtype is V for Views, D for Data tables, T (default) for all generations of all tables

LG12

LG,tablename,key,rowlengthoverride,partialkeylength LG,tablename,partialkey*,rowlengthoverride LG,tablename,*,rowlengthoverride

List rows using generic key

  • key, partialkey default to spaces

LL

LL

List library search order

LS

LS

List status switches

See the “Change Status (CS)” command in Chapter 3 of the tableBASE Programming Guide for a full description of status switches

LT14

LT,howmany,startfrom
List tables currently open in the TSR

  • howmany defaults to 10; wildcard allowed
  • startfrom defaults to 1; ignored if wildcard used for howmany
  • TSR call count – as of Version 7 this field is always displayed. Before Version 7, function 16 had to be entered using the SP command in order for this field to be displayed.

LV

LV

List VTS settings

ML

ML,LIB1,LIB2,...,LIB10
Modify library search order

  • Up to 10 DDnames and VTS:xxxx
  • Set empty search list
  • Blank characters between library names are ignored
  • Note that 10 library names may not fit into the input card, if each DDname takes the full 8 characters.

MT

MT,tablename,locklatch

Empty table (erase contents in TSR)

NX

NX,tablename,ddname,s
Return next tablename in library

  • s is S for library space stats (tablename is ignored)
  • NX changes the current table name unless S is given

OA12,13

OA,tablename

Open Any. If table is a base table, open table for read. If table is an alternate, open base table and invoke the alternate. Provides for initial loading of tables into VTS-TSRs.

OR13

OR,tablename,password,gennumber,indiropen
Open table for read

  • indiropen is I for indirect open

OW13

OW,tablename,wpswd,gennumber,indiropen,locklatch
Open table for write

  • indiropen is I for indirect open

PR12,14

PR,tablename,startrow,endrow,rowlengthoverride PR,tablename,*,,rowlengthoverride PR,tablename,startrow,*,rowlengthoverride

List next 10 table rows (default command)

  • PR defaults to printing of 10 rows after current row

QR12

QR,tablename,password,gennumber,indiropen
Open View for read

  • indiropen is I for indirect open; not applicable for this command

QW12

QW,tablename,wpswd,gennumber,indiropen,locklatch
Open View for write

  • indiropen is I for indirect open; not applicable for this command but a comma should be used to bypass this parameter if locklatch parameter is used

RC

RC,tablename,count,rowdata,rowlengthoverride,locklatch
Replace row by count

  • rowdata defaults to spaces

RF14

RF,tablename
Refresh a table that is opened for read in TSR (or VTS-TSR)

  • This command will cause all opened Alternate indexes to be refreshed as well

RK

RK,tablename,rowdata,rowlengthoverride,locklatch
Replace row by key

  • rowdata defaults to spaces

RL14

RL,tablename,locklatch

Release table (Change open status from write to read)

RN

RN,tablename,newtablename,wpswd
Rename table in library

  • RN changes current tablename to newtablename

SI

SI,criterion

Set indirect table search criterion

SK

SK,tablename,key
Search row by Key

  • key defaults to spaces

SP12

SP,1,,,yyyymmdd

for date-sensitive processing; yyyymmdd defaults to current date

SP,0

for regular processing

SP,16

for additional definition block fields (this is no longer required as of Version 7 i.e. these additional fields will be displayed without SP,16)

SP,S

for accessing current generation of VTS-TSR; an S is placed in the START-TBUOW field of the COMMAND-AREA parameter

SS12

SS,VTSName

Set VTS server name

SS

(Unset server name)

Set VTS name (TB-SUBSYSTEM) in TB-PARM

ST14

ST,tablename,locklatch

Store table

UL

UL,DDNAME

Unallocate a library

VE12

VE

Show version of DK1TDRV.

VS12

SS,VTSName

Synonym for SS – Note that this is a different command from the tableBASE VS command.

XT

XT,tablename,wpswd

Eliminate all generations of a table from library

12 This is a special TBDRIVER (DK1TDRV) command.
13 Same as 14 but list of tables to be matched is all tables in the current library search list (LIB-LIST).
14 An asterisk (*) may be used as a wildcard character in the table name. An asterisk can only be used on its own or at the end of a string. A standalone asterisk denotes all table names. An asterisk at the end of a string denotes zero or more characters. Any characters after the first asterisk will be ignored. For example:

OR,* opens all tables
OR,B* opens all tables beginning with the letter B
OR,*S* opens all tables; characters after the first asterisk are ignored
OR,F*T* opens all tables beginning with the letter F.

The input command is processed against all the tables matching the table name mask. For example, when the close table (CL) command is issued to table HOWARD* the command closes all the tables and alternates with HOWARD in the first six characters of the name. While wildcard commands are in progress, libraries in the library search list (LIB-LIST) should not be updated, otherwise results returned will be unpredict­able.

15

The GD command display of the DDNAME field is increased from eight bytes to 12 bytes. This allows display of VTS:xxxxxxxx for tables accessed by a linked VTS-TSR. This may affect applications which post-process the output from TBDRIVER steps.

16 TABLENAMEMASK is a wild-card form as above, or contains no asterisks, for example, CAT in which case it is assumed to be equivalent to CAT*. The list matched is all tables in the current library search (LIB-LIST).