Second form of divide verb, COBOL Programming

Assignment Help:

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.


Related Discussions:- Second form of divide verb

Example of open statement, Example of Open statement: Illustration: ...

Example of Open statement: Illustration: The OPEN INPUT TRANSACTION, OLD-MASTER OUTPUT NEW-MASTER. The illustration represents that there are two input files named the

Input-output section - cobol programming, INPUT-OUTPUT SECTION: This s...

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

Program for multiply verb, PROGRAM FOR MULTIPLY VERB: We have to write...

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

Why 77 level used for, 77 level used for- It is Elementary level item. it C...

77 level used for- It is Elementary level item. it Cannot be subdivisions of other items or cannot be qualified, or they can be subdivided themselves.

Direct organization, Direct Organization: Besides the relative or inde...

Direct Organization: Besides the relative or indexed organization, also a direct access file can be designed to have what is termed as direct organization.  In this organizati

Label record and value of clause, LABEL RECORD CLAUSE: This clause spe...

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

Rules for occurs clause, RULES FOR OCCURS CLAUSE: The rules apply for ...

RULES FOR OCCURS CLAUSE: The rules apply for the OCCURS clause and the subscripts are as shown below. (1) The integer in the OCCURS clause should be a positive integer.

Picture clause, Picture Clause: The picture clause explains the genera...

Picture Clause: The picture clause explains the general characteristics of an elementary data item. These characteristics are elaborated below: Class: In COBOL the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd