Job Management Partner 1/Base User's Guide
Function
The Jisktod command extracts as many valid records as possible from a key file of an ISAM file where an error occurred and then restores the extracted records to a sequential file. However, this command exclusively locks the ISAM file to be restored. For this reason, before you execute this command, make sure that the ISAM file to be restored cannot be accessed.
The command validates the following logical structure of an ISAM file, and outputs the valid records managed by each key file to a sequential file:
- The logical structure of the definition file
- The size and logical record structure of each data file
- Consistency between the logical structure of key files and data files
If an error is detected during logical structure validation, a detailed message is output according to the specified message output level. If a fatal error is detected, the command ends abnormally and no sequential file is created. In such a case, the command attempts to extract as many valid records as possible, depending on the error that occurred.
When this command extracts records, it determines the record type and record length from the definitions in the key definition file. For this reason, if the key definition file is corrupt, no records can be extracted.
You can use the existing file conversion command (Jisconv) to convert the created sequential file into an ISAM file. The record type and length must be the same for both the sequential file and the target ISAM file.
Format
In Windows:
Jisktod [-k key-item-name] [-l message-output-level] [-b buffer-size] [-d work-folder-name] extraction-target-ISAM-file-name sequential-file-name Jisktod -c [-k key-item-name] [-l message-output-level] [-b buffer-size] [-d work-folder-name] validation-target-ISAM-file-nameIn UNIX:
Jisktod [-k key-item-name] [-l message-output-level] [-b buffer-size] [-T work-directory-name] extraction-target-ISAM-file-name sequential-file-name Jisktod -c [-k key-item-name] [-l message-output-level] [-b buffer-size] [-T work-directory-name] validation-target-ISAM-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
Command directory
- In Windows:
- installation-folder\bin\
- In UNIX:
- /opt/jp1base/bin/
Arguments
-c
Use this option only if you want to validate the logical structure of an ISAM file. The option determines whether records can be extracted from each key file of the specified ISAM file. After validating the logical structure of the ISAM file, if records that can be extracted from each key file and error message are detected, the command outputs the number of records that can be extracted. The number of records is output to the standard output.
This option allows you to specify the name of the ISAM file to be validated.
If this option is omitted, after the logical structure of the ISAM file is validated, the command extracts as many valid records as possible and restores them to a sequential file. If you omit this option, you must specify the name of the ISAM file from which valid records are to be extracted, and the name of a sequential file to which the valid records are to be output.
If you specify the -k option, you can explicitly specify a key file to be validated.
If you omit the -k option, all key files specified in the key definition file are validated. If an appropriate key file does not exist, the command does not validate the file, and instead proceeds to the next key file.
-k key-item-name
You must use the key definition display (Jisinfo) command to specify the key item name in a key file, and display it as key file information.
If the -c option is specified when validating the logical structure of an ISAM file, select a key item name specified in the key file to be validated. If the -c option is specified and the -k option is omitted, all the key files specified in the key definition file are validated.
If the -c option is omitted when extracting valid records from the ISAM file, select a key item name specified in the key file from which valid records are to be extracted. If both the -c and -k options are omitted in the operation to extract valid records, the files to be extracted are determined by the key file containing the first key item name shown as key file information. You can use the key definition display (Jisinfo) command to specify the key item name.
-l message-output-level
Specify whether messages detailing errors are to be output to the standard error output. The valid value is 0 or 1. If you specify 1, all messages, including detailed messages, are output to the standard error output. The default is 0.
-b buffer-size (MB)
Specify a buffer size used for file input and output. The specifiable range is 0 to 256 (in MB). If you specify 0, no buffer is reserved. The default is 16.
-d work-folder-name
Work files are used to extract and sort valid records from key files. This means that you must specify the folder for the work files. If you omit this option, the current folder or a folder specified with the environment variable temp or tmp is used. This option can only be specified in Windows.
-T work-directory-name
Work files are used to extract and sort valid records from key files. This means that you must specify the directory for the work files. If you omit this option, /tmp or /usr/tmp is used. This option is available for UNIX only.
extraction-target-ISAM-file-name
If the -c option is omitted, you can specify an ISAM file as an extraction target. Specify the name of an ISAM file that contains the key file. The valid records are extracted from the key file. If you do not specify the full path name of a file, the command assumes that the file is located in the current directory at the current drive. If you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
If a definition file extension# accompanies the specified file name, the file name without the extension is assumed to be an ISAM file name. For all other extensions#, the combination of the file name and extension is assumed to be an ISAM file name.
- #:
- Windows: .KDF. This extension is not case sensitive.
- UNIX: .DEF. This extension is case sensitive.
sequential-file-name
If the -c option is omitted, you can specify the name of a sequential file to which valid records are to be output. These records are extracted from the ISAM file specified as the extraction target. If the specified file already exists, the file is overwritten.
If you do not specify the full path name of a file, the command assumes that the file is located in the current directory at the current drive. If you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
An ISAM file extension# cannot be specified.
- #:
- Windows: .KDF, .DRF, and .K01 to .K99. These extensions are not case sensitive.
- UNIX: .DEF, .DAT, and .K01 to .K99. These extensions are case sensitive.
validation-target-ISAM-file-name
If the -c option is specified, you can specify an ISAM file as a validation target. Specify the name of an ISAM file whose logical structure is to be validated. If you do not specify the full path name of a file, the command assumes that the file is located in the current directory at the current drive. If you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
If a definition file extension# accompanies the specified file name, the file name without the extension is assumed to be an ISAM file name. For all other extensions#, the combination of the file name and extension is assumed to be an ISAM file name.
- #:
- Windows: .KDF. This extension is not case sensitive.
- UNIX: .DEF. This extension is case sensitive.
Notes
- If the -c option is omitted, two buffers are used for file input and output. Thus, the reserved buffer is twice the size of the value specified with the -b option.
- If an ISAM file has more than one key file, and if one of the key files has an invalid logical structure, the file conversion (Jisconv) command might fail when attempting to convert the ISAM file.
Return values
0 Normal end 1 Record that cannot be extracted was found. 2 Record that can be extracted was found, but its consistency is not fully maintained. 3 Argument error, invalid file, system error, internal inconsistency, or exclusive error
Example
The following examples show how to extract valid records from an ISAM file (ISAMFILE) to a sequential file (SAMFILE).
- Extracting records to a sequential file from an ISAM file that has a single key file:
>Jisktod ISAMFILE SAMFILE KAIU347-I Checking of ISAM data file will now start. ISAM file name: ISAMFILE KAIU348-I Checking of ISAM data file was finished normally. ISAM file name: ISAMFILE KAIU321-I Extraction of ISAM file will now start. key item name: K01 ISAM file name: ISAMFILE Output file: SAMFILE KAIU323-I The record has been successfully extracted from the key file. key item name: K01 Number of extractions: 101 Number of registrations: 101 ISAM file name: ISAMFILE Output file: SAMFILE- Extracting records to a sequential file from an ISAM file that has two key files (key item name: K01 and K02):
1. The logical structure is validated for each key file.
2. After the logical structures are validated in step 1, the normal key file (key item name: K02) is used to extract the records.
>Jisktod -c -l 1 ISAMFILE KAIU347-I Checking of ISAM data file will now start. ISAM file name: ISAMFILE KAIU348-I Checking of ISAM data file was finished normally. ISAM file name: ISAMFILE KAIU322-I Checking of ISAM key file will now start. key item name: K01 ISAM file name: ISAMFILE KAIU333-W The leaf page does not match the record key. key item name: K01 ISAM file name: ISAMFILE Offset: 0x00000000 KAIU342-W A definition file entry does not match the number of key file records. Key item name: K01 Number of valid records: 100 Number of registrations: 101 ISAM file name: ISAMFILE KAIU340-W A record not managed from the key file exists. key item name: K01 ISAM file name: ISAMFILE Offset: 0x00000000 KAIU328-W The integrity of part of the key file cannot be guaranteed. key item name: K01 Number of extractable items: 100 Number of registrations: 101 ISAM file name: ISAMFILE KAIU322-I Checking of ISAM key file will now start. key item name: K02 ISAM file name: ISAMFILE KAIU324-I The state of the key file is normal. key item name: K02 Number of extractable items: 101 Number of registrations: 101 ISAM file name: ISAMFILE
>Jisktod -k K02 ISAMFILE SAMFILE KAIU347-I Checking of ISAM data file will now start. ISAM file name: ISAMFILE KAIU348-I Checking of ISAM data file was finished normally. ISAM file name: ISAMFILE KAIU321-I Extraction of ISAM file will now start. key item name: K02 ISAM file name: ISAMFILE Output file: SAMFILE KAIU323-I The record has been successfully extracted from the key file. key item name: K02 Number of extractions: 101 Number of registrations: 101 ISAM file name: ISAMFILE Output file: SAMFILE
All Rights Reserved. Copyright (C) 2009, Hitachi, Ltd.