Wildcard question

2009-02-19 Thread Mark Milke
Hi Listers,

I'm still on ARS 6.3.

I need to make an AL that checks if a value of a char fields is made
of max. 8 digits.

I did this:

'fieldname' LIKE  [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

but this works only if I enter exact 8 digits...

Then I need to check if the value in the char field begins with E or
I, the second character is alphanumeric and the third character is a
.
The lenght of the value doesn't matter in this case.

I'm trying:

('fieldname' LIKE  E[A-Z].%)  OR ('fieldname' LIKE  I[A-Z].%)

but it fails.


What am I missing here?

Thanks,
Mark

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are


Re: Wildcard question

2009-02-19 Thread Brian Bishop
Hi Mark,

If you want to make sure that it is a maximum of 8 digits do the following.

Do a a/l set fields into an display only integer field of LENGTHC($field
name$)

Follow it up with a second a/l that has a qualification of integer field is
8 and throws an error message
This will allow anything from 0 to 8 characters.

If I want to ensure a character field is numeric only I do the following.

a/l or filter set fields into a display only char field
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPL
ACE($ISSINumber$,  0,  ),  1,  ),  2,  ),  3,  ),  4,
),  5,  ),  6,  ),  7,  ),  8,  ),  9,  )

follow this up with either a second action checking length and if it is
greater than 0 there must be other characters beside numeric, or check if it
is NULL. The replace will take away all numeric values and if anything is
left it can't be purely numeric.

For your second problem check if it is E% or I% if it isn't throw an error
message. If it is then check if the field is __.% That is two underscores a
full stop and then % for anything. All these checks will need to be a NOT
'fieldname' LIKE

Brian Bishop
Goldstag Consultants Ltd
tel: 07973 746832

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Mark Milke
Sent: 19 February 2009 16:05
To: arslist@ARSLIST.ORG
Subject: Wildcard question

Hi Listers,

I'm still on ARS 6.3.

I need to make an AL that checks if a value of a char fields is made
of max. 8 digits.

I did this:

'fieldname' LIKE  [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]

but this works only if I enter exact 8 digits...

Then I need to check if the value in the char field begins with E or
I, the second character is alphanumeric and the third character is a
.
The lenght of the value doesn't matter in this case.

I'm trying:

('fieldname' LIKE  E[A-Z].%)  OR ('fieldname' LIKE  I[A-Z].%)

but it fails.


What am I missing here?

Thanks,
Mark


___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are
No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.237 / Virus Database: 270.10.25/1958 - Release Date: 02/18/09
20:55:00

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are


Re: Wildcard question

2009-02-19 Thread Rocky Rockwell
**




Mark, the only thing I would add to Brian's email is first make UPPER
function to make sure the alpha values are in upper case and then to
check for the upper case "E" or "I" add it to his replace. Or do do
your wildcard with "[EI]".

Hope this helps















Rocky
Rocky Rockwell 
mgrockw...@verizon.net

Ph#1: 325-884-1234 
Ph#2: 325-884-1263 
Mobile:
325-450-1297
http://www.linkedin.com/in/mgrockwell






Brian Bishop wrote:

  Hi Mark,

If you want to make sure that it is a maximum of 8 digits do the following.

Do a a/l set fields into an display only integer field of LENGTHC($field
name$)

Follow it up with a second a/l that has a qualification of integer field is
  
  
8 and throws an error message

  
  This will allow anything from 0 to 8 characters.

If I want to ensure a character field is numeric only I do the following.

a/l or filter set fields into a display only char field
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPL
ACE($ISSINumber$,  "0",  ""),  "1",  ""),  "2",  ""),  "3",  ""),  "4",
""),  "5",  ""),  "6",  ""),  "7",  ""),  "8",  ""),  "9",  "")

follow this up with either a second action checking length and if it is
greater than 0 there must be other characters beside numeric, or check if it
is NULL. The replace will take away all numeric values and if anything is
left it can't be purely numeric.

For your second problem check if it is E% or I% if it isn't throw an error
message. If it is then check if the field is __.% That is two underscores a
full stop and then % for anything. All these checks will need to be a NOT
'fieldname' LIKE

Brian Bishop
Goldstag Consultants Ltd
tel: 07973 746832

-Original Message-
From: Action Request System discussion list(ARSList)
__Platinum Sponsor: RMI Solutions ARSlist: "Where the Answers Are" html___


Re: Wildcard question

2009-02-19 Thread Opela, Gary L CTR USAF AFMC 72 CS/SCBAH
Try using: Field LIKE %%

I think that is what it is, anyways. I've seen it done, but it's been a
long time and a few different jobs ago.

Gary

-Original Message-
From: Action Request System discussion list(ARSList)
[mailto:arsl...@arslist.org] On Behalf Of Rocky Rockwell
Sent: Thursday, February 19, 2009 3:32 PM
To: arslist@ARSLIST.ORG
Subject: Re: Wildcard question

** 
Mark, the only thing I would add to Brian's email is first make UPPER
function to make sure the alpha values are in upper case and then to
check for the upper case E or I add it to his replace. Or do do your
wildcard with [EI].

Hope this helps


Rocky

Rocky Rockwell 
mgrockw...@verizon.net 
Ph#1: 325-884-1234 
Ph#2: 325-884-1263 
Mobile: 325-450-1297

http://www.linkedin.com/in/mgrockwell 





Brian Bishop wrote: 

Hi Mark,

If you want to make sure that it is a maximum of 8 digits do the
following.

Do a a/l set fields into an display only integer field of
LENGTHC($field
name$)

Follow it up with a second a/l that has a qualification of
integer field is
  

8 and throws an error message


This will allow anything from 0 to 8 characters.

If I want to ensure a character field is numeric only I do the
following.

a/l or filter set fields into a display only char field

REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(
REPL
ACE($ISSINumber$,  0,  ),  1,  ),  2,  ),  3,
),  4,
),  5,  ),  6,  ),  7,  ),  8,  ),  9,  )

follow this up with either a second action checking length and
if it is
greater than 0 there must be other characters beside numeric, or
check if it
is NULL. The replace will take away all numeric values and if
anything is
left it can't be purely numeric.

For your second problem check if it is E% or I% if it isn't
throw an error
message. If it is then check if the field is __.% That is two
underscores a
full stop and then % for anything. All these checks will need to
be a NOT
'fieldname' LIKE

Brian Bishop
Goldstag Consultants Ltd
tel: 07973 746832

-Original Message-
From: Action Request System discussion list(ARSList)
__Platinum Sponsor: RMI Solutions ARSlist: Where the Answers
Are html___

___
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are