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



Joined: 29 Jan 2012
Posts: 31
Location: Australia
Points: 313

Post Posted: Thu Jul 25, 2013 5:06 pm Reply with quote    Back to top    

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

I have an address field I would like to standardise. the problem I have is I cant seem to perform a classification override for a mulitple words, for example I would like to standardise the words NEW SOUTH WALES to the abreviation of NSW.

First off opening the existing AUAREA rule set and trying to perform classification override does not allow for the space character in the input token.

I have also tried taking a copy of the AUAREA rule set and modifying the classification table by inserting a new classification of:
"NEW SOUTH WALES" NSW S

Any help on this issues would be appreciated.

Cheers,
Joseph.
stuartjvnorton
Participant



Joined: 19 Apr 2007
Posts: 523
Location: Melbourne
Points: 3890

Post Posted: Thu Jul 25, 2013 5:25 pm Reply with quote    Back to top    

Hi Joseph,

You can do this by creating a reference table out of them and add a Pattern/Action Block in the PAT file.
It's explained on page 32 of the Pattern Action Reference.
Rate this response:  
Not yet rated
jneasy
Participant



Joined: 29 Jan 2012
Posts: 31
Location: Australia
Points: 313

Post Posted: Thu Jul 25, 2013 7:12 pm Reply with quote    Back to top    

Ok so I have created a reference table named AUSTATES and entered in the following rows for a start:
"NEW SOUTH WALES" NSW
"SOUTH AUSTRALIA" SA


Now I'm a bit stuck with editing the Pattern file, is this the correct pattern to convert the words to their abreviated form?
&
CONVERT [1] @AUSTATES.TBL TKN

Also I am unsure where I would need to add this pattern. I am using a copy of the AUAREA rule set if this helps.
Rate this response:  
Not yet rated
stuartjvnorton
Participant



Joined: 19 Apr 2007
Posts: 523
Location: Melbourne
Points: 3890

Post Posted: Fri Jul 26, 2013 10:08 am Reply with quote    Back to top    

Just had another look and I don't think my earlier post will work.
You'll probably have to do it the manual way, eg

& = "NEW" | & = "SOUTH" | & = "WALES"
RETYPE [1] S "NSW"
RETYPE [2] 0
RETYPE [3] 0

Do that sort of thing for each state.

IIRC there is a call to a Common_Patterns subroutine:

&
CALL Common_Patterns

It would probably be easiest to put it above this.
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