The sample description file shown in Figures 29, 30, and 31 creates a Btrieve file with a page size of 512 bytes and 2 keys. The fixed-length portion of the record is 98 bytes long. The file allows variable-length records but does not use blank truncation.
The file uses data compression, allows for Variable-tail Allocation Tables (VATs), and has the free space threshold set to 20 percent. Btrieve preallocates 100 pages, or 51,200 bytes, when it creates the file. The file has two keys: Key 0 and Key 1. Key 0 is a segmented key with two segments.
Figure 28
Sample Description File Using Alternate Collating Sequence Filename
In Figure 28, an alternate collating sequence filename (UPPER.ALT) is specified for Key 0.
If you specify y for the Alternate Collating Sequence element for a key, you must supply an alternate collating sequence filename or a country ID and code page ID.
In Figure 29, a country ID and code page ID are specified (countryid=-1 and codepageid=-1). If you specify the name=sequenceFile element (or the countryid=nnn and codepageid=nnn elements) at the end of the description file, Btrieve uses it as the default alternate collating sequence.
That is, if you specify alternate=y for a given key but do not include a name=sequenceFile element (or the countryid=nnn and codepageid=nnn elements) for that key, Btrieve uses the name=sequenceFile element (or the countryid=nnn and codepageid=nnn elements) specified at the end of the description file.
Figure 29
Sample Description File Using Alternate Collating Sequence ID
In Figure 30, a different alternate collating sequence filename is specified for Key 0 and Key 1. If you want to use different alternate collating sequences for different keys, you must specify the name=sequenceFile element (or the countryid=nnn and codepageid=nnn elements) for each key that uses a different alternate collating sequence.
Figure 30
Sample Description File Using Alternate Collating Sequence Filename on a File Segment
Different segments of the same key cannot have different alternate collating sequences.
You can specify only one alternate collating sequence per key, and you must provide an alternate collating sequence filename (or values for the countryid=nnn and codepageid=nnn elements) for each segment of the key.
The filename for the name=sequenceFile element (or values for the countryid=nnn and codepageid=nnn elements) must be the same for each segment. In Figure 30, the filename specified for each segment in Key 0 is LOWER.ALT. The filename specified for Key 1 is UPPER.ALT.
For more information, see Alternate Collating Sequence in Appendix A, "Btrieve Concepts."