pooling file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
santosh
Premium Member
Premium Member
Posts: 28
Joined: Tue Jan 11, 2005 1:09 am
Location: London

pooling file

Post by santosh »

We want to run a job whenever we get a .done file in UNIX folder. I was able to look file using "Wait for file Activity" in sequence.

But I want this job to get triggered automatically multiple times in a day. I mean i will get 6 or 7 .done files in a day. My job should run accordingly. Please share your thoughts on this.

regards,
Santosh
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

WaitforFile may not help you much.
But use Execute command activity to find for this file.
Since you need to find anywhere in the unix folder,use

Code: Select all

find / -name .done 2>/dev/null
and use the Comand output in the Trigger to check for the output and trigger the rest of the stage. You can itrate this command continuesly with some SLEEP value.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Santosh

You can also use the Sequencer and Loop for your job. Inside your loop have the Wait for File and while running your job clear the file so that when next file comes it will be ready for next run.
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That would create an "always running" job sequence. Don't forget to design in a clean way to notify it to shut down. There are many possibilities.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jatayl
Premium Member
Premium Member
Posts: 47
Joined: Thu Jan 19, 2006 11:20 am
Location: Rogers, AR

Post by jatayl »

I would just use unix cron command and set it up to execute a korn shell script that looks for the file.

Jason
Post Reply