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



Joined: 13 Mar 2007
Posts: 150

Points: 1382

Post Posted: Tue Dec 23, 2014 10:21 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
Hi,

I am trying to remove dots following initials and combine them. after combining the initials I would want to retype the token to appropriate class. But I am not able to do.

below is the example I am trying to achieve.

Code:
Input string:
1. abc xyc Pty L.T.D
2. J.O.H.N CAFE


Output pattern I am looking to achieve is :
Code:
1. abc xyz pty LTD -> ++WO
2. JOHN CAFE -> FW

I have already tried retyping the token like below but nothing seems to be working.

Code:
1. RETYPE [1] & "JOHN"
2. RETYPE [1] * "JOHN"
3. RETYPE [1] + "JOHN"

Thanks for your help!!
rjdickson
Participant



Joined: 16 Jun 2003
Posts: 378
Location: Chicago, USA
Points: 2531

Post Posted: Wed Dec 24, 2014 8:15 am Reply with quote    Back to top    

Hi,

Is the output pattern significant, or just how you want to deal with the data?

The most direct way is to test for the specific words toward the top of the rule set:

*&="L" | . | &="T" | . | &="D"
RETYPE [1] O "LTD" "LTD"
RETYPE [2] 0
RETYPE [3] 0
RETYPE [4] 0
RETYPE [5] 0

Note that the xxNAME rule sets already do this.

For JOHN, the same routine in xxNAME (the Periods subroutine) also outputs 'JOHN'.

I hope this helps!

_________________
Regards,
Robert
Rate this response:  
Not yet rated
hitmanthesilentassasin
Participant



Joined: 13 Mar 2007
Posts: 150

Points: 1382

Post Posted: Sat Dec 27, 2014 4:37 am Reply with quote    Back to top    

Thanks for your the reply rjdickson.

I wanted to classify the tokens to appropriate class after suppressing noise. the dot sepator was just an example. If I can classify the tokens to appropriate classes then they would get handled with the following patterns else I would have to handle each word in the pattern.
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42960
Location: Denver, CO
Points: 221541

Post Posted: Sat Dec 27, 2014 8:41 am Reply with quote    Back to top    

hitmanthesilentassasin wrote:
the dot sepator was just an example

And yet in your post all you mentioned was "I am trying to remove dots following initials and combine them" so that's why you got the answer you did. Always best to lead with a full example / explanation of what you need so you don't have people waste time spinning up an answer that doesn't really help you.

So what exactly falls into your "noise" category? Confused

_________________
-craig

Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
Rate this response:  
Not yet rated
hitmanthesilentassasin
Participant



Joined: 13 Mar 2007
Posts: 150

Points: 1382

Post Posted: Sat Dec 27, 2014 7:38 pm Reply with quote    Back to top    

Craig - in the example I provided the dots separators are the noise. my question was about retyping the cleansed tokens to the classifications defined within the classification table without having to retype each word to specific class.

Thanks for your help!!
Rate this response:  
Not yet rated
hitmanthesilentassasin
Participant



Joined: 13 Mar 2007
Posts: 150

Points: 1382

Post Posted: Sun Dec 28, 2014 10:08 pm Reply with quote    Back to top    

I have managed to find below URL which does exactly what I was looking for. All I need to do is to manage separate list of classifications in the reference table.

http://www-01.ibm.com/support/knowledgecenter/SSZJPZ_8.7.0/com.ibm.swg.im.iis.qs.patguide.doc/topics/r_Retyping_Tokens.html
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 42960
Location: Denver, CO
Points: 221541

Post Posted: Mon Dec 29, 2014 9:08 am Reply with quote    Back to top    

Excellent.

_________________
-craig

Now I've got that feeling once again, I can't explain; you would not understand
this is now who I am. I have become comfortably numb.
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