Wait for 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
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Wait for file

Post by vinothkumar »

Hi,
I have to start a sequence repeatedly if any file arrives at a particular location. I tried to do by using a WaitForFile stage by giving the file name as *.*. It is not working. How can we do this ?
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Re: Wait for file

Post by betterthanever »

[quote="vinothkumar"]Hi,
I have to start a sequence repeatedly if any file arrives at a particular location. I tried to do by using a WaitForFile stage by giving the file name as *.*. It is not working. How can we do this ?[/quote]

did you give the complete path in the file name ??
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Re: Wait for file

Post by vinothkumar »

I gave full path. Instead of giving file name I gave *.*.
But it didnt work..

I gave xx/xx/*.*
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Re: Wait for file

Post by betterthanever »

[quote="vinothkumar"]I gave full path. Instead of giving file name I gave *.*.
But it didnt work..

I gave xx/xx/*.*[/quote]

i presume that you compiled the job and ran the job so that the job waits till any file available in the specified path

is that what you are doing???
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Re: Wait for file

Post by vinothkumar »

Even I keep any dummy file in that location to test, it is not working. If we give exact file name in Wait for File stage it is working.
betterthanever
Participant
Posts: 152
Joined: Tue Jan 13, 2009 8:59 am

Re: Wait for file

Post by betterthanever »

[quote="vinothkumar"]Even I keep any dummy file in that location to test, it is not working. If we give exact file name in Wait for File stage it is working.[/quote]

since it searches for the name of the file name literally...that is why it is waiting...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a server routine that can wait for *.* or timeout, and use a Routine activity rather than a Wait For File activity.
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 »

Just to nit pick, in UNIX *.* won't match any file like it would on Windows, it will match any file with a "dot" in the name. Stick with a single asterisk in your routine.
-craig

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