Page 1 of 1

Running single job for all value file set

Posted: Wed Oct 15, 2014 6:23 am
by atulgoel
Hi,

I have around 30 Value Files in my Parameter Set. I want to run my job for the values present in 30 Value Files.
I have made my job as Multiple Instance job and I have created a sequencer with 30 JOB ACTIVITY which is calling this job with different Invocation Id and Value file.

Is there any way to achieve this using looping in sequencers so that I can pass different value file from parameter set each time using only one job activity?

Let me know in case of any doubts in question.

Thanks

Posted: Wed Oct 15, 2014 6:47 am
by chulett
I don't see why not. Have you built a looping Sequence job before?

Posted: Wed Oct 15, 2014 7:14 am
by atulgoel
Thanks for the reply Craig.

Yeah. I have used looping in sequencers. But I am not sure how to create looping on 'value files' in parameter set and paas next value file to a job.

I will be very thankful if you can help me.

Thanks

Posted: Wed Oct 15, 2014 7:20 am
by chulett
How are you doing it right now with the MI jobs and the value file assigned to each? Shouldn't be all that different, I would think. Unfortunately, I'm not anywhere I can test / build anything that might help.

Posted: Wed Oct 15, 2014 7:42 am
by chulett
As an example, you may need to create a delimited list of all your value file names and use that to drive your loop iterations.

Posted: Thu Oct 16, 2014 5:38 am
by atulgoel
Yes Craig. I created delimited list of values as below:

1|A
2|B
3|C

(There is no enter after C)

I am reading this file using Command Activity stage in sequencer using below Command:

paste -s -d ',' <File Name>

This will give below output:

1|A,2|B,3|C

After this I am using Loog start Activity having "List Loop" and 'Delimited Values' as #Execute_Command_95.$CommandOutput#
Delimiter is COMMA.

Then in Job Activity I am passing 1 and A from source to job using field function like below:

Field(StartLoop_Activity_96.$Counter,'|',1)
Field(StartLoop_Activity_96.$Counter,'|',2,1)

Now its working fine till Iteration 2, but during Interation 3 sequencer is getting aborted:

testseq.JobControl (@Job_Activity_97): Controller problem: Error calling DSSetParam(Table), code=-4
[ParamValue/Limitvalue is not appropriate]

It not able to pass "C" to job activity. Any idea on this.

Posted: Thu Oct 16, 2014 7:06 am
by chulett
Do an exact search here for "ParamValue/Limitvalue is not appropriate", you'll see what the problem is as you're not the first person to encounter it. :wink:

Posted: Thu Oct 16, 2014 4:01 pm
by ray.wurlod
Perhaps (for example) the parameter is a List type that accepts only A or B as its value.

Posted: Fri Oct 17, 2014 4:31 am
by atulgoel
Thanks All,

It solved the issue.

After CAT the source file, execute below code in User Variable

Trim(Convert(@FM,',',MOVE_TO_SOURCE.$CommandOutput),',','T')

above will convert all new lines to comma and remove the last comma.

And then start the loop on list of values from user variable stage.

Thanks