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
 

 

Doubt in Multiply verb in COBOL

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

New User


Joined: 01 Oct 2008
Posts: 2
Location: Melbourne,Australia

PostPosted: Tue Oct 07, 2008 12:13 pm    Post subject: Doubt in Multiply verb in COBOL
Reply with quote

Hi,
If anyone can let me know about the following query in COBOL whether it's correct or not.

MULTIPLY A by B C GIVING D E

i am getting the error as there are many variables given before "GIVING" verb.color=blue][/color]
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 12:31 pm    Post subject:
Reply with quote

neither FORMAT 1 or FORMAT 2 of the MULTIPLY statement
(it is not a query - you are misusing a DB2 term)
provides for multiple multiplicands nor multiple quotients.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 1:15 pm    Post subject:
Reply with quote

Quote:

ok thanks for your reply.please give me the solution..


mshemanthkumar,

don't send me private messages. Besides,

there could be someone else on this forum that is too lazy
to look at the manuals
IBM Manuals button at top of every page on this website.

Pick any COBOL Reference manual,
check-out chapter on Procedure Division statements,
MULTIPLY is one of them.
Click on the link for MULTIPLY and READ the documentation.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 3:16 pm    Post subject:
Reply with quote

another private msg:
Quote:

Are you sure it's available in any reference manual? Don't you think we would have searched already?

This is not the proper answer. If you know the exact answer please post your reply else leave it as it is some one may try to find the solution.


1. Not only did your error message provide you a rather large hint as to what was wrong, but I gave you the solution.
Quote:

neither FORMAT 1 or FORMAT 2 of the MULTIPLY statement
...
provides for multiple multiplicands nor multiple quotients.


2. Has not been much activity on this topic.
your question and my three posts.
maybe, others consider a non-question.

3. If your problem is language comprehension, say so; I or someone else will spell it out.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 3:21 pm    Post subject:
Reply with quote

the multiply statement has:

one multiplier, one multiplicand and one quotient.
Your statement has two (2) multiplicands - B and C
and two (2) quotients - D and E
Quote:

MULTIPLY A by B C GIVING D E


remove B or C and D or E.

Below are acceptable Multiply statements:

MULTIPLY A BY B GIVING D
MULTIPLY A BY B GIVING E
MULTIPLY A BY C GIVING D
MULTIPLY A BY C GIVING E
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Oct 09, 2008 6:29 pm    Post subject:
Reply with quote

In my manual it seems to say that the following is also acceptable:
Code:
MULTIPLY A BY B GIVING D E F (etc.)
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Thu Oct 09, 2008 6:34 pm    Post subject:
Reply with quote

I stand corrected, Jack.

got a little carried away.
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
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
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts COBOL Programming Sandpit? jodrisco COBOL Programming 6 Wed Apr 12, 2017 3:47 am


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