Page 1 of 1

dsjob -run

Posted: Thu Sep 20, 2007 2:02 pm
by kavuri
Hi,
I am trying to run my jobs in command prompt. But I am unable to do so I am getting following error.

$ dsjob -run -mode NORMAL bhidev facility_fact
ksh: dsjob: not found.
thusmiannadv21: /home/bhi

Please tell me what changes ( like PATH or LIBPATH) I have to make ?

Thanks
Kavuri

you need to find the path for the dsengine.

Posted: Thu Sep 20, 2007 2:10 pm
by pimmit22043
you need find the path for the dsengine and like this and /home/dsadm/Ascential/DataStage/DSEngine/bin

and run.

Posted: Thu Sep 20, 2007 2:14 pm
by chulett
First 'source' your dsenv file to set the environment:

Code: Select all

cd `cat /.dshome`
. ./dsenv
Then run your job.

Re: you need to find the path for the dsengine.

Posted: Thu Sep 20, 2007 2:15 pm
by kavuri
I tried as you told but I am getting following error.

$ dsjob -run -mode NORMAL bhidev facility_fact
exec(): 0509-036 Cannot load program dsjob because of the following errors:
0509-150 Dependent module libvmdsapi.so could not be loaded.
0509-022 Cannot load module libvmdsapi.so.
0509-026 System error: A file or directory in the path name does not exist.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine/bin


Thanks
Kavuri

Posted: Thu Sep 20, 2007 2:18 pm
by kavuri
Hi Craig,

I tried it.

$ cd `cat /.dshome`
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ . ./dsenv
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ dsjob -run -mode NORMAL bhidev facility_fact
ksh: dsjob: not found.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$


Previously somewhere I studied some .so file need to be executed or something. can you tell me how can I run my jobs properly?

Thanks
Kavuri

Posted: Thu Sep 20, 2007 2:31 pm
by chulett
That's all it should take as everything should be set in your dsenv file. :?

Try this - after doing the previous steps, try running your job like this:

Code: Select all

$DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
And let us know what happens.

Posted: Thu Sep 20, 2007 3:12 pm
by kavuri
Hi Craig,
I tried but in vain.
I am getting error. May be something needed to modified in dsenv file. Can you figure out what should be modified.


$ cd `cat/.dshome`
ksh: cat/.dshome: not found.
thusmiannadv21: /home/bhi
$ cd `cat /.dshome`
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ . ./dsenv
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$ DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
ksh: DSHOME/bin/dsjob: not found.
thusmiannadv21: /medstat/advantage/common/Ascential/DataStage/DSEngine
$


Thanks
Kavuri

Posted: Thu Sep 20, 2007 3:21 pm
by chulett
Not DSHOME - $DSHOME

Posted: Thu Sep 20, 2007 3:50 pm
by kavuri
Sorry Craig,

I found the job successful, but I am not getting the target file generating. But when I run job from director I got the outout.

Even I am not getting any errors.

$ $DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact

Status code = 0
thusmiannadv21: /home/bhi


Thanks
Kavuri

Posted: Thu Sep 20, 2007 3:52 pm
by kavuri
When I am trying to run it again, it is giving error.

$ $DSHOME/bin/dsjob -run -mode NORMAL bhidev facility_fact
Error running job

Status code = -2 DSJE_BADSTATE
thusmiannadv21: /home/bhi


Thanks
Kavuri

Posted: Thu Sep 20, 2007 3:57 pm
by chulett
Well, at least now it's trying to run the job. What 'state' is it in now? The error tells you the job is not runnable - that can mean it is not compiled or is aborted and needs to be reset first or it may already be running.

You need to figure that one out.

Posted: Thu Sep 20, 2007 4:31 pm
by kavuri
Yes, thanks Craig, Now its working fine, I had changed in my C++ routine which I compiled, but I havent compiled job since then. So I am getting this error.

Can you tell me how you have identified error for the STATE code? Is there any manual shows for this error this is the reason?

One more thing, I think process is running in the background, without saying when the job will complete? Is there any way to find that? And where can I retrieve log file in which directory?

I dont want to look at Director for log. I want to see it in command prompt.

I appreciate your help and advices.

Thanks
Kavuri

Posted: Thu Sep 20, 2007 5:00 pm
by ray.wurlod
Please mark thread as Resolved.

Posted: Thu Sep 20, 2007 6:34 pm
by chulett
kavuri wrote:Can you tell me how you have identified error for the STATE code? Is there any manual shows for this error this is the reason?
The error codes have been posted here in the past and can be found in the $DSHOME/include/dsapi.h file, from what I recall. Mostly, it's just something you learn, either first hand or from reading posts here.
kavuri also wrote:One more thing, I think process is running in the background, without saying when the job will complete? Is there any way to find that? And where can I retrieve log file in which directory? I dont want to look at Director for log. I want to see it in command prompt.
Yes, without one of the "wait" options, it will spool the job off as a normal background process and immediately return to the command line. You can read about "-wait" and "-jobstatus" options here or in yor pdf docs, they would cause the command to wait for the job to finish before returning to the command line. The difference is in the nature of the codes returned.

You can't read the logs easily except from the Director. You can, however, check the job's status using dsjob with (oddly enough) the -jobstatus option from the command line.

All this and more in the Command Line Interface section of the Server Job Developer's Guide pdf.

Posted: Fri Sep 21, 2007 7:29 am
by kavuri
Thanks Craig, I appreciate your directions for learning.

Thanks once again.
Kavuri