Fastload: Incorrect number of bytes returned from a File Read
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


Fastload: Incorrect number of bytes returned... Expand / Collapse
Author
Message
Posted 6/20/2008 3:09:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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!!!
Post #11937
Posted 6/24/2008 4:38:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 6/24/2008 4:38:11 PM
Posts: 6, Visits: 15
anyone knows the answer? thx again!
Post #11951
Posted 6/26/2008 9:46:26 PM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme 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.
Post #11980
Posted 8/11/2008 6:29:18 AM
Forum Member

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member

Group: Forum Members
Last Login: 9/17/2008 6:21:35 AM
Posts: 30, Visits: 105
HI

ERRR IN THE DEFINE STATEMENT.


SHEEBA
Post #12500
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 3:45pm

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.219. 9 queries. Compression Disabled.