List Open Tables (LT)

Command title

List Open Tables

Description

The command provides usage statistics related to the TSR and the current tables opened in the TSR to assist in optimization and capacity planning.

COBOL syntax

MOVE 'LT'                   TO xxxx-COMMAND.
CALL 'TBLBASE' USING        TB-PARM
                            xxxx-COMMAND-AREA
                            LIST-BLOCK
                            [TABLE-STATS].

C syntax

memcpy( tbCommArea.tbCommand, "LT", 2 );
TBLBASE( &tbParm, &tbCommArea, &tbListBlock,
         &tbTableStats );

Parameters

LIST-BLOCK

If the fields LIST-FROM and LIST-REQD in the LIST-BLOCK parameter are zero, then nothing will be returned to the TABLE-STATS parameter. In this case, the value returned in the LIST-TOTAL field will show the number of open tables in the TSR and this can then be used to control the amount of space required for the TABLE-STATS parameter in a subsequent execution of another LT command.

The FUNCTION-ID in the command area can be set to 16 to return all output fields in this area – for more details, see LIST-BLOCK (88 bytes).

TABLE-STATS (optional)

Explanation

The statistics provided by LT are stored in the LIST-BLOCK parameter and include:

  • number of Open tables
  • Open Tables size—storage used by all tables currently open.
  • Open Tables Size High Water Mark—the largest amount of storage used by all open tables up until now
  • TSR High Water Mark—the largest amount of the TSR utilized up until now
  • TSR Size Utilized—the amount of TSR currently being used.
  • TSR Size—the actual TSR size allocated
  • Strobe Interval—the number of tableBASE accesses between each automatically generated snapshot of the TSR statistics to the Table Space Report
  • The total call count for all tables in the TSR or the TSR Access counter
  • The maximum number of tables in the TSR.

Explanation (cont’d)

See LIST-BLOCK (88 bytes) for a complete description of the LIST-BLOCK parameter.

For each table selected in the TSR the following information is provided in the TABLE-STATS parameter:

  • Table Name
  • Open Status (open for write or open for read)
  • Whether the table is in a local TSR or a VTS-TSR
  • Whether Alternate Indexes are invoked against this table (Y or N)
  • Number of accesses to the table since it was opened or the Table Access counter
  • Table Size
  • Number of rows in table
  • Number of rows before table is automatically expanded
  • Data table name if the table is an Alternate Index or the name of the VTS-TSR if the table is linked to a VTS-TSR
  • Number of updates to the table since it was opened or the Table Update counter

See TABLE-STATS for a complete description of the TABLE-STATS parameter.

The TSR Access, Table Access and Table Update counters are internal counters that are updated by tableBASE each time certain commands are executed successfully; they are reflected in the Strobe Report as well as the LIST-BLOCK and TABLE-STATS parameters used in the LT command. The following is a list of the commands that update each counter.

For the TSR Access counter:
Retrieval commands: FC, FG, FK, FN, GF, GN, GL, GP, SK
Update commands: DC, IC, RC, DK, IK, RK, MT
Table Control commands: OR (including implicit opens), OW (including implicit opens), RL, RF, ST, DT, CD, DV, DW, CN, DU, IA, DD.

For the Table Access counter:
Retrieval commands: FC, FG, FK, FN, GF, GN, GL, GP, SK
Update commands: DC, IC, RC, DK, IK, RK, MT
Table Control commands: OR (including implicit opens), OW (including implicit opens), RL, RF, ST, DT, CD, DV, DW, CN, DU, IA, DD.

For the Table Update counter:
Update commands: DC, IC, RC, DK, IK, RK, MT
Table Control commands: RL, ST, DT, CD, DV, DW.

Return value

None

Notes

This command is not usually coded in a program. Support for it has been incorporated in the command processors TBDRIVER (DK1TDRV) and TBDRIVC (DK1TDRVC). For information on using TBDRIVER and TBDRIVC, see tableBASE driver command processor for CICS and TBDRIVER command processor for Batch/TSO.

Using these development tools, the LT command produces formatted output of the current state of the TSR (see Figure 92 below). This command might be used in utility transactions. A transaction that closes all open tables is a good example. It could do an LT to see the TSR information just prior to closing all tables.

Exceptions

None

See also

tableBASE driver command processor for CICS

TBDRIVER command processor for Batch/TSO.

Note:
In the Figure below, ACCESS COUNTS shows the value in the TSR Access counter; CALLS shows the value in the Table Access counter, and UPDATES shows the value in the Table Update counter.
Figure 92. Sample LT command output from TBDRIVER
Sample LT command output from TBDRIVER

Figure 93. Version 5 LT command output
Version 5 LT command output