Page 1 of 1

how to catch the path of a file

Posted: Thu Jul 22, 2010 7:00 pm
by drav8815
hi i'm a newbie in datastage and my english is not very good but i try to explain

i have a file that could be on diferent directories when the job run i need to find first in which directory the file exist i try to use "find" comand but how can i catch the given output of the command, to utilize the path

Posted: Thu Jul 22, 2010 7:49 pm
by ray.wurlod
Welcome aboard.

Use a job sequence. Have an Execute Command activity execute the find command. Its output is available through an activity variable that can be interrogated in downstream activities.

Don't forget to code for the possibility that the file is not found at all.