Hi,
i just tried to compile the follow c++ script ( created and compiled with microsoft visual c++ studio 2008 EE ) on teradata:
SCRIPT:
***********************************************
#include <iostream>
using namespace std;
int IsNumeric(string text){
int non_e_double=1;
char ce=' ';
// CONTROLLO CHE NELLA STRINGA CONSIDERATA NON SI INSERISCANO LETTERE
for(int i=0;i<text.length()&&non_e_double==1;i++){
ce=text.at(i);
if(ce!='0'&&
ce!='1'&&
ce!='2'&&
ce!='3'&&
ce!='4'&&
ce!='5'&&
ce!='6'&&
ce!='7'&&
ce!='8'&&
ce!='9'&&
ce!='.'){
non_e_double=0;
}
}
// CONTROLLO CHE NON SI INSERISCA PIU' DI UN PUNTO
int cont=0;
ce=' ';
for(int j=0;j<text.length()&& non_e_double==1;j++){
ce=text.at(j);
if(ce=='.')
cont++;
}
if(cont>1)
non_e_double=0;
return non_e_double;
}
******************************************************
but i have those errors:
ERRORS:
*********************************************
Errors/Warnings reported during compilation
---------------------------------------------------------------------------
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c IsNumeric.cpp
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c NCR_new_delete.cpp
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c pre_IsNumeric.c
/usr/bin/gcc -shared -fpic -Xlinker -rpath -Xlinker /usr/tdbms/lib -Wl,--ve
rsion-script=/var/opt/teradata/tdtemp/UDFTemp/03E9.16383.7DB373a/UserUdf_ve
rsions.scr -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/tdbm
s/lib -o libudf_03e9_33.so IsNumeric.o NCR_new_delete.o pre_IsNumeric.o p
re_MonitorSQLText.o pre_MonitorPhysicalSummary.o pre_installpkg.o pre_GetQu
eryBandValueSP.o pre_MonitorSQLSteps.o pre_GetQueryBand.o pre_SetResourceRa
te.o pre_IdentifySession.o pre_MonitorVersion.o chkNum.o pre_chkNum.o pre_M
onitorSQLCurrentStep.o pre_MonitorAWTResource.o pre_MonitorVirtualResource.
o pre_AbortSessions.o pre_MonitorSessionRate.o pre_MonitorPhysicalResource.
o pre_IdentifyDatabase.o pre_MonitorSession.o pre_IdentifyUser.o pre_GetQue
ryBandPairs.o pre_GetQueryBandPairs2.o pre_GetQueryBandValue.o pre_GetQuery
BandValue2.o pre_IdentifyTable.o pre_MonitorVirtualSummary.o pre_MonitorMyS
essions.o pre_MonitorVirtualConfig.o pre_AbortListSessions.o pre_SetSession
Account.o pre_MonitorPhysicalConfig.o pre_SetSessionRate.o pre_MonitorQuery
Band.o pre_GetQueryBandSP.o -lapi -ludflib -lxsp -ludf -lm -ljil -lst
dc++
/var/opt/teradata/tdtemp/UDFTemp/03E9.16383.7DB373a/libudf_03e9_33.so: unde
fined symbol: IsNumeric
***************************************************
anyone can help me?
Thanks
i just tried to compile the follow c++ script ( created and compiled with microsoft visual c++ studio 2008 EE ) on teradata:
SCRIPT:
***********************************************
#include <iostream>
using namespace std;
int IsNumeric(string text){
int non_e_double=1;
char ce=' ';
// CONTROLLO CHE NELLA STRINGA CONSIDERATA NON SI INSERISCANO LETTERE
for(int i=0;i<text.length()&&non_e_double==1;i++){
ce=text.at(i);
if(ce!='0'&&
ce!='1'&&
ce!='2'&&
ce!='3'&&
ce!='4'&&
ce!='5'&&
ce!='6'&&
ce!='7'&&
ce!='8'&&
ce!='9'&&
ce!='.'){
non_e_double=0;
}
}
// CONTROLLO CHE NON SI INSERISCA PIU' DI UN PUNTO
int cont=0;
ce=' ';
for(int j=0;j<text.length()&& non_e_double==1;j++){
ce=text.at(j);
if(ce=='.')
cont++;
}
if(cont>1)
non_e_double=0;
return non_e_double;
}
******************************************************
but i have those errors:
ERRORS:
*********************************************
Errors/Warnings reported during compilation
---------------------------------------------------------------------------
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c IsNumeric.cpp
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c NCR_new_delete.cpp
/usr/bin/gcc -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/td
bms/lib -fpic -c pre_IsNumeric.c
/usr/bin/gcc -shared -fpic -Xlinker -rpath -Xlinker /usr/tdbms/lib -Wl,--ve
rsion-script=/var/opt/teradata/tdtemp/UDFTemp/03E9.16383.7DB373a/UserUdf_ve
rsions.scr -D_REENTRANT -D_LIBC_REENTRANT -I/usr/tdbms/etc -L/usr/tdbm
s/lib -o libudf_03e9_33.so IsNumeric.o NCR_new_delete.o pre_IsNumeric.o p
re_MonitorSQLText.o pre_MonitorPhysicalSummary.o pre_installpkg.o pre_GetQu
eryBandValueSP.o pre_MonitorSQLSteps.o pre_GetQueryBand.o pre_SetResourceRa
te.o pre_IdentifySession.o pre_MonitorVersion.o chkNum.o pre_chkNum.o pre_M
onitorSQLCurrentStep.o pre_MonitorAWTResource.o pre_MonitorVirtualResource.
o pre_AbortSessions.o pre_MonitorSessionRate.o pre_MonitorPhysicalResource.
o pre_IdentifyDatabase.o pre_MonitorSession.o pre_IdentifyUser.o pre_GetQue
ryBandPairs.o pre_GetQueryBandPairs2.o pre_GetQueryBandValue.o pre_GetQuery
BandValue2.o pre_IdentifyTable.o pre_MonitorVirtualSummary.o pre_MonitorMyS
essions.o pre_MonitorVirtualConfig.o pre_AbortListSessions.o pre_SetSession
Account.o pre_MonitorPhysicalConfig.o pre_SetSessionRate.o pre_MonitorQuery
Band.o pre_GetQueryBandSP.o -lapi -ludflib -lxsp -ludf -lm -ljil -lst
dc++
/var/opt/teradata/tdtemp/UDFTemp/03E9.16383.7DB373a/libudf_03e9_33.so: unde
fined symbol: IsNumeric
***************************************************
anyone can help me?
Thanks