PAL syntax question

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

PAL syntax question

Post by bobyon »

What is wrong with this picture:

Code: Select all

\SUB Input_Modifications

=T= "FC"
RETYPE [1] 0

=T= "FORGN"
RETYPE [1] 0

RETURN

\END_SUB

I am attempting to get QS to drop those strings (FC and FORGN) from the address. However, it does not seem to be having any effect. I tested the following address and it results in US in the country code which tells me it is not working.

Code: Select all

ZQUSZQ 18 AGIOU ISIDOROU ST           ATHENS 114 71       GREECE     FC FORGN  
The same address without the FC FORGN works just fine.
What am I doing wrong.

I made a copy of the COUNTRY rule set and added the code pasted above. Is the syntax wrong? Have I placed the code in the wrong place?

Thanks,
Bob
Bob
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

You're trying to do a comparison without a token type.

You need a '+' if those tokens aren't classified.

+ = "FC" | + = "FORGN"
RETYPE [1] 0
RETYPE [2] 0
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

Tried it like you recommneded and still getting default values.

Do I have to re-provision after each change?
Bob
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Not for seeing the results in the Test dialog.
But you will for the change to show in jobs.
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

Hmmmm? I'm still seeing the default results.


Could I have the code in the wrong place?
Bob
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

You need to add a '*' to the beginning of the PAL to 'scan from the left'. Your code right now expects that token to be the first token.

Also, you can replace + with & (token of any class) since you do not care.

Finally, another option is to enter a classification override to classify FC and FORGN as class 0 (zero). You will not need any PAL in this case.
Regards,
Robert
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

BINGO!

Thanks guys. The * did the trick.

The classification override also worked which is probably the technique I will use going forward since that won't require creating a copy of the COUNTRY set in production.

Thanks guys!
Bob
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

BINGO!

Thanks guys. The * did the trick.

The classification override also worked which is probably the technique I will use going forward since that won't require creating a copy of the COUNTRY set in production.

Thanks guys!
Bob
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

OK, so those two methods both work in the COUNTRY rule set in both the test dialog and in the job itself. The ISO Country code is being set appropriately now.

However, because the COUNTRY rule set only outputs ISO Country and Identifier flag, the FC and FORGN are still in my target file since I passed everything through from the source file adding ISO Country and ID flag along the way.

The next step ( I think) is to pass this data through the MNS stage to standardize as many addresses as possible. But with the FC and FORGN in address line four and state and zip, etc. MNS is not standardizing any addresses that contain FC and FORGN.

Since there is not a single MNS rule set, how do I eliminate these values from the addresses so that MNS can standardize properly?

Do I need to add the classification overrides to all of the waves rule sets?
Bob
Post Reply