Second form of divide verb, COBOL Programming

Second form of Divide verb:

The second form of this verb is as shown below:

939_Second form of Divide verb.png

In this situation the identifier-1 or numeric- literal-1 will be divided by identifier-2 or numeric-literal-2, whatever may be the situation. The result is stored in the identifier-3, identifier-4, etc.

Illustration:

DIVIDE A BY 3 GIVING C.

If the value of A is 21 then after execution of this statement C will hold 7. There is the other form of DIVIDE verb where there is a condition to store the remainder.  Its form is

2446_Second form of Divide verb1.png

 

Illustration:

DIVIDE A INTO B GIVING C REMAINDER D.

If the identifier A, B, C & D are all 2-digited numbers and if they holds 05, 37, 18 & 20 respectively before the execution of the statement, then after execution of the statement, they will hold 05, 37, 07 & 02 correspondingly.

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







Related Discussions:- Second form of divide verb, Assignment Help, Ask Question on Second form of divide verb, Get Answer, Expert's Help, Second form of divide verb Discussions

Write discussion on Second form of divide verb
Your posts are moderated
Related Questions
WRITE STATEMENT: The WRITE Statement verb releases a record in an output file. The syntax for the WRITE statement can be unlike depending on the output device and the medium us

Example of Nested if statement: Illustration: Consider the following sentence The nested IF sentence holds two IFs and one ELSE. The IF-ELSE couple has been marke

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

VALUE CLAUSE: The value clause defines the preliminary value of the data item. Normally initialization will be completed just before the first statement in the procedure di

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

Plus Sign - edit characters for numeric data: + (Plus Sign) : A plus sign is alike to minus sign except that when the item is positive, +sign will be inserted rather th


SUBTRACT VERB: The SUBTRACT verb is used to subtract one, or the sum of two or more numbers from one or more numbers and to store the result. The form of the SUBTRACT verb

Selection of file Organization: While designing a file, the programmer should select an appropriate association for a file. The order in which the choice is to be made is as s

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil