Setting warning limit override at job

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
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Setting warning limit override at job

Post 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
Pierre
Participant
Posts: 66
Joined: Thu May 24, 2007 7:16 am
Location: Paris

Post 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.
Felix qui potuit rerum cognoscere causas. Virgile (Géorgiques).
saikrishna
Participant
Posts: 158
Joined: Tue Mar 15, 2005 3:16 am

Post 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?
Pierre
Participant
Posts: 66
Joined: Thu May 24, 2007 7:16 am
Location: Paris

Post by Pierre »

I think the code generated by DataStage is read-only...

Pierre.
Felix qui potuit rerum cognoscere causas. Virgile (Géorgiques).
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post 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
Pierre
Participant
Posts: 66
Joined: Thu May 24, 2007 7:16 am
Location: Paris

Post 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.
Felix qui potuit rerum cognoscere causas. Virgile (Géorgiques).
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

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