How to pass filenames 1 at a time to server routine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

How to pass filenames 1 at a time to server routine

Post by synsog »

I have 100 files in a folder. All file names are started with name TU_*. I need to pass 1 file name at a time to a server routine which need to exectue in sequence job. Suppose today there might be 100 files, tomorrow,,, 200 files .. so on a day.. if N number of files present, then the loop should execute N times and the server routine should exectue for each filename.

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unless I'm missing something, that just sounds like a Sequence job with the Start Loop and End Loop stages. Have you tried using them for this task?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use a server job reading the output of the Filter command DIR /B pathname/TU* which will give you a stream of file names that you can pass to the Routine in a Transformer stage.

Or use a sequence with an Execute Command activity to generate the list of file names, and a loop containing a Routine activity to process those one at a time.
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