Pattern Help

Lorry Litman LLitman@exchange.hsc.mb.ca
Fri, 30 Nov 2001 08:40:59 -0600


Hi,

You're absolutely correct one could code for QUICK

FIELD TEMP PATTERN =
"(A|B|D|E|F|G|H|I|J|K|L|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)#####"

However, given different scenarios the pattern as above can get quite ugly,
and the input procedure simply allows a little more control.

There are a number of different ways as you and others have pointed out with
using define. temporary could be used, put the pattern on the element in the
dictionary, use other procedures like edit,process.

Thanx
    Lorry


-----Original Message-----
From: shulbert@littlejohnfrazer.com
[mailto:shulbert@littlejohnfrazer.com]
Sent: Friday, November 30, 2001 3:57 AM
To: Lorry Litman
Cc: powerh-l@lists.swau.edu
Subject: RE: Pattern Help


am i missing something, or is this just too obvious?

acc *quizwork
def b char*70 = "(A|B|D|E|F|G|H|I|J|K|L|N|O|P|Q|R|S|T|U|V|W|X|Y|Z)#####"
def c char*3 = "OK" if matchp(a, tru(b)) else "Bad"
rep a c
go

a       c

A11111  OK
C11111  Bad
M11111  Bad
011111  Bad
BA1111  Bad


regards,
Stephen Hulbert.
Senior Analyst/Programmer.
Software Division. Littlejohn Frazer.
Direct: +44 (20) 7369 4501. Fax: +44 (20) 7987 9707
mailto:shulbert@littlejohnfrazer.com



 -----Original Message-----
From: 	LLitman@exchange.hsc.mb.ca [mailto:LLitman@exchange.hsc.mb.ca] Sent:
Friday, November 30, 2001 5:02 AM
To:	MOORSAR@co-opsonline.com; powerh-l@lists.swau.edu
Subject:	RE: Pattern Help

Hi,

The problem I believe you're going to have with trying to exclude M,C,# as
the first character is that the PATTERN function does not have and AND
option (which is what you need)it only has an OR option.
If your field statement is anything like
FIELD TEMP PATTERN = "(\M|\C|\#)#####"
as soon as you put the | you've negated what you're trying to accomplish,
because M fails \M but passes \C and also passes \#, and so on.

Since you mention you're useing Quick my suggestion would be
FIELD TEMP PATTERN "^#####"
PROCEDURE INPUT TEMP
BEGIN
IF 0 < SIZE(FIELDTEXT) AND MATCHPATTERN(FIELDTEXT[1:1],"M|C")
THEN .....
END

There are other variations on the same theme, putting more in the input
procedure, taking off the pattern statement from the field statement
completely...

Hope this helps

Thanx
    Lorry

-----Original Message-----
From: Sarah Moore [mailto:MOORSAR@co-opsonline.com]
Sent: Thursday, November 29, 2001 12:07 PM
To: powerh-l@lists.swau.edu
Subject: Pattern Help


We are using Powerhouse 6.20 on OpenVMS.

We had this original pattern on a field in QUICK "^#####" We want to
restrict it to not let the Alpha be equal to M or C. We tried a
lot
of different combinations and found this one. "\M#####" which restricted
the M but allows the user to enter 6 digits. Also, we were not able to
restrict the C. Thanks in advance

Sarah Moore Co-op Atlantic
Moncton, NB

= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.


= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l@lists.swau.edu
Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
Unsubscribe: "unsubscribe" in message body to
powerh-l-request@lists.swau.edu
http://lists.swau.edu/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.




The information contained in this communication is confidential and may
be legally privileged. It is intended solely for the use of the individual
or entity to whom it is addressed and others authorised to receive it.
If you are not the intended recipient you are hereby notified that any
disclosure, copying, distribution or taking of any action in reliance on
the contents of this information is strictly prohibited and may be
unlawful.

Littlejohn Frazer reserves the right to monitor the content of any message
sent to or from littlejohnfrazer.com and its associate domains,
fmi-litjon.co.uk and litjon.co.uk

A list of partners may be inspected at 1 Park Place, Canary Wharf,
London, E14 4HJ

Registered to carry on audit work and authorised to carry on investment
business by the Institute of Chartered Accountants in England & Wales