BookmarkSubscribeRSS Feed
LineMoon
Lapis Lazuli | Level 10

Hello expert,

Please, I would like to know the impact of giving for a sas program the name : autoexec.sas (this program is not  a "sas file autoexec

is executed immediately after SAS initializes")

https://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p0bmj7wjme32ayn1h...

Is there any restriction on this name "autoexec" ? It can make a problems ?

 

 

6 REPLIES 6
LineMoon
Lapis Lazuli | Level 10

Hello Experts,

Please, I would like to know the impact of the creation sas program with the name autoexec.sas( but this program is not the autoexec file )

https://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/viewer.htm#p0bmj7wjme32ayn1h...

 

given a sas program the name "autoexec.sas" is it correct ? it can make a matters ?

 

 

 

 

Shmuel
Garnet | Level 18

As much as I know there is no restriction or impact to call your program autoexec.sas

which is not the sas autoexec - as long:

1) the program with its path is not mentioned in the configuration file

2) nor in the exec sas command line

 

BTW, any program with any name can be used at exec sas command line or be called

through the sas configuration file in order to initiate sas environment  - usually contains

LIBNAMEs, FILENAMEs, system options and predefined options - and you can add any

desired code besides.

 

Patrick
Opal | Level 21

The name autoexec.sas isn't of functional relevance but it's a naming convention SAS uses OOTB for .sas files executed during SAS invocation.

 

I'd consider it a bad practice but yes, you could also call another file autoexec.sas if you want to confuse people.

mnjtrana
Pyrite | Level 9

Hi,

 

Creating a sas program with name- autoexec.sas should not be a problem. the file -autoexec.sas that sas runs automatically is defined by the administrator and it's reference is there in sas, however the file you will create won't be run automatically, unless you want it to.

 

We are also using one such autoexec.sas which we have created for one specific project and run it manually, before you we want to get it to that project.

 

Hope that helps!

 

Thanks,

Manjeet


Cheers from India!

Manjeet
Kurt_Bremser
Super User

Since SAS (if started without the -autoexec commandline option) will automatically use any autoexec.sas in the current directory (from which SAS was called), I would NEVER name a file like that, unless it is meant to be used as an autoexec.

SASKiwi
PROC Star

If your aim is to be a best-practice SAS practitioner then I would recommend taking @Kurt_Bremser's advice to heart.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1196 views
  • 5 likes
  • 6 in conversation