Help using Base SAS procedures

run code on startup

Accepted Solution Solved
Reply
Contributor
Posts: 56
Accepted Solution

run code on startup

I have code like

libname home "C:\My SAS Files\";

libname folder1 "C:\My SAS Files\folder1\";

libname folder2 "C:\My SAS Files\folder2\";

etc...

which I have to run at startup to get my folders up into the system,

is there a way to do this automatically? without manual labor ever time I open SAS?up


Accepted Solutions
Solution
‎05-03-2012 03:14 PM
Super Contributor
Posts: 1,636

Re: run code on startup

If  you use PC SAS, please check the attached screenshots. make sure the "enable at startup" is checked.


part2.pngcreate per. library.png

View solution in original post


All Replies
Solution
‎05-03-2012 03:14 PM
Super Contributor
Posts: 1,636

Re: run code on startup

If  you use PC SAS, please check the attached screenshots. make sure the "enable at startup" is checked.


part2.pngcreate per. library.png
Regular Contributor
Posts: 165

Re: run code on startup

It is also possible (I think) to add these to the config file "SASV9.CFG".  You could then copy this file to use on other workstations, etc. and this could be quicker than saving the libs one by one if you have a lot of them.  You could also create a program to read a spreadsheet with the libraries/paths and programmatically assign them at the beginning of a program.  A compiled macro to do this would be a good idea too.

Good luck!

Valued Guide
Posts: 765

Re: run code on startup

hi ... if you create a file named AUTOEXEC.SAS in the folder where SAS.EXE is located, all statements in that file are executed at startup

one advantage, you get another PC ... use the same file rather than customizing using SAS windows-based commands

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 2175 views
  • 6 likes
  • 4 in conversation