passing values to start loop using execute command

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Kirtikumar
Participant
Posts: 437
Joined: Fri Oct 15, 2004 6:13 am
Location: Pune, India

Post by Kirtikumar »

Never used the loops n all.

But may be a work around I would have gone for - Use the routine to perform looping as per the no. of values in input. Call the job or sequence in the loop in routine.

Other option could be a job param, but I think there is a limitation to its length.
Regards,
S. Kirtikumar.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Call it from a UserVariables stage, that can then feed them to the Start Loop.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

Hi Thanks,
our is like we have input file where we are maintaining the client code.
That code is passed as where condition in few jobs based on the client code o/p file is produced for that particular code.

We can generalise the process by using parameter in where condition like
where client code = $CD.

But my question is like how to make this as generic in sequencer...
if there is any limit of passing the values to parameters..

I tried user variable stage but iam not able to add var.its not showing any add button.

Could you please tell me how to use user variable and will it be solution for the above?

Thanks in advance
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

Right click and you will get the option for this.
Poornagirija wrote: I tried user variable stage but iam not able to add var.its not showing any add button.

No limits :)
But my question is like how to make this as generic in sequencer...
if there is any limit of passing the values to parameters..
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

Hi Josh,
I found that!

Thanks! :D

But is there a way we can pass input field to those variables.or list of values in that? :?:
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post by JoshGeorge »

You can do this in many ways.
Pls. refer THIS post for one way of doing it.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

Hi Josh,
Thank you very much for redirecting me to the exact one!
You were also involved in that discussion.

My file is like
AA
BB
CC

I need to pass these values to start loop.I have used char(10) as ray suggested.But iam getting DSSetParam(CLIENT),code=-4 error.I know its related to new line character...
but dont know how to get rid of these. :shock:
The same job is working fine for , delimiter...
like AA,BB,CC

Any suggestions for me...
Thanks
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps this post would help:

viewtopic.php?t=111013

There are many more on the same subject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Poornagirija
Participant
Posts: 65
Joined: Fri Nov 19, 2004 12:00 am

Post by Poornagirija »

Hi,
Thanks to all.

Now i got rid of the error.
But i have changed the file format to loop as below.

AA,BB,CC
its working with this format not with
AA
BB
CC

Anyway i found a workaround.
Is there any limit of passing values to start loop?
With Regards,
Poornagirija.

"Don't limit your challenges - challenge your limits"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Probably, but I'd be surprised if it's a limit you need to worry about. How many values or loops are you planning on needing?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply