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
IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

SPECIAL-NAMES: This paragraph is used to associate some hardware names to the user-specified mnemonic names. This paragraph is elective in all compilers. The format of this pa

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

Valid and Invalid Word - Cobol words: Valid Word             Invalid Word & Reason emp-sal                  -pay   ( it starts with a hyphen)  TOTAL MARK (blank space em

ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable.  Though, the processing is not-terminated and the co

File Activity: The file activity is a measure of the proportion of records processed during an update run. Therefore we define the activity ration as shown below. Activi

LABEL RECORD CLAUSE: This clause specifies whether or not the standard header and trailer labels must be present in the magnetic-tape files. VALUE OF CLAUSE: The VAL

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

Sign - Picture clause: The numeric data item can be signed or unsigned. If a numeric data is regarded as unsigned then during the execution these unsigned data items are treat

INPUT-OUTPUT SECTION: This section holds information regarding the files to be used in the program. There are 2 paragraphs in this section- FILE-CONTROL & I-O-CONTROL. The