Page 1 of 1

Design scenario for calling sequence multiple times

Posted: Fri Feb 22, 2013 10:21 am
by RK72
I have a very basic design but am wondering if it's possible to use the start and end loop activity for this. As the title suggests i have a sequence that needs to be called several times by passing a different file name each time.

For now i simply have a master sequence that has multiple job activity stages. My question is can the same be accomplished using the loop activity stages and if so how will i pass different file names? Thanks!

Posted: Fri Feb 22, 2013 3:51 pm
by ray.wurlod
Definitely. Use a "list of things" loop. Pass it a delimited list of file pathnames. Within the loop access the activity variable StartLoop.$Counter which will contain the pathname of the file for that iteration. (StartLoop needs to be replaced with the name you used for your Start Loop activity.)

Posted: Tue Feb 26, 2013 5:08 pm
by RK72
Sorry..... I'm unable to see your entire post. Is there anyway I can do that without the price tag? Thanks!

Posted: Tue Feb 26, 2013 7:33 pm
by ray.wurlod
You wouldn't have missed much, so I unprotected it.

Posted: Thu Mar 14, 2013 9:57 am
by RK72
Thank you for unprotecting it and apologize for the delayed response. The "list of things" seems to work fine as the loop goes over as many items as I have.

But I seem to be unable to pass different parameters to this Job Activity. For example, every run will have a unique identifier that needs to be passed to the Job. How can I accomplish this?

Thanks in advance!

Posted: Thu Mar 14, 2013 10:19 am
by prasannakumarkk
You mean within in the loop you have to pass more than one parameter and that too differently?
Tell number of parameters and what are those.

Posted: Thu Mar 14, 2013 10:30 am
by RK72
Yes, that is correct. For now I have only 2 params; file name and unique identifier. So if the job reads 4 files, I'll have to pass 4 file names (which the loop handles) plus 4 different values for Identifier that will be passed to the job inside a sequence....

Posted: Thu Mar 14, 2013 10:47 am
by chulett

Posted: Thu Mar 14, 2013 10:53 am
by prasannakumarkk
So one more question at what frequency this unique identifier can be reset.

If it is for a run:
1) You can have a user variable activity side the loop and increment it. Guess there will be more better solution than this

If it has to be unique over a period of time, you have to use a external sequencer or maintain the value in a file. increment in each run , rewrite it.

Posted: Thu Mar 14, 2013 3:10 pm
by RK72
Thanks for the responses. I'm unsure whether I can write to a file and read from it as the params are passed via a UNIX script....

And to answer the frequency of reset Q, I'm not sure about that one either. All I know is that they have to be unique for every run and there may be thousands of run for the same job.