PAL - Validate Ruleset

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
dj
Participant
Posts: 78
Joined: Thu Aug 24, 2006 5:03 am
Location: india

PAL - Validate Ruleset

Post by dj »

Hi All,

I'm trying to create a rule to identify words to ignore and i'm referring to the VDATE/VPHONE ruelsets.

If any of the input column for a row is identified with IGNORABLE words then it is set.

For single pattern it works fine. But the Input string is of 7 Columns with N number of patterns.

Code: Select all

+ ; 
COPY_S [1] temp
CONVERT temp @IGNORE.TBL TEMP
** | [temp = "IGNORE"] ; Table hit
COPY "I" {InvalidReason}
COPY [1] {InvalidData}
RETYPE [1] 0
RETURN

** ;Valid if we get here
COPY "T" {ValidFlag} OF  VIGNORE
COPY data {ValidData} OF VIGNORE
RETYPE [1] 0 
;other patterns
+|+ ;JAMES DUNGEON
^++++241 ABEL LANE WARD JAMES

Do i have to repeat for all possible number of patterns? Can someone help on this.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can use the scanning and "search anywhere" components in PAL, for example *+

It really depends on exactly what you want to be able to do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Try using %1, %2, %3, etc.
Regards,
Robert
dj
Participant
Posts: 78
Joined: Thu Aug 24, 2006 5:03 am
Location: india

Post by dj »

Thanks, we kind of created a new classfication code for ignorable words.

But for single words with space, as in classfication table we are unable to add , these words are not getting properly handled.

We cannot add w1 w2 as 2 different entries as w1 and w2 when parsed separately will be of valid ones and pattern generated is incorrect.

word - ignorable words
w1 w2 - single word with space

Eg: Smith word :: pattern : FX
Smith w1 w2 :: pattern should get generated as FX
Thanks
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

If you add w1 and w2 as class X then

Code: Select all

smith w1 w2
will get pattern FXX.
You can then, if you want:

Code: Select all

*X | X ; two ignore words in a row
COPY [1] temp
CONCAT " " temp
CONCAT [2] temp
RETYPE [1] X temp temp
RETYPE [2] 0 
Now you have the FX you desire.

You may want to handle FXXX and FXXXX as well...
Regards,
Robert
dj
Participant
Posts: 78
Joined: Thu Aug 24, 2006 5:03 am
Location: india

Post by dj »

Thanks Robert.

Eg:
shut up - is a single word provided by customer to ignore them.
smith "shut up"
shut X
up X
Pattern :FXX

But what we doubt is if either "shut" or "up" appears to be valid ones if it is part of any name/address, then it may be incorrect to categorize them as "X".

Is there a way to read them as whole string?

Thanks.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

Hi,

Yes. After you find XX you then look that phrase up on a table you create that has valid XX combinations. If found, replace. If not, then restype to + to prevent the X's from being handled later.
Regards,
Robert
Post Reply