Page 1 of 3

dsjob (-jobinfo works, but -run does not)

Posted: Thu Mar 27, 2008 5:27 pm
by perfman
This is what I have tried:

[dsadm@perf MyProject]$ pwd
/opt/IBM/Ascential/DataStage/Projects/MyProject

[dsadm@perf MyProject]$ /opt/IBM/Ascential/DataStage/DSEngine/bin/dsjob -jobinfo "MyProject" testseq
Job Status : NOT RUNNING (99)
Job Controller : not available
Job Start Time : Fri Mar 28 10:03:39 2008
Job Wave Number : 0
User Status : not available
Job Control : not available
Interim Status : NOT RUNNING (99)
Invocation ID : not available
Last Run Time : not available
Job Process ID : 0
Invocation List : testseq

Status code = 0

[dsadm@perf MyProject]$ /opt/IBM/Ascential/DataStage/DSEngine/bin/dsjob -run "MyProject" testseq
Error running job

Status code = -99 DSJE_REPERROR
[dsadm@perf MyProject]$

Posted: Thu Mar 27, 2008 5:35 pm
by chulett
Does it work properly if you pass in the user credentials on the command line?

Posted: Thu Mar 27, 2008 6:08 pm
by perfman
I have tried a number of variations of that, but no it does not seem to work:

[dsadm@perf MyProject]$ /opt/IBM/Ascential/DataStage/DSEngine/bin/dsjob -user dsadm -password mypwd -jobinfo "MyProject" testseq
ERROR: Failed to open project

Status code = 81011
[dsadm@perf MyProject]$


I'm pretty sure I am authenticating properly because other wise I don't see how I could get the jobinfo, also when I try and "run" a job that does not exist I get a different error than when I try and run a job that does exist.

Posted: Thu Mar 27, 2008 7:29 pm
by ray.wurlod
What happens if there are no quotes around the project name?

Posted: Thu Mar 27, 2008 7:57 pm
by perfman
It appears that there is no difference to any of these commands when ran with or without the quotes around the project

Posted: Fri Mar 28, 2008 7:10 am
by chulett
You don't need the quotes. The 'failed to open Project' only happens when it can't authenticate you from what I've seen, hence my request. Note that when you pass in '-user' and '-password' you must also include the '-server' option as well, even if you are currently on that same server.

So...

Code: Select all

$ dsjob -server MyServer -user dsadm -password mypwd -jobinfo MyProject testseq 

$ dsjob -server MyServer -user dsadm -password mypwd -run MyProject testseq 

Posted: Fri Mar 28, 2008 8:00 am
by ArndW
Try adding "-mode NORMAL"

Posted: Fri Mar 28, 2008 2:51 pm
by perfman
@ Chulett > Sure it sounds like a valid test. I successfully connected using user credentials after adding the server. However did not solve the problem. I can get jobinfo but not run a job.

@ ArndW > Thanks I tried it, but no luck :(
[dsadm@perf MyProject]$ $DSHOME/bin/dsjob -run -mode NORMAL "MyProject" testseq
Error running job

Status code = -99 DSJE_REPERROR

Posted: Fri Mar 28, 2008 4:04 pm
by chulett
:? That really makes no sense. It should be working fine for you, not really sure what in the heck we are missing. At this point, all I can think to suggest is to open a case with your official Support provider and see if they can shed any light on this. Sorry.

Posted: Fri Mar 28, 2008 5:04 pm
by ray.wurlod
Is the job successfully compiled?

Posted: Fri Mar 28, 2008 5:12 pm
by chulett
I assumed successfully compiled and run before this. Would -jobinfo work on an uncompiled or 'unsuccessfully compiled' job? :?

Posted: Fri Mar 28, 2008 9:51 pm
by ray.wurlod
Why not? DSGetJobInfo() does.

Posted: Sat Mar 29, 2008 6:09 am
by chulett
Ah... ok, just wondering as for some reason it seemed reasonable to me that it might not and I didn't recall ever specifically testing that. [shrug]

However, jobinfo is returning a 99 - not a 98 - so that should mean it is compiled.

Posted: Sun Mar 30, 2008 1:27 am
by perfman
I just double checked and yes it is compiled, also job runs with no errors or warnings from Designer/Director.

Posted: Sun Mar 30, 2008 3:09 am
by ArndW
Are you logged in at UNIX with the same userid as you used to compile the job? If you create a dummy job (Column Generator -> copy stage) and compile that, can you run that one from the command line?