Warning while sending a Email using DSSendMail
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
Warning while sending a Email using DSSendMail
Hello Gurus,
Today i created a job where i send a E-mail to me and my project mates as and when a job gets completed.. Now when the job gets completed i get a warning in director:"SeqLoadHash..JobControl (DSSendMail): Parameter 1 ('0') does not start with a keyword".. but the mail was actually sent to everyone... i am sending a e-mail by calling the DSSendmail Built-in Routine.. I gave the following details in the Routine stage...DSSendMail"From:XX@yahoo.com\nTo:yyy@yahoo.com\nSubject:Hi ya\nBody:JobHashedCompleted\n%report%").. is there something wrong with my parameter.. any help?...
Thanks
Today i created a job where i send a E-mail to me and my project mates as and when a job gets completed.. Now when the job gets completed i get a warning in director:"SeqLoadHash..JobControl (DSSendMail): Parameter 1 ('0') does not start with a keyword".. but the mail was actually sent to everyone... i am sending a e-mail by calling the DSSendmail Built-in Routine.. I gave the following details in the Routine stage...DSSendMail"From:XX@yahoo.com\nTo:yyy@yahoo.com\nSubject:Hi ya\nBody:JobHashedCompleted\n%report%").. is there something wrong with my parameter.. any help?...
Thanks
Hi,
search for the DSSendMailTester routine in the built in routines.
it is a wraper routine for the DSSendMail that gets parameters for each section seperatly.
I bet you'll find it usefull.
IHTH,
search for the DSSendMailTester routine in the built in routines.
it is a wraper routine for the DSSendMail that gets parameters for each section seperatly.
I bet you'll find it usefull.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
![Image](http://www.worldcommunitygrid.org/images/logo.gif)
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
Roy,
I tried that routine also it asks for all the values like from,to,body,SMTP Server.. i gave all the values but when i tried to complie the job i get the following error..
Compiling: Source = 'RT_BP5160/JOB.2017379336.DT.1354017781', Object = 'RT_BP5160.O/JOB.2017379336.DT.1354017781'
********************************************************************************************?********
0073 p$12$1 = (XX@abc.com)
^
Variable Name (UNDEFINED) unexpected, Was expecting: Array Name,
CALLable Variable Name, DIMENSIONable Array Name, Variable name,
New variable name, Expression, "RPC_CALL"
0074 p$12$2 = (XX@abc.com)
^
Variable Name (UNDEFINED) unexpected, Was expecting: Array Name,
CALLable Variable Name, DIMENSIONable Array Name, Variable name,
New variable name, Expression, "RPC_CALL"
WARNING: Variable 'XX' never assigned a value.
WARNING: Variable 'Hai' never assigned a value.
WARNING: Variable 'This' never assigned a value.
WARNING: Variable 'is' never assigned a value.
WARNING: Variable 'a' never assigned a value.
WARNING: Variable 'test' never assigned a value.
WARNING: Variable 'mail' never assigned a value.
WARNING: Variable 'n%report%' never assigned a value.
2 Errors detected, No Object Code Produced.
(SeqLoadHash)
I could not even complie the job..do i have to put the values in some format.. does anyone has tried this routine....please help..
Thanks
I tried that routine also it asks for all the values like from,to,body,SMTP Server.. i gave all the values but when i tried to complie the job i get the following error..
Compiling: Source = 'RT_BP5160/JOB.2017379336.DT.1354017781', Object = 'RT_BP5160.O/JOB.2017379336.DT.1354017781'
********************************************************************************************?********
0073 p$12$1 = (XX@abc.com)
^
Variable Name (UNDEFINED) unexpected, Was expecting: Array Name,
CALLable Variable Name, DIMENSIONable Array Name, Variable name,
New variable name, Expression, "RPC_CALL"
0074 p$12$2 = (XX@abc.com)
^
Variable Name (UNDEFINED) unexpected, Was expecting: Array Name,
CALLable Variable Name, DIMENSIONable Array Name, Variable name,
New variable name, Expression, "RPC_CALL"
WARNING: Variable 'XX' never assigned a value.
WARNING: Variable 'Hai' never assigned a value.
WARNING: Variable 'This' never assigned a value.
WARNING: Variable 'is' never assigned a value.
WARNING: Variable 'a' never assigned a value.
WARNING: Variable 'test' never assigned a value.
WARNING: Variable 'mail' never assigned a value.
WARNING: Variable 'n%report%' never assigned a value.
2 Errors detected, No Object Code Produced.
(SeqLoadHash)
I could not even complie the job..do i have to put the values in some format.. does anyone has tried this routine....please help..
Thanks
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
I am not compiling the routine i am compiling the my job.. that time only i am getting this problem.. i don't know much about the notification stage...can you give some more info on this stage?. so that i can try this.. my requirement is to send a mail when a particular job is completed.. so it can do by any option.. i am planning to try sending mail from the UNIX box.. where i will write a shell script to send a mail and i can call this shell script in the BEFORE/AFTER stage of my job..which one will be effective datastage or UNIX ..can some one throw light on this?.. i am some what confused at this moment?.. please help...
Thanks
Thanks
Sorry, I thought you said you were trying to compile the DSSendMailTester routine. That is what I was referring to when I said you can 'test' it to see if you can send email from DataStage. And DataStage uses 'sendmail' on UNIX under the covers to do the actual work, so no difference there.
If you are using Sequence jobs to run your Server jobs, then it should be trivial to send an email when the job completes. Simply run a link to the Notification Activity stage and fill in the blanks. No need for special routines or shell scripts... unless you need something it can't provide, like being able to send a true attachment with the email.
If you don't want to use Sequencers, then yes you'll need to write routines and/or shell scripts to accomplish your goal.
If you are using Sequence jobs to run your Server jobs, then it should be trivial to send an email when the job completes. Simply run a link to the Notification Activity stage and fill in the blanks. No need for special routines or shell scripts... unless you need something it can't provide, like being able to send a true attachment with the email.
If you don't want to use Sequencers, then yes you'll need to write routines and/or shell scripts to accomplish your goal.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
Based on the warning messages, I think you need to quote your arguments. Although, I agree with Craig, the NotificationActivity stage is the preferred approach.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
Thanks to Ray,Smith and other for helping me..but unfortunately i am getting the same issue, now i gave quotes to all the field in DSSendMailTester routinue, my job got compiled successfully...but when i run the job i getting the same exception again "SeqLoadHash..JobControl (DSSendMail): Parameter 1 ('0') does not start with a keyword".. i think that i am making some mistakes with the parameters.. has anyone faced like this before?..has anyone tried sending e-mail from Datastage..if so how?.. please explain...
Thanks
Thanks
-
- Participant
- Posts: 82
- Joined: Thu Dec 02, 2004 10:27 pm
- Location: INDIA
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am
Hi,
The following are the values that i give to the DSSendMailTester
1.ToAddress -'xx@abc.com'
2.FromAddress -'xx@abc.com'
3.Subject--'Hai this is a test mail'
4.SMTPServer-'11.1.4.45'-- My SMTP Server IP Address
5.MessageBody-'Body:JobHashedCompleted\n%report%'---
I don't think that there is an ( or some other character in my values..it looks like a bug somewhere or am i giving some wrong values.. please help me in resolving this..
Thanks
The following are the values that i give to the DSSendMailTester
1.ToAddress -'xx@abc.com'
2.FromAddress -'xx@abc.com'
3.Subject--'Hai this is a test mail'
4.SMTPServer-'11.1.4.45'-- My SMTP Server IP Address
5.MessageBody-'Body:JobHashedCompleted\n%report%'---
I don't think that there is an ( or some other character in my values..it looks like a bug somewhere or am i giving some wrong values.. please help me in resolving this..
Thanks
-
- Participant
- Posts: 64
- Joined: Fri Jul 16, 2004 7:53 am