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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm


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