DATA Step, Macro, Functions and more

Impact of sas configration on some sas program

Reply
Super Contributor
Posts: 371

Impact of sas configration on some sas program

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 ?

 

 

Super Contributor
Posts: 371

the impact of sas configuration on the sas program name

[ Edited ]

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 ?

 

 

 

 

Trusted Advisor
Posts: 1,372

Re: the impact of sas configuration on the sas program name

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.

 

Respected Advisor
Posts: 3,887

Re: the impact of sas configuration on the sas program name

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.

Contributor
Posts: 52

Re: Impact of sas configration on some sas program

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
Super User
Posts: 6,932

Re: Impact of sas configration on some sas program

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 3,102

Re: Impact of sas configration on some sas program

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

Ask a Question
Discussion stats
  • 6 replies
  • 237 views
  • 5 likes
  • 6 in conversation