ContentsIndexPreviousNext

3.3.6.1 Responding to vutil generated prompts

If you use the interactive version of the "gen" option, you are immediately given the opportunity to store the session in a file, so that your responses can be used again. (In fact, you can use the session file as the list file with the non-interactive version of "gen".) If you indicate that you do want to save the session, you are prompted for a session file name.

Next you are prompted for the name of the new file, and for its attributes. The exact prompts are shown here, and are described in section 3.3.6.2. Default values are enclosed in brackets.

Save this session [Y]?
Enter session filename:

Enter filename:
Enter the blocking factor [1]:
Enter the number of blocks to pre-allocate [1]:
Enter the # of blocks for extension [0]:
Enter the compression factor (0-100) [0]:
Enable record encryption [N]?
Enter the maximum record size (1-32767):
Enter the minimum record size (1-maximum)  [maximum]:

Enter the # of keys [1]:
-- Primary key --
Enter number of segments (1-6): (For generating Version 2 or 3 files)
Enter number of segments (1-16): (For generating Version 4 files)
Enter segment size:
Enter segment offset: (Segment size and segment offset repeat as a pair for each segment)

-- Alternate key n -- (repeats for each alternate key)
Enter number of segments:
Duplicates allowed [N]?
Enter segment size:
Enter segment offset: (Segment size and segment offset repeat as a pair for each segment)

Enter translation table filename:
Enter file comment (30 char max):

Generate another file?

Collating Sequence

One of the attributes you may specify is the name of a file containing a translation table. This enables you to create a custom collating sequence for the new file, instead of using the standard ASCII collating sequence. The exact format for the translation table is given here.

All white-space characters (space, tab, new line, etc.) are ignored, so the table can have as many lines and spaces as you desire.

The sequence of the characters in the table determines the collating sequence for keys. For example, a file which looks like this:

Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

would sort keys reverse alphabetically, for the values in the range A to Z.

You may enter special characters by typing a backslash (\) and then the decimal value of the character desired. Thus, "\032" would be used to specify the SPACE character.

Ranges can be specified with a dash (-). The sequence of the starting and ending characters in the range is significant. The reverse-alphabetical table shown above could be specified more concisely as:

Z - A

Finally, you can give two or more characters the same sort value by using an ampersand (&) between them. For example, the file will not distinguish case if you use a translation table with the following format:

a & A b & B c & C d & D e & E f & F g & G h & H i & I j & J k & K l & L m & M n & N o & O p & P q & Q r & R s & S t & T u & U v & V w & W x & X y & Y z & Z

Any characters in the native collating sequence that are not explicitly named in the table assume a position greater than any of the explicitly named characters. The relative order of these unnamed characters remains the same as in the native collating sequence. In the last example, all digits, punctuation, and control characters would be in their usual order, but after all alphabetic characters.