All Forums Tools
Stiphu 5 posts Joined 07/13
17 Jul 2013
End of CSV File / Fastload

I wrote a fastload sript which works fine to load my CSV files. It looks like following:

sessions 2;
errlimit 25;
logon xxxx/yyyy,zzzz;

DROP TABLE scsDataImport;
CREATE TABLE scsDataImport(

set record VARTEXT " ";
file = testEndSequence.CSV;
begin loading scsDataImport errorfiles error_1, error_2;
insert into scsDataImport(
end loading;

Just there is something I don't like. At the end of each CSV file, I have two empty lines. That means that the loading "crashes" and displays the message "not enough fields in in vartext data record nummer: n". If I remove the empty lines, that means if I just make a newline after the last entry, everything works fine and the import is successfull.
Well I know that I can change all the CSV files manually, but that means periodically work and is not a beautifull solution for this problem. I'm sure there is a workaround, but I couldn't find it out so far. Do you guys have any suggestion?

feinholz 1234 posts Joined 05/08
17 Jul 2013

That is the way FastLoad works.
The reading of the file is expecting each record in the file to adhere to the DEFINE list of columns.
There is no workaround in FastLoad.


SuSeSi 61 posts Joined 10/08
19 Jul 2013

If you know there is empty lines in your data file, then pre-process the file before giving to Fastload. 


You must sign in to leave a comment.