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
ACCEPT STATEMENT: The ACCEPT statement is used to read the low-volume data from the operator's console, several other hardware device or from the operating system. The common

Concept of a two-dimensional table: Concept of a two-dimensional table can be easily extended to tables having three or more dimensions. The Handling of tables up to three dim

PROGRAM FOR MASTER FILE MAINTENANCE: We have to write a program to keep the stu-file for which a record has just 2 fields,viz., rno(Roll Number) and name(Student Name). Give t

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 UNTIL OPTION: The format is as shown below: Illustration:  A) Perform p-3 until i > 5. Here p-3 will be executed whenever i B)  Perform p-2 thru

PROCEDURE DIVISION statements for the indexed files: All the statements which are available for a relative file are also available for an indexed file. READ STTATEMENT :

Rules of read statements: The next record is identified according to the rules as shown below: (i) Whenever the READ NEXT statement is the initial statement to be executed

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

Example of Special-names: Consider the illustration: Let the SPECIAL-NAMES paragraph be as shown: SPECIAL-NAMES. CHANNEL 1 IS PAGE-TOP. The Channel is related with the t

LEVEL NUMBERS: The COBOL makes use of the level number concept to explain the hierarchical data structure. A level number is a 2 digit number. The permitted level numbers a