Description

Tests linear hash tables, and stores statistical information about data distribution and space utilization for a table or tables. Verify_LH also diagnoses group format errors (GFEs).

Note: By default, the index table (the ! file) and the dictionary (DICT.filename) associated with the table are verified, along with the data portion of the file. If you only wish to verify the data portion only, prefix tablelist with DATA., as in DATA.orders.

Syntax

Verify_LH (volumelist, tablelist, ignoreflag, keepflag, detailflag)

Parameters

Verify_LH accepts arguments for the following parameters.

ParameterDescription
volumelistContains the operating system path and drive identifier for each volume to test or the key of a volume definition row in the SYSPTRS table.

If null, then tablelist is tested. If volumelist and tablelist are null, the default volume, specified using the system stored procedure Set_Env, is used.

Note: As of Version 4.1.3, volumelist can reference a UNC style location, such as a location on another computer (for example \\server\share\revdata, referring to folder \share\revdata on the computer \\server).

TablelistA table or list of tables in a specific volume to test. You can test the data, dictionary, and index tables separately by entering the appropriate table name. Multiple tables are delimited by @FM.

If volumelist and tablelist are null, the default volume, specified using the stored procedure Set_Env, is used.

ignoreflagSet ignoreflag to true (1), to continue testing all tables specified, if an error is encountered during testing.
keepflagIf true (1), the data in the output tables SYSLHVERIFY and SYSLHGROUP is not cleared. By default, the tables are cleared if this flag is not set.
detailflagIf true (1), detailed statistical information about each group in the table or tables tested is saved in the SYSLHGROUP table.

Output

For each table tested by Verify_LH, a row is stored in SYSLHVERIFY. The fields are as follows:

Field NumberDescription
0Key, in the format DateTimeVerified*Application_Name*TableName
1Date and Time verified, in internal (ICONV) format
2Group
3Frame size, in bytes
4LK_size, in bytes
5OV_size, in bytes
6Modulo
7Sizelock (0 = off, 1 = on)
8Frame for free space
9Unused free space
10Number of rows
11Row count
12Rows per group
13Average row length
14Primary frame row factor (percent of primary frames used)
15Overall load factor (percent of all frames used)
16Average disk I/O
17Standard disk I/O
18Average overflow for group
19Standard overflow for group
21Load factor

If detailflag = 1, a row in SYSLHGROUP per group per table verified is generated, with the following fields:

Field NumberDescription
0*1Date and Time verified, in internal (ICONV) format
0*2Application Name
0*3Table Name
0*4Group Number
1Number of Frames
2Number of Rows
4Average disk I/Os

See also

Fix_LH

Example

/* Verifies the structure of the ORDERS table (including the bang file and dictionary file)
and the data portion of the INVOICES table, in the volume DATAVOL. 
If errors are found in ORDERS, testing continues on DATA.INVOICES. 
SYSLHVERIFY and SYSLHGROUP are not cleared.
Detailed group information is saved in the SYSLHGROUP table. */
 
declare subroutine verify_lh
declare function get_status
TableList = "ORDERS":@FM:"DATA.INVOICES"
Verify_LH("DATAVOL", TableList, 1, 1, 1)
If Get_Status(ErrCodes) Then
  GoSub ErrorHandling
End
return 0
ErrorHandling:
  * process errors here
return
  • No labels