Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.
Moderators: chulett , rschirm , roy
jshurak
Participant
Posts: 74 Joined: Mon Jan 09, 2006 12:39 pm
Post
by jshurak » Wed Sep 13, 2006 12:25 pm
I have the following piece of code setup to read the 'DSSendMail 'To:' parameter from the TEST_Email_Control.txt file. The contents of said file are: To:
abc@xyz.com \n
My question is: Can you designate multiple email addresses in the 'To:' parameter?
Code: Select all
EMail = ''
* Find out what AS/400 the file will be extracted from ***
OpenSeq "G:\DataStage\DStage_Data\TEST_Email_Control.txt" To INLINE Then
Read:
ReadSeq DataLine from INLINE Then
EMail = DataLine
END
CloseSeq INLINE
****CALL DSExecute("NT", "type G:\DataStage\DStage_Data\TEST_Email_Control.txt", EMail, ReturnCode)
*** Variable Definition ***
message = ""
sender = "From:Data_Staqe_Dwetl2@appliedcard.com\n"
DateDay = OConv(@DATE - 1, "D-YMD[4,2,2]")
*** Process ***
message ="Subject: DWETL2 - ROW Extract CD623A":" \n "
message = message:"Server:172.17.90.80\n"
message = message:"Body:\n"
message = message:"Command Center, \n"
message = message:" \n"
message = message:"Production job Main_CD623A_Extraction has not run yet. Please make sure":" \n "
message = message:"the ROW extract for CD623A had been placed on":" \n "
message = message:"Server Dwetl2."
message = message:" \n"
message = message:" \n"
message = message:" \n"
message = message:"Thank you,":"\n"
message = message:"Dwetl2":"\n"
message = message:"ETL Production Server"
*
* Send the e-mail's
*
Call DSLogInfo(EMail,'Job Control')
EMailMessage = ""
EMailMessage = sender
EMailMessage = EMailMessage:EMail
EMailMessage = EMailMessage:message
Call DSLogInfo(EMailMessage, 'Job Control')
code = ''
code = DSSendMail(EMailMessage)
If code = 0 Then
Call DSLogInfo("E-mail sent successfully.",'Job Control')
End Else
Call DSLogInfo("E-mail NOT sent.",'Job Control')
End
DeepakCorning
Premium Member
Posts: 503 Joined: Wed Jun 29, 2005 8:14 am
Post
by DeepakCorning » Wed Sep 13, 2006 12:43 pm
As far as I know, nope. I tested it with many addresses seperated my commas/semi colons and all but it does not work. So I had to do include the code it many times to mail to many people.
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Sep 13, 2006 12:47 pm
Did you try with spaces in between?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
kris007
Charter Member
Posts: 1102 Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI
Post
by kris007 » Wed Sep 13, 2006 12:48 pm
Spaces should work. I have done that in the past successfully
Another suggestion to overcome this would be to create a group email address and include all the people in it and use it rather than entering invidually unless it doesn't meet your purpose.
Kris
Where's the "Any" key?-Homer Simpson
DeepakCorning
Premium Member
Posts: 503 Joined: Wed Jun 29, 2005 8:14 am
Post
by DeepakCorning » Wed Sep 13, 2006 1:16 pm
Really ?? Is it possible in the Notification Activity Stage as well?? As I m trying with spaces and my ends up with a warning..
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Sep 13, 2006 1:25 pm
Yes, it surely works in the Notification activity. Have done that before successfully.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Wed Sep 13, 2006 3:09 pm
You can always send to an email address that is a "list" in your email server.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.