COBOL Assumed decimal point data type
Assumed decimal point allows storing period (.) for decimal values.
Assumed decimal point data type uses P/V to declare the data item which contains a decimal value.
Assumed decimal point data type declaration will come with a combination of numeric data type which is used to declare numeric data items.
DISPLAY USAGE clause is applicable for Assumed decimal point data type.
If the decimal point is in between the values, then V will be used in declaration.
S=+12.567, The declaration of S should be like below 01 S PIC S9(2)V9(3). Here V represents the dot.
If the decimal point is at any end of values, then P will be used in declaration.
Y= .567 -> 01 Y PIC P9(3)
1. Assumed decimal point P or V does not occupy any extra storage space.a. P/V --- Doesn’t occupy any storage space. b. P --- External decimal point. c. V --- Internal decimal point.2. If the Decimal point at the boundaries of numeric value then P will use to represent the. (Dot).
3. Numeric & alpha numeric data types are declared as alphanumeric but not vice versa.
4. SOC7 error will occurs whenever we pass the mismatch of the data types
If any questions on the above, post your queries on Cobol Discussion forum
COBOL Sign Data Type COBOL Renames Clause