Prev | Advanced Operations Guide | Next |
File Information Editor
This section provides general information about the File Information Editor with which you can create new files based on file and key specifications you construct. Because this Editor allows you to load information based on an existing file, it is also useful for viewing file and key specifications on existing data files. You can also create a new file based on the file and key specifications of an existing file (similar to CLONE in the command-line Maintenance utility ).
You open the File Information Editor by clicking Options4Show Information Editor.
Figure 14-2 File Information Editor![]()
File Information Editor Dialog Elements
At the top of the Editor, the following buttons appear:
The Data File Info box, also at the top of the File Information Editor, contains the following controls:
Owner Name Provides a text box you can use to specify the owner name, if applicable, for an existing file. Version Earliest version of the MicroKernel that can read all the attributes of the file. For example, if you created a file using the 6.15 MicroKernel but did not use any attributes specific to 6.15, the Maintenance utility displays 6.0 as the version number. See File Version Notes for additional information about file format versions. Total Records Total number of records in the file.The File Specification box is in the middle of the File Information Editor. Table 14-1 describes the controls in this box.
At the bottom middle of the dialog box, the Key list shows the key numbers defined in a file. (For 6.x and later files, these key numbers do not have to be consecutive; they can have gaps between them.) The Maintenance utility displays the highlighted key's specifications in the Key box at the bottom left of the dialog box.
Also at the bottom middle of the dialog box, the Segment list shows the key segment numbers defined for the key highlighted in the Key list. The Maintenance utility displays the highlighted segment's specifications in the Segment box at the bottom right of the dialog box.
In addition, the following buttons appear under the Key and Segment lists:
Note
Because these buttons control key specifications for a file you want to create, you cannot use them to operate on keys in an existing file. If you want to create or drop an index on an existing file, refer to Index Tasks .
At the bottom left in the dialog box is the Key group box. Table 14-2 describes the controls in this area. These controls are specific to the designated key (that is, the key highlighted in the Key list), not just to the current key segment. When you change the setting for one of these controls, the change affects all segments of the specified key.
At the bottom right in the dialog box is the Key Segment group box. Table 14-3 describes the controls in this area. These controls are specific to the designated key segment (that is, the segment highlighted in the Segment list),
Information Editor Tasks
You perform the following tasks with the File Information Editor:
- Load information from an existing data file
- Create a new file
- Compact a Btrieve file
- Show or hide 6.x data
- Specify a key's alternate collating sequence
Loading Information from an Existing Data File
When you load information from an existing file, you are not editing the existing file. Instead, you are loading a copy of the information about that file. Generally, you want to load a data file before performing other tasks with the File Information Editor, but this is not mandatory.
To load information from an existing data file into the File Information Editor
- Click Load Information at the top of the File Information Editor. The Select File dialog box appears (Figure 14-3).
Figure 14-3 Select File Dialog Box![]()
- Specify the name and path of the file for which you want to load information. (By default, data files have the .mkd extension.)
The Maintenance utility first attempts to open the specified file as a data file. If the file requires an owner name, the utility prompts you for one. (Because owner names are optional, the file you open may not require an owner name.) If the specified file is not a data file, the utility then attempts to open the file as a description file.
Creating a New File
You can create a new file based on the current information in the File Information Editor or on new information you provide.
To create a new file based on the current information in the File Information Editor
- Click Create File at the top of the File Information Editor dialog box. The Create File dialog box (Figure 14-4) appears.
Figure 14-4 Create File Dialog Box![]()
- Specify the controls in the Create File dialog box, which are described in Table 14-4.
Table 14-4 Create File Dialog Controls Control Description Default File Name Specifies a name and path for the file. By default, data files have the .mkd extension. N/A File Type Specifies the type of file to create. If you are creating a description file, you can use the Index Only option, which creates a description file you can use with the BUTIL utility to add an index to an existing data file. (For more information, refer to Creating Indexes .) MicroKernel-compatible System Data Determines whether the utility includes system data in the file. If you choose Use Engine Setting, the utility uses the setting for the System Data configuration option described . If you choose No System Data, the utility does not create system data, regardless of the engine configuration. If you choose Force System Data, the utility creates system data, regardless of the engine configuration.
This is applicable only if the file type is MicroKernel-compatible. Use Engine SettingAdding Comments to a Description File
The comments are written to the top of the description file when you create the description file. For example, the comment, "This is my file," appears at the top of the description files as
/* This is my file */
. If you add additional comments after creating the description file, you need to create the file again to include the additional comments.
To add comments to a description file
- Click Description Comments. The Description File Comments dialog box (Figure 14-5) appears.
Figure 14-5 Description File Comments Dialog Box![]()
- Enter a block of comments up to 5,120 characters long.
- Click OK when you are finished entering comments.
Compacting Btrieve Data Files
You can compact a Btrieve data file to remove unused space in it, which typically decreases the file's size. You can also perform this procedure using the command-line Maintenance utility .
- Click Load Information in the File Information Editor and select the file you want to compact.
- Click Create File, give the file a new name (which creates a clone) in the Create File dialog box, and click OK.
- From the Data menu on the main window, select Save. In the Save Data dialog box, enter the name of the original file in the From MicroKernel File box and then specify a name for the output file (for example, <original file>.out) in the To Sequential File box.
- Click Execute. The Save Data dialog box displays the results of the save. Click Close.
- From the Data menu, select Load. In the Load Data dialog box, enter the name of the sequential data file you just saved in the From Sequential File box. Then enter the name of the clone file you created in Step 2 in the To MicroKernel File box.
- Click Execute. The Loading Data dialog box displays the results of the load. Click Close.
You can now compare the size of the original file to the clone file to verify the reduction in size.
Showing and Hiding 6.x Data
When you load a pre-6.0 file, all the controls in the File Information Editor that are specific to 6.x and later are unavailable unless you click the Show 6.x Data button. For example, one feature that is specific to 6.x and later is the use of variable-tail allocation tables, or VATs.
This button is useful for users working in environments that use both pre-6.0 and 6.x and later MicroKernels. By hiding the 6.x-specific controls, you can avoid unintentionally creating a 6.x file. (Pre-6.0 MicroKernels cannot access 6.x files.)
To display the 6.x-specific controls
The Show 6.x Data button is unavailable unless you are working with pre-6.0 files.
Specifying a Key's Alternate Collating Sequence
You can use an alternate collating sequence (ACS) to sort string keys (types STRING, LSTRING, and ZSTRING) differently from the standard ASCII collating sequence. By using one or more ACSs, you can sort keys as follows:
- By your own user-defined sorting order, which may require a sorting sequence that mixes alphanumeric characters (A-Z, a-z, and 0-9) with non-alphanumeric characters (such as #).
- By an international sorting rule (ISR) that accommodates language-specific collations, including multi-byte collating elements, diacritics, and character expansions and contractions.
Files can have a different ACS for each key in the file, but only one ACS per key. Therefore, if the key is segmented, each segment must use either the key's specified ACS or no ACS at all. For a file in which a key has an ACS designated for some segments but not for others, Btrieve sorts only the segments that specify the ACS.
The ISR tables are provided with Pervasive.SQL and are based on ISO-standard locale tables. ISR tables are stored in the COLLATE.CFG file, which is a Pervasive.SQL system file. This means that multiple data files can share a single ISR.
To specify a key's alternate collating sequence
- Click ACS Information.
The Maintenance utility displays the Specify ACS Information dialog box (Figure 14-6).
Figure 14-6 Specify ACS Information Dialog Box![]()
- You can specify either a country ID and code page, an ACS file name, or an International Sorting Rule (ISR) as follows:
- When you specify a country ID and code page ID, the MicroKernel stores the locale-specific collating sequence in the data file. Moreover, the MicroKernel can insert new key values correctly, even if the locale changes.
- When you specify an ACS file name for a data file, the MicroKernel copies the contents of the ACS file into the data file. (That is, the data file does not contain the file name of the ACS file.) The ACS identifies itself using an eight-digit name (such as UPPER). Subsequently, when you view the ACS information for a data file, the Maintenance utility displays this eight-digit name, not the file name of the original ACS.
- When you specify an ACS file name for a description file, the Maintenance utility copies the actual path and file name of the ACS file into the description file. Subsequently, when you view the ACS information for a description file, the Maintenance utility attempts to locate the specified ACS file.
To specify an ACS that sorts string values using an ISO-defined, language-specific collating sequence, you must specify an ISR table name. The Table Name field is limited to 16 characters. For more information on ISRs, refer to the Pervasive.SQL Programmer's Guide, available with the Pervasive.SQL Software Developer's Kit (SDK).
Prev Btrieve Interactive Maintenance Utility |
Contents Up Check for Revisions | Next Owner Names |