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
Build op - Float comparison.
Moderators: chulett, rschirm, roy
Here You Go...
===================================
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);
===================================
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);
I am not that experience in BuildOps, I go for routines. But instead of comparing with 89, specify a const float and initialize it with 89. Do your comparison with that variable. Also before you try that, try changing your data type to float and then run your code, unchanged, and see if the error persists. If it does, try the first suggestion I gave.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: