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 FOR INDEXED SEQUENTIAL FILE CREATION (RANDOM MODE): We have to write a program to create an Indexed Sequential File in random mode for Student particulars. Suppose jus

Example of If- else statement Illustration:   IF   QUANTITY IS NUMERIC AND QUANTITY IS POSITIVE          MOVE ZERO TO ERROR-CODE. COMPUTE SALES VALUE=QUANTITY*RATE

Transaction file : A transaction file is a file which contains new records those changes to old records which are used to update the master file. The problem of file updatio

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

CLOSE STATEMENT: When the processing of a file is completed, then the file may be closed. This is completed with the help of the CLOSE-verb. The form of the CLOSE statement is

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

ADD and SUBTRACT CORRESPONDING: The CORRESPONDING option can also used with the ADD and SUBTRACT verbs. The following are some of the formats of these verbs with the CORRESPON

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa

Size: The number of characters or digits needed to store the data item in the memory in termed as the Size of the data item. All the 4 general characteristics explained can