how to set a job to abort after first warning?

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
karthikgk0705
Premium Member
Premium Member
Posts: 45
Joined: Tue Aug 29, 2006 2:59 am
Location: Bangalore

how to set a job to abort after first warning?

Post by karthikgk0705 »

Hi All,
We have some 50 independent jobs in our project.
Independent job in the sense , they cannot be put into a sequencer or a batch.Thay needs to be run seperately as and when required.
Our project level limit has been set in such a way that any job after 50 warnings gets aborted.
I need this 50 jobs alone to get aborted after the first warning itself.
I can do the same in run time...But our testing team needs this requirement to be set in the job itself.
It would be of great help if someone could guide us how to set in such a way that only few jobs abort after the first warning.

Thanks in advance.

Karthik.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: how to set a job to abort after first warning?

Post by chulett »

karthikgk0705 wrote:I can do the same in run time...But our testing team needs this requirement to be set in the job itself.
What does this mean, exactly? How are the jobs run in test? As you note, there is a "-warn" option for the command line 'dsjob' function where you could set it to 1. The limit can also be set when running from the Director using the Limits tab. Sequence jobs pass their warnings limits down to all child jobs.

In the job itself, you'd need to consider a reject row with the 'Abort after X rows' value set to 1. Some stages also have a 'Treat warnings as Fatal' option in them. Either method could be used.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthikgk0705
Premium Member
Premium Member
Posts: 45
Joined: Tue Aug 29, 2006 2:59 am
Location: Bangalore

Post by karthikgk0705 »

Hi,
Thanks Chulett for ur reply.It was of great help for us.
For now they are running using a shell script , but we would like to keep that option as the last one.
Stagewise change is also not very apt since every job has different stage as its target(like oracle,flatfile,hash file...).
Is there any other option that can be done in the DS client components as a permanent solution?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In Director, under Tools > Options, you can set the default Warnings limit to 1. This will, of course, then become a global setting for jobs initiated from that particular Director client.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, you can change the default in the Director. Note also this means you must do this on all workstations that could be running jobs.

And one last note - nothing changes the default when running jobs from the Designer - it always defaults to unlimited there. While convienent it really should be avoided, or people should learn to always switch to the Limits tab and set a warning limit before pressing Run.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The note after the last note: nothing you do in the clients affects the way that the command line interface (dsjob) works. You must specify an explicit warning limit with this interface.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karthikgk0705
Premium Member
Premium Member
Posts: 45
Joined: Tue Aug 29, 2006 2:59 am
Location: Bangalore

Post by karthikgk0705 »

Thanks all for your swift replies....
We had finally decided to alter the target stage option.
If the target is a database , then we have an option "Treats Warning as Fatal Error" which can be set.
But how do I do the same for flat files?
I get a doubt now..
Does jobs with flat files as tgt, finishes with warnings?
Up to my knowledge,either it finishes successfully or aborts.
Please correct me if I'm wrong.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Warnings are also possible. For example, if data are truncated.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply