Looping with different parameters in a sequencer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 34
- Joined: Mon Jun 15, 2009 12:16 am
- Location: Bangalore
Looping with different parameters in a sequencer
Hello,
I have a sequencer which in turn calls 2 sequences and a job activity. After the two sequences completed successfully, I want to run the job activity 4 times,each time passing different parameters.
I am relatively new to datstage.Could you please help me to implemet this.
I have a sequencer which in turn calls 2 sequences and a job activity. After the two sequences completed successfully, I want to run the job activity 4 times,each time passing different parameters.
I am relatively new to datstage.Could you please help me to implemet this.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
I would do it with a list loop.
put the parameters in the list and pass counter to job activity as a parameter.
Or if you need to fetch the parameters dynamically then a numeric loop followed by mechanism to fetch the parameter and then pass it to the job activity.
put the parameters in the list and pass counter to job activity as a parameter.
Or if you need to fetch the parameters dynamically then a numeric loop followed by mechanism to fetch the parameter and then pass it to the job activity.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Premium Member
- Posts: 892
- Joined: Thu Oct 16, 2003 5:18 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 34
- Joined: Mon Jun 15, 2009 12:16 am
- Location: Bangalore
Re: Looping with different parameters in a sequencer
Thanks a lot for everyone's help.I tried using loop activity with list. I am able to pass one parameter each time.But I need to pass 4 parameters for the job activity and those 4 parameters should differ for each run.
Please let me know,how to handle this.
Linda
Please let me know,how to handle this.
Linda
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Otherwise your list needs to be more complex, for example "A1|A2|A3|A4,B1|B2|B3|B4,C1|C2|C3|C4,D1|D2|D3|D4", and decomposed within the loop, probably using Field() functions. $Counter will be "A1|A2|A3|A4" on the first iteration, "B1|B2|B3|B4" on the second iteration, and so on.ray.wurlod wrote:If it's exactly four times you could simply emplace four Job activities in the sequence.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
Exactly. You need two delimiter, one to seperate parameters for the same run. and second to differenciate set of parameters between the runs.ray.wurlod wrote: Otherwise your list needs to be more complex, for example "A1|A2|A3|A4,B1|B2|B3|B4..
In above example from Ray "|" is used for first purpose and "," for second.
If you use "," as seperator for you list loop first time it will pass A1|A2|A3|A4 as counter. Then you can use field function to break the counter in four parts and pass them to your 4 parameters and so on for the next runs.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
My journey down that path documented here: viewtopic.php?t=127425
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers