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

Multiply verb in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Oct 07, 2008 12:31 pm
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: 6966
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 1:15 pm
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: 6966
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 3:16 pm
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: 6966
Location: porcelain throne

PostPosted: Tue Oct 07, 2008 3:21 pm
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
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: 6966
Location: porcelain throne

PostPosted: Thu Oct 09, 2008 6:34 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top