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....
DSjob -jobinfo
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 210
- Joined: Wed Feb 16, 2005 7:17 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ray,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 ...
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,
RK
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.