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
 

 

Can we use % operator in COBOL ,like in C if yes Then how

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
ritesh pandey

New User


Joined: 09 Feb 2007
Posts: 11
Location: Pune

PostPosted: Wed Dec 03, 2008 3:28 pm    Post subject: Can we use % operator in COBOL ,like in C if yes Then how
Reply with quote

Can we use '%' operator in COBOL ,like in C if yes Then how .
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Wed Dec 03, 2008 3:36 pm    Post subject:
Reply with quote

No.
Back to top
View user's profile Send private message
atosvv

New User


Joined: 04 Dec 2008
Posts: 11
Location: Mumbai

PostPosted: Fri Dec 05, 2008 12:13 pm    Post subject:
Reply with quote

Hi Ritesh,

I think you are looking for the MOD operator (to obtain the remainder while performing division) equivalent in COBOL.

Please refer the DIVIDE ...... REMAINDER in COBOL.
DIVIDE A BY B GIVING C REMAINDER D.

Keep Learning.

icon_smile.gif
-VV
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Dec 05, 2008 3:11 pm    Post subject:
Reply with quote

I thought like %d, %f in displays..
Never though it could be for mod operator.. Let's see what OP says on this.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8121
Location: East Dubuque, Illinois, USA

PostPosted: Fri Dec 05, 2008 5:52 pm    Post subject:
Reply with quote

Quote:
I think you are looking for the MOD operator (to obtain the remainder while performing division) equivalent in COBOL.

Please refer the DIVIDE ...... REMAINDER in COBOL.
DIVIDE A BY B GIVING C REMAINDER D.
and
Quote:
I thought like %d, %f in displays..
Never though it could be for mod operator..

Another example of why it is so vital to be very clear and precise (and use the correct terminology) in the questions posed on this forum -- so frequently there are multiple interpretations to what is asked and additional clarification is required to answer the actual question, not the understood question.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Dec 05, 2008 6:17 pm    Post subject:
Reply with quote

By the way even I thought about mod operator, I was on the way back to Mumbai so could not reply.

-Ad
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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


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