Online Documentation for Data Import for DB2

Working with console application


All the import options are set in template (*.itm) files. A template can be also used in the Console version of Data Import for DB2.

 

To create a template file, follow the instructions below:

 

Console application also generates the *.log file that contains information about the import operation completion.

 

The easiest way to start Data Import for DB2 console application is to double-click the generated *.itm template. The other way is to enter the command line and type the appropriate command.

 

Usage:

 

<path to Data Import for DB2 console application>\Db2ImportC.exe TemplateFile [-datafile=<source file name>] [-B]

 

datafile=<filename1>;<filename2>;<filename3>

Indicates the source file(s) for data import. The values you specify replace the names of the files in the template. The number of files should strongly correspond to the number of files in the template. Multiple files are separated with a semicolon.

 

TemplateFile

Stands for the *.itm template file to be used as the console version execution parameter

 

[-B]

Use this parameter in the command line to run the console version of Data Import for DB2 in the background mode.

 

Example:

 

"C:\Program Files\EMS\Data Import for DB2\Db2ImportC.exe" "C:\EMS\DataImport\Template1.itm" -B -datafile=test150283.xls

 

Note: The following exit codes can be returned by Data Import for DB2 to the operating system after performing the latest task:

0 - successful completion;

1 - error(s) occurred during task performing;

2 - fatal error occurred. The task was not performed.