HiRDB Dataextractor Version 8 Description, User's Guide and Operator's Guide

[Contents][Index][Back][Next]

3.4 Creating files

File creation by HiRDB Dataextractor involves receiving data from a source system and then storing the data in a file at the target host.

HiRDB Dataextractor enables you to extract data from a HiRDB database and create an input file for a database system. Combined with XDM/XT, HiRDB Dataextractor can create an input file for a database system using the data sent from a mainframe database. Using a file created with the file creation facility, you can import data into a non-HiRDB database system.

This section explains how to use HiRDB Dataextractor for data source and file creation at the target host.

Organization of this section
(1) Format of file to be created
(2) Data types of the created file
(3) Character codes of the file to be created
(4) Specifying a name for the created file
(5) Executing a shell script

(1) Format of file to be created

To create a file, use the xtrep or xtrepO command's -R option. The -R option enables you to select one of the following two file formats:

(2) Data types of the created file

The data types of the created file depend on the extracted database.

(3) Character codes of the file to be created

When there is a data linkage between ORACLE and HiRDB systems or between HiRDB systems, the character codes can be converted as specified in the environment variable in order to create files. For details about the supported character code sets, see 3.1.4 Converting the character codes of extracted data. For details about how to use this function, see 4.2.3 Additional data extraction and import functions or 5.1.3 Additional data extraction and import functions.

(4) Specifying a name for the created file

You use the -o option to specify a name for the created file, which is referred to as the output file. If the extracted columns contain a BLOB column, HiRDB Dataextractor creates LOB input files as well as the output file. A LOB input file is created for each LOB data item. You can use the -b option to specify a directory for storing the LOB input files. To store BLOB-column data in the same output file as for non-BLOB data without creating LOB input files, specify the XTLOBKIND environment variable.

If an output file or LOB input file to be created already exists, the -y option determines whether or not the existing file is to be overwritten. When the -y option is specified, HiRDB Dataextractor deletes the existing file and then outputs data to the file. When the -y option is omitted, HiRDB Dataextractor outputs a message and terminates processing.

The output file and LOB input files are created at the host at the following HiRDB server on the target system:

(5) Executing a shell script

To execute user-defined processing after file creation, use the -x option to specify the filename of the shell script you want to execute. When the filename of a shell script is specified, HiRDB Dataextractor passes control to the user-created shell script after file creation and then waits for completion of the shell script. When the shell script is completed, HiRDB Dataextractor regains control and terminates the processing.