Page 1 of 1

get the "compiled" job status in Unix cmd-line int

Posted: Sun Sep 20, 2009 12:19 am
by hailun
Hello,everyone!
As we know,we can see the job info especially the job status from the DataStage Director like this:
Job_name Status Started On_date Last _ran ......
filter_string Compiled 04:01 AM 12/29/2008 ......

I would like to check whether the jobs are in the "compiled" status or not in the command line interface after I import them .
Is there a Unix command or dssh shell command or SQL which can meet my requirement?
we know that all of the possible job status is like below:
but Equ DSJS.NOTRUNNING To 99 indicates * Any other status not only "compiled".
In that case , the command "dsjob -jobinfo" is not suitable,I think.
So is there any other way that can fulfill my requirement?

* Possible return values for token DSJ.STATUS:
Equ DSJS.RUNNING To 0 ;* This is the only status that means the job is actually running
Equ DSJS.RUNOK To 1 ;* Job finished a normal run with no warnings
Equ DSJS.RUNWARN To 2 ;* Job finished a normal run with warnings
Equ DSJS.RUNFAILED To 3 ;* Job finished a normal run with a fatal error
Equ DSJS.VALOK To 11 ;* Job finished a validation run with no warnings
Equ DSJS.VALWARN To 12 ;* Job finished a validation run with warnings
Equ DSJS.VALFAILED To 13 ;* Job failed a validation run
Equ DSJS.RESET To 21 ;* Job finished a reset run
Equ DSJS.CRASHED To 96 ;* Job has crashed
Equ DSJS.STOPPED To 97 ;* Job was stopped by operator intervention (can't tell run type)
Equ DSJS.NOTRUNNABLE To 98 ;* Job has not been compiled
Equ DSJS.NOTRUNNING To 99 ;* Any other status

Posted: Sun Sep 20, 2009 7:26 am
by chulett
I would think you'd be plenty safe using dsjob and checking for 99 as "compiled". What happens when you test that theory?

ensure the job is in the "compiled" status?

Posted: Sun Sep 20, 2009 8:37 am
by hailun
chulett wrote:I would think you'd be plenty safe using dsjob and checking for 99 as "compiled". What happens when you test that theory?
Not running 99 indicates "Any other status" not only "compiled".
So I would like to find a command or SQL to make sure that a job is in the "compiled" status just as it shows in the DataStage Director:
Job_name Status Started On_date Last _ran ......
filter_string Compiled 04:01 AM 12/29/2008 ......

Posted: Sun Sep 20, 2009 8:58 am
by chulett
I fully understand what you'd like and what "99" means. All I'm saying is, if you check to see what dsjob returns for several jobs in your projects, including Compiled ones, what do you get?

Gives you something to do, anyway, rather than sit around and wait for someone who may know the query involved to show up and post.

Posted: Thu Sep 24, 2009 3:33 am
by hailun
Thanks for your comments,chulett!
A job which status is identified as "compiled" in Director is indicated :
Not running 99

after I run

dsjob -jobinfo ProjectName JobName


I do not think that it can prove that 99 means compiled.

What is your opinion?

Posted: Thu Sep 24, 2009 5:39 am
by chulett
Well... run it in a loop for all jobs in the project and see if you get a '99' for anything other than your compiled jobs. May give you some peace of mind, or show that we need something "tighter".