Page 1 of 1

Datastage Server Routine for LINKCOUNT?

Posted: Thu Apr 03, 2014 4:03 am
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 

Posted: Thu Apr 03, 2014 4:16 am
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.

Posted: Thu Apr 03, 2014 4:25 am
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.