Passing Parameter to start loop activity in the sequence
Moderators: chulett, rschirm, roy
Passing Parameter to start loop activity in the sequence
hi,
I need to pass a set of email address as a start loop activity in the Job sequence.when i tried giving as paramter by giving the file name as parameter i didn't work.any suggesstion on that.
thanks,
RK
I need to pass a set of email address as a start loop activity in the Job sequence.when i tried giving as paramter by giving the file name as parameter i didn't work.any suggesstion on that.
thanks,
RK
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
Is the list of email addresses that you need to send dynamic? If it is not dynamic you could set up an environmental variable.
If it is dynamic you are going to need to create a routine that reads the file, and returns all of the emails as one output column. You could then send this output to the start loop activity.
Was the loop meant to read the file or were you doing something else?
If it is dynamic you are going to need to create a routine that reads the file, and returns all of the emails as one output column. You could then send this output to the start loop activity.
Was the loop meant to read the file or were you doing something else?
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
Re: Passing Parameter to start loop activity in the sequence
Actually i am sending the email address as dynamic.aslo if you can help me out with setting up with environment variable would be great.I am sending the notification as part of the automation activity to report the status of the job.kwwilliams wrote:Is the list of email addresses that you need to send dynamic? If it is not dynamic you could set up an environmental variable.
If it is dynamic you are going to need to create a routine that reads the file, and returns all of the emails as one output column. You could then send this output to the start loop activity.
Was the loop meant to read the file or were you doing something else?
Thanks,
RK
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
How dynamic, it changes with each job run? Or it can change occasionally?
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
Re: Passing Parameter to start loop activity in the sequence
it will chage occasionaly.also that is not the key thing we can make it static also.only problem is i want to send it as file.(to address)kwwilliams wrote:How dynamic, it changes with each job run? Or it can change occasionally?
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
I just want to make sure I understand you correctly.
One of the following is true:
1. The file contains the email addresses that you need to send the notification to.
or
2. The file is to be sent to the users in the to address.
If 1 is true I would also like to know why you want to set this up through a file. Have you looked at using environmental variables instead?
Really looking for clarification before I start providing answers.
One of the following is true:
1. The file contains the email addresses that you need to send the notification to.
or
2. The file is to be sent to the users in the to address.
If 1 is true I would also like to know why you want to set this up through a file. Have you looked at using environmental variables instead?
Really looking for clarification before I start providing answers.
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
Re: Passing Parameter to start loop activity in the sequence
1 is true.i have n't beacuse the file contents change over a period of time.kwwilliams wrote:I just want to make sure I understand you correctly.
One of the following is true:
1. The file contains the email addresses that you need to send the notification to.
or
2. The file is to be sent to the users in the to address.
If 1 is true I would also like to know why you want to set this up through a file. Have you looked at using environmental variables instead?
Really looking for clarification before I start providing answers.
also if you can suggest me on the environment variable if you guide me on that i will appreciate that.
RK
Re: Passing Parameter to start loop activity in the sequence
kwwilliams wrote:How dynamic, it changes with each job run? Or it can change occasionally?
not each job ru.Occasionaly it will change.
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
Go into Data Stage Administrator and then set up a variable name, something like STEWARDEMAIL. Provide a description, and set the type to string. Make the email address be whatever email you were going to put in the file.
Then go to your job properties and include this environmental variable in your job properties.
What version of dataStage are you running?
Then go to your job properties and include this environmental variable in your job properties.
What version of dataStage are you running?
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
Re: Passing Parameter to start loop activity in the sequence
my version is 7.5kwwilliams wrote:Go into Data Stage Administrator and then set up a variable name, something like STEWARDEMAIL. Provide a description, and set the type to string. Make the email address be whatever email you were going to put in the file.
Then go to your job properties and include this environmental variable in your job properties.
What version of dataStage are you running?
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
Cool. Set up your environmental variable in the administrator. Add the environmental variable into the properties of your job and then set the value equal to $PROJDEF. Anytime you need to change the value you just go into the administrator and change the value there and it will automatically be picked up in the sequence.
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
Re: Passing Parameter to start loop activity in the sequence
so the environment variable should have the defalut value as file name?or can you explain me bit in detail.kwwilliams wrote:Cool. Set up your environmental variable in the administrator. Add the environmental variable into the properties of your job and then set the value equal to $PROJDEF. Anytime you need to change the value you just go into the administrator and change the value there and it will automatically be picked up in the sequence.
RK
-
- Participant
- Posts: 437
- Joined: Fri Oct 21, 2005 10:00 pm
Re: Passing Parameter to start loop activity in the sequence
It sounds like you are using the filename to actually store the email address. This seems a bit of an overkill. Why not just have it stored as an environmental variable and when it changes it is changed in the administrator. Thsi would only be pleasant if it changes ocasionally and not often.
What creates your file and populates it? In other words what is the triggering mechanism for an email change?
What creates your file and populates it? In other words what is the triggering mechanism for an email change?
Keith Williams
keith@peacefieldinc.com
keith@peacefieldinc.com
-
- Participant
- Posts: 221
- Joined: Fri Feb 17, 2006 3:38 am
- Location: India
- Contact:
Re: Passing Parameter to start loop activity in the sequence
you can simply add a user variable stage in the starting of your sequence. In that user variable stage you can defin required parameters. the output of that stage can now be fed to the Job Activity stage where you can give this value to the parameter that you might have defined in the job tab.g_rkrish wrote:hi,
I need to pass a set of email address as a start loop activity in the Job sequence.when i tried giving as paramter by giving the file name as parameter i didn't work.any suggesstion on that.
thanks,
RK
so if you want email as parameter, then
define a user variable Email
Define Email as a parameter in that job tab and in its value expression just provide that variable as USER_VARIABLES.Email
Thanks & Regards
Parag Saundattikar
Certified for Infosphere DataStage v8.0
Parag Saundattikar
Certified for Infosphere DataStage v8.0
Re: Passing Parameter to start loop activity in the sequence
let me explain bit clearkwwilliams wrote:It sounds like you are using the filename to actually store the email address. This seems a bit of an overkill. Why not just have it stored as an environmental variable and when it changes it is changed in the administrator. Thsi would only be pleasant if it changes ocasionally and not often.
What creates your file and populates it? In other words what is the triggering mechanism for an email change?
what i have done i have a module in which i have created a env variable as you explained.i am using that in the sequence in sending email but when i inlcude the job info there is none of the info included.i will do the multiple email as you said but can you help me out with this issue.
RK