Passing perameter to DSSendMail fuction

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

Post Reply
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Call the Notification Stage (E-Mail) after the corresponding job from job sequencer. Adding the job log will be only a tick in the box below the message line.
Rajender
Participant
Posts: 24
Joined: Wed Mar 31, 2004 6:10 am

Post by Rajender »

Hi Sainath,

Actually we are using a job control to achieve this, some of our requirement is pushing us to write a code rather then using the Notification Stage (E-Mail), as such it would be a great help if I can get to know how to achieve this in job control

Thanks & Regards
Raj
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
do you get the mail sent without the log report?
do you receive any mail as specified by the recipiat clause?

the most simple way to get this info will be to build a blank sequence job, add a notification activity + put some thing in the values neede and compile the job.
then simply look in the properties under the Job Control tab.

at first look your code seems to have no Log variable included in it?!.

by the way AFAIR (As Far As I Remember) no info is returned back.

depnding on the mail seteup in your company E-mails with a none valid email addesses or maybe company valid addresses in the sender's part might result in no mail being sent!
so try using company valid E-mail and recheck it.

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

Post by chulett »

You should write a script to do the actual call to sendmail. In your job control, gather up the information that you need and then pass it as parameters to the script... let it do the work.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rgandra
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 02, 2004 9:31 am
Contact:

Post by rgandra »

Hi Rajender,

I have the exact requirement and i am doing as follows:

Create the jobsequence with the jobs you want and for each job add a email notification stage ( if you want to send each job log as email) and check the jobstatus check box in email notification stage. Then compile this job and take out the code and paste it in a new job(server job not a sequence job).
Then Remove the dsmakejobreport function and add your dsgetlogsummary code. Then you are all set.

That's working absolutely fine and if you have questions let me know

sandeep
Rajender
Participant
Posts: 24
Joined: Wed Mar 31, 2004 6:10 am

Post by Rajender »

Hi sandeep,

Actually we are using a job control to achieve this, some of our requirement is pushing us to write a code rather then using the Notification Stage (E-Mail), as such it would be a great help if I can get to know how to achieve this in job control

Thanks & Regards
Raj
rgandra
Premium Member
Premium Member
Posts: 49
Joined: Mon Aug 02, 2004 9:31 am
Contact:

Post by rgandra »

Hi Rajender,

Even i am doing that in job control. [b]I just wanted to you to paste the code that generated in the sequence not the sequence [/b]and use the variable in that code in your mail syntax. Anyway you are using Dsendmail routine which is used by emailnotification stage.
Either way you can do every thing in job control. R u using any unix commands to send the mail? If not this should work.

I don't see any problem there. Let me know any questions

sandeep
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
getting my job report means I'm still running?!
you should get a report of jobs that have already finished running!

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
Post Reply