and your question
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/topic/com.ibm.db29.doc.apsg/db2z_equivalentcdatatypes.htm
you should use datatype - _Decimal32 or _Decimal64 or _Decimal128
but, bad news:
To use the decimal floating-point host data type, you must do the following:
Use z/OS 1.10 or above (z/OS V1R10 XL C/C++ ).
Compile with the C/C++ compiler option, DFP.
Specify the SQL compiler option to enable the DB2 coprocessor.
Specify C/C++ compiler option, ARCH(7). It is required by the DFP compiler option if the DFP type is used in the source.
Specify 'DEFINE(__STDC_WANT_DEC_FP__)' compiler option because DFP is not officially part of the C/C++ Language Standard.
Hi Anup,
Thanks for raising this question in forum.
Hi Momi,
Thanks for information given below!
I am also looking to migrate my db2 columns from 'double' to 'DECFLOAT' to avoid loss in data precision due to rounding errors.
Please find below my system specifications -
Operating system: zOS - z/OS 10.00 01
C++ compiler - XL series C++ compiler v1.10 on Z/OS
Transaction Manager : CICS
Database - DB2 REL 915
What equivalent datatype should I use in my business layer (written in C++) and DM layer written in Pro*C (host variable representation)? Can you please suggest a way to migrate my double datatypes to DECFLOAT with these system and language preferences?