regarding dsfunctions

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

regarding dsfunctions

Post by vijaykumar »

Hi gurus,

odbc--->transformer--->odbc.

i want to use DS function in my transformer stage so that it displays all the link information.
i used the function in this way, it says the expression is in valid.
DSGetLinkInfo(DSJ.ME, DSLink3.JOB).
plz help me in validating the expression and where can i get all the link information.
plz help me.

cheers;
vijay
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Check the online help for DSGetLinkInfo, you can also do a search on the forum.
If you don't get any, get back.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

That is not the correct syntax and hence your quest. But as pointed out, you can get syntax like these from DS help.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It is really bad practice to call DSGetLinkInfo() from within a Transformer stage, because you have to call it for every row processed, and the answer is already there in @INROWNUM or @OUTROWNUM system variables. The overhead of calling it repetitively and unnecessarily will cause poor throughput, about which you will no doubt complain in some other post.

Therefore, if you want the row counts from such a simple job, wait till it's ended and use DSGetLinkInfo() - correctly - then, or get the link row counts from the "active stage finishing" message in the job log, or send the values of @INROWNUM and @OUTROWNUM through an Aggregator stage set to either Last or Max.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

hi gurus,
thanks very much. One more thing which is the best way to call this function, as you gurus said that its not best idea to call these functions from transformer stage, then normally where does we use this function, i mean which stage we use to call this function, plz help me.
plz help me.

cheers;
vijay
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can do it in jobcontrol or in after job subroutine.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't call it from any stage - that was my point. Unless, of course, you call it from an after-stage subroutine, which only gets executed once.
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