Build op - Float comparison.
Posted: Mon Mar 05, 2007 8:12 am
generation of build op fails for incorrect operator =='
If condition with == works fine for all string constants but fails for decimal constants.
Here is the code
Code definition.
==============
char BLOCKA=' ';
char BLOCKB=' ';
==============
code - Per records
=======================
doTransfer(0);
BLOCKA = ' ';
BLOCKB = ' ';
if (CHD_EXTERNAL_STATUS == 'B')
{
BLOCKA = 'B';
BLOCKB = 'H';
}
else if (CHD_STATUS_REASON_CODE = 89)
#==> Here is where it fail, the data is decimal and is defined decimal in metadata;
{
BLOCKA = 'Z';
BLOCKB = 'H';
}
writeRecord(0);
==============================
Error Message:
Operator Generation Failed
buildop -f -BC /usr/vacpp/bin/xlC_r -BL /usr/vacpp/bin/xlC_r -C buildop -H buildop -O buildop -W buildop buildop/BlkCode.opd
##E TBLD 000000 Subprocess command failed with exit status 256.
##W TBLD 000000 Output from subprocess: "Per-Record Code (buildop/BlkCode.opd)", line 25.33: 1540-0218 (S) The call does not match any parameter list for "operator=".
##I TBLD 000000 /usr/vacpp/bin/xlC_r -O -I/data/ds/ccs/projectlibs/dpr_ccs_dev/buildop -I/opt/tools/ds/Ascential/DataStage/PXEngine/include -O -c -qspill=32704 /data/ds/ccs/projectlibs/dpr_ccs_dev/buildop/bosource1151424-0.C -o /data/ds/tmp/bosource1151424-0_s.o.
##W TBLD 000000 Output from subprocess: "/opt/tools/ds/Ascential/DataStage/PXEngine/include/apt_util/decimal.h", line 317.16: 1540-1283 (I) "APT_Decimal::operator=(const APT_Decimal &)" is not a viable candidate.
"Per-Record Code (buildop/BlkCode.opd)", line 25.10: 1540-1289 (I) The implicit object parameter of type "APT_Decimal &" cannot be initialized with an implied argument of type "const APT_Decimal".
"/opt/tools/ds/Ascential/DataStage/PXEngine/include/apt_util/decimal.h", line 300.16: 1540-1283 (I) "APT_Decimal::operator=(APT_DFloat)" is no
##W TBLD 000000 Output from subprocess: t a viable candidate.
##W TBLD 000000 Output from subprocess: "Per-Record Code (buildop/BlkCode.opd)", line 25.10: 1540-1289 (I) The implicit object parameter of type "APT_Decimal &" cannot be initialized with an implied argument of type "const APT_Decimal".
====================================
Thanks
bikan
If condition with == works fine for all string constants but fails for decimal constants.
Here is the code
Code definition.
==============
char BLOCKA=' ';
char BLOCKB=' ';
==============
code - Per records
=======================
doTransfer(0);
BLOCKA = ' ';
BLOCKB = ' ';
if (CHD_EXTERNAL_STATUS == 'B')
{
BLOCKA = 'B';
BLOCKB = 'H';
}
else if (CHD_STATUS_REASON_CODE = 89)
#==> Here is where it fail, the data is decimal and is defined decimal in metadata;
{
BLOCKA = 'Z';
BLOCKB = 'H';
}
writeRecord(0);
==============================
Error Message:
Operator Generation Failed
buildop -f -BC /usr/vacpp/bin/xlC_r -BL /usr/vacpp/bin/xlC_r -C buildop -H buildop -O buildop -W buildop buildop/BlkCode.opd
##E TBLD 000000 Subprocess command failed with exit status 256.
##W TBLD 000000 Output from subprocess: "Per-Record Code (buildop/BlkCode.opd)", line 25.33: 1540-0218 (S) The call does not match any parameter list for "operator=".
##I TBLD 000000 /usr/vacpp/bin/xlC_r -O -I/data/ds/ccs/projectlibs/dpr_ccs_dev/buildop -I/opt/tools/ds/Ascential/DataStage/PXEngine/include -O -c -qspill=32704 /data/ds/ccs/projectlibs/dpr_ccs_dev/buildop/bosource1151424-0.C -o /data/ds/tmp/bosource1151424-0_s.o.
##W TBLD 000000 Output from subprocess: "/opt/tools/ds/Ascential/DataStage/PXEngine/include/apt_util/decimal.h", line 317.16: 1540-1283 (I) "APT_Decimal::operator=(const APT_Decimal &)" is not a viable candidate.
"Per-Record Code (buildop/BlkCode.opd)", line 25.10: 1540-1289 (I) The implicit object parameter of type "APT_Decimal &" cannot be initialized with an implied argument of type "const APT_Decimal".
"/opt/tools/ds/Ascential/DataStage/PXEngine/include/apt_util/decimal.h", line 300.16: 1540-1283 (I) "APT_Decimal::operator=(APT_DFloat)" is no
##W TBLD 000000 Output from subprocess: t a viable candidate.
##W TBLD 000000 Output from subprocess: "Per-Record Code (buildop/BlkCode.opd)", line 25.10: 1540-1289 (I) The implicit object parameter of type "APT_Decimal &" cannot be initialized with an implied argument of type "const APT_Decimal".
====================================
Thanks
bikan