Syntax of Macro function of DSLinkinfo

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
shirishareddy
Participant
Posts: 12
Joined: Mon Sep 08, 2008 12:40 am
Location: Hyderabad

Syntax of Macro function of DSLinkinfo

Post by shirishareddy »

I need row count for particular link, for that i am using DSLinkinfo Function.Can any body send the exact syntax for the DSLinkinfo.Is there any way to get the row count for particular link?
Shirishareddy
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

hi,
In server jobs
process1:
DSGetLinkInfo(DSJ.ME, DSJ.ME, DSJ.ME, DSJ.LINKROWCOUNT)
DSJ.ME(it reads current job name)
arg2:DSJ.ME(it reads current source stage name)
arg3:DSJ.ME(it reads current link name)
arg4:cal DSJ.LINKROWCOUNT
then if u have 4 records in input
then in output
u will get
1
2
3
4
so from this you should fetch last record
so use aggregator stage and take max val as rowcount:
process2:
after getting first output and sort data in descending order then use transformer stage and write constraint @inrownum=1

Thanks
vin...
9962222668
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:?

Why would anyone need to post 'the exact syntax' here when you can simply look it up in the Designer's online help? It's all there, including how to get a row count from a particular link.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Abhijeet1980
Participant
Posts: 81
Joined: Tue Aug 15, 2006 8:31 am
Location: Zürich
Contact:

Post by Abhijeet1980 »

:?

Some people fail even after they are given choice to use all their textbooks they have during their exams.

Once a business analyst had to write the code in order to explain the technical data analyst to make him understand the requirement.

So, use this code. Code and technical specifications. :D

Many regards,
Kind regards
Abhijit Gaikwad
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:?

You make someone self sufficient by teaching them how to help themselves. Learning how to use the documentation that is readily available is the first step in that process. Handing someone a snippet of code or syntax on a silver platter generally teaches nothing, even if it does "solve" the problem.

There's a saying that goes something like... give a man a fire and he's warm for a day, set a man on fire and he's warm for the rest of his life. Wait... that's not quite the right one. :wink:
-craig

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