View previous topic :: View next topic
|
Author |
Message |
mshemanthkumar
New User
Joined: 01 Oct 2008 Posts: 2 Location: Melbourne,Australia
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
I stand corrected, Jack.
got a little carried away. |
|
Back to top |
|
|
|