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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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