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
 
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: 8165
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

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