Page 1 of 1

Creating Custom Rule set Query

Posted: Thu Nov 06, 2008 6:59 pm
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

Posted: Thu Nov 06, 2008 7:17 pm
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.

Posted: Thu Nov 06, 2008 9:58 pm
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?

Posted: Fri Nov 14, 2008 1:37 pm
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.