Page 1 of 1

Unable to read a Seq File

Posted: Mon Jul 16, 2012 3:44 am
by atul9806
Hi Team
I am facing problem while reading a Seq file.

This is my file :
EMPNO,PROJNO,ACTNO,EMPTIME,EMSTDATE,EMENDATE
10,AD3100,10,0.5,1/1/2002,7/1/2002
70,AD3110,10,1,1/1/2002,2/1/2003
230,AD3111,60,1,1/1/2002,3/15/2002
230,AD3111,60,0.5,3/15/2002,4/15/2002
230,AD3111,70,0.5,3/15/2002,10/15/2002
230,AD3111,80,0.5,4/15/2002,10/15/2002
230,AD3111,180,0.5,10/15/2002,1/1/2003
240,AD3111,70,1,2/15/2002,9/15/2002
240,AD3111,80,1,9/15/2002,1/1/2003
250,AD3112,60,1,1/1/2002,2/1/2002
250,AD3112,60,0.5,2/1/2002,3/15/2002
250,AD3112,60,1,1/1/2003,2/1/2003
250,AD3112,70,0.5,2/1/2002,3/15/2002
250,AD3112,70,1,3/15/2002,8/15/2002
250,AD3112,70,0.25,8/15/2002,10/15/2002
250,AD3112,80,0.25,8/15/2002,10/15/2002
250,AD3112,80,0.5,10/15/2002,12/1/2002
250,AD3112,180,0.5,8/15/2002,1/1/2003
I am using "comma" as delimiter but getting this error while reading file.
##I TFCN 000001 15:11:06(000) <main_program>
Ascential DataStage(tm) Enterprise Edition 7.5
Copyright (c) 2004, 1997-2004 Ascential Software Corporation.
All Rights Reserved


##I TOSH 000002 15:11:06(001) <main_program> orchgeneral: loaded
##I TOSH 000002 15:11:07(000) <main_program> orchsort: loaded
##I TOSH 000002 15:11:07(001) <main_program> orchstats: loaded
##W TCOS 000049 15:11:07(002) <main_program> Parameter specified but not used in flow: DSProjectMapName
##I TFSC 000001 15:11:08(004) <main_program> APT configuration file: C:/Ascential/DataStage/Configurations/default.apt
##W TOIX 000000 15:11:14(000) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 27
##W TOIX 000154 15:11:14(001) <Sequential_File_8,0> Import warning at record 0:
##W TOIX 000018 15:11:14(002) <Sequential_File_8,0> Import unsuccessful at record 0:
##W TOIX 000000 15:11:14(003) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 25
##W TOIX 000154 15:11:14(004) <Sequential_File_8,0> Import warning at record 1:
##W TOIX 000018 15:11:14(005) <Sequential_File_8,0> Import unsuccessful at record 1:
##W TOIX 000000 15:11:14(006) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 26
##W TOIX 000154 15:11:14(007) <Sequential_File_8,0> Import warning at record 2:
##W TOIX 000018 15:11:14(008) <Sequential_File_8,0> Import unsuccessful at record 2:
##W TOIX 000000 15:11:14(009) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 28
##W TOIX 000154 15:11:14(010) <Sequential_File_8,0> Import warning at record 3:
##W TOIX 000018 15:11:14(011) <Sequential_File_8,0> Import unsuccessful at record 3:
##W TOIX 000000 15:11:14(012) <Sequential_File_8,0> Field "EMSTDATE" delimiter not seen, at offset: 28
##W TOIX 000154 15:11:14(013) <Sequential_File_8,0> Import warning at record 4:
##W TOIX 000018 15:11:14(014) <Sequential_File_8,0> Import unsuccessful at record 4:
##I TOIX 000157 15:11:14(015) <Sequential_File_8,0> (no further reports will be generated from this partition until successful import)
##I TOIX 000163 15:11:14(016) <Sequential_File_8,0> Import complete. 0 records imported successfully, 73 rejected.
**VIEWDATA ROW LIMITER HIT**
I am unable to understand the error
please help

Posted: Mon Jul 16, 2012 5:05 am
by jaysheel
In the seq file stage what datatype you have given for the date columns. The date columns are not in proper format. Change those column types as Varchar and try reading it.

Posted: Mon Jul 16, 2012 7:17 am
by ArndW
Although changing the data type of the date columns to string will solve the reading problem, you will still want to convert this string date to a real date. I would edit the extended attributes of the date column in your source sequential file stage and add a format of "%dd/%mm/%yyyy" so that the dates are converted correctly while reading the file.

Posted: Mon Jul 16, 2012 4:26 pm
by Kryt0n
Agree with the above although wouldn't %dd expect a two digit day? Can't say I've ever tried against a 1 digit day as I've autmatically used %(d,s)

Posted: Tue Jul 17, 2012 12:25 am
by ArndW
I didn't look at the input file in detail and didn't notice that the days and months can be one digit.