Page 1 of 1

Buildop C++

Posted: Mon Aug 08, 2005 5:13 am
by Kirtikumar
Hi All,

I want to abort the job in Buildop C++ Stage / PX Tansformer with customize warning message.
I am using DSLogFatal for the same.
But I am getting following error
"DSLogFatal" is not declared.

Do I need to include any C++ API file for this purpose?

Thanks in advance

Cheers,
Vinayak

Posted: Mon Aug 08, 2005 6:05 pm
by ray.wurlod
DSLogFatal is a BASIC function.

In the DataStage C API there is a function called ds_writelog()
It's prototype is in dsd_gci.h and an example of its use is in dscapi.h, both of which can be found in $DSHOME/gcidir/include on the server.

Posted: Mon Aug 08, 2005 6:48 pm
by benny.lbs
Ray,

How to include this Header file (*.h) into BuildOp ?

I code as following

Code: Select all

#ifndef DSD_GCI_H
#ifndef DATUM
#define DATUM long
#define DBFILE long
#define HANDLE long
/* #define BITMAP long */
typedef struct tagSTRING
{ 
    unsigned int len;
    unsigned char* text;
} STRING;
#endif /* DATUM */
#define h_typedef

#ifdef WIN32
#include "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/UCI.h"
#else
#if !defined(_AIX) && !defined(__alpha)
#include "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/UCI.h"
#endif
#endif

struct SHdata {int i;};
#include "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h"
#endif /* DSD_GCI_H */
but failed with
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/WriteLog.opd

##E TBLD 000000 Subprocess command failed with exit status 256
##W TBLD 000000 Output from subprocess: 1540-5215 (I) No licenses available. Contact your program supplier to add additional users. Compilation will proceed shortly.
##I TBLD 000008 /usr/vacpp/bin/xlC_r -O -I/sysp/DataStage/Ascential/Projects/ZEDPLBS/buildop -I/sysp/DataStage/Ascential/DataStage/PXEngine/include -O -c -qspill=32704 /sysp/DataStage/Ascential/Projects/ZEDPLBS/buildop/bosource232334-0.C -o /hsbc/gcf/tmp/bosource232334-0_s.o
##W TBLD 000000 Output from subprocess:

##W TBLD 000000 Output from subprocess: "File Scope Code (buildop/WriteLog.opd)", line 18.3: 1540-0400 (S) "STRING" has a conflicting declaration.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/Projects/ZEDPLBS/buildop/bosource232334-0.C", line 36.20: 1540-0425 (I) "STRING" is defined on line 36 of "/sysp/DataStage/Ascential/Projects/ZEDPLBS/buildop/bosource232334-0.C".

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1114.25: 1540-1136 (S) "STRING d_str" cannot be a union member, because "APT_String" has a non-trivial constructor.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1122.25: 1540-0040 (S) The text "col1" is unexpected. "COLDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1265.20: 1540-1136 (S) "ANYPINDATA anypin" cannot be a union member, because "anypin_data_tag" has a non-trivial constructor.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1310.19: 1540-0040 (S) The text "pin_data" is unexpected. "LPPINDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1314.19: 1540-0040 (S) The text "stagedata" is unexpected. "STAGEDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1431.38: 1540-0040 (S) The text "ppin" is unexpected. "LPPINDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1432.38: 1540-0040 (S) The text "ppin" is unexpected. "LPPINDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1433.40: 1540-0040 (S) The text "ppin" is unexpected. "LPPINDATA" may be undeclared or ambiguous.

##W TBLD 000000 Output from subprocess: "/sysp/DataStage/Ascential/DataStage/DSEngine/gcidir/include/dsd_gci.h", line 1434.43: 1540-0040 (S) The text "ppin" is unexpected. "LPPINDATA" may be undeclared or ambiguous.

Posted: Mon Aug 08, 2005 7:12 pm
by ray.wurlod
There's other stuff in dsd_gci.h that needs a licence. Try creating your own header file just incorporating the relevant prototype. Apart from that, it's not something I've done, so I await the results of your experiment; any additional advice will be purely theoretical. Has your support provider suggested anything?

Posted: Tue Aug 09, 2005 4:43 am
by alraaayeq
Kirtikumar,

I have a follow up question (if you dont mind).

what sort of C++ compiler do you have, and have you tried GCC before?

Re: Buildop C++

Posted: Wed Aug 10, 2005 4:47 am
by benny.lbs
Kirtikumar,

Have you solved this problem ?

Ray,

There is Macro APT_MSG in "PXEngine/include/apt_util/message.h", do you know how to use it ?

APT_MSG(MessageSeverity, englishString, args, logOrSourceModule)

For "logOrSourceModule", what is the possible value ?

Thanks all of you.

Re: Buildop C++

Posted: Thu Mar 06, 2014 10:32 am
by evandal
benny.lbs wrote:APT_MSG(MessageSeverity, englishString, args, logOrSourceModule)

For "logOrSourceModule", what is the possible value ?
Hi, I know this is an old thread, but I can't find any documentation on what "logOrSourceModule" should be. If I set it to APT_LogWarningId (generated by the builOp code), I get a message "Resource bundle corresponding to message key This is a warning message! Check that DSHOME or APT_RESPATH is set." in my job log. So I assume that this is some sort of link to a resource file with pre-defined messages.

I also tried NULL, but it defaults to the same ting. What should the value of "logOrSourceModule" be if I just want to pass a string to APT_MSG and have that displayed in the log. Sample or explanation would be much apreciated!

Posted: Thu Mar 06, 2014 11:07 am
by chulett
Hopefully this helps.

Posted: Thu Mar 06, 2014 11:57 am
by evandal
Hi, Thanks for the quick reply. The link doesn't work but I assume it is this one
http://www-01.ibm.com/support/knowledge ... acros.html

All that says is:
The final argument is logOrSourceModule : the object to which the message is written.
The argument value can be an APT_ErrorLog object, an APT_Error::SourceModule object, or it can be NULL. If the value is NULL, the message is written to the APT_Error::SourceModule object APT_localErrorSourceModule.
I assume that what I am passing is a "APT_Error::SourceModule object" and that doesn't work because of the whole resource issue mentioned above.

So what is an "APT_ErrorLog object"? Is there a function to convert an EnglishString as they refer to it to an APT_ErrorLog Object?

If you take the example from that page, that doesn't even compile.
APT_MSG(Error, "The number of output datasets is invalid.", NULL, errorLog);
So that IBM page isn't a lot of help. I'm not really strong in C but I have been looking at the message.h and errlog.h files to try to figure out what they expect for this parameter.

Does anyone have an actual working example of this code?

Appreciate all your help.

Posted: Thu Mar 06, 2014 12:19 pm
by chulett
Hmmm... the link I posted worked (and still works) fine for me. Looks like you found the same information, however.