When you add a DB2 unload file data map, you can import a copybook.
To add a DB2 unload file data map:
On the
Resources
tab in the
Resource Explorer
, click
Add > Data Map
.
Enter the following information in the
Name
dialog box:
Select the
DB2UNLD
access method.
Select the
Import Record Definitions
option.
In the
DB2UNLD Access Method
dialog box, enter the following information:
In the
File Name
box, enter the name of the target DB2 unload file.
In the
DB Instance
box, enter the DB instance, such as DSN9.
In the
Table Name
box, enter the table name or click the Browse button to browse to the file. In the
DB2 Table Filter
dialog box, enter filter criteria based on the creator or schema name, database name, or table name. Click
Next
. Select a table and click
Finish
.
In the
Unload Type
list, select the unload type. For bulk access to unload files, the following IBM and BMC formats are supported: .REORG UNLOAD, .DSNTIAUL/BMC UNLOAD+, .DSNUTILB UNLOAD, and .UNDEFINED. By default, the .UNDEFINED type is generated with null indicators, and count fields in the same position as in the REORG UNLOAD EXTERNAL type. Instead of using these unload types, you can modify these statements to meet specific requirements. You can move or delete these statements to correspond to user-defined unload formats, but PowerExchange interprets them if they precede the data field to which they apply.
Click
Finish
.
In the
Import Copybook - Source Details
dialog box, select
Remote
and select the
DB2 Catalog
copybook type.
Click
Next
.
In the
Import Copybook - Remote DB2 Catalog Details
dialog box, enter the following information:
In the
Save File Locally As
box, enter a file name.
In the
Null Indicator
box, enter the hexadecimal value of the null indicator that is used in the unload file that you are mapping.
If the variables are padded in the unload file that you are mapping, select the
Pad Variable
option. This option corresponds to the BMC UNLOAD PLUS FIXEDVARCHAR option.
To select specific columns, click
Preview/Amend Columns
.
Click
Next
.
In the
Import Copybook - Configuration Details
dialog box, select the actions for imported records, fields, and tables and click