DSjob -jobinfo

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

DSjob -jobinfo

Post 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....
RK
aakashahuja
Premium Member
Premium Member
Posts: 210
Joined: Wed Feb 16, 2005 7:17 am

Post by aakashahuja »

Sorry but the post sounds a bit confusing. Will it be possible for you to paste your code here?
L'arrêt essayant d'être parfait… évoluons.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
g_rkrish
Participant
Posts: 264
Joined: Wed Feb 08, 2006 12:06 am

Post 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,
RK
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply