Checking Phone number

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
BuddingDev
Premium Member
Premium Member
Posts: 43
Joined: Wed Feb 08, 2012 8:12 pm
Location: United States

Checking Phone number

Post by BuddingDev »

I want some suggestions on removing those phone number from consideration which has area code starting with 1 or 0.

In an existing rule set four dictionary fields are being populated for area code, exchange and number respectively.

I like to validate the area code does not start with 1 or 0.

I have tried creating following modification in.PAT file. It does not seem to be working.

**
COPY data(1:3) temp1
* [temp1(1:1] =1,0]
RETYPE [1] 0

Is there anything different needs to be done for this requirement?
Jboyd
Participant
Posts: 15
Joined: Mon Mar 14, 2011 12:55 pm

Post by Jboyd »

Why not put the incoming data through a transformer and make a constraint on the flowing data allowing only the data to flow where the contraint =

(field.area_code [1,1]) <> 1 or (field.area_code [1,1]) <> 0
BuddingDev
Premium Member
Premium Member
Posts: 43
Joined: Wed Feb 08, 2012 8:12 pm
Location: United States

Post by BuddingDev »

Thanks for the quick response. It can be handled in transformer as you have said. However, I like to handle it in QS this time.
I kind of got somewhere after multiple trial and error.

**| [data(1:1) !=1]
the above code is giving me desired output but I like to give two numeric values as follows
** |[data(1:1) !=1,2]

Can somebody suggest me how to give multiple numeric conditional values in .PAT file.
Whenever I am attempting to give multiple values , My window is shutting down to no avail.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Try double-quotes around the 1 and 2:

Code: Select all

** |[data(1:1) !="1","2"] 
or

Code: Select all

** |[data(1:1) !="1" "2"] 
BuddingDev
Premium Member
Premium Member
Posts: 43
Joined: Wed Feb 08, 2012 8:12 pm
Location: United States

Post by BuddingDev »

In my case this double quote was not working So I decided to use & between two conditional operators and it worked.

Thanks all for your suggestions.
Post Reply