BookmarkSubscribeRSS Feed
Barkat
Pyrite | Level 9

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?

9 REPLIES 9
PaigeMiller
Diamond | Level 26

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?

--
Paige Miller
Barkat
Pyrite | Level 9

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; "

SASKiwi
PROC Star

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.

Barkat
Pyrite | Level 9

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.

"

Quentin
Super User

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.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Barkat
Pyrite | Level 9

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. 

Quentin
Super User

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. 

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
Reeza
Super User
No SAS code is required.

What's more important is are you running SAS on a server or is it locally installed. If locally, then your computer must be running and you can just use Windows Scheduler.
SASKiwi
PROC Star

@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.

SASKiwi_0-1699988418554.png

At the very least your IT administrators should know how to install this.

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 1022 views
  • 10 likes
  • 5 in conversation