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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hailun
Participant
Posts: 40
Joined: Fri Nov 07, 2008 9:07 am

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

Post 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
Let's Progress Together....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
hailun
Participant
Posts: 40
Joined: Fri Nov 07, 2008 9:07 am

ensure the job is in the "compiled" status?

Post 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 ......
Let's Progress Together....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
hailun
Participant
Posts: 40
Joined: Fri Nov 07, 2008 9:07 am

Post 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?
Let's Progress Together....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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".
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply