Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to check a Decimal value for NUMERIC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to check a Decimal value for NUMERIC
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: 276
Location: Bang,iflex

PostPosted: Wed Jun 25, 2008 12:19 pm    Post subject:
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    Post subject: Reply to: How to check a Decimal value for NUMERIC
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    Post subject: Reply to: How to check a Decimal value for NUMERIC
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us