Page 1 of 1
sequential file reading with ~# delimiter
Posted: Thu Jul 05, 2012 7:28 am
by marpadga18
Hi
my data is like this
abc~#asdf~#hdsajds
the delmiter is ~# how do we read this I tried giving the delimiter as ~# but it is reading #also how to avoid this
Thanks
M
Posted: Thu Jul 05, 2012 7:35 am
by ArndW
In your sequential file stage, specify Format -> Record Level -> Record Delimiter String as "~#" (without the quotes).
Posted: Thu Jul 05, 2012 7:45 am
by marpadga18
abc~#asdf~#hdsajds
these are the column names how to import the sqeuential file table definition. I tried with sequential file table definitions but not working.
Any ideas really helpfull
Posted: Thu Jul 05, 2012 9:00 am
by ArndW
I assumed those were line terminators, not column delimiters.
Change your sequential stage to declare "~#" as your Field Delimiter String.
Posted: Fri Jul 20, 2012 2:13 pm
by srinivas.g
use the sed command to replace ~# to comma delimiter and call sed command in filter property. Make sure insided the data you should not have same pattern (~#).
Posted: Tue Jul 24, 2012 5:48 am
by ssreeni3
Hi,
Need to run any script?Or use external filter/seq file options?Please give clarity regarding this.Where should we write sed command to resolve this?
Thanks in advance
Sreeni
Posted: Tue Jul 24, 2012 6:03 am
by ray.wurlod
There's no need to do anything external if you use Arnd's solution.
The solution from srinivas.g requires that the file be pre-processed - it does not matter where.