Page 1 of 1

C++ routine guide

Posted: Tue Aug 02, 2011 7:17 am
by Nagac
Hi

Can anyone advise me where i can get the Parallel Routines(C++) guide.

Thanks
Naga

Posted: Tue Aug 02, 2011 7:48 am
by vinothkumar
Go for some books/docs which can teach c++. If you want to know how to use that routine in DataStage job check out this link.
http://it.toolbox.com/blogs/dw-soa/data ... easy-20926

Posted: Tue Aug 02, 2011 3:47 pm
by ray.wurlod
... once you're competent with the language, the classes that you will need (the DataStage API) are documented in the Programming DataStage manual.

Posted: Thu Aug 04, 2011 7:12 am
by Nagac
Thanks to all,

I have gone through the API Functions.

But i want to create a routine which should return Elapsed time, Status, and Number of Rows. For no. of rows we can use below function

Code: Select all

typedef struct _DSLINKINFO {
int infoType:   /
union {
   DSLOGDETAIL lastError;
   int rowCount;   
   char *linkName;
   char *linkSQLState;
   char *linkDBMSCode;
   char *linkDesc;
   char *linkedStage;
   char *rowCountList;
} info
;   
} DSLINKINFO;
But doubt is whether we can use it in Transformer as Rowcount column expression or in Sequence?

Posted: Thu Aug 04, 2011 1:21 pm
by ray.wurlod
Why bother? In a Transformer stage you can use @INROWNUM or @OUTROWNUM to give the row counts.

Posted: Fri Aug 05, 2011 3:22 am
by Nagac
Yeah, we can do that.

But i need to gather few more link row counts as well. along with some other Audit related information.

that si the reason i am going for Routine.

Posted: Fri Aug 05, 2011 2:25 pm
by ray.wurlod
You should not be doing this as the job runs, you should get the link row counts after the job has finished. Do this in an after-job subroutine or in an external routine (possibly invoked from the controlling sequence). Either of these uses the DataStage BASIC language.