A-10 – HP Neoview Release 2.5 Software User Manual

Page 102

Advertising
background image

Example A-10 Control File: Update with Constant, NULL, or Expression

/*--------------------------------*/
/* Constants, NULLs & Expressions */
/*--------------------------------*/

version 1;

options
{
errors = 1000,
discards = 100,
rowsetsize = 5000
}

dataformats
{
dataformat1 delimited
records separated by <nl>
fields delimited by <,>
optionally qualified by <">
(
FIRST_NAME char,
LAST_NAME char,
ADDRESS char,
ZIP int,
PHONE char,
SSN largeint,
INFO1 char,
INFO2 char
)

dataformat2 sql fields
(
FIRST_NAME char,
LAST_NAME char,
ADDRESS char,
ZIP int,
PHONE char,
SSN largeint,
INFO1 char,
INFO2 char
)
}

sources {
src1 file "./data_files/sn_nvt.dat"

tgt1 jdbc table NEO.nvt.sn_nvt options
(
system = "asl0101",
url = "jdbc:hpt4jdbc://txnaslan01.txn.cpqcorp.net:18650/",
user = "user",
password = "transport",
datasource = "Admin_Load_DataSource"
)
}

maps {
map1 from dataformat1 to dataformat2
(

# comment: use a constant for the target field PHONE
PHONE = CONSTANT "8001237890",
SSN = SSN,
FIRST_NAME = FIRST_NAME,
LAST_NAME = LAST_NAME,
ADDRESS = ADDRESS,

# comment: increment source field ZIP by 1 and assign the resulting value to target field ZIP
ZIP = EXPRESSION ":ZIP + 1",

# comment: assign NULL to the target field INFO1
INFO1 = NULL,
INFO2 = INFO2
)
}

jobs
{

102

Control File Examples

Advertising