I have a SAS program that I need to open and run every Friday at 4pm. Running this program creates an ODS output that reports the activities in the previous week.
My question: Is there any way so the program will be automatically opened and run without any person's involvement?
It depends on your operating system, and possibly on your university or employer's restrictions. What operating system are you using? It also depends on what implementation in SAS you are using. What SAS implementation/interface are you using?
Windows 10 Enterprise
It is an official laptop and all the files have to be saved in share folder. I am not sure if there is any restriction applied. If there is an restriction, that can be withdrawn, I believe.
I am using SAS Enterprise Guide, 8.3 (8.3.0.103) (64-bit)
FYI: My program pulls data from the data tables in the SQL server and create report.
Below is an example statement to create library:
"LIBNAME Parts ODBC noprompt="DRIVER={ODBC Driver 17 for SQL Server};
Trusted_Connection=yes; server=HP****D01;
database=P**S" schema="d**o";
run; "
Talk to your SAS administrator. Ask them about SAS server-based scheduling of SAS programs run as batch jobs as that is exactly what you want. Once scheduled, the SAS program automatically runs at the required dates and times. SAS Management Console contains a tool called Schedule Manager that does this, but your site may use other tools.
I am going to send the following email to the SAS administrator in my organization. I shall get back to you once I hear from them. Thanks.
"
Hello,
I have created few SAS programs that needs to be run automatically on a particular day and time of each week and month. I was wondering if you could help me in SAS server-based scheduling of SAS programs run as batch jobs.
"
In addition to asking your administrator, remember to also ask your colleagues who work on the same server. Hopefully they can shows you an approach that works for your environment. This is a case where it's really helpful to have an internal SAS user group (or just internal analytics user group, language-agnostic), within an organization.
The SAS administrators in my organizations are all IT persons and they are not familiar with SAS programs. They just know how to install SAS, update SAS etc.
I am wondering if any SAS code will be required for this task. If so, then they will not be able to do that.
It won't require any SAS code. But it may require them to understand scheduling tools that may have been provided with the SAS install. Regardless, it's definitely a fair question to ask them about.
@Barkat - There is a SAS client tool that can be installed on your PC just like Enterprise Guide called SAS Management Console. It has Schedule Manager that can schedule jobs on your SAS server just by filling in a few screens - no programming is required.
At the very least your IT administrators should know how to install this.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.