BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RichardL
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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

4 REPLIES 4
ballardw
Super User

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.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

RichardL
Calcite | Level 5

Thank you, ballardw and RW9!

jakarman
Barite | Level 11

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

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

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