Page 1 of 1

Looking for Unknown File names

Posted: Fri Apr 01, 2005 7:31 am
by JDionne
We have a situation where we are delivered a file every day with a slightly different file name. The difference is always the date and time. Is there a way to program a routine to look for a file name using wild cards? Jim

Posted: Fri Apr 01, 2005 7:46 am
by Sainath.Srinivasan
Use DSExecute with 'dir *' to check the directory entries. You may have to them locate the file by some logic.

Posted: Fri Apr 01, 2005 8:06 am
by JDionne
Sainath.Srinivasan wrote:Use DSExecute with 'dir *' to check the directory entries. You may have to them locate the file by some logic.
A coleage has found a way to output a file with the current file name using the folder stage. We think this output can be used some how as input for a paramiter that can be used as the FILE NAME in the sequencial stage. Any Ideas on this?

Posted: Fri Apr 01, 2005 3:42 pm
by ray.wurlod
The first idea is that you can't do it in the same job, because a running job can not change the values of its own parameters.

Therefore, no matter what method you choose, you're going to need a two phase process, probably controlled by a job sequence. Therefore, however you determine the file name must be made accessible (for example as a routine's return value or a job's user status value) to the downstream Job Activity in the job sequence.