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

Want to check for an integer if i have given a number


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

New User


Joined: 18 Aug 2006
Posts: 45

PostPosted: Fri Aug 18, 2006 2:16 pm
Reply with quote

In response to the reply for my query i want clear that i want to check for an integer since if i have given a number with decimal the is numeric gets satisfied.


but what i am asking is only for an integer .
Back to top
View user's profile Send private message
Sridevi_C

Active User


Joined: 22 Sep 2005
Posts: 104
Location: Concord, New Hampshire, USA.

PostPosted: Fri Aug 18, 2006 7:11 pm
Reply with quote

This is one way ....

01 SALARY PIC 9(5)V99.
01 RESULT.
05 INTEGER-PART PIC 9(5).
05 FRACTION-PART PIC 99.
MOVE SALARY TO RESULT.
IF FRACTION-PART IS ZERO DISPLAY ?SALARY IS AN INTEGER?
ELSE DISPLAY ?SALARY IS NOT AN INTEGER?.

Please try to use comma, period, etc. This will help us read your question better.

Thanks.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Aug 19, 2006 6:49 am
Reply with quote

Please provide an example of your situation. Your words are open to a variety of interpretations.
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 Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top