Page 1 of 1

Run sequence job from parallel job for each incoming value.

Posted: Mon Sep 29, 2008 1:43 pm
by AKUMAR21
I have a parallel job that reads a csv file having two columns (col1, col2) through sequential file stage. For each value in the file I need to run a sequence job SeqJob1 and send the values of col1, col2 as parameter to the sequence job which will finally generate a report in xls format. Thus if there are 500 values in source csv I need to generate 500 reports after various formattings done by the set of jobs controlled by a sequence job SeqJob1.
So, How to run a sequence job by a parallel for every incoming value and send the vlues as parameters to the sequence job?
Any other methods are also welcome. I tried through a shell script but I couldnt able to find the right way.

Posted: Mon Sep 29, 2008 1:47 pm
by chulett
Search the forums for examples of using the UtilityRunJob function.

Posted: Mon Sep 29, 2008 2:10 pm
by chaks
Hi Kumar,
I had similar situation except I wanted to read only one value. What I did was Like this

Code: Select all

Execute_Command     -->Loop Activity            ---> Sequence Job
(Read the values)  (Pass them as Parameters)     (Your job)
In this case you can read both columns as one from Unix and break them again in your parallel job

Posted: Mon Sep 29, 2008 2:39 pm
by AKUMAR21
Chaks

In your code, did u mean to read all the values at first using the shell script or one by one. I'm assuming that u r using the list loop option but how are u passing the values as parameters (one sequencer run per value) to the sequence job


Chulett

Can UtilityRunJob function be run from a parallel job? I think its a sequence job function.

Posted: Mon Sep 29, 2008 2:54 pm
by chulett
Yes, of course - I wouldn't have suggested it otherwise. Don't confuse that function with a Job Activity stage.

Posted: Mon Sep 29, 2008 3:28 pm
by chaks
Yeah,Read all the values and pass it as list to the Loop Activity, and in the sequence you should select "Execute_Command.Comand_OutPut", It will pass the output from Execute Command to the list loop as parameter.

Posted: Tue Sep 30, 2008 12:47 pm
by AKUMAR21
Thanks Chaks

Can you show the code snippet of the shell script in which you are reading the values from the file and returning them to be fetched by the loop activity?
I tried doing that but I think I'm missing something in the script.
In addition to that could you let me know what are you mentioning in the loop definition -> delimited values section for the start loop activity stage.