DK1TDRV commands

A DK1TDRV command begins with a two-letter command name (in positions 1 and 2 of the input line, see Table 84). If parameters are provided with the command, they are separated from the command and from each other by commas.

A null (blank) input line acts as if you had entered a PR command that inherits the previous command’s COUNT value. For example, if the previous command was a GL, then the blank line ‘PR’ does not display any rows, but if the previous command was an open (which sets count to 0), then a blank line PR will display rows starting with Row 1.

DK1TDRV parses the input line into parameter blocks for tableBASE then invokes the tableBASE API (DK1TCALL) to carry out the command. The resulting ERROR, FOUND, and COUNT values returned by tableBASE are displayed.

Some special DK1TDRV commands, and commands accepting wild-carded table names, perform a sequence of tableBASE calls. Commands that were unique in VTS in previous releases are now included in the batch DK1TDRV.

In the DK1TDRV command descriptions in Table 84, parameters in lower-case are optional. If omitted, defaults are supplied by tableBASE or a value specified in a previous DK1TDRV command is re-used. For example, in the sequence of commands
      GD,MYTABLE
      OR
      CN,,NEWTABLE

MYTABLE defaults in the OR and CN commands.

Parameters in upper-case must be specified.

If parameters are omitted, commas must be used as placeholders when other parameters follow in the command, for example, CG,MYTABLE,,8.

In all commands except ML, blank spaces may not be used within the command line. Parsing of command options stops at the first blank space.

An asterisk at the beginning of a line may be used to indicate a comment line. For example:

    * This is a comment.
Details on all parameters are given for the corresponding tableBASE commands described in tableBASE commands.

Note:
  • The DK1TDRV input card is limited to 80 characters. Therefore the number of parameters that can fit on the input card for commands like ML are limited by how long each parameter is.
  • Parameters named “locklatch” below are entered either to lock the table during the open process or to match the locklatch key that was used to open the table. They do not change the locklatch key.
Table 84. DK1TDRV command descriptions

The table below specifies the DK1TDRV program commands. For each command there is command syntax format and description. The HP command and described syntax provide this information.

Command name

Format / Description

AB6

AB

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

AL

AL,ddname,DSNAME,disp
Allocate an existing library

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

AR6,7

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

CD8

​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 changed by the CD command
  • numgens can only be changed using CG

CG

CG,tablename,wpswd,gennumber

Change number of table generations retained in library

CL8

CL,tablename,locklatch

Close table

CN

CN,tablename,newtablename,locklatch
Change table name in the TSR only.

  • 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 from a library.

  • 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

DR6

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

DV8

DV,tablename,DDNAME,locklatch

Divert the table from the TSR to a library where that table does not exist.

DW8

DW,tablename,DDNAME,locklatch

Divert the table from the TSR to a library where that table already 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.
  • partialkeylength specifies the length of the generic key. Zero is not recommended as it will produce unpredictable results.
  • count should be zero for the first FG. FC with a count of zero, or GF followed by GP will set the count to zero.

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
  • If a key is found, repeating FN will refind the same row. The key must be increased to fetch the next row.
GD8,9
GD,tablename,gennumber

Get table definition

If the table is already open, and the gennumber is not specified, the definition of the open table will be returned.

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

HP6

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

Help about command(s)

IA7

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

LD10

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

LG6

                                    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

LT8

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

  • howmany defaults to 10; * means all rows.
  • 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
  • ML with no operands sets an 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 updates the current table name unless S is given

OA6,7

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, both for read. Provides for initial loading of tables into a local TSR or VTS-TSRs.

OR7

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

  • indiropen is I for indirect open

OW7

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

  • indiropen is I for indirect open

PR6,8

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

QR6

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

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

QW6

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

RF8

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

  • The tablename must be a base table.
  • 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. The key is extracted from the rowdata.

RL8

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

See the tableBASE Programming Guide Open Indirect topic.

SK

SK,tablename,key
Search row by Key

  • key defaults to spaces

SP6

SP,1,,,yyyymmdd

for date-sensitive processing; yyyymmdd defaults to current date

SP,0

for regular processing

SP,16

This is required for use with the NX
command to populate LIBMETA-DATA Block.
SP,64 This is required for use with the VSAM
Interface.

SP,S

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

This only applies with a license for VTS Gate.

SS6

SS,VTSName

Set VTS server name

SS

(Unset server name)

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

ST8

ST,tablename,locklatch

Store the table into the tableBASE library. The table must be open for write in the TSR or VTS-TSR.

UL

UL,DDNAME

Unallocate a library

The UL command is valid only for single-task batch and IMS TM interfaces, and may be used only for files allocated by the AL command.

VE6

VE

Show version of DK1TDRV.

VS6

VS,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

If only one generation needs to be eliminated refer to the DG Command.

6 This is a special DK1TDRV command.
7 Same as 8 but list of tables to be matched is all tables in the current library search list (LIB-LIST).
8 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.

9

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 DK1TDRV steps.

10 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).