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
PROGRAM FOR SCREEN SECTION WITH FILES: identification division.   program- id.   environment division.          input-output section.   file-control.     select

Example of Class condition: Let the BASIC-PAY be a data name in the card record defined with picture 9(5) V99. By reading the card we can test the value of the BASIC-PAY to ma

Common form of the READ statements: Format 1 is the common form of the READ statements. Format 2 is used when the access mode is either random or dynamic. For illustration,

MULTIPLY VERB:   The Multiply Verb causes one or more multiplicands to be multiplied by the multiplier and to store the products. The form of the MULTIPLY verb is as shown be

READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the

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

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

Data Division: The Data Division is a part of the COBOL program where every data item processed by the program is described. It is very important to note that unless a data

ROUNDED OPTION: Let us consider the DATA DIVISION entries which are as shown below: Now, subsequent to the execution of the statement ADD A B GIVING C, the C will hold

, (Comma) : A comma, whenever used in a picture, is considered as an insertion character and inserted wherever it become visible. There can be more than one comma in the pictu