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
How do I move a single QUOTE to a field or set the value clause? "''" does not work?

Identification Division: The Identification Division is the first division of each and every COBOL source program. The paragraph PROGRAM-ID is necessary in most of the mac

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

PROGRAM FOR SUBTRACT VERB: We have to write a simple program to elaborate the SUBTRACT verb. You can also use edit characters in the program. Identification division. Pr

NONSTANDARD CLAUSES: The various clauses explained above are as per the ANSI standard. Also, most compilers provide for additional nonstandard clauses to meet the specific nec

I uploaded a file from PC to Mainframe, variable LRCL 256. In my COBOL program I defined it as FD INPUT-FILE LABEL RECORDS ARE OMITTED BLOCK CONTAINS 0 RECORDING MODE

PERFORM WITH TIMES OPTION: The format of a PERFORM TIMES statement is as shown below: Illustration:   A)  Perform the para-2 5 times. In this situation the specifie

Example of constructing an arithmetic expression: An arithmetic expression may be proceeded by a + or - sign. These operations are known as unary + or unary - operators. Il

COBOL Words: The COBOL word can be formed by using the characters as shown below: 0-9 A-Z (a-z) - (hyphen) The rules below should be hold in forming the COBOL words.

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam