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
RULES FOR SEARCH VERB: The rules apply for the SEARCH verb is as shown below: (1) The SEARCH verb can be applied only to a table that has the OCCURS clause and INDEXED phra

Illustration of Divide verb: (a) DIVIDE 5 INTO A. If the value of A is 20, then after execution of this statement the value of A will be 4. The older value of A will be los

Data types available in COBOL are given below Alpha-numeric (X), numeric (9), alphabetic (A)

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

File Description for the Relative and Indexed Files: The FD entry for a relative or an indexed file is similar to that of a sequential file. Some compilers do not permit varia

Introduction to COBOL: In the year 1959, a new language named the COBOL ( CO mmon B usiness O riented L anguage) was introduced remembering the business purpose application

Non numeric: The nonnumeric literal is used in normal to output messages or headings. The Characters which are enclosed between " " constitute nonnumeric literal. The maximum

Example of File-control: The assign clause assigns a specific physical peripheral device name to a file. The physical peripheral device are machine-dependent. We use the devic

DISPLAY STATEMENT:   The function of the DISPLAY statement is just opposite to that of the ACCEPT statement. It is used to display the low-volume results on the operator's co

REWRITE STATEMENT: The REWRITE statement has the format for a relative file as shown below, REWRITE record-name  [ FORM identifier ]