Setting warning limits in a before-job routine?

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
shankar_ramanath
Premium Member
Premium Member
Posts: 67
Joined: Thu Aug 09, 2007 7:51 pm

Setting warning limits in a before-job routine?

Post 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.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

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

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

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shankar_ramanath
Premium Member
Premium Member
Posts: 67
Joined: Thu Aug 09, 2007 7:51 pm

Post 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.
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post 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
Regards,
Shree
785-816-0728
Sreedhar
Participant
Posts: 187
Joined: Mon Oct 30, 2006 12:16 am

Post 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
Regards,
Shree
785-816-0728
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

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

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

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

Post by chulett »

And I just wanted to convey that you can if you first copy it out to another job. :wink:
-craig

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