beautypg.com

A-16 – HP Neoview Release 2.5 Software User Manual

Page 111

background image

Example A-16 Control File: Load File to Table Without 1 to 1 Mapping

/*-----------------------------------------------------*/
/* Simple Load From File To Table With Non 1-1 Mapping */
/*-----------------------------------------------------*/

/* DDL to be used to create target table:

CREATE TABLE NVT.SN_NVT_MIX
(
FN_tgt CHAR(24) CHARACTER SET ISO88591 NO DEFAULT NOT NULL
, LN_tgt CHAR(24) CHARACTER SET ISO88591 NO DEFAULT NOT NULL
, ADR_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT NULL
, ZP_tgt INT DEFAULT 0
, PH_tgt CHAR(10) CHARACTER SET ISO88591 DEFAULT NULL
, SOCIAL_tgt LARGEINT NO DEFAULT NOT NULL
, IN1_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT NULL
, IN2_tgt CHAR(128) CHARACTER SET ISO88591 DEFAULT NULL
, PRIMARY KEY (SOCIAL_tgt ASC)
)
ATTRIBUTES ALIGNED FORMAT
HASH PARTITION ;

*/

version 1.0;

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

dataformats
{
dataformat1 delimited
records separated by
fields delimited by <,>
optionally qualified by <">
(
FIRST_NAME_src char,
LAST_NAME_src char,
ADDRESS_src char,
ZIP_src int,
PHONE_src char,
SSN_src largeint,
INFO1_src char,
INFO2_src char
)

dataformat2 sql fields
(
FN_tgt char,
LN_tgt char,
ADR_tgt char,
ZP_tgt int,
PH_tgt char,
SOCIAL_tgt largeint,
IN1_tgt char,
IN2_tgt char
)

}

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

tgt1 jdbc table NEO.nvt.sn_nvt_mix options
(
system = "tra0101",
user = "testdbt",

111