Jisconv
- Organization of this page
Function
The Jisconv command converts a sequential file into an ISAM file. The Jisconv command also converts an ISAM file into a sequential file.
When records from an ISAM file where an error occurred are extracted to a sequential file, you can use this command to restore the ISAM file from the sequential file.
Converting a sequential file into an ISAM file
Based on the information in the key definition file, this command converts a sequential file into an ISAM file. This command also creates the key file if keys are defined in the ISAM file. However, if no keys are defined in the ISAM file, this command does not create the key file.
The sequential file (before conversion) and the ISAM file (after conversion) must have the same record type. The following table shows the possible combinations of record types.
Sequential file (before conversion) |
ISAM file (after conversion) |
|
---|---|---|
Fixed length |
Variable length |
|
Fixed length |
Yes |
No |
Variable length |
No |
Yes |
- Legend:
-
Yes: Conversion is possible.
No: Conversion is impossible.
The command handles the record length as follows.
-
When the command converts a fixed-length sequential file into a fixed-length ISAM file, the command assumes the following as the record length of the source file (sequential file): the record length defined in the key definition file for the destination file (ISAM file).
-
When the command converts a variable-length sequential file into a variable-length ISAM file, the command uses the record length of each record in the source file. If the record length of the source file is not within the range of the record lengths defined in the key definition file for the destination file, the command assumes that the source record length is incorrect, and stops the conversion.
- Notes
-
Note the following when converting a sequential file into an ISAM file:
-
You must create the ISAM file for the converted data in advance.
-
The command uses work files when converting the data into an ISAM file.
-
Converting an ISAM file into a sequential file
This command converts an ISAM data file into a sequential file. The command outputs records to the destination file in the same order as the physical order of records in the source file. This command does not output the records that were deleted from the source file.
The ISAM file (before conversion) and the sequential file (after conversion) must have the same record type. The following table shows the possible combinations of record types.
ISAM file (before conversion) |
Sequential file (after conversion) |
|
---|---|---|
Fixed length |
Variable length |
|
Fixed length |
Yes |
No |
Variable length |
No |
Yes |
- Legend:
-
Yes: Conversion is possible.
No: Conversion is impossible.
The command handles the record length as follows.
-
When the command converts a fixed-length ISAM file into a fixed-length sequential file, the command assumes the following as the record length of the source file (ISAM file): the record length defined in the key definition file for the destination file (sequential file).
-
When the command converts a variable-length ISAM file into a variable-length sequential file, the command assumes the following as the minimum record length and maximum record length for the destination file: the minimum record length and maximum record length defined in the key definition file for the source file.
Format
- In Windows:
-
Jisconv [-f] -t type [-d dir work-folder-name] file-name-1 file-name-2
- In UNIX:
-
Jisconv -t type [-T dir work-directory-name] file-name-1 file-name-2
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
-f
Specify this option if you do not want to display an overwrite confirmation message that appears if the file specified in file-name-2 already exists. This option can only be specified in Windows.
-t type
In type, specify either of the following keywords:
- SI
-
The Jisconv command converts a sequential file into an ISAM file.
- IS
-
When you specify this keyword, the command converts from an ISAM file into a sequential file.
-d dir work-folder-name
The work files is used to sort key entries when converting the sequential file into an ISAM file. This means that you must specify the directory for the work files. If you omit this option, the directory specified in the TEMP environment variable, the tmp directory, or the current directory is used. This option can only be specified in Windows.
-T dir work-directory-name
The work files is used to sort key entries when converting the sequential file into an ISAM file. This means that you must specify the directory for the work files. If you omit this option, the /tmp or /usr/tmp directory is used. This option can only be specified in UNIX.
file-name-1
Specify the name of the source file for conversion. 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.
In Windows, if you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
In UNIX, if you specify a hyphen (-) in this argument when converting a sequential file into an ISAM file, the command uses the standard input as the source file.
file-name-2
Specify the name of the destination file for conversion. 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 specify the name of an existing file, the file specified in this argument replaces the existing one.
In Windows, if you want to specify a file name that includes spaces, enclose the file name in double quotation marks (").
In UNIX, if you specify a hyphen (-) in this argument when converting an ISAM file into a sequential file, the command uses the standard output as the destination file.
Return values
0 |
Normal end |
1 |
Abnormal end |