Looking for Unknown File names

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Looking for Unknown File names

Post 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
Sure I need help....But who dosent?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Use DSExecute with 'dir *' to check the directory entries. You may have to them locate the file by some logic.
JDionne
Participant
Posts: 342
Joined: Wed Aug 27, 2003 1:06 pm

Post 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?
Sure I need help....But who dosent?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply