Job Control - detecting 'Aborted/Restartable'

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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Job Control - detecting 'Aborted/Restartable'

Post by chulett »

Something I've been wondering about - when you attach to a job in custom job control, how can one tell that the job is in an 'Aborted/Restartable' status rather than just 'Aborted'? :?

I don't see anything related to JOBSTATUS in the dsapi.h file that seems like it can be used for that. I've found that DSPrepareJob differentiates and doesn't reset a Sequence job in an Aborted/Restartable status whereas it does if it is just Aborted. Don't know if the same can be said for RUNRESET at this moment.

More of a curiousity than anything, haven't taken the time to force some aborts and poke around. Mostly wondering if someone already knew. :wink:

I'm also curious how one tells they are attached to a Sequence job rather than just a 'normal' Server job, let's say. I vaguely recall someone like Kim posting something regarding that, but haven't been able to turn it up yet.

Thanks!
-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 »

Can't help with the first question. The Help on DSPrepareJob is unhelpful in this regard, and the DSGetJobInfo help does not seem to cover the topic at all. Yes it can certainly be done from RT_STATUSxxx, but that's venturing into unchartered, not-supported-in-version-8, waters, and I'm trying to wean myself off hacking the Repository illegally.

DS_JOBS has a column called JOBTYPE which returns an enumerated value.
0 = server job
1 = mainframe job
2 = job sequence
3 = parallel job

Code: Select all

SELECT JOBTYPE FROM DS_JOBS WHERE NAME = '<<Job Name>>';
The numbers don't really mean anything, but happen to be the order in which the job types became available in the product.

Code: Select all

SELECT NAME FMT '36L', EVAL "FIELD('Server|Mainframe|Sequence|Parallel', '|', JOBTYPE + 1, 1)" FMT '10L' COL.HDG 'Job Type' FROM DS_JOBS WHERE NAME NOT LIKE '\\%' ORDER BY 1;
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 »

Thanks... hopefully these kind of things become web service calls under 8.x, or at least simple repository queries. Simple being a relative term, of course. :wink:
-craig

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