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?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.