DSGetJobInfo - return codes

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
wooda
Participant
Posts: 7
Joined: Tue Feb 01, 2005 3:45 am

DSGetJobInfo - return codes

Post by wooda »

How are the return codes for the DSGetJobInfo function defined? When I get a 0 or 1 as the return, the job appears to have run successfully. However - I don't know what the full list of possible return values is and what they represent.

The line of code where I'm using this function is:
DSGetJobInfo(hJob1, DSJ.JOBSTATUS)

Could someone help me out?

Thanks,

Abi
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I did a search for DSGetJobInfo and got 236 hits. Lots with code in them.
Mamu Kim
xcb
Premium Member
Premium Member
Posts: 66
Joined: Wed Mar 05, 2003 6:03 pm
Location: Brisbane, Australia
Contact:

Post by xcb »

You can inspect JOBCONTROL.H found in the DSINCLUDE folder under a project directory which shows how DSGetJobInfo is defined and the list of possible return tokens.
Cameron Boog
adrian
Participant
Posts: 10
Joined: Wed Jul 14, 2004 1:59 am
Location: Bucharest, Romania

Post by adrian »

For the begining, Basic guide - pag. 255:
" DSJ.JOBSTATUS Integer. Current status of job overall. Possible statuses
that can be returned are currently divided into two categories:
Firstly, a job that is in progress is identified by:
DSJS.RESET Job finished a reset run.
DSJS.RUNFAILED Job finished a normal run with a fatal error.
DSJS.RUNNING Job running - this is the only status that means the job is actually running.
Secondly, jobs that are not running may have the following statuses:
DSJS.RUNOK Job finished a normal run with no warnings.
DSJS.RUNWARN Job finished a normal run with warnings.
DSJS.STOPPED Job was stopped by operator intervention (can't tell run type).
DSJS.VALFAILED Job failed a validation run.
DSJS.VALOK Job finished a validation run with no warnings.
DSJS.VALWARN Job finished a validation run with warnings."

And you have the option to compare the result with each of the constants listed above, instead of 0 or 1. Or look at these constants defined in JOBCONTROL.H:
"* 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
"


Regards,
Adrian.
Post Reply