Reading tab delimated file, encountering problem
Posted: Mon Nov 26, 2012 9:28 am
Hi,
I am reading a file with multiple records.Each column in a single record is TAB delimated.
the input file looks like this below:(the space btw is TAB)
FH column1 column2 column3
BH Column1 Column2 Column3
DS Column 1 Column2 Column3
DL...etc.
To read each column i gave this logic in transformer by putting respective constraints on recordType.
Field(Extract_lnk.LogRecord,Char(9),1)
and like wise, Field(Extract_lnk.LogRecord,Char(9),2).....
the logic is working fine as long as there is only one long string, but if they are strings with spaces between them, then the datastage is considering them as 2 columns, like in the DS record in column1 is with space as column and 1, so it is reading in 2 different columns(despite it being space and not tab)? how shall this be resolved, any ideas
I am reading a file with multiple records.Each column in a single record is TAB delimated.
the input file looks like this below:(the space btw is TAB)
FH column1 column2 column3
BH Column1 Column2 Column3
DS Column 1 Column2 Column3
DL...etc.
To read each column i gave this logic in transformer by putting respective constraints on recordType.
Field(Extract_lnk.LogRecord,Char(9),1)
and like wise, Field(Extract_lnk.LogRecord,Char(9),2).....
the logic is working fine as long as there is only one long string, but if they are strings with spaces between them, then the datastage is considering them as 2 columns, like in the DS record in column1 is with space as column and 1, so it is reading in 2 different columns(despite it being space and not tab)? how shall this be resolved, any ideas