Hi there,
I know that we use DSLinkGetInfor() to get the information about the no. of records sent on a link. But I am unable to write a routine which takes the jobname, stage name and link name as parameters and gives the count of rows as the return value.
Please help me on this.
And thanks a lot..
DS Server Routine which can give information about the link.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
DS Server Routine which can give information about the link.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
Use the search facility to get code by others. There are quite a few examples here.
Another place where you can look is, in the source code of the sdk routine, DSRunJob(), under 'Utility'. Look at the section "* Retrieve more information about this job run."
Another place where you can look is, in the source code of the sdk routine, DSRunJob(), under 'Utility'. Look at the section "* Retrieve more information about this job run."
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Re: DS Server Routine which can give information about the l
And why is that? What have you tried? Why don't you post your current effort here wrapped inMinhajuddin wrote:But I am unable to write a routine which takes the jobname, stage name and link name as parameters and gives the count of rows as the return value.
Code: Select all
tags and we'll help you 'fix' it. :wink:
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
My guess is that the routine lacks DSAttachJob() and DSDetachJob() calls. Probably lacks appropriate error handling also. But let's wait till the first attempt is posted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Hi I have figured out why it was not working. But, How do we
Hi there,
Thanks for all your support, I have figured out, what was wrong.
I had given DSJ.LINKROWCOUNT as DSJ.LinkRowCount and that is why it wasn't working. BASIC is case sensitive
Here is the code of the routine which takes three arguments. The arguments are JobName,StageName,LinkName
Here I have one more thing to do. Instead of returning the value, I think we can write it to a file. But I don't know How to accomplish this. Please Help.
Thanks for all your support, I have figured out, what was wrong.
I had given DSJ.LINKROWCOUNT as DSJ.LinkRowCount and that is why it wasn't working. BASIC is case sensitive
Here is the code of the routine which takes three arguments. The arguments are JobName,StageName,LinkName
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
Job_Handle=DSAttachJob(JobName,DSJ.ERRFATAL)
rc=DSGetLinkInfo(Job_Handle,StageName,LinkName,DSJ.LINKROWCOUNT)
Error_Code=DSDetachJob(Job_Handle)
Ans=rc
Last edited by Minhajuddin on Sun May 27, 2007 1:16 am, edited 1 time in total.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What kind of file? You can execute the echo command via DSExecute, or go through the more formal OpenSeq, WriteSeq and CloseSeq statements in DataStage BASIC. Search the forum for a useful routine called OpenSequentialFile().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
In the docs folder of your client install, have a look at the basic.pdf, this can be very useful, particularly in the Quick Reference/Sequential File I/O. This will give you some better ideas about what is available, then you could search the site for the BASIC functions you think you need to use and you'll find examples of others code.
Regards,
Nick.
Nick.