All Forums Tools
Teradata_lcl 6 posts Joined 03/08
20 Jun 2008
Fastload: Incorrect number of bytes returned from a File Read

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/ kshTABLENAME=$dbLoad.xxx_fcstvalLOGFILE=$XXX/scripts/ LOG/xxx_fastload.logrm -rf $LOGFILEfastload &1.sessions 6.tenacity 1.sleep 1.logon $dbServ/$dbUser,$dbPass;DATABASE $dbLoad;.set record formatted.set record text '|'.set record unformattedDROP 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!!!

Teradata_lcl 6 posts Joined 03/08
24 Jun 2008

anyone knows the answer? thx again!

Fred 1096 posts Joined 08/04
26 Jun 2008

.set record vartextAlso 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.

11 Aug 2008

HI ERRR IN THE DEFINE STATEMENT.

smeher 3 posts Joined 11/11
02 Nov 2011

Sometime teradata behaves strangely... this error may be coming because of incorrect order of fileds in the control file. Recheck/regenerate the control file and try again.

I had faced this error and I had used the above mentioned step to resolve the issue.

 

Sushant.

 

Sushant.
www.SMeher.com

You must sign in to leave a comment.