Hi All,
I have requirement in DataStage to wait for a list of files to be present in a UNIX folder and check if all the files are present then proceed otherwise terminate the job.
1) How do we pass more than one file name in wait for file activity stage?
2) How do we parametrized the file names. Mean i am getting files based on dates...like
06082009_ABC.txt, 06082009_EFG.txt -- for June 08 2009
06092009_ABC.txt, 06092009_EFG.txt -- for June 09 2009
06102009_ABC.txt, 06102009_EFG.txt -- for June 10 2009
Please let me know if some one has worked on this type of requirement.
Thanks in advance!
Regards,
-Santosh
How to parametrized wait for file activity stage
Moderators: chulett, rschirm, roy
The stage itself will only take one filename, but if you need to wait for all the files you can just put them sequentially, one stage per file. If more "intelligence" is needed then you could always call a shell script from your job and return an appropriate code for "all files present" or "waited too long".
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Thanks for response.ArndW wrote:The stage itself will only take one filename, but if you need to wait for all the files you can just put them sequentially, one stage per file. If more "intelligence" is needed then you could always c ...
I have one more requirement that is to parametrized the file name based on the Date...As I mentioned file names of like
06082009_ABC.txt for June 08
06092009_ABC.txt for June 09 means (_ABC.txt ) files name is prefixed with the Date and which not fixed. How do we check that part.
What is preventing you from using parameters for the file names in the stage?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
ArndW wrote:What is preventing you from using parameters for the file names in the stage? ...
My question is how to generate the parameter for the date so that it would read the file name as
06082009_ABC.txt on June 08 run
06092009_ABC.txt ... on June 09 run
and so on in wait for file activity stage for every date.