Convert DECIMAL(7,3) into equivalent COBOL host variable PIC form.

DB2DatabaseBig Data Analytics

The formula for converting DECIMAL DB2 data type to COBOL equivalent is−DECIMAL(p,q) = PIC S9(p-q)V(q). Where V indicates implied decimal.

The DECIMAL(7,3) can take a sample value as 7861.237 and this can be converted to COBOL equivalent as PIC S9(7-3)V(3) = PIC S9(4)V(3).

raja
Published on 14-Sep-2020 14:29:43
Advertisements