Code to run on connection to Server

Reply
Super User
Posts: 19,814

Code to run on connection to Server

EG has a command to allow code to run once you've connected to the Server, is there a similar functionality in BASE?

I have some code that I'd like to run everytime I start SAS, but first we have to log in to the server (every time).  Is there some way to set that in BASE SAS?

Super Contributor
Posts: 644

Re: Code to run on connection to Server

Have you tried (do you have permissions) to modify system options?  You can include code that is run when SAS is initiated using the -initcmd option, or an alternate autoexec.sas which would include your connect code us ing the -autoexec option.

Richard

Respected Advisor
Posts: 3,156

Re: Code to run on connection to Server

You can if you bury your credentials in the SAS/Connect script. One thing I could not figure out is to use IWA (integrated windows authentication), by doing that I don't have to update my password in the script. I don't have the script with me right now, I will get it when I am back in town next Tuesday, but it is some basic commands as I can recall.

Haikuo

Super User
Posts: 3,254

Re: Code to run on connection to Server

Firstly SAS/CONNECT needs to be licensed and installed as well as Base SAS on both the SAS client and SAS server. Use PROC SETINIT to check this out. EG doesn't require CONNECT as connectivity is built into the product. 

Ask a Question
Discussion stats
  • 3 replies
  • 170 views
  • 1 like
  • 4 in conversation