Page 1 of 1

unable to pass parameters to mail stage

Posted: Wed Feb 02, 2005 2:35 am
by Pavan_Yelugula
Hi,

We are not able to pass the parameters (mail receipient, e-mail subject ) to the mail stage in the sequencer (in which we are using that mail stage).

On hard-coding the above mentioned paramaters the job runs fine. However, when we pass a value to them through a job parameter - the sequencer reports successful completion but there is no mail sent.

Doesn't mail stage support - passing of job parameters???
Lest it would be very helpful to us if you can send us any round about way for the same.

Thanks and Regards
Pavan

Posted: Wed Feb 02, 2005 8:43 am
by chulett
Why post thing again in a different forum? You're not going to get a different answer. :?

Re: unable to pass parameters to mail stage

Posted: Wed Feb 02, 2005 5:45 pm
by T42
Pavan_Yelugula wrote:Hi,
Doesn't mail stage support - passing of job parameters???
The answer is...

No.

Any other questions?

Posted: Wed Feb 02, 2005 5:49 pm
by s1kaasam
Hi Pavan
Yes you can pass enviroment variable in the email notification stage.All you have to do is make sure that parameter is there in your Job properties, parameters for the sequencer and just pull it in the Job email notification stage.In that way the parameter would be inside two hashes (#Job Parameter#).
Any questions let me know.

Posted: Wed Feb 02, 2005 7:47 pm
by Pavan_Yelugula
hey guys
i just posted it to get my question across to people who see only PX forum.
and unfortunetly everyone out there seems to agree with chulet.

The last thread of mail says i can do it. i tried the same way but it literally took #EmailID#( Email is my parameter) and tried to send a mail to #EmailID# and gave a output as cann't send.

If you guys have a shell script which does the same functionality and like to share with us it will be great

Sorry chulet for posting in a different forum

Thanks and Regards
Pavan

Posted: Wed Feb 02, 2005 9:02 pm
by trokosz
What works is to create a new environment variable vs. using a parm. So create, for example, a new environment variable (in DataStage Admin or in your Job Properties) and call it send_email_to and receive_email_from.....then in Job Properties you see $send_email_to vs. #send_email_to.....it works just fine

Posted: Wed Feb 02, 2005 9:44 pm
by chulett
Well, at least there one answer for you. Job parameters may not work but it sounds like Environment Variables do. Or at least can. :wink:

You might have to be careful, though - from what I remember, one of the early 7.x versions required you to recompile any job that used enviroment variables in order to pick up their new (changed) value. The next release (7.1? 7.5?) fixed it so that you didn't have to do that.