Desktop productivity for business analysts and programmers

How to save a dataset each first day of the month without opening the SAS program (automatically)

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 119
Accepted Solution

How to save a dataset each first day of the month without opening the SAS program (automatically)

Hello,

 

I am using a SAS Enterprise Guide 7.15 and I would like to make a backup of a dataset automatically each first day of the month.  Is there a way to achieve that operation.  Does The SAS programm need to be open?

 

Regards,

 


Accepted Solutions
Solution
3 weeks ago
Super User
Posts: 23,354

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

Create a stored procedure that runs on the first of the month. You can schedule this is in your SAS server. 

The stored procedure is basically the code to save the data set, depending on your rules you can possibly use PROC DATASETS to copy it over and rename the data set. You need to have this scheduled on a server because its likely your computer is not on every day and no guarantee that it's on the first of the month, especially on weekends.

 

http://www2.sas.com/proceedings/sugi30/135-30.pdf

View solution in original post


All Replies
Super User
Posts: 9,932

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

Where is your SAS workspace server running? If it's not local, using the server's scheduling tool is more reliable (and usually simpler) than scheduling a EG project on the desktop.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 23,354

Re: How to save a dataset each first day of the month without opening the SAS program (automatically


@alepage wrote:

Hello,

 

I am using a SAS Enterprise Guide 7.15 and I would like to make a backup of a dataset automatically each first day of the month.  Is there a way to achieve that operation. 


Yes

 


@alepage wrote:

Does The SAS programm need to be open?

  


No. 

 

 

Frequent Contributor
Posts: 119

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

how can we make a backup of a dataset automaticaly lets say at each first Monday of the Month without opening the SAS program with EG 7.15

Solution
3 weeks ago
Super User
Posts: 23,354

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

Create a stored procedure that runs on the first of the month. You can schedule this is in your SAS server. 

The stored procedure is basically the code to save the data set, depending on your rules you can possibly use PROC DATASETS to copy it over and rename the data set. You need to have this scheduled on a server because its likely your computer is not on every day and no guarantee that it's on the first of the month, especially on weekends.

 

http://www2.sas.com/proceedings/sugi30/135-30.pdf

Super User
Posts: 9,932

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

What do you mean by "backup"? Just a copy to a new name, to a different directory, or to a tape archive?

Does your organization already run jobs automatically in batch?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Frequent Contributor
Posts: 119

Re: How to save a dataset each first day of the month without opening the SAS program (automatically

Posted in reply to KurtBremser

copy a work.dataset on the commun server

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 196 views
  • 1 like
  • 3 in conversation