TBEXEC Command Summary

TBEXEC (DK1TEXEC) is the primary tableBASE batch utility. It is used to define and manage libraries, and to populate tables using sequential files. The following tables describe the available commands and their parameters used with TBEXEC, and then display the command-parameter relationships. For more details about TBEXEC see the tableBASE Batch Utilities Guide.

Table 114. TBEXEC commands

Command

Description

Parameters

CHANGE

Change table characteristics.

Option 1: Change the definition of a table.

EXPFACTR, GEN, ISZ/RSZ, KSZ, KLOC, LIB, LOWERDEN, MAXGEN, MTHD, ORG, INDEX, PSWD, RPSWD, SMC, TBL†, TTYPE, UCOMMENT, UPPERDEN, WPSWD

Option 2: Change an Alternate Index definition.

ALT†, BASENAME, KSZ, KLOC, LIB, MTHD, ORG

CLEAR

Clear or empty a table.

GEN, LIB, PSWD, TBL†, TTYPE

COPY

Copy a table, table generation, or a library:

Option 1: Copy a table generation.

GEN, LIB, NEWID, NEWNAME, PSWD, REPLACE, TBL†, TO†, TTYPE, WPSWD

Option 2: Copy all generations of a table.

ALLGEN†, NEWID, NEWNAME, PSWD, REPLACE, TBL†, TO†, TTYPE, WPSWD

Option 3: Copy a tableBASE Library.

FROM†, NEWID, REPLACE, TO† EXCLUDE, EXCLFILE, TTYPE

DEFINE

Initialize a new library, define a new table, define an Alternate Index:

Option 1: Initialize a new tableBASE Library.

NEWLIB†

Option 2: Define a new table.

EST, EXPACTR, ISZ/RSZ, KSZ, KLOC, LIB, LOWERDEN, MAXGEN, MTHD, ORG, INDEX, PSWD, RPSWD, SMC, TBL†, TTYPE, UCOMMENT, UPPERDEN, WPSWD

Option 3: Create an Alternate Index definition.

ALT†, BASENAME†, KSZ, KLOC, LIB, MTHD, ORG

DELETE

Delete one or more table generations:

Option 1: Delete one generation of a table.

GEN, LIB, PSWD, TBL†, TTYPE

Option 2: Delete all generations of a table.

ALLGEN†, LIB, PSWD, TBL†, TTYPE

EXPAND

Expand / increase size of a tableBASE library.

LIB, NEWLIB†

EXPORT

Convert a tableBASE library or table to a sequential dataset.

Option 1: Convert a library or table to a sequential dataset.

LIB†, PSWD, TO†

Option 2: Convert a table to a sequential dataset

LIB†, PSWD, TBL†, TO†, TTYPE

IMPORT

Copy an exported sequential dataset into a tableBASE library.

FROM†, LIB, REPLACE

LOAD

Load a table generation from a sequential dataset.

DUP, FROM†, GEN, LIB, PSWD, RECCOUNT, STARTBYT, STARTREC, TBL†, TTYPE

PRINT

Prints information about a directory, table generation, and/or table contents.

Option 1: List Directory.

DETAIL, LIB

Option 2: Print Table Information.

DEF†, LIB, TTYPE

Option 3: Print Table Contents.

BTYCOUNT, GEN, LIB, LINSIZ, PRNT, PSWD, RECCOUNT, STARTBYT, STARTREC, TBL†, TTYPE

RENAME

Rename table generations.

LIB, NEWNAME†, PSWD, TBL†, TTYPE

SET

Establishes default values for keywords.

LIB, LINSZ, PRNT, PSWD

UNLOAD

Write a specified table generation to a sequential dataset.

GEN, LIB, PSWD, RECCOUNT, STARTBYT, STARTREC, TBL†, TO†, TTYPE

UPDATE

Update a table from an input dataset.

GEN, LIB, PSWD, REMOVE*, TBL†, TTYPE, WITH*

† = required parameter; * = at least one of these parameters

Table 115. TBEXEC parameters

Parameter

Description

ALLGEN

Denotes that all generations of a table are to be processed by the command. When used, the value must be YES.

ALT

The name of the Alternate Index.

BASENAME

The name of the Data Table for which this is an Alternate Index. The name has a maximum length of 8 bytes. If the name contains non-alphanumeric characters, it must be enclosed in quotes (‘).

BYTCOUNT

The number of bytes to be used from the table row. The default is the row size.

DEF

The name of the table to be used.

DUP

This LOAD command parameter indicates whether or not duplicate key rows will be loaded into a tableBASE table.

  • DUP=(Y/N); default is Y
  • DUP=Y allows loading of a sequential file containing duplicate keys rows to a tableBASE table
  • DUP=N means only the first occurrence of a row with duplicate keys from the sequential file will be loaded into a tableBASE table; subsequent duplicate rows will not be loaded. The following message will be displayed:
    LOAD WARNING: xxxxxxxxx ROWS HAVE BEEN LOADED;
    yyyyyyyyy DUPLICATE ROWS NOT LOADED.

EST

An estimate of the number of rows that will be loaded into the table the first time it is used. The default value depends on the table organization and row size, which is explained in greater detail the tableBASE Programming Guide.

EXCLFILE

This COPY command parameter will exclude a list of table names supplied in a file from being copied from FROMLIB (the DDNAME of the dataset from which data is to be taken) to TOLIB (the DDNAME of the dataset into which data is to be copied).

EXCLUDE

This COPY command parameter will exclude a table from being copied from FROMLIB (the DDNAME of the dataset from which data is to be taken) to TOLIB (the DDNAME of the dataset into which data is to be copied).

EXPFACTR

An integer between 1-999 representing the number of tenths of a percent in the expansion factor. An expansion factor of 250, for example, will be treated as 25%. The default is 200. The Expansion Factor field is described in the tableBASE Programming Guide.

FROM

The DDNAME of the dataset from which data is to be taken.

GEN

A number from -8 to +255 identifying the generation of a table. If this parameter is:

  • zero or is omitted, the most recent generation will be assumed
  • positive, it refers to an absolute generation number
  • negative, it refers to a relative generation number

INDEX

A one-character code with value of T or P to indicate whether the table data is to be maintained as a True table (T) or as a Pointer table (P). The default is P.

With Version 6, all tables are Pointer tables. The value T is retained for backwards compatibility.

ISZ

A number between 1-32767 that identifies the length of the row. The default value is 1. ISZ is a synonym for RSZ.

KSZ

A number between 1-256 that identifies the length of the key. The default value is 1.

KLOC

KLOC identifies the starting position of the key within the row. The default of 1 represents a key starting at the beginning of the row.

LIB

The name of a DD statement connected to a tableBASE library. Unless changed by the SET command, the default is MAINLIB.

LINSIZ

A number between 1-100 that represents the number of bytes of table data to be printed per line. If omitted, or if 0 is entered, the default is 100 or the value specified on the most recent SET command.

LOWERDEN

An integer between 1-999 representing, in the thousands, the lowest density a Hash table may have. A lower density of 700, for example, will be treated as 70%. Density is discussed in the tableBASE Programming Guide.

MAXGEN

A number between 1-9 that represents the number of generations to be kept for the table. The default value is 1.

MTHD

A one-character code indicating the table search method to be used: S (Serial), Q (Queued Sequential), B (Binary), C (Bounded Binary), and H (Hash). The default value is S or depends on the ORG parameter setting; see below.

NEWID

This COPY command parameter indicates whether the update history of the table should change when a table is copied (default is YES). Alternate Indexes are always copied as NEWID=YES, as the setting of NEWID is ignored.

If NEWID is NO, the userid and timestamp are not updated when the table is copied.

NEWLIB

The DDNAME of a new tableBASE library to be initialized or the target of an EXPAND command.

NEWNAME

A new table name for a copied or renamed table. The name has a maximum length of 8 bytes. If the name contains non-alphanumeric characters, it must be enclosed in quotes (‘).

ORG

A one-character code indicating how the data in a table is to be organized: R (Random), U (User-Controlled), S (Sequential), D (Descending Sequential), or H (Hash). The default is R.

PRNT

A one-character code indicating the format to be used to print the table contents: C (Character), H (Hexadecimal), or B (Both). If omitted, the default is C or the value specified by the most recent SET command.

PSWD

The read or write password used to gain access to a protected table. It will be used in commands where a password is required. If ‘*’ is specified in the SET command, the default will be restored to the normal default value, which is eight blanks. The maximum length of a password is 8 bytes.

RECCOUNT

A number used to limit the number of rows loaded to, or taken from, a table.

REMOVE

The DDNAME of the dataset which contains the keys of table entries to be removed.

REPLACE

A parameter to indicate that an existing table is to be replaced by a table named in the COPY function.

RPSWD

Read password, if read password protection is desired.

RSZ

A number between 1-32767 that identifies the length of the row. The default value is 1. RSZ is a synonym for ISZ.

STARTBYT

A number that indicates the location in the table entry or input record from which data is to be retrieved. The default value is 1.

STARTREC

A number that indicates the record at which printing, loading, or unloading is to start. The default value is 1.

SMC

A one-character code that denotes the table’s storage mode code. Version 6 supports only R (Resident). Since this is the default value, there is no need to use this keyword, and is only provided for backwards compatibility.

TBL

Denotes the name of the table to be used for the command. The name has a maximum length of 8 bytes. If the name contains non-alphanumeric characters, it must be enclosed in quotes (‘).

TO

Indicates the DDNAME of the dataset into which data is to be copied.

TTYPE

This parameter can be used to specify the name of a View. Views have the first character of their table name as a lower case letter. A table with the name ABC may have a View named aBC.

  • If TTYPE is blank the table name refers to a Data Table name.
  • If TTYPE is V (or F), the table name refers to a View name. F is supported for backwards compatibility.
  • When TTYPE is specified with commands using the parameters TBL, DEF, and NEWNAME, it will cause each name to be converted.

UCOMMENT

A 16 byte character field that can be used to describe the purpose of the table.

  • Anything other than 0 to 9 or upper case A to Z must be enclosed in single quotes.
  • Value is blank padded on the right if less than 16 characters.
  • An * in the first byte sets the field to blanks.
  • If all 16 bytes are blanks or low-values, no change is made to the field.

UPPERDEN

An integer between 1-999 representing, in the thousands, the highest density a Hash table may have. An upper density of 850, for example, will be treated as 85%. The default is 800. Density is discussed in the tableBASE Programming Guide.

WITH

Indicates the DDNAME of the dataset from which data is to be retrieved for the purpose of updating a table.

WPSWD

Write password, if write password protection is desired. If not specified on the DEFINE command, it will be set to the read password.