HiRDB Dataextractor Version 8 Description, User's Guide and Operator's Guide
This subsection describes the following data extraction and import functions:
HiRDB Dataextractor enables the user to specify desired information in the following SQL statements that are issued when data is extracted from a HiRDB table.
Table 4-4 explains the scope of this function.
Table 4-4 Scope of the SQL user specification function during data extraction
| Data linkage type | Source | Target | Applicability |
|---|---|---|---|
| XDM/XT linkage | XDM/RD | HiRDB | -- |
| Sequential dataset | -- | ||
| HiRDB | XDM/RD | Y | |
| Sequential dataset | Y | ||
| HiRDB Dataextractor linkage | HiRDB | HiRDB | Y |
| Binary-format file | Y | ||
| DAT-format file | Y |
Y: Applicable
--: Not applicable to HiRDB Dataextractor alone.
For details, see the manual VOS3 Database Extraction Program XDM/XT.
To use this function with XDM/XT linkage, the following specifications are required:
Table 4-5 lists the environment variables that must be specified in the environment variable information setup file.
Table 4-5 Environment variables to be set to use the SQL user specification function (applicable to XDM/XT linkage)
| Environment variable | Specification |
|---|---|
| PDHOST | As required* |
| PDNAMEPORT | As required* |
| XTEXTRACTDB | As required |
| XTLCKxxxx | As required |
| XTTBLxxxx | As required |
| XTCLMxxxx | As required |
| XTWHExxxx | As required |
As required: Specify as appropriate.
* This environment variable is required when the RDBDEF statement is specified in XDM/XT's JXUMCTL control statement.
For details about the environment variables, see 2.2.3 Specifying environment variables.
To use this function with HiRDB Dataextractor linkage, you execute the xtrep command.
If you use this function, make sure that the following environment variable is specified in the source system:
For details about the environment variables, see 2.2.3 Specifying environment variables.
Table 4-6 describes the options whose specification is related to this function.
Table 4-6 Specification of xtrep command options when the SQL user specification function is used during data extraction
| Command | Option | Value | Import to HiRDB | Binary or DAT file creation | ||
|---|---|---|---|---|---|---|
| XTSQL | XTSQL | |||||
| 0 | 1 | 0 | 1 | |||
| xtrep | -g | -- | O | M | O | M |
| lock-information-file | ||||||
| -r | [authorization-identifier,]table-identifier | O | M | N | N | |
| -R | -- | N | N | M | M | |
| {bin|dat} | ||||||
| -s | column-name-specification-file-name | O | O | O | O | |
| -w | table-expression-specification-file-name | O | N | O | N | |
| [authorization-identifier,]table-identifier | -- | M | N | M | N | |
| table-expression-specification-file | -- | N | M | N | M | |
M: Mandatory
O: Optional
N: Not specifiable
--: Not specified
| XTSQL | -g option | Action | |
|---|---|---|---|
| 0 | Omitted | -- | Issue LOCK TABLE using the table name entered on the command line. |
| Specified | No value specified | Do not issue LOCK TABLE. | |
| Value specified | Issue LOCK TABLE based on information in the lock information file. | ||
| 1 | Omitted | -- | Error |
| Specified | No value specified | Do not issue LOCK TABLE. | |
| Value specified | Issue LOCK TABLE based on information in the lock information file. | ||
For details about these options, see 4.2.2 xtrep command.
This subsection describes the specification of files in options.
| XTSQL | Specification |
|---|---|
| 0 | Specify the lock options that follow LOCK TABLE table-name |
| 1 | Specify the lock options that follow LOCK TABLE |
| XTSQL | Specification |
|---|---|
| 0 | Specify the table expression that follows FROM table-name in the SELECT statement |
| 1 | Specify the table expression that follows FROM in the SELECT statement |
When 1 is specified in the XTSQL environment variable, no column name can be specified in the null value information file. If you specify information such as a default null value or data format of repetition columns, specify applicable field numbers. Specifying column names results in an error.
When data is imported into a HiRDB table, HiRDB Dataextractor starts HiRDB's database load utility (pdload). The loader parameter specification function enables you to specify desired parameters for pdload.
Table 4-7 explains the scope of this function.
Table 4-7 Scope of loader parameter specification function
| Data linkage type | Source | Target | Applicability |
|---|---|---|---|
| XDM/XT linkage | XDM/RD | HiRDB | Y |
| Sequential data set | Y | ||
| HiRDB Dataextractor linkage | HiRDB | HiRDB | Y |
Y: Applicable
To use this function with XDM/XT linkage, the following specifications are required:
To use this function with HiRDB Dataextractor linkage, execute the xtrep command.
When you use this function, specify the following environment variables as required in the target system's environment variable information setup file:
For details about the environment variables, see 2.2.3 Specifying environment variables.
Table 4-8 describes the options whose specification is related to this function.
Table 4-8 Specification of the xtrep command options when the loader parameter specification function is used
| Command | Option | Value | Requirement |
|---|---|---|---|
| xtrep | -d | -- | 1' |
| -f | server-name | O | |
| -i | {c|s|n|x} | 1' | |
| -I | XTPDCFxxxx | O | |
| XTLPRMxxxx | M, 1 | ||
| XTPDSRxxxx | M, 2 | ||
| -j | RDAREA-name | O | |
| -l | {a|p|n} | 1' | |
| -n | buffer-sectors-count | 1' | |
| -q | error-data-file-name,count | 2' | |
| -v | null-value-information-file | O | |
| -z | -- | 1' |
M: One of these items is required in order to use this function.
O: This item is optional.
1, 1': These items are mutually exclusive.
2, 2': These items are mutually exclusive.
This function converts the character codes of the extracted data according to specified environment variables and then imports the data.
Table 4-9 explains the scope of this function.
Table 4-9 Scope of the character code conversion function
| Data linkage type | Source | Target | Applicability |
|---|---|---|---|
| XDM/XT linkage | XDM/RD | HiRDB | -- |
| Sequential dataset | -- | ||
| HiRDB | XDM/RD | -- | |
| Sequential dataset | -- | ||
| HiRDB Dataextractor linkage | HiRDB | HiRDB | Y |
| Binary-format file | Y | ||
| DAT-format file | Y |
--: Not applicable to HiRDB Dataextractor.
For details, see the manual VOS3 Database Extraction Program XDM/XT.
Y: Applicable
For details about the character code sets that can be converted by this function, see 3.1.4 Converting the character codes of extracted data.
By specifying environment variables and a null value information file, you can convert the character codes during data import processing.
Table 4-10 shows the environment variables that are required to use this function. For details about the location where the environment variables are to be set, see 2.2.3 Specifying environment variables.
Table 4-10 Environment variables required to use the character code conversion function
| Environment variable | Source | Target | File creation system |
|---|---|---|---|
| XTLOCALE | As required | As required | As required |
| XTUNDEF | As required | As required |
As required: Specify as appropriate
| Source | Target | |||
|---|---|---|---|---|
| sjis | euc | utf-8 | unknown | |
| sjis | -- | Y | Y | -- |
| euc | Y | -- | Y | -- |
| utf-8 | Y | Y | -- | -- |
| unknown | -- | -- | -- | -- |
To specify whether or not the character codes are to be converted for each column, specify a null information file in the -v option of the xtrep command.
For details about how to specify this file, see 4.2.4 Contents of files specified with the xtrep command.
To convert Gaiji characters of the SJIS or EUC character code sets, use a mapping table for converting character codes. The base mapping table that is used for conversion is installed automatically when HiRDB Dataextractor is installed. For details about the directory and file names, see (2) Directories and files created by HiRDB Dataextractor in 2.2.2 Installing HiRDB Dataextractor.
In the initial status, no Gaiji codes have been defined in this base mapping table. If you use Gaiji characters during conversion, you must update character code conversion mapping tables.
When you update mapping tables, verify that both the following mapping tables are updated, so that consistency is maintained:
You use the xtccnvedt command to define Gaiji codes in a mapping table or to reference a table's contents.
HiRDB Dataextractor must not be running while a mapping table is being edited.
Function
On the basis of the mapping table that was provided during installation of HiRDB Dataextractor, create a new mapping table in the following directory:
/opt/HIRDBXT/lib/usermap/
If a mapping table already exists in this directory, it will be overwritten.
Execution environment
Execute the command as superuser on the target machine to which data is to be imported.
Command
xtccnvedt -w
-f {sjis|euc|ucs2}
-t {sjis|euc|ucs2}
-d conversion-definition-file-namextccnvedt -r
-f {sjis|euc|ucs2}
-t {sjis|euc|ucs2}
-o output-file-name
[-s output-start-code]
[-e output-end-code]Options
To update a mapping table
Note
If the character code set is UTF-8, specify ucs2.
Note
If the character code set is UTF-8, specify ucs2.
To reference a mapping table
Note
Specify output-start-code as follows:
Note
Specify output-end-code as follows:
| -f option | -t option | Map file subject to processing |
|---|---|---|
| sjis | euc | jis2euc.map |
| ucs2# | jis2ucs2.map | |
| euc | sjis | euc2jis.map or eucg2j.map |
| ucs2# | euc2ucs2.map or eucg2u.map | |
| ucs2# | sjis | ucs22jis.map |
| euc | ucs22euc.map |
Conversion definition file
In the conversion definition file, you specify in the following format a source character code in the character code conversion mapping table that is to be updated and the target character code:
source-character-code,target-character-code |
The code conversion error handling procedure depends on the cause of the error, as described below.
When the command detects a conversion error, it issues an error message (JXU7230I) and processes the column following the erroneous column. If the number of conversion error records reaches the cancellation count, the command issues an error message (JXU7230E) and terminates processing.
All rights reserved. Copyright (C) 2007, Hitachi, Ltd.