Passing Delimited List of Values to StartLoop

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
lawrencetaylor
Participant
Posts: 4
Joined: Fri May 11, 2007 11:50 am

Passing Delimited List of Values to StartLoop

Post by lawrencetaylor »

Hi all,

I am trying to extract a list of values from a database, and pass it to a StartLoop activity to execute a Job repetitively for each value in the list.

I can extract the data and construct the list in a parallel job, but I cannot feed the the data in a field (or, alternatively, in a file containing the list) into the StartLoop activity.

How can I create an output parameter from a parallel job, or set the value of a Sequence parameter within a parallel job? Or, alternatively, how can I get the data in a file into a parameter so it can be seen by the StartLoop activity?

TIA

Larry Taylor
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Re: Passing Delimited List of Values to StartLoop

Post by chitravallivenkat »

Get the value in variable and seperate the value from the variable using sequence number and delimiter used in the value.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

A file should work fine. Build a routine to 'type' the file and send back the output, then call the routine in a UserVariables Activity stage. The Start Loop can then leverage the delimited list quite easily.
-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 »

In one of the forthcoming training DVDs from DSXchange Learning Center this technique is shown.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lawrencetaylor
Participant
Posts: 4
Joined: Fri May 11, 2007 11:50 am

Post by lawrencetaylor »

Okay, I have added an ExecCommand activity that uses "cat" to list the file into the $CommandOutput variable.

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

Post by chulett »

If that fixed your problem, please mark the post as Resolved using the button at the top of the screen.
-craig

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