Datastage Server Routine for LINKCOUNT?

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
pkll
Participant
Posts: 73
Joined: Thu Oct 25, 2012 9:45 pm

Datastage Server Routine for LINKCOUNT?

Post by pkll »

I am trying to execute the below data stage server routine to get the link count of the source and target but I am getting warning-7 please let me know if i miss any thing in the below routine

Code: Select all

$INCLUDE DSINCLUDE JOBCONTROL.H

JobHandle = DSJ.ME
JB_HANDLE = DSAttachJob("jobName",DSJ.ERRWARN)
Lnk_Cnt = DSGetLinkInfo(handle,'ilk_emp','olk_output',DSJ.LINKROWCOUNT)
Ans=Lnk_Cnt 
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

1. Use JobHandle rather than handle in the call to DSGetLinkInfo() function.

2a. Delete the line that attaches a job. You don't need to do this if you're interested in the current job (the handle for which is DSJ.ME).

2b. If you are interested in getting the link count from a job other than the one in which the routine is being executed, then reverse the above advise and use JB_HANDLE rather than handle in the call to DSGetLinkInfo() function. In this scenario you should also use DSDetachJob() when you no longer need to have the job attached to your routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pkll
Participant
Posts: 73
Joined: Thu Oct 25, 2012 9:45 pm

Post by pkll »

Hi Ray,

I am not a Premium Member(shortly I will be a premium member).I am not able to see entire message. Can you please copy the routine.
Post Reply