Page 1 of 1

Setting warning limit override at job

Posted: Thu Dec 04, 2008 5:16 am
by saikrishna
Hi

I have a master sequencer which calls five jobs in a sequential order.

While running the master sequencer, i have given 50 warnings limit...which defaultly applies to all of the five called jobs.

But, I would like to override this 50 warning limit with a 100 warning limit for only one job out of five called jobs whenever there is a master sequence runs with 50 warning limit globally.

Is it possible to do this in DataStage?

Thanks
Sai

Posted: Thu Dec 04, 2008 5:31 am
by Pierre
You can use a job control to launch your jobs, using the following :

...
NumberWarnings=50
NbWarnings = DSSetJobLimit(JobHandle, DSJ.LIMITWARN, NumberWarnings)
ErrExec = DSRunJob(JobHandle, DSJ.RUNNORMAL)
...

to parameter the abort of jobs after warnings.

Pierre.

Posted: Thu Dec 04, 2008 5:51 am
by saikrishna
Can I use the existing job control routine that was generated by datastage itself?...means the "master sequencer" that i built...can i use this and change its job control routine for warnings?

Posted: Thu Dec 04, 2008 7:26 am
by Pierre
I think the code generated by DataStage is read-only...

Pierre.

Posted: Thu Dec 04, 2008 7:41 am
by Mike
Why not fix the job so that it doesn't generate warnings?

I'm firmly in the camp that believes the warning limit should be 1. In my opinion, using the default warning limit of 50 is just lazy programming/design.

And it's downright dangerous... what if you get a warning that actually requires you to take some corrective action to avoid corrupting your data warehouse? If you allow any warnings, there's a good possibility that you're going to miss the important ones.

Mike

Posted: Thu Dec 04, 2008 7:55 am
by Pierre
Mike is right, but sometimes we receive files with special characters which have to be rejected.
I sometimes use jobs with no limits (only during the running time) with a reject file to store the warnings, so I can run the job and treat the rejects later.

Pierre.

Posted: Thu Dec 04, 2008 8:04 am
by chulett
You can't use the Job Activity stage for this. You'll either need a Routine that uses DSExecute and DSSetJobLimit or a script via Execute Command with dsjob and "-warn 100" to run the job.