C++ routine guide

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

C++ routine guide

Post by Nagac »

Hi

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

Thanks
Naga
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why bother? In a Transformer stage you can use @INROWNUM or @OUTROWNUM to give the row counts.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Nagac
Premium Member
Premium Member
Posts: 127
Joined: Tue Mar 29, 2011 11:39 am
Location: India

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply