View previous topic :: View next topic
|
Author |
Message |
rasitha chandran
New User
Joined: 25 Jan 2008 Posts: 6 Location: chennai
|
|
|
|
Hi,
I have a doubt.
For example,
01 a pic x(4).
and a=12,
now my query is if it is numeric it has to perform some action
and if is alphanumeric it has to do some other action. How can i find out that is numeric. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
rasitha,
Use CLASS condition. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Your initial condition is ambiguous. For Pic X(4), A cannot = 12.
Which is your case?
A = '0012'
A = '12 '
or something else? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I should have shown my choices better to show the two blanks in the quotes:
Code: |
A = '0012'
A = '12 ' |
|
|
Back to top |
|
|
NOWAR
New User
Joined: 20 Feb 2007 Posts: 11 Location: Houthalen, Belgium
|
|
|
|
Use the statement
Code: |
IF A IS NUMERIC
THEN
<action>
ELSE
<action>
END-IF |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Rasitha and welcome to the forums,
Quote: |
How can i find out that is numeric. |
I believe your first task is to define just what is numeric. For example - is a leading blank still numeric?, trailing blank(s)? Should leading blanks be converted to zeros?
Once the rules are defined, implementation can proceed. |
|
Back to top |
|
|
raghumale
New User
Joined: 21 Feb 2008 Posts: 6 Location: banglore
|
|
|
|
hi rasitha
ur question is confujion |
|
Back to top |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
HELLO Raghumale.....
Quote: |
ur question is confujion |
There is no confusion in this question answer has been given in the previous post. Please refer the previous posts. |
|
Back to top |
|
|
|