COBOL Numeric Data type

COBOL Value Clause COBOL Alphabetic Data Type

Advertisements


Numeric data type name is self explanatory which will allow storing a combination of 0 to 9 numbers.

If any data item declared as Numeric, then it will store the data which included 0-9 numbers that are used in the program.

Numeric data type uses 9 to declare the numeric data item.

The max length of numeric data type is 18. i.e. PIC 9(18).

NUMERIC data type declaration can be with a combination of other data types like V(Virtual decimal point),P(decimal point) and S(Sign).

All USAGE clauses are applicable for Numeric data type.

Below example to display the constant value with two variable of smaller length and larger length than actual constant length


If any questions on the above, post your queries on Cobol Discussion forum


COBOL Value Clause COBOL Alphabetic Data Type

Advertisements