Status of DSGetJobInfo

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
svipul16
Participant
Posts: 8
Joined: Sun Sep 23, 2007 10:29 am

Status of DSGetJobInfo

Post by svipul16 »

We have a server job which just have jcl written in it. This job calls bunch of other parallel jobs and checks the status of the jobs.

It checks if the jobs status is runok or runwarn, if not job will abort. Issue we are having is the server job which calls other jobs aborts and says that the status is '4'.

Haven't seen job status 4 before. We recently got our servers upgraded to 11.3.1. Anything to do with this?

JobStatus(JobCount)=DSGetJobInfo(hJob(JobCount),DSJ.JOBSTATUS)
If (JobStatus(JobCount) <> DSJS.RUNOK and JobStatus(JobCount) <> DSJS.RUNWARN) Then
Rslt = GetLogMsg(LOGDIR,MyJobName(JobCount))
ErrorMsg = ExecutableName:'Job Failed when executing':MyJobName(JobCount)
Rslt = WriteErrorMsg(LOGDIR,DSJobName, ErrorMsg)
Call DSLogFatal("Job Failed: ":JobStatus(JobCount), "JobControl")
End Else
ErrCode = DSDetachJob(hJob(JobCount))
Call DSLogInfo(">>>>>>>":MyJobName(JobCount):"<<<<<Finished Successfully>>>>>":"<<<<<<<<*","JobControl")

log says

(fatal error from JobControl): Job Failed: job_name Status: 4
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They're all listed in the various "header" and/or "include" files that ship with the product, perhaps even in the documentation somewhere. I don't recall seeing a "4" in the past but you could take a look at this post and see what your versions of the files noted in it look like on your system.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DSJS.RUNFAILED = 4 ; job aborted
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's a "3" actually, isn't it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Quite a good memory you got there (yes, "3" is RUNFAILED).

"4" looks like a relatively new status related to the WLM feature, DSJS.QUEUED, meaning that the job queued waiting for resource allocation.

So, I suspect your routine needs to be modified to allow for QUEUED status. The job hasn't failed; it just hasn't been run yet.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply