IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to check a Decimal value for NUMERIC


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sathish_rathinam

New User


Joined: 22 Aug 2005
Posts: 59
Location: india

PostPosted: Wed Jun 25, 2008 11:36 am
Reply with quote

Is there any function for checking a decimal value for NUMERIC condition.
I tried checking 99.99 value is NUMERIC, but i got the result showing 99.99 in not a NUMERIC. How can we process this without a INSPECT statement.
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Wed Jun 25, 2008 12:19 pm
Reply with quote

Hi,

you can make use of EVALUATE function.

like

Code:
EVALUATE TRUE
    WHEN VARIABLE = 0000.00 THRU 9999.99
       STATEMENT
       STATEMENT
       STATEMENT
    WHEN OTHER
       DISPLAY ' CHECK CONDITION FAILED'
       END-EVALUATE

This will not work in all cases.
Back to top
View user's profile Send private message
sasikaran

New User


Joined: 24 Jun 2008
Posts: 3
Location: chennai

PostPosted: Wed Jun 25, 2008 12:49 pm
Reply with quote

We cant check the numeric for decimal values..U can check for the filed from which the 99.99 is moved.
Back to top
View user's profile Send private message
sasikaran

New User


Joined: 24 Jun 2008
Posts: 3
Location: chennai

PostPosted: Wed Jun 25, 2008 2:48 pm
Reply with quote

The other option is to MOVE the 99.99 to a working storage variable of 99v99 and check Numeric for this Working storage field.

Hope this helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts How to check whether who renamed the ... JCL & VSAM 3
Search our Forums:

Back to Top