Getting JobStatus in After-Job Subroutine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Getting JobStatus in After-Job Subroutine

Post by DSUser2000 »

How may I obtain the JobStatus from an After-Job Subroutine in DS 7.5 on Unix? I mean getting the "Finished", "Finished(with warnings)", "Aborted" (or something similar in numerical form).
I tried to get it via
DSGetJobInfo(DSJ.ME, DSJ.JOBSTATUS)
but apparently, this always gives 0 as the job hasn't finished yet...is there any possibility or is it just not possible?
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

you need JOBINTERIMSTATUS
Check this out: viewtopic.php?t=144286
pandeeswaran
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Post by DSUser2000 »

Thanks a lot that works so far but it seems like I can't distinguish between a validation run and a normal run with that (never get DSJS.VALOK). Is there a way for doing that?
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Can you explain a little bit?
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The question is quite clear, however I for one don't have an answer. If you've found that checking the interim status doesn't differentiate between those two end states, I'm not sure how else you would go about it. Not saying it can't be done, just that off the top of my head I don't know how. Never mind the fact that I stopped doing validation runs years ago when you no longer had to do them to create hashed files. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Post by DSUser2000 »

Yes, chulett understood that absolutely correct. Basically, I don't want my subroutine to run when you just click on "validate" instead of "run" for the job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, out of curiousity, do you actually do validation runs or is this mostly just an academic question?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSUser2000
Participant
Posts: 42
Joined: Tue Oct 20, 2009 8:36 am

Post by DSUser2000 »

Yes we really do job validation, especially after each automatic deployment but also manually.
Post Reply