Illustration of divide verb, COBOL Programming

Assignment Help:

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 lost.

(b) DIVIDE 5 INTO A GIVING B.

If the value of A is 20, then after execution of this statement then the value of B will be 4. At this point the A will retain its older value.

(c) DIVIDE 3 INTO A GIVING B C.

In this illustration the result of the division of A by 3 will be stored both in B & C.

(d) DIVIDE 2.5 INTO A B GIVING C D.

In this situation the A will be divided by 2.5 and the result will be stored in C, while the result of the division of B by the 2.5 will be stored in D.

As in the situation of the MULTIPLY statement, the literals cannot be used for identifier-2, identifier-3, etc. Whenever the GIVING option is only used the numeric literals permitted in the place of identifier-2, identifier-3, etc. For illustration, DIVIDE A INTO 25 GIVING V. 

 


Related Discussions:- Illustration of divide verb

Example of file-control, Example of File-control: The assign clause as...

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

Redefine clause, Can we declare a redefine clause as below? A Redefines B, ...

Can we declare a redefine clause as below? A Redefines B, PIC X(4)

Column and field in cobol program, Column and Field in COBOL program: ...

Column and Field in COBOL program: In COBOL there are 2 types of entries termed as margin A and margin B entries. The Margin A entries start from the column 8, 9, 10 or 11 and

Label records or disk directory - file characteristics, Label Records / Dis...

Label Records / Disk Directory: The most important information stored in the header label is what is termed as the file title. In the situation of magnetic-disk files the labe

Illustration of search verb, Illustration of Search verb: To illustrat...

Illustration of Search verb: To illustrate the other use of SEARCH verb, assume we wish to search the similar tab to find the number of persons whose deposited amount is more

Program for compute verb, PROGRAM FOR COMPUTE VERB: We have to write a...

PROGRAM FOR COMPUTE VERB: We have to write an easy program to elaborate the COMPUTE verb.  Identification division. Program- id. compverb. Environment division. Da

Program for add verb, PROGRAM FOR ADD VERB: We have to write a simple ...

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

Difference between index and subscript, What is the difference b/w index an...

What is the difference b/w index and subscript? Subscript indicates to the array occurrence whereas index is the displacement (in no of bytes) from the beginning of the array.

Relational condition - cobol programming, RELATIONAL CONDITION:   We ...

RELATIONAL CONDITION:   We know that a relational condition specifies a comparison between two operands and has the form.     Operand-1    relational-operator   operand-2

Handling file that was uploaded from a PC, I uploaded a file from PC to Mai...

I uploaded a file from PC to Mainframe, variable LRCL 256. In my COBOL program I defined it as FD INPUT-FILE LABEL RECORDS ARE OMITTED BLOCK CONTAINS 0 RECORDING MODE

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