Hi ,
is it possible to create a batch in SAS that picks up a file from a particular UNIX location and emails it to myself for example?
I dont have certain dates when that file will be in UNIX
pls advise
Thanks
Yes. Assuming that SAS is running on the Unix server and that it is configured to work with an email server.
Why do you want to use email? What happens if the file is too large to send as an email attachment? Most email systems have restrictions on this.
Also there are schedulers that can check for the existence of a file and then run a batch job.
thanks guys,
I usually pick up the file from our server manually and load it to another server which is not owned by us but now the guys asked me if i can pick it up and email it to them directly instead of loading it to their server.
Can you please point where on here i can get the samples of those scripts or even the scheduler that check for existence?
thanks,
i dont know how to write scripts in UNIX
Here is a link that has some code example for sending emails with attachments:
You should talk to your SAS administrator to confirm your site's email settings if any.
thanks SaSKiwi,
i did try one of the codes from the link you sent me and looks like my SAS is not set up to talk to SMTP yet.
Can you also point to some codes that check to see if a file exists in a particular server and then picks it up before sending it via email?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.