1.
|
To set up IBM® Campaign to use a database load utility, there are three main steps to perform for each datasource: Create two load control file templates; create a script or executable to start the load utility; then set the loader configuration properties in IBM® Campaign.
|
a.
|
connect to <DATABASE> user <USER> using <PASSWORD>;
load client from <DATAFILE> of del modified by coldel| insert into <TABLE>(
<FIELDNAME><,>
)
nonrecoverable;
b.
|
connect to <DATABASE> user <USER> using <PASSWORD>;
load client from <DATAFILE> of del modified by coldel| insert into <TABLE>(
<FIELDNAME><,>
)
nonrecoverable;
a.
|
For this example, create a shell script called db2load.sh, to start the loader. For the /tmp path, you can substitute the directory of your choice:
|
#!/bin/sh
cp $1 /tmp/controlfile.tmp
cp $2 /tmp/db2load.dat
db2 -tvf $1 >> /tmp/db2load.log
chmod 755 db2load.sh
4.
|
a.
|
Choose Settings > Configuration, then select Campaign|partitions|partition1|dataSources|<datasourcename>.
|
b.
|
Set the properties that begin with the word Loader. For important information, see the topic Configuration properties for IBM® Campaign in the IBM® Campaign Administrator's Guide or the online help.
|
|
LoaderCommand: The path to the script or executable to invoke the database load utility. Most database load utilities require several arguments to be launched successfully. The tokens required by DB2® are shown in angle brackets in the following example. Type them exactly as shown. They will be replaced by the specified elements when the command is run. Example: /Unica/Campaign/partition/partition1/db2load.sh <CONTROLFILE> <DATAFILE>
|
|
LoaderCommandForAppend: The path to the script or executable to invoke the database load utility for appending records to a database table. Example: /Unica/Campaign/partition/partition1/db2load.sh <CONTROLFILE> <DATAFILE>
|
|
LoaderDelimiter and LoaderDelimiterForAppend: The delimiter used in the loader control file template.
|
|
LoaderControlFileTemplate: The path to the control file template, relative to the current partition. Example: loadscript.db2
|
|
LoaderControlFileTemplateForAppend: The path to the control file template for appending records, relative to the current partition. Example: loadappend.db2
|
|
All other Loader settings: Specify as required for your implementation, according to the information provided in the topic Configuration properties for IBM® Campaign.
|
c.
|
Copyright IBM Corporation 2015. All Rights Reserved.
|