Program for add verb, COBOL Programming


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

Environment division.

Data division.

Working-storage section.

77 a  pic    s9(3)v9(2) value 0.

77 b  pic     s9(3)v9(2) value 0.

77 c  pic     s9(4)v9(2) value 0.

77 e-c pic   +z(4).z(2).

Procedure division.


    Identification division.

    program- id. Add verb.

    environment division.

    data division.

working - storage section.

      77  A  PIC  S9(3)   V9(2)

      77  B  PIC  S9(3)  V9(2)

      77  C  PIC  S9(4)  V9(2)

      77  e-a  PIC  +z(4)  Value 0


PARA - 1

Description:   This program gets 2 inputs from the user.

                      It adds them by using the ADD verb. 


The unedited outcome is available in c.

We move c to e-c, where the edit characters are available.

Note that the variable e-c makes the use of the + edit character.

The e-c will always be exhibited with result. 


Posted Date: 10/17/2012 1:27:44 AM | Location : United States

Related Discussions:- Program for add verb, Assignment Help, Ask Question on Program for add verb, Get Answer, Expert's Help, Program for add verb Discussions

Write discussion on Program for add verb
Your posts are moderated
Related Questions
Comparison of Numeric Operands: We are well-known with the kind of the relational condition where both the operands are numeric. The comparison in this situation is algebraic

Illustration of Perform with varying option: A) Perform para-3 varying the k from 1 by 1 until k > 10. Here para-3 will be constantly executed 10 times (For k=1,2,3, .....1

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

Rules for apply for the condition name: The rules below apply for the condition name. (i) The Condition names should be explained at level 88. The level number starts in ma

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

SIGN CONDITION:   The sign condition establishes whether or not the algebraic value of an operand is negative, positive or zero. The operand can be either the numeric identif

SEARCH VERB: The SEARCH verb is used to position elements in one-dimensional tables. Let us consider the following problem. Assume that each element of a table consists of thr

BLANK WHEN ZERO: BLANK WHEN ZERO is an editing clause that may be used along with a picture. This will set the whole data item to blanks of its value is equal to zero. Though,

We have input file, record layout is EMP ID (6 char) , EMP NAME (20 char), Designation (3 char),Salary (5 digit) Base Branch (10char) Grade (3 Alphanumeric). This is the input f

PROGRAM TO FIND INTEREST ON BANK DEPOSITS: We have to write a program to find interest on deposits. The criteria is given below : identification division. program-