Posted: Sun Oct 06, 2002 8:25 pm
Recursion of job execution is not possible in DataStage. A particular instance of a job can only be started if it is in a runnable state, and "running" is not a runnable stage.
Iteration, on the other hand, is very straightforward. Note, though, that there is no tool in the graphical job sequencer palette for achieving it.
You have essentially two ways that you can go.
You can modify the job control code that is produced by the sequencer or a batch, or write your own, that opens the directory where the files reside (use the OpenPath statement) and loops through the file name values, starting a child job to process each file. The child job can be run using DSRunJob() after setting appropriate parameters.
Alternately you could create a job that processed the directory as if it were a table, providing a stream of file names, and invoking the sdk function UtilityRunJob().
Iteration, on the other hand, is very straightforward. Note, though, that there is no tool in the graphical job sequencer palette for achieving it.
You have essentially two ways that you can go.
You can modify the job control code that is produced by the sequencer or a batch, or write your own, that opens the directory where the files reside (use the OpenPath statement) and loops through the file name values, starting a child job to process each file. The child job can be run using DSRunJob() after setting appropriate parameters.
Alternately you could create a job that processed the directory as if it were a table, providing a stream of file names, and invoking the sdk function UtilityRunJob().