Page 1 of 1

Setting warning limits in a before-job routine?

Posted: Thu Feb 07, 2008 7:57 am
by shankar_ramanath
Hi,

I have a set of job sequences, which are in turn made up of many jobs each. These jobs can be classified in two types, say A and B.

I need the A jobs to abort after the usual 50 warnings, and the B jobs to abort at 1 warning.

Is it possible to set the warning limit using a before-job rotuine call? Or from anywhere within the sequencer?

I've searched the forums and it seems like it's not possible without resorting to manually programming a job controller in basic. While that solution could work for me, it's not an acceptable answer for the end user to give up the graphical sequencer interface. Creating a Routine Call activity before each job to see its type and set its warning limits isn't an option either, since it would clutter up the sequence interface with a call before each job, effectively doubling the amount of items on the sequencer screen (and I'm also not 100% sure it would work :) ).

These job sequences are scheduled to run with director - will setting the limits in director on a job by job basis work? This is the least desirable solution (since it implies going job by job setting limits by hand) but at least would produce the desired effect of aborting A-type jobs at 50 warnings and B-type jobs at 1 warning.

Thanks in advance.

Re: Setting warning limits in a before-job routine?

Posted: Thu Feb 07, 2008 8:03 am
by ArndW
shankar_ramanath wrote:Is it possible to set the warning limit using a before-job rotuine call? Or from anywhere within the sequencer?
No, unfortunately not. You can use the command line invocation to change the warning level with "dsjob -run -warn {n}", though.

Posted: Thu Feb 07, 2008 8:04 am
by chulett
As you've found by searching the forums, doing this in a 'Before job' routine is too late as the job has already started. And there's nothing to set from the Directory other than a global default for jobs run from that instance of the Director.

Your only option that I see is custom job control code, where you have explicit control over individual job launches and can thus handle each warning limit on a case by case basis. A nice shortcut to get you there is to download Ken Bland's (free) Job Control Utilities which will give you all of this right out of the box.

Posted: Thu Feb 07, 2008 8:14 am
by shankar_ramanath
Thank you, ArndW and chulett.

I will see if I can work out an accomodation with the end users (as I said, I could program the custom job control but the users don't want to give up on the interface).

chulett, can you please point me to where I might find Ken Bland's Job Control Utilities?

Thanks again.

Posted: Thu Feb 07, 2008 8:26 am
by Sreedhar
Hi shankar_ramanath ,

When you say 1 warning in the second job is that a specific warnings or any warnings should abort the sequence.

In one of your earlier project we have written a after job subroutine(Unix Script) that will look for any warnings.

Thw new warning will be compared to the standard list of error or warnings if a match is found the job will be aborted else it willl run through.


Look for JOBLOG in adv parallel externder pdf

Posted: Thu Feb 07, 2008 8:27 am
by Sreedhar
Hi shankar_ramanath ,

When you say 1 warning in the second job is that a specific warnings or any warnings should abort the sequence.

In one of your earlier project we have written a after job subroutine(Unix Script) that will look for any warnings.

Thw new warning will be compared to the standard list of error or warnings if a match is found the job will be aborted else it willl run through.


Look for JOBLOG in adv parallel externder pdf

Posted: Thu Feb 07, 2008 9:04 am
by sachin1
hello, i hope your job sequencer calls job of type A and B.

but i doubt you can custom code job control of job sequencer with basic code,

you cant edit the code of job control that is developed automatically.

Posted: Thu Feb 07, 2008 9:43 am
by chulett
sachin1 wrote:but i doubt you can custom code job control of job sequencer with basic code, you cant edit the code of job control that is developed automatically.
People have been building custom job control code in BASIC for years, well before the Sequence job came into the picture. And while you can't edit the generated Sequence job code and expect it to survive the compile step, you *can* copy it out into a 'regular' Server job and edit it there to your heart's content.

Not something I'd recommend, however.

Posted: Thu Feb 07, 2008 10:06 am
by sachin1
hello chulett i want to convey that you can't add your custom code in the code already generated by job sequencer, as the Job Control of sequencer is not editable as compared to other simple datastage jobs.

Posted: Thu Feb 07, 2008 10:37 am
by chulett
And I just wanted to convey that you can if you first copy it out to another job. :wink: