Fload from csv file

Database
Enthusiast

Fload from csv file

Hi,
I am running the following fastload script to read from a csv file:

SHOW VERSION ;
SESSIONS 4;
ERRLIMIT 2000;

logon tdpid/username,password;

drop table DBNAME.Bday_reminder ;

create table DBNAME.Bday_reminder (
First_Name VARCHAR(50),
Last_Name VARCHAR(50),
Mail_Id VARCHAR(50),
Emp_id INTEGER,
Extn_No INTEGER,
Mobile_No INTEGER,
Mobile_No_Home INTEGER
)
PRIMARY INDEX Bday_reminder ( Emp_id );

SET RECORD vartext " ";

define

First_Name (VARCHAR(50)) ,
Last_Name (VARCHAR(50)),
Mail_Id (VARCHAR(50)),
Emp_id (VARCHAR(6)),
Extn_No (VARCHAR(5)),
Mobile_No (VARCHAR(10)),
Mobile_No_Home (VARCHAR(15))

file=BDay.csv;

SHOW;

drop table DBNAME.err_1 ;
drop table DBNAME.err_2 ;

BEGIN LOADING DBNAME.Bday_reminder errorfiles DBNAME.err_1, DBNAME.err_2;
insert into DBNAME.Bday_reminder
(
First_Name ,
Last_Name ,
Mail_Id ,
Emp_id ,
Extn_No ,
Mobile_No ,
Mobile_No_Home
)
VALUES
(
:First_Name ,
:Last_Name ,
:Mail_Id ,
:Emp_id ,
:Extn_No ,
:Mobile_No ,
:Mobile_No_Home
);

END LOADING;

logoff;

The csv file is tab delimited.I am getting the following error:
**** 11:22:38 Number of recs/msg: 336
**** 11:22:38 Starting to send to RDBMS with record 1
**** 11:22:38 I/O Error on File Read: 35, Text: EOF encountered before
end of record

Can anyone help me out where the error is and what's the solution ?

Thanks in Advance
Kishore
2 REPLIES
Enthusiast

Re: Fload from csv file

This is from "Message" pdf document:

35 EOF encountered before end of record

Explanation: The end-of-file was reached before the
expected end-of-record was reached. I.e., the record
read is too short. This problem can be caused while
reading text formatted data if a valid EOR field was not
found before the end-of-file.

Remedy: Check the last record in the file and fix the
data.

Enthusiast

Re: Fload from csv file

Also check encoding of your file, if there any nonascii symbols try SET SESSION CHARSET "UTF8"