How to pass multiple files through looping activity

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
deesh
Participant
Posts: 193
Joined: Mon Oct 08, 2007 2:57 am

How to pass multiple files through looping activity

Post by deesh »

Hi, i am getting multiple files with the common structure, but my senior saying need to use the loop activity in sequence jobs and solve the issue.

Please let me know how to resolve by using start and end loop in job sequencer
danddmrs
Premium Member
Premium Member
Posts: 86
Joined: Fri Apr 20, 2007 12:55 pm

Post by danddmrs »

DIRectory listing of the files
Flatten the list into a single comma delimited record of filenames
Read the file with the single record of filenames with a User Variable stage
Pass the uvParameter to the Start Loop (List Loop, Comma Delimited)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

To kill the first two birds with one stone, doing a "ls -m" should get you your list of files directly in a comma delimited list.
-craig

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