LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2003, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 26 Mar 2003 09:49:57 -0800
Reply-To:     "Huang, Ya" <yhuang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Huang, Ya" <yhuang@AMYLIN.COM>
Subject:      Re: e-mail log files?
Comments: To: "Droogendyk, Harry" <Harry.Droogendyk@CIBC.COM>
Content-Type: text/plain; charset="iso-8859-1"


I would suggest that the last step be separated as another sas program, dedicated to do the mailing. There is a risk that the main program may bomb then email will not send out. I used to do the similar thing in Unix, one of my coworker embedded the mailing code in the main code, but once a while he can not receive the email and the reason is that the main program did not run successfully.

Never used windows scheduler yet, but I think it should allow another job followed the main job.


Ya -----Original Message----- From: Droogendyk, Harry [mailto:Harry.Droogendyk@CIBC.COM] Sent: Wednesday, March 26, 2003 9:41 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: e-mail log files?

Use PROC PRINTTO to route the log to an external file, execute the pertinent stuff, route the log back to the default location and use the attach parameter of the EMAIL FILENAME to send it to yourself.

proc printto log = 'c:\name.log'; run;

data a; do i = 1 to 10; output; end; run;

proc printto log=log; run;

filename mymail email "" subject="log file" attach="c:\name.log"; data _null_; file mymail; put 'Log file attached'; run;

-----Original Message----- From: Mike Cohen [mailto:mcohen@ATTBI.COM] Sent: March 26, 2003 12:18 PM To: SAS-L@LISTSERV.UGA.EDU Subject: e-mail log files?

Hello All,

I want to do something which I hope is quite simple :)

I run a number of jobs via my Windows scheduler at night, and would like to e-mail the completed log files to myself once the jobs end (either successfully or non-successfully). Anyone have any idea how to easily do this?

I am running SAS 8.01 on Win 2k 5.0.

Thank you!


Back to: Top of message | Previous page | Main SAS-L page