Hi,
I have built a user defined Server Routine.
I compiled and tested the Server Routine, it works fine.
When I called this Server Routine in another Server Job, it is returning me -1 value.
Any help will be appreciated.....
Server Routine returning -1 in the Actual Job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm
Did you write a DataStage Routine or a Function? I will assume you wrote a function, as you are writing about a "return" value. In DataStage the design interface automatically returns the value of variable "Ans". Thus we need to know how you are assigning this value in your code in order to guess why the behaviour is different in your environments.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm
I wrote a Server Routine.
Below is the code.
And then I am trying to call this Routine inside a transformer using the Code below:
Below is the code.
Code: Select all
$INCLUDE DSINCLUDE JOBCONTROL.H
Jobhandle=DSAttachJob(Arg1,DSJ.ERRNONE)
Ans=DSGetJobInfo(Jobhandle,DSJ.JOBSTATUS)
Code: Select all
GetJobStatusRoutine(TRIM(svJOBNAME))
Let's not worry about what you are doing at the moment, let's start with asking what exactly are you trying to accomplish? Your routine will need to do more than simply attach to something and won't need a handle if the "svJOBNAME" value is the current job calling the routine.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm
OK... so there's more to come with the routine. I'm guessing the JOBNAME value you passed in is not valid or is not in the current project, which is why the handle attach failed. Add some helpful DSLogInfo() debug messages until you get it all working.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 96
- Joined: Mon May 14, 2012 1:30 pm