Page 1 of 1

Dynamic parameter passing for different countries

Posted: Thu May 13, 2010 10:21 am
by ysrini9
Hi,

I have requirement like below.

I need to use same set of jobs reusable for all the countries

Ex:\ I have executed 2 jobs for US

C:\US\Brand.txt
C:\US\Brand1.txt

Same set of jobs are present in C:\UK\brand.txt and C:\UK\brand1.txt

How to achive this logic between startloop and endloop

Please suggest me to read path automatically as parameter in runtime and pass to job sequence

Thanks in Advance

Posted: Thu May 13, 2010 12:32 pm
by asorrell
Ok - I believe I understand the question, though I will re-phrase it to make sure.

You have a parameterized job that use different sequential files for different countries. You need to drive them from a job sequence and need it to cycle through a loop sending different parameters to the job each time it executes.

Correct? If so...

Setup two string parameters in your main sequence, something like pFirstPath and pSecondPath. Set their values as follows:

pFirstPath = C:\US\Brand.txt|C:\UK\brand.txt
pSecondPath = C:\US\Brand1.txt|C:\UK\brand1.txt

Set your loop to execute twice.

Then set your file parameters for the job to use these respectively:

Field(pFirstPath,"|",LoopName.$Counter)
Field(pSecondPath,"|",LoopName.$Counter)

I think that will work...

Posted: Thu May 13, 2010 12:51 pm
by nagarjuna
you can also do it in unix using dsjob command and passing the parameter .

for i in ` cat parameter`
do
dsjob -run -param $i ......
done