Page 1 of 1

DSjob -jobinfo

Posted: Thu Nov 01, 2007 9:48 pm
by g_rkrish
Hi,

I have a issue here when i run the job from command prompt..it's basically a shell script where i create log for every schedule run.when i give the dsjob -run command..it says status code 0..after that i give the next command to dsjob -run as dsjob -jobinfo..what it does is after a while it just puts the running status in file rather than putting the jobinfo after the job finish ...i gave a sleep command also for a miniute..there are certain job that runs fast puts as finished..like long running job says running..which i don't understand..as status code for the dsjob -run say 0..meaning the job runs ok or finished..pls help me out with that....

Posted: Thu Nov 01, 2007 10:56 pm
by aakashahuja
Sorry but the post sounds a bit confusing. Will it be possible for you to paste your code here?

Posted: Fri Nov 02, 2007 2:15 am
by ray.wurlod
The exit status of dsjob is (can be) affected by its arguments. For example the -jobstatus argument causes the job's status (0 = running, 1 = finished, etc.) to be the exit status of the dsjob command.

Read about these variations in either the Server Job Developer's Guide or the Parallel Job Developer's Guide manual.

To provide a clearer answer we will need a clearer idea of what you are trying to achieve and the specific command with which you are attempting to achieve it.

Posted: Fri Nov 02, 2007 9:58 am
by g_rkrish
ray.wurlod wrote:The exit status of dsjob is (can be) affected by its arguments. For example the -jobstatus argument causes the job's status (0 = running, 1 = finished, etc.) to be the exit status of th ...
Ray,

The thing i want to acheive here is that..i have to run the job, once it finished i have to get the jobinfo and detail log..so what i need to to get that done shell script....I used

dsjob -run <> <>(project and job name)
dsjob -jobinfo <> <> "" > file name
dsjob -logdetail <> <> """ >> Faile name

I did like this in my shell script..




Thanks,

Posted: Fri Nov 02, 2007 10:06 am
by ray.wurlod
Make sure that you include a -jobstatus (preferred) or -wait option along with the -run option so that control does not return to the script immediately. Either of these options changes the dsjob command to synchronous execution by not returning (from the dsjob command) until the job changes state from "running".