Routine for getting the count in the link

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
jpradeep.net
Participant
Posts: 21
Joined: Mon Jul 12, 2010 2:05 am
Location: India

Routine for getting the count in the link

Post by jpradeep.net »

Can anybody share a subroutine which returns the count from the source stage link and to a target stage link and to a reject stage link. It is very urgent.
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

Use a simple basic routine and here is a sample:

Code: Select all

DEFFUN svtGetLinkCount(JobName, StageName ,LinkName) CALLING "DSU.COUNT.FILES"

*************************************************************************************************************************
* Header files to be included
*************************************************************************************************************************
#include DSINCLUDE JOBCONTROL.H

Ans = 0

*************************************************************************************************************************
* Create local variable for arguements
*************************************************************************************************************************
ThisJob = JobName
ThisStage = StageName
ThisLink = LinkName

*************************************************************************************************************************
* Get the handle of the job
*************************************************************************************************************************
JobHandle = DSAttachJob(ThisJob, DSJ.ERRFATAL)

*************************************************************************************************************************
* Get row count for the link
*************************************************************************************************************************
Result = DSGetLinkInfo (JobHandle, ThisStage, ThisLink, DSJ.LINKROWCOUNT)

*************************************************************************************************************************
* Release the handle
*************************************************************************************************************************
Nothing = DSDetachJob(JobHandle)

*************************************************************************************************************************
* Return the row count
*************************************************************************************************************************
Ans = Result

Return(Ans)
Regards,
S. Kirtikumar.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

We don't do "urgent". We especially don't do "very urgent". DSXchange is an all-volunteer site whose members post as and when they can. If you need urgent help, sign up with your official support provider for priority service and learn just how much "urgent" costs.

My own observation: Nothing properly planned gets the chance to be urgent.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jpradeep.net
Participant
Posts: 21
Joined: Mon Jul 12, 2010 2:05 am
Location: India

Post by jpradeep.net »

Where and how can i call this routine kirtikumar?
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

Hi Pradeep,

Do not post empty messages . Do not try to prove a point which is incorrect.
Try to learn.

Regards
Sreeni
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not empty but sometimes people put their only message in the subject line of their reply and you can only see it when you reply. And people still seem to think the only way to reply in a thread is to quote another one in its entirety... sheesh. :?

Fixed both.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply