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 write a simple cobol programming that works

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

cobol program for generate a eb bill

FD Entry for variable-length Records: The RECORDS CONTAINS and BLOCK CONTAINS clause are quite dissimilar in the case of files with variable- length records. The syntax of the

PERFORM WITH VARYING OPTION: The format is as shown below:

PROGRAM FOR SCREEN SECTION:  identification division.   program- id.   environment division.   data division.   working-storage section.   01  a pic 9(2) value

SEQUENTIAL FILE CREATION AND REWRITING: We have to write a program to create a student file with just two fields: sno i.e. Student Number and same i.e. Student Name. Add a few

REDEFINES CLAUSE: At times it may be found that two or more storage regions defined in the DATA DIVISION are not in use concurrently. In such situations only one storage regio

PROGRAM FOR CONDITION NAMES: We have to write a simple program to demonstrate Condition names usage.  identification division.   program- id.   environment division.

OPEN statement: We know that the processing of a file should start with the execution of an OPEN statement. The file can be opened in any one of the 4 open modes - INPUT, OUTP