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
 
Want to check for an integer if i have given a number

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Want to check for an integer if i have given a number
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    Post subject: Re: related to value checking
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    Post subject:
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    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 add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts PARSE GDG name to separate generation... Abid Hasan SYNCSORT 2 Sun Feb 11, 2018 3:40 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts Profile changed to NUMBER ON STD (fro... Martylin TSO/ISPF 1 Thu Aug 03, 2017 9:14 am

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