DSJobReport for a Job Sequence

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
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

DSJobReport for a Job Sequence

Post by rleishman »

DSJobReport() does a great job for a Server Job. You just whack it in the After-Job-Subroutine and a log is generated to disk with minimum effort. Is there any similarly elegant facility available for Job Sequences (which do not have After-Job-Subroutines)? I tried calling DSJobReport() from a routine activity at the end of the Seq; it worked - sort of - but the Job Status was wrong.

My reasearch so far shows that DSJobReport() calls the DSGetJobInfo() function with argument DSJ.JOBINTERIMSTATUS rather than DSJ.JOBSTATUS. This enables it to return the status of a running job as if it was completed. ie. If it has warnings, status is "Finished with warnings". If it is in the process of aborting, the status is "Aborted".

But this doesn't work for Job Sequences:
- DSJ.JOBSTATUS for a running Job Sequence (when called from a Routine Activity within the seq) is 0 (Running) - no surprise there.
- DSJ.JOBINTERIMSTATUS for a running Job Sequence (when called from a Routine Activity within the seq) is 99 (Not Running).

This seems to be a limitation of DSJ.JOBINTERIMSTATUS for Job Sequences. Regardless of whether the sequence has warnings or not, or whether it is under control of an Exception Handler activity, it still shows status 99.

I appreciate that I can accurately determine the status AFTER the Job Sequence has finished, but this is less elegant than the DSJobReport solution where each job is self-reporting. I want a Job Seq to be self-reporting too.
Ross Leishman
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ross, is this an... enhancement request?
-craig

"You can never have too many knives" -- Logan Nine Fingers
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Post by rleishman »

Craig, be assured that I hold this forum in the highest esteem, but my expectations don't include alterations to the DS kernal.

I'm having trouble accepting that no-one else has tried this before. Or is this the reason ETLStats exists?

If there is no elegant work-around, so be it. The help for DSJobReport cerainly doesn't promise that it works with Sequences - on the contrary, it is recommended only for use in After-Job Subroutines.

However if the consensus of this thread is that it is a bug (unlikely IMO), I'll raise it with Ascential.
Ross Leishman
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hey, you never know! There is a forum for enhancement requests, so I was wondering if maybe this landed here by accident. And since you really didn't ask anything like a question that I could see... :wink:

I can say that I've never tried this before. You are probably running into the same issue that doesn't allow you to "monitor" a Sequence job - it doesn't have any "active stages" to facilitate anything like that, which may very well be why you get the 99 status. Perhaps someone more familiar with the underlying architecture could enlighten the both of us on the whys and the wherefors of it all.

And yes, I've gone the more "traditional" ETLStats type route and gathered information like this after the fact.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rleishman
Premium Member
Premium Member
Posts: 252
Joined: Mon Sep 19, 2005 10:28 pm
Location: Melbourne, Australia
Contact:

Re: DSJobReport for a Job Sequence

Post by rleishman »

chulett wrote:Hey, you never know! There is a forum for enhancement requests, so I was wondering if maybe this landed here by accident. And since you really didn't ask anything like a question that I could see...
It was cleverlly hidden amongst the verbal diarrhoea :wink:
rleishman wrote:Is there any similarly elegant facility available for Job Sequences (which do not have After-Job-Subroutines)?
Thanks for your experience anyway. Might be worth a scroll down to the Enhancements Forum...
Ross Leishman
Post Reply