Creating Custom Rule set Query

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
gsym
Charter Member
Charter Member
Posts: 118
Joined: Thu Feb 02, 2006 3:05 pm

Creating Custom Rule set Query

Post by gsym »

Hi,

I am relatively new with Qualitystage and got some basic questions regarding creating custom rule set.

My ClS file

;;QualityStage v8.0
\FORMAT\ SORT=Y

AARON AARON F
ABBEY ABBEY F
JOHN JOHN F

My DCT file

;;QualityStage v8.0
\FORMAT\ SORT=N
;-------------------------------------------------------------------------------
; Domain Fields
;-------------------------------------------------------------------------------
FirstName C 25 S FirstName
MiddleName C 25 S MiddleName


My PAT file

\PRAGMA_START
SEPLIST " ~`!@#$%^&*()_-+={}[]|\\:;\"'<>,.?/"
\PRAGMA_END

& ; Determine Input Pattern {InputPattern}
PATTERN {InputPattern}

& ; CALL Common_Patterns SUBROUTINE

\SUB Common_Patterns

? | ?
COPY [1] {FirstName}
COPY [2] {MiddleName}

\END_SUB

If my understanding of created files is right, I am jus classfying 3 names and the rest of the names in the file comes has "?", when i ran word INV report.Also i am jus creating 2 output columns in the report and in the patter acction file, I am jus specifiying one pattern to move on to the specified fields.

My question here is

Did i miss some basic logic here?, because when I test the rule by typing in 2 unknown names (which should return back "??" and place first operand in FN and second operand in middle name), nothing shows up in tst result.

Did i miss something basic here or my whole understanding of concepts is wrong?

Thanks in advance for the reply
Last edited by gsym on Fri Nov 07, 2008 10:12 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:idea: Can't help you but just wanted to point out - if you're going to use the BBCode tags for bold, italics (etc) then you cannot check/enable the "Disable BBCode in this post" option. You can edit your post and uncheck it so things appear as you meant.

Or at least 'Preview' posts first so easily noted problems can be corrected before Submitting.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your PAT file lacks a STRIPLIST in the PRAGMA section, lacks a POST actions section (which is OK, you may not want any), and lacks an EXIT statement to prevent falling through into the subroutine. You have not shown examples of the kinds of data you will be processing, but any with AARON, ABBEY or JOHN or any with other than two names will not generate the pattern in your file. Indeed, the ? pattern element matches one or more unclassified words, so it is unlikely that any input record will match that pattern. Try + | + instead. Have you created a PRC file to describe your rule set?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gsym
Charter Member
Charter Member
Posts: 118
Joined: Thu Feb 02, 2006 3:05 pm

Post by gsym »

Hiii Ray,

Sorry For late reply and Thanks for the reply, I tried and it worked. The reason my file was restricted to 3 names, was jus for learning purpose and trying to figure out concepts behind these rules set.

Also, attended DSXchange's first webinar Congrats . It was unfortunate that it ended with out the coverage of last few slides.
Post Reply