Page 1 of 1

PAL syntax question

Posted: Mon Oct 21, 2013 5:55 pm
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

Posted: Mon Oct 21, 2013 6:16 pm
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

Posted: Mon Oct 21, 2013 6:36 pm
by bobyon
Tried it like you recommneded and still getting default values.

Do I have to re-provision after each change?

Posted: Mon Oct 21, 2013 6:40 pm
by stuartjvnorton
Not for seeing the results in the Test dialog.
But you will for the change to show in jobs.

Posted: Mon Oct 21, 2013 9:01 pm
by bobyon
Hmmmm? I'm still seeing the default results.


Could I have the code in the wrong place?

Posted: Mon Oct 21, 2013 11:55 pm
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.

Posted: Tue Oct 22, 2013 7:27 am
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!

Posted: Tue Oct 22, 2013 7:29 am
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!

Posted: Tue Oct 22, 2013 10:47 am
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?