HASH-TEST Command

Use HASH-TEST to experiment with different modulos and to produce a summary of what the item distribution in a file would be if its modulo were changed. This command can be used to determine what modulo would produce the best item distribution for a file.

Format

HASH-TEST [DICT] filename [item-list] [selection] [modifiers] [(options)]

Parameter(s)

DICT

Specifies the file dictionary.

filename

Name of the file.

item-list

List of individual item-IDs. Enclose each item-ID in single quotes.

selection

Specifies one or more conditions that an item must meet to be included in the report. For a complete description of selection expression syntax, see the LIST Command.

modifiers

Include one or more keywords that specify the report format. These parameters affect headers, footers, spacing, totalling column figures, control breaks, and more. For complete information about using these keywords, see the section, Connectives, Modifiers, and Options in the INFO/ACCESS User Reference Guide.

options

Include one or more single-character codes that specify the report format and direct or modify output. They must be enclosed in parentheses, can be entered in any order, and need not be separated by spaces or any delimiters such as commas. For complete information about using these parenthetical options, see the section, Connectives, Modifiers, and Options in the INFO/ACCESS User Reference Guide.

Description

HASH-TEST first analyzes what the structure of groups within a file would be, then produces a hypothetical file-hashing histogram that is helpful for determining whether the current file structure is the best one. The file against which you run HASH-TEST remains unchanged.

Once you have determined what the new modulo for the file should be, you can resize the file by entering the new modulo in Attribute 13 of the File Definition item. The file will be resized automatically after the next file-save and file-restore. See the mvBase Operation and Administration Guide for information on how to resize files.

NOTE

To resize a data file, change Attribute 13 in the D-pointer located in the file dictionary. To resize a file dictionary, change Attribute 13 in the D-pointer located in the Master Dictionary of the account. To resize an account’s Master Dictionary, change Attribute 13 in the SYSTEM Dictionary.

Using HASH-TEST

When you enter the HASH-TEST statement, you are prompted to enter a modulo for testing:

TEST MODULO:

Enter a number. HASH-TEST produces a report that looks like the report produced by the ISTAT command:

>HASH-TEST CUSTOMERS

TEST MODULO:9

FILE= CUSTOMERS MODULO=9               17:29:33  dd mmm yyyy

FRAMES

BYTES

ITMS

 

1

86

3 *>>>

 

1

89

3 *>>>

 

1

88

3 *>>>

 

1

108

4 *>>>>

 

1

106

4 *>>>>

 

1

99

4 *>>>>

 

1

76

3 *>>>

 

1

78

3 *>>>

 

1

86

3 *>>>

 

9

 

 

 

 

 

 

 

ITEM COUNT=       30, BYTE COUNT=       816, AVG. BYTES/ITEM=    27.2, AVG. ITEMS/GROUP=     3.3, STD. DEVIATION=    .5, AVG. BYTES/GROUP=    90.6

 

 

 

 

>

 

 

 

Compare this report with the one shown on the ISTAT command page. The ISTAT report shows the actual item distribution for the file, whereas the HASH-TEST report shows what the item distribution would be for the file if the modulo were changed from 3 to 9. The histogram does not represent the fullness of groups, but rather the relative balance of item distribution in groups.