Jiskeymnt
- Organization of this page
Function
The Jiskeymnt command adds or deletes keys. The Jiskeymnt command also reorganizes the key file. The key definition parameter file specifies the keys to be added, deleted or reorganized. Use a text editor or the vi editor (in UNIX) to create the key definition parameter file.
- Adding keys
-
This command adds key item names and key definitions to the key definition file. This command also creates the key file for the keys to be added.
- Deleting keys
-
This command deletes key item names and key definitions from the key definition file. This command also deletes the key file for the keys to be deleted.
- Reorganizing keys
-
This command uses the current key definitions to re-create the key file for the specified keys.
Format
- In Windows:
-
Jiskeymnt file-name
- In UNIX:
-
Jiskeymnt [file-name ...]
Required execution permission
In Windows: Administrators (If User Account Control (UAC) for Windows is enabled, you must execute the command from the administrator console.)
In UNIX: Superuser or JP1/Base administrator permission
Command directory
- In Windows:
-
installation-folder\bin\
- In UNIX:
-
/opt/jp1base/bin/
Arguments
file-name
Specify the name of the key definition parameter file containing the information about the ISAM file for which you want to add, delete or reorganize keys.
In Windows, if you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
In UNIX, you can omit a file name. If you omit a file name, the command imports the key definitions for the ISAM file from the standard input. When you specify more than one file name, use at least one space to separate each file name. You can also use the wildcard character (*) to specify files.
- Example:
-
The following shows examples in Windows.
-
Specify all the files in the c:\data directory.
Jiskeymnt c:\data\*
-
Specify all the file names beginning with SAMPLE in the c:\data directory.
Jiskeymnt c:\data\SAMPLE*
-
Creating the key definition parameter file
The following shows how to create the key definition parameter file.
Items to be specified in the file
The following table shows the items you need to specify in the key definition parameter file.
Keyword |
Format |
Contents |
---|---|---|
fi- |
file-name#1 |
Specify the name of an ISAM file. You can include a path name in the file name. Follow the file naming rules of the OS you are using. In Windows, if the file name includes spaces, enclose the file name in double quotation marks ("). In UNIX, the maximum number of characters you can use in file-name is four characters fewer than the maximum file name length of the OS. |
an- |
key-item-name#2 |
Specify a key item name when you add a key. |
dn- |
key-item-name#2 |
Specify a key item name when you delete a key. |
rn- |
key-item-name#2 |
Specify a key item name when you reorganize a key. If you want to reorganize all keys, omit key-item-name. |
ke- |
t=key-attribute ,p=key-position ,l=key-length [,ISDESC] |
Specify the details of a key when you add a key. You must specify this keyword when adding a key. When you want to specify a compound key, you must specify this keyword for each constituent element in the compound key.#3
|
cp- |
Information about key duplication and compression |
When you want to add a key, use four hexadecimal numbers to specify the information about key duplication and compression.
|
sp- |
When you add a key, use two hexadecimal numbers to specify the internal value of the sparse character. Specify this parameter only when you specify the cp parameter. |
In the key definition parameter file, the specifications of the keys to be added, the keys to be deleted and the keys to be reorganized can coexist. You can specify more than one key for each operation type.
Specifying parameters
The following shows how to specify parameters in the key definition parameter file.
Notes on parameter specification
Remember the following points when you specify parameters in the key definition parameter file.
-
Use at least one space to separate each parameter.
- Example:
-
fi-isamfilern-subkey1...
(Legend) : Space
-
You cannot place a space in a parameter.
- Example:
-
ke-t=c,p=10...
(Legend) : Space
Notes
-
You cannot add or delete primary keys.
-
Addition or reorganization of keys uses work files.
-
The command immediately stops if an I/O error occurs or a specified file does not exist even when the command has already processed some files.
Return values
0 |
Normal end |
1 |
Abnormal end |