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
kunal1101
Participant



Joined: 03 Dec 2007
Posts: 8
Location: Pune
Points: 52

Post Posted: Wed Jan 16, 2008 11:31 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: TX
OS: Unix
Hi....
i am again back with delimiters...
what is the workaround if i have different delimiters to seprate fields within a record?
for ex.:- i have data as:-
CustomerID;ABCWIDGET~ABC Widgets, Inc.

where my first delimiter is ';' between customerid and ABCWIDGET and second delimiter is ~ between ABCWIDGET and ABC Widgets, Inc.

I tried specifying different seprators while defining the above mentioned indiviual items.But my problem lies in what complonent syntax i should have for the group containing above items?.It should be surely delimited and i cant specify more than one delimiter.
Confused
Please help.

_________________
Kunal_devil!!!
mdan


since June 2010

Group memberships:
Premium Members

Joined: 28 Apr 2003
Posts: 46
Location: Brussels
Points: 292

Post Posted: Thu Jan 17, 2008 2:32 am Reply with quote    Back to top    

Hi,
you may use 2 successive "column importer" stages:
- read the file as a single (long) line - varchar
- the first one has as delimiter the ';' char, and the second group is imported as one single column
- the second one it will have '~' as delimiter, using as input column the second group; map only the previously imported columns

You can do the same split using a transformer and field func (if you don't want to use column importer).

Dan
Rate this response:  
janhess
Participant



Joined: 18 Sep 2003
Posts: 201
Location: UK
Points: 950

Post Posted: Thu Jan 17, 2008 4:53 am Reply with quote    Back to top    

mdan this is dstx forum.
Rate this response:  
Not yet rated
janhess
Participant



Joined: 18 Sep 2003
Posts: 201
Location: UK
Points: 950

Post Posted: Thu Jan 17, 2008 4:59 am Reply with quote    Back to top    

mdan this is dstx forum.

CustomerID;ABCWIDGET~ABC Widgets, Inc.

You can create a group containing 2 groups
First contains Item CustomerID and Group Widget with ; delimiter
Second contains items widget name and widget company with ~ delimiter
Rate this response:  
Not yet rated
kunal1101
Participant



Joined: 03 Dec 2007
Posts: 8
Location: Pune
Points: 52

Post Posted: Thu Jan 17, 2008 5:31 am Reply with quote    Back to top    

thanx janhess Cool

_________________
Kunal_devil!!!
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