Page 1 of 1

NotificationActivity : parameter for email address

Posted: Fri Feb 21, 2003 6:38 am
by luca
I have a parameter for email address in my job sequencer.
I want to use this parameter in a NotificationActivity (email).
What special caracter do I have to enclose my parameter with in the senders and recipient email address fields ?
Probably easy, but I didn't find it in the doc/help.
Thanks.

Posted: Fri Feb 21, 2003 3:31 pm
by ray.wurlod
No special character.
Try one, and examine the job control code that is generated when you compile the sequencer. The argument list for DSSendMail includes n characters to separate the components, but DataStage puts these in for you.


Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518

Posted: Fri Feb 21, 2003 3:40 pm
by vmcburney
I don't think it accepts any job parameters anywhere in this stage! It turns all of the data entry fields into string fields. I compiled a job and looked at the readonly job control code:
p$2$Parameters = "To:":'MyRecipient':"nFrom:":'MyAddress':"nSubject:":'MySubject':"nServer:":'MyServerName':"nBody:":'Excuse me #SupportPerson#, your job has finished.':"n":rpt$all
Call 'DSSendMail'(r$2, p$2$Parameters)

All the fields were enclosed in single inverted commas so there is no way a job parameter will be located and switched. If you want to use job parameters for email I suggest you send your email using a routine and forget about the email stage. As you can see from the generated job control code the DSSendMail command is easy to use. Have a look at your Job Control code for your sequence job, transfer the send mail code to a routine and turn the email settings into passed in routine parameters.


Vincent McBurney
Data Integration Services
www.intramatix.com

Posted: Fri Feb 21, 2003 3:46 pm
by ray.wurlod
Yeah, that's what I meant to be saying, but was operating in terse mode! Sorry about that; checking three email boxes, two Messenger conversations and the Forum simultaneously.

Posted: Fri Feb 21, 2003 4:17 pm
by vmcburney
It wasn't till after my post that I saw your reply. It's a Saturday, time I stopped reading this forum and went out into the backyard to play.


Vincent McBurney
Data Integration Services
www.intramatix.com

Posted: Fri Feb 21, 2003 5:22 pm
by ray.wurlod
Same here but I find if I don't clear the inboxes on Saturday (Friday PM in the US) they get too full to process the following Monday. [:(] Unfortunately I'm not allowed to play in the backyard till the chores are done.