Running single job for all value file set

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Running single job for all value file set

Post 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
Atul
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't see why not. Have you built a looping Sequence job before?
-craig

"You can never have too many knives" -- Logan Nine Fingers
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post 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
Atul
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post 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.
Atul
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Perhaps (for example) the parameter is a List type that accepts only A or B as its value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

Post 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
Atul
Post Reply