DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
manu.dwhds
Participant



Joined: 26 Sep 2008
Posts: 30
Location: Bangalore
Points: 282

Post Posted: Tue Feb 15, 2011 10:56 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
HI ,
Please any body let me know how to read two diffrent delimters conatines single file like (Ex:my flat file containes Pipe and comma).
Please suggest using which stage we can perform this reading opeartion .


Last edited by manu.dwhds on Tue Feb 15, 2011 11:05 pm; edited 1 time in total
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42662
Location: Denver, CO
Points: 219709

Post Posted: Tue Feb 15, 2011 11:01 pm Reply with quote    Back to top    

First suggestion, post in the correct forum based on your job type. I guessed PX, 8.x and UNIX so moved it here. If that's not right please go back and edit your post so that it is correct.

_________________
-craig

And I'm hovering like a fly, waiting for the windshield on the freeway...
Rate this response:  
Not yet rated
manu.dwhds
Participant



Joined: 26 Sep 2008
Posts: 30
Location: Bangalore
Points: 282

Post Posted: Tue Feb 15, 2011 11:10 pm Reply with quote    Back to top    

Thanks for reply,
I have flat file it containes data few of the rows as comma delimter and few of the data as pipe delimeter when i read using sequntial file stage its not reading properly ,please let me know how to set the property in sequntial file stage.

_________________
Manu
Rate this response:  
Not yet rated
myukassign



Group memberships:
Premium Members

Joined: 25 Jul 2008
Posts: 238

Points: 2543

Post Posted: Wed Feb 16, 2011 12:16 am Reply with quote    Back to top    

Option 1
----------
Read the file using sequential file stage with delimiter comma.

Then use a following column import stage, there you can specify pipe as a delimiter to further split into columns

Option 2
----------

Read the file with just one column of length varchar 500 or something 1.e. read line by line

Decalre one stage variable where you can replace all pipes with comma, or all comma with pipe to make the delimiter uniform using convert function.

Now you know what to do, you can extract columns using Field / substring function.

split the column in the transformer with Field functions, you need to do it carefully not to missout any columns.


Last edited by myukassign on Wed Feb 16, 2011 12:18 am; edited 1 time in total
Rate this response:  
Not yet rated
manu.dwhds
Participant



Joined: 26 Sep 2008
Posts: 30
Location: Bangalore
Points: 282

Post Posted: Wed Feb 16, 2011 1:04 am Reply with quote    Back to top    

Thanks for your quick reply

_________________
Manu
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours