03-30-2017 02:36 PM
I am still fairly new to the SAS programming world and I was recently asked a question about the autoexec function. The individual wanted to know if it was possible to add something to the AutoExec so that a specific project would automatically launch during startup. I've not been able to find a solution at this point whether through autoexec or not. Is it possible to have SAS launch a certian project when it first launches?
03-30-2017 02:40 PM
Are you using Enterprise Guide or Display Manager? With Display Manager, yes, you can modifiy the shortcut to run a specified .sas file upon lauching SAS. I'm not sure about EG.
03-30-2017 02:45 PM
Okay, sorry. I'll be curious to see what other responses you get, as I'd like to know how to do this myself. I currently just have a %include "....."; at the top of most of my code that serves this purpose.
03-30-2017 02:42 PM - edited 03-30-2017 02:43 PM
You could create an autoexec for each specific project, then a separate shortcut to launch SAS with the desired autoexec. So, if you have "Project A" and "Project B" (creative names, huh?) then each would have it's own SAS shortcut.
03-30-2017 03:02 PM
Please be aware that most EG setups connect to a remote SAS server. The remote servers have their own AUTOEXEC programs that are not EG-aware. However within EG Options you can setup code that will run when you connect to a SAS server. Strictly speaking this is not an AUTOEXEC, but may serve the same purpose:
03-30-2017 03:06 PM
Thank you for the reply. I had seen this in other sets of reference material. I don't believe it would be an issue if it was conifigured for local/single user use. The issue is that I am unfamiliar with the code that would be required to iniate the specific .egp file/report.
03-30-2017 03:30 PM
Not an autoexec solution, but couldn't you do that from the command line or change the icon functionality?
For example if you double click a project it opens directly. If you find the EG icon that's being used, when you go into the windows property you should be able to change that to open the specific project of interest.