Illustration of multiply verb, COBOL Programming

Illustration of Multiply verb:

(a)  MULTIPLY A BY B.

In this situation the value of A & B will be multiplied and the product will be stored in B.  The decimal point location will automatically be taken care of. The older value of B will be lost.

(b)  MULTIPLY A BY B GIVING C.

In this Verb the value of A & B will be multiplied and the product will be stored in C. The older value of C will be lost but B will hold its old value.

(c)  MULTIPLY A BY B C D.

In this Verb B will be multiplied by A and the result will be stored in B. Likewise, C will be multiplied by A and the product will be stored in C and the result of the multiplication of D and A will be stored in D.

(d)  MULTIPLY A BY B C GIVING D E.

In this situation the product of B & A will be stored in D, while the product of C and A will be stored in E.

In the situation of the MULTIPLY statement also, the literals cannot be used for identifier-2, Identifier-3, etc. Though, if the GIVING option is used, the numeric literals are also permitted in place of the identifier-2, identifier-3, etc.  For illustration,

MULTIPLY  TAX  BY .05  GIVING  TAX-BASE.

 

Posted Date: 10/16/2012 5:22:10 AM | Location : United States







Related Discussions:- Illustration of multiply verb, Assignment Help, Ask Question on Illustration of multiply verb, Get Answer, Expert's Help, Illustration of multiply verb Discussions

Write discussion on Illustration of multiply verb
Your posts are moderated
Related Questions
PROGRAM TO DEMONSTRATE MERGE VERB: The two files for which a record having 2 fields viz. Account Number and Name are already available. Now Merge these two files and create a

Evaluate is like a case statement & Evaluate  stamenet can be used to replace nested Ifs. The difference b/w EVALUATE and case is that there is no 'break' is required for EVALUATE

File Description for the Relative and Indexed Files: The FD entry for a relative or an indexed file is similar to that of a sequential file. Some compilers do not permit varia

I need help with a COBOL programming assingment. I have started the program but I need help completing the program. I have 5 errors. Here is the question. 10. Suppose your company

PROGRAM FOR INDEXED SEQUENTIAL FILE CREATION: We have to write a program to create an Indexed Sequential File in a dynamic mode for Student particulars. Suppose just 3 fields:

Valid and Invalid Word - Cobol words: Valid Word             Invalid Word & Reason emp-sal                  -pay   ( it starts with a hyphen)  TOTAL MARK (blank space em

Examples - Edit characters for numeric data: The following illustration illustrates the use of Z editing characters. The character b is used to indicate the space character an

ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable.  Though, the processing is not-terminated and the co

RELATIVE FILES: The Files that are stored on a direct access storage medium like magnetic disk are frequently known as direct access files. The COBOL supports three different

DIVIDE VERB: The aim of the DIVIDE verb is to divide one number by the other and to store the result.  There are few forms of this verb. One of its forms is as shown below: