unable to pass parameters to mail stage

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
Pavan_Yelugula
Premium Member
Premium Member
Posts: 133
Joined: Tue Nov 23, 2004 11:24 pm
Location: India

unable to pass parameters to mail stage

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

Post by chulett »

Why post thing again in a different forum? You're not going to get a different answer. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Re: unable to pass parameters to mail stage

Post by T42 »

Pavan_Yelugula wrote:Hi,
Doesn't mail stage support - passing of job parameters???
The answer is...

No.

Any other questions?
s1kaasam
Participant
Posts: 17
Joined: Wed Feb 02, 2005 5:11 pm
Location: virginia

Post 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.
shravan
Pavan_Yelugula
Premium Member
Premium Member
Posts: 133
Joined: Tue Nov 23, 2004 11:24 pm
Location: India

Post 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
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

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

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

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