Page 1 of 1

execute a job for a list of file

Posted: Thu Jul 08, 2004 1:44 pm
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

Posted: Thu Jul 08, 2004 2:29 pm
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.

Posted: Thu Jul 08, 2004 2:33 pm
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.