TSO-ISPF JCL COBOL VSAM DB2 CICS Tools Articles Job Portal Forum Quiz Interview Q&A

COBOL - Arithmetic Expressions


Arithmetic Expressions may consist of any of the following:

  • An identifier described as a numeric elementary item.

  • A numeric literal.

  • Identifiers and literals separated by arithmetic operators.

  • Two arithmetic expressions separated by an arithmetic operator.

  • An arithmetic expression enclosed in parentheses.

Arithmetic Operators:

Following are the arithmetic operators:
  • BINARY: + - * / **

  • UNARY: + -

  • Precedence

  • Unary

  • Exponentiation

  • Multiplication and Division

  • Addition and Subtraction


Arithmetic Statements

Arithmetic statements are of five kinds:
  1. ADD

  2. SUBTRACT

  3. MULTIPLY

  4. DIVIDE

  5. COMPUTE


If you have any doubts or queries related to this chapter, get them clarified from our Mainframe experts on ibmmainframer Community!

Are you looking for Job Change? Job Portal