Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us