|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/24/2008 4:38:11 PM
Posts: 6,
Visits: 15
|
|
Hi there,
Could anybody help me to look at this? Thanks in advance!
I met some problems when I use fastload:
error messages:
Incorrect number of bytes returned from a File Read!
The flat file:
001371|104880|Q|12|13|41|1|1|1|1|2|1|2|2|2|1|2|2|1|0|2|1|1|2|2|1|2|2|2|1|2|
001371|780460|Q|101|0|0|0|0|10|91|1|1|0|0|0|1|1|1|1|0|0|0|1|1|1|1|0|0|0|1|1|
The script:
#!/bin/ksh
TABLENAME=$dbLoad.xxx_fcstval
LOGFILE=$XXX/scripts/LOG/xxx_fastload.log
rm -rf $LOGFILE
fastload &1
.sessions 6
.tenacity 1
.sleep 1
.logon $dbServ/$dbUser,$dbPass;
DATABASE $dbLoad;
.set record formatted
.set record text '|'
.set record unformatted
DROP TABLE $TABLENAME;
DROP TABLE ${TABLENAME}_err1;
DROP TABLE ${TABLENAME}_err2;
CREATE TABLE $dbLoad.lh_lcl_fcstVal ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL
(
locationid CHAR(6) CHARACTER SET LATIN NOT CASESPECIFIC NOT NULL,
productnumber INTEGER NOT NULL,
contributioncode CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,
dailyregfcst01 INTEGER,
........
dailyregfcst28 INTEGER)
PRIMARY INDEX ( locationid,productnumber );
DEFINE
locationid(char(6)),
productnumber(integer),
unitofMeasure(char(1)),
dlyfcst01(integer),
.............
dailyregfcst28 INTEGER)
PRIMARY INDEX ( locationid,productnumber );
.os touch fastload.input;
BEGIN LOADING $TABLENAME ERRORFILES ${TABLENAME}_err1, ${TABLENAME}_err2;
insert into $dbLoad.xxx_fcstVal
values(
:locationid
, :productnumber
, :unitofMeasure
, :dlyfcst01
, :dlyfcst02
.........
, :dlyfcst28);
.end loading
.logoff
.quit
!EOF
-----the end------
thanks!!!
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/24/2008 4:38:11 PM
Posts: 6,
Visits: 15
|
|
|
anyone knows the answer? thx again!
|
|
|
|
|
Supreme Being
      
Group: PAC and SFT Members
Last Login: Today @ 8:40:04 AM
Posts: 331,
Visits: 532
|
|
.set record vartext
Also the DEFINE describes the input file, not the table. In particular, if you use VARTEXT all DEFINE fields must be declared VARCHAR. The values will be translated to internal format during the load.
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 9/17/2008 6:21:35 AM
Posts: 30,
Visits: 105
|
|
HI
ERRR IN THE DEFINE STATEMENT.
SHEEBA
|
|
|
|