execute a job for a list of file

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
auvray.muriel
Participant
Posts: 43
Joined: Wed Feb 19, 2003 7:17 am
Location: France - Paris
Contact:

execute a job for a list of file

Post by auvray.muriel »

Hello,

I have a job which must be to carry out time as many as there are files in the repertory.


How can I make?

Thank you for your assistance

Muriel
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Use DS BASIC job control in an Batch job. Setup a loop to cycle looking in the directory of interest and execute the jobstream for each file present. As you finish a file, either move it or rename it to take it out of the processing loop. Continuously loop until the list of files are exhausted.

You should consider also checking for some flag file to indicate the Batch job should stop cycling, as the Director STOP button will be ineffectual inside logic of this type. You'll also want to consider making sure a file is successfully processed before moving on to the next file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What he said. :wink:

In addition, I'd suggest doing a search of this forum for the word 'loop' or 'looping'. You'll find a number of posts from people in the same (or at least a very similar) boat, along with quite a bit of discussion on the details.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply