Architecting, installing and maintaining your SAS environment

Preloaded Statements when Starting a SAS Session

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Preloaded Statements when Starting a SAS Session

Is it possible to have specific code statements already typed in when a SAS session starts?  I always begin my programs with the same LIBNAME statements and pass through statements. I'd like to avoid having to enter these with each new SAS session.

Thank you for your help!

Richard


Accepted Solutions
Solution
‎04-16-2015 10:57 AM
Super User
Posts: 11,343

Re: Preloaded Statements when Starting a SAS Session

That is what the AUTOEXEC.SAS file is for. Add a reference in the config file

-autoexec "path and file name"

that file will execute every time SAS starts.

View solution in original post


All Replies
Solution
‎04-16-2015 10:57 AM
Super User
Posts: 11,343

Re: Preloaded Statements when Starting a SAS Session

That is what the AUTOEXEC.SAS file is for. Add a reference in the config file

-autoexec "path and file name"

that file will execute every time SAS starts.

Super User
Super User
Posts: 7,977

Re: Preloaded Statements when Starting a SAS Session

Have a look at autoexec.sas, this is run when SAS starts up.

New Contributor
Posts: 3

Re: Preloaded Statements when Starting a SAS Session

Thank you, ballardw and RW9!

Trusted Advisor
Posts: 3,215

Re: Preloaded Statements when Starting a SAS Session

In a EIP (BI/DI) setup you a usermods-autoexec for each server-process and appserver.

Same goal as old classic autoexec usage. It is different form a metadata registration as it also offers filename macro locations an much more (user dependicies) not possible in metadata.  

---->-- ja karman --<-----
🔒 This topic is solved and locked.

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

Discussion stats
  • 4 replies
  • 532 views
  • 3 likes
  • 4 in conversation