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.
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!
Job Control - detecting 'Aborted/Restartable'
Moderators: chulett, rschirm, roy
Job Control - detecting 'Aborted/Restartable'
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
The numbers don't really mean anything, but happen to be the order in which the job types became available in the product.
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>>';
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.