Run job only when source file is there

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
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Run job only when source file is there

Post by senthilmp »

Hi,
My job uses a file as input, if the file is not present in the directory the job fails. I want the job not to fail if the file is not present in the directory.

i.e The job should kick off only when the file is present else the job shouldnt kick off. I searched the forum but not able to locate correctly.Can anyone help me out. I know its simple, but still am not gettin it.

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

Post by ray.wurlod »

Wait For File activity in job sequence.

Given your requirement that the job can not start until and unless the file is present means that some external agency (such as a job sequence) must be used to "kick off" the job.

You can use other techniques, too, such as third party schedulers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Post by senthilmp »

YEs i use sequential file stage, but i dont see a property window to set the Mode specified....Where can i find the property in the Sequential file stage (My job is Server Edition)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What property?

You CANNOT do this in a Sequential File stage.

You do it in a Wait For File activity in a job sequence, or in an external script.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Post by senthilmp »

Ok thanks, someone posted in the middle stating there is a propery and now its deleted, so only i asked about it.

Thanks for your support :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly, you need something else to check and thus only run your job if the file is found. Easiest way is the Sequence and WFF way, but there are others.
-craig

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