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

Move verb - cobol programming, Introduction to MOVE Verb: The aim of th...

Introduction to MOVE Verb: The aim of this section is to introduce the learner how to move data from one place to the other place in the memory. This is completed with the help

Sequential files, SEQUENTIAL FILES:   The purpose of the proposed sec...

SEQUENTIAL FILES:   The purpose of the proposed section is to introduce the concepts such as File characteristics, File Description for Fixed-Length Records, File-Control

Rules for constructing an arithmetic expression, Rules for constructing an ...

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

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

File-control paragraph for the relative files, FILE-CONTROL paragraph for t...

FILE-CONTROL paragraph for the relative files: The normal format for the SELECT clause for a relative file is as shown below. SELECT  file-name  ASSIGN  TO  implementor-nam

Example of move corresponding, Example of Move corresponding: Consider...

Example of Move corresponding: Consider the DATA DIVISION entries shown below. Suppose it is needed that the data stored in the 4 fields of the PAY_REC should be

Example of accept statement, Example of Accept statement: For illustra...

Example of Accept statement: For illustration, ACCEPT FLAG-A can be specified to read the value of the FLAG_A from the console. It may be keep in mind that no file definition

Illustration of the abbreviation - compound condition, Illustration of the ...

Illustration of the abbreviation: A few illustration of the abbreviation are given below: Illustration: The compound condition  AMOUNT GREATER THAN 499 AND AMOUNT L

Sign - picture clause, Sign - Picture clause: The numeric data item ca...

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

Minus sign - edit characters for numeric data , Minus sign - edit character...

Minus sign - edit characters for numeric data: The minus sign can appear either at the leftmost or rightmost location of the picture. If an item is negative, a minus sign will

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