Hi all,
I am a real newb with routine writing. I am trying to have a routing that looks for a file. If it exists then the routine is OK, otherwise it is a Fail.
Could anyone help me out on this? or point me to some resources that I can sift through to find a solution?
Thanks and happy thursday
Routine - does file exist
Moderators: chulett, rschirm, roy
Routine - does file exist
Adam Love
Re: Routine - does file exist
1. Do a list on the specified directory.
2. Use the list command within a DSExecute.
3. If the ReturnCode of the DSExecute is not equal to 0, it would mean, the file does not exist.
Simple as that.
gateleys
2. Use the list command within a DSExecute.
3. If the ReturnCode of the DSExecute is not equal to 0, it would mean, the file does not exist.
Simple as that.
gateleys
Where do you want to run this routine? In a sequence job or inside a parallel job?
If former then you can use wait for file activity stage and set the time to 00:00:00.
If latter then you need to write a C routine to do this, how good are your C skills?
If former then you can use wait for file activity stage and set the time to 00:00:00.
If latter then you need to write a C routine to do this, how good are your C skills?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.