LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (April 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 20 Apr 2007 14:01:41 -0700
Reply-To:     sbarry@SBBWORKS.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Scott Barry <sbarry@SBBWORKS.COM>
Organization: http://groups.google.com
Subject:      Re: How to use SAS process to collect information and email it
Comments: To: sas-l@uga.edu
In-Reply-To:  <c2192a610704200740s5c2abbcap4fbd58ed622d6f5b@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

On Apr 20, 10:40 am, procconte...@GMAIL.COM (SAS_learner) wrote: > Hello Guys being Friday morning just playing around this piece of Code, by > kuhasu's I do not know where I going wrong ?? when I submitting it a DOS > window pop's up warning( 'c:\send\mailcmd' is not recognized as an internal > or external command, > operable program or batch file. > ) , any Ideas where ( by the I am doing on office machine and default mail > is outlook but I did log in to my Gmail account during the time I submitted > the program > ______________________________________________________ > Kuhasu's blog > From sasCommunity > Jump to: navigation, search > [edit] Hacker!Sasor!Whoever! > You can use sas process to collect information and email it through > firewalls!*^_^* > > Sounds like a tallent hacker,isn't it? > Acctually,it's another usage of sas for remoted data process. > > Remember: Use it good. > > [edit] codes here: > 1. creat a dataset.(You can omit it,'cause someone might do it for you:>) > > /*Create an dataset*/ > > data sendmail; > input test; > cards; > 1 > 2 > 3 > 5 > ; > run; > proc print data=sendmail; > run; > /*2. Save the output and the log(output can be created,but logs are not > recommanded if you wanna hack something) */ > /*Save the output and the log*/ > > DM OUTPUT 'FILE "c:\send\test.OUT"'; > DM LOG 'FILE "c:\send\test.LOG"'; > > 3. Finally,send this output file as attachment to the email address you set > /*Send the output to mailbox*/ > > data _null_; > call system('c:\send\mailcmd proconte...@gmail.com "procconte...@gmail.com" > "procconte...@gmail.com" "Subject: SAS results" "Contents: SAS results" "" > "c:\send\readme.txt"'); > run;

Suggest you consider using SAS-supplied FILENAME / EMAIL engine support for sending EMAILs (supports attachments). Formats other than text are supported in the EMAIL body, such as HTML.

In addition to SAS Windows companion documentation, you will find troubleshooting info in the SAS.COM support tech notes -- here's the DOC link to get you started:

http://support.sas.com/onlinedoc/913/getDoc/en/hostwin.hlp/sassession.htm#usingemail

Scott Barry SBBWorks, Inc.


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