I have written a routine to call a shell unix using DSRunJob function.
the Routine (and the job that is called from it) runs unsuccessfully the first time. The error I
see is(***Controller problem: Error calling DSRunJob(.....), code=-2
[Job is not in the right state (compiled and not running)]***) .
I was wondering if any of you guys came across this problem??
Thank You!
Error calling DSRunJob
Moderators: chulett, rschirm, roy
Re: Error calling DSRunJob
Welcome aboard! :Dlory wrote:I have written a routine to call a shell unix using DSRunJob function.
If you are trying to execute a shell script - no matter what the shell script does - you need to use DSExecute instead. Only use DSRunJob to start a DataStage job (typically) from within Job Control, and then only after attaching to it ('DSAttachJob') and possibly resetting it first ('DSPrepareJob'). Depending on your circumstances, you may need to detach the job handle when you are done as well, and that's 'DSDetachJob' from what I recall.
Inside your shell script, you would use dsjob to start the DataStage job from the Command Line.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers