give a variable as end parameter in loop start activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 27
- Joined: Thu Aug 09, 2012 4:55 am
- Location: bangalore
give a variable as end parameter in loop start activity
i am using a loop activity .the number of times the loop runs is n which is a variable .how to use this in end parameter of start loop activity
ROSHAN
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
If you want to run a loop using varibale(non numeric),you can not put it in a numeric loop,instead you can invoke List Loop(For Each Things in List).
Using this option you can put your variable in loop definition either by comma,space or other delimiter.
In case your variables are in file,you need to first execute the cat command in Execute command activity then pass the command output in delimited value of start loop activity.
If you want to run a loop using varibale(non numeric),you can not put it in a numeric loop,instead you can invoke List Loop(For Each Things in List).
Using this option you can put your variable in loop definition either by comma,space or other delimiter.
In case your variables are in file,you need to first execute the cat command in Execute command activity then pass the command output in delimited value of start loop activity.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Ahh....i didnt see you have mentioned as numeric variable.You can paas these value of n as a parameter in start loop activity.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 27
- Joined: Thu Aug 09, 2012 4:55 am
- Location: bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Have the server job place the value into its User Status area.
In the sequence refer to the activity variable $UserStatus (for the activity that runs the server job) to get that value. This can appear directly in any field that can contain an expression and which is downstream of the server job activity.
In the sequence refer to the activity variable $UserStatus (for the activity that runs the server job) to get that value. This can appear directly in any field that can contain an expression and which is downstream of the server job activity.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
You need to store variable in DSSetUserStatus(Write a routine using this function and invoke in your server job transformer) and before start loop activity,add UserVariable activity,create a sequence variable there and assign its value like:-
SeqVar you need to pass in start loop activity.
You need to store variable in DSSetUserStatus(Write a routine using this function and invoke in your server job transformer) and before start loop activity,add UserVariable activity,create a sequence variable there and assign its value like:-
Code: Select all
SeqVar=Serverjob.UserStatus
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/