How to read a seq file wich has all records in a 1 line?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

How to read a seq file wich has all records in a 1 line?

Post by rajan.n »

Hi frnds..
here am reading a seq. file thru seq stage which has the following format.
1,a,111|2,b,222|3,c,333|4,d,444| the pipe and the commas am generating thru routine i can change what ever i want

so when i read the seq file i need to view the data as

no. name code
1 a 111
2 b 222
3 c 333
4 d 444

but its reading as
1 a 111 it reads only one line.the remaining continuation is ignored..

i have give final delimiter in record level '|' and field delemiter as comma


can anyone sujjest me how to read this file to get the proper output.

thanks much in advance..!
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

Rajan,

Try specifying the "Record Delimiter" with '|'

J.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

Hi
i was seriously waiting for a responce,thanx a lot for ur reply
ya i tried with that already..it dint worked out.


jhmckeever wrote:Rajan,

Try specifying the "Record Delimiter" with '|'

J.
jhmckeever
Premium Member
Premium Member
Posts: 301
Joined: Thu Jul 14, 2005 10:27 am
Location: Melbourne, Australia
Contact:

Post by jhmckeever »

OK, The following works a treat for me:

Code: Select all

$ cat john.txt
1,a,111|2,b,222|3,c,333|4,d,444|
Sequential File / Format tab:

Code: Select all

Record level
   Final Delimiter = End
   Record delimiter = |
Field Defaults
   Delimiter = Comma
   Quote = None

... With 3 varchar columns defined in my stage.

Is that what you're doing?

J.
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
rajan.n
Premium Member
Premium Member
Posts: 96
Joined: Mon Oct 09, 2006 7:47 am

Post by rajan.n »

heyyy......jhmckeever
u are worth for the treat...!!!!
thanxxx a lot...its working...
really a timely help from u.....
thanx much once again.

jhmckeever wrote:OK, The following works a treat for me:

Code: Select all

$ cat john.txt
1,a,111|2,b,222|3,c,333|4,d,444|
Sequential File / Format tab:

Code: Select all

Record level
   Final Delimiter = End
   Record delimiter = |
Field Defaults
   Delimiter = Comma
   Quote = None

... With 3 varchar columns defined in my stage.

Is that what you're doing?

J.
Post Reply