Desktop productivity for business analysts and programmers

SAS Invocation

Reply
Frequent Contributor
Posts: 97

SAS Invocation

I have come across several SAS Options that must be set at invocation or in the autoexec file. Since I am running EG on a server, I am not able to change the config or autoexec files.

I ran across an article at "http://analytics.ncsu.edu/sesug/2004/TU07-Heaton.pdf" that tell you to create a shortcut and place the option in the target such as:
"C:\Program Files\SAS\Enterprise Guide 4\SEGuide.exe" -sasInitialFolder="."
The article was made for PC SAS, and when I try in EG, I get the error "Specified cast is not valid.

Similarly, I tried passing this as a parameter from the command prompt :
seguide.exe -sasInitialFolder="."
This did not work.

Is there a way to pass options on invocation?
Christopher Johnson
www.codeitmagazine.com
SAS Employee
Posts: 149

Re: SAS Invocation

Are you running EG 4.1 or 4.2? The reason I ask is that there are ways in both pieces of software for the client to have statements submitted up front. EG 4.1 used something called EGAuto; EG 4.2 has an option to submit code when connecting to the server for the first time.
Frequent Contributor
Posts: 97

Re: SAS Invocation

I am running 4.1. I found the EGAuto.sas file, and added this line to the end:
OPTIONS sasinitialfolder="\\Shared\SAS\";
but it is not having an effect. Am I doing this correctly?

Thanks,
Chris
Christopher Johnson
www.codeitmagazine.com
Respected Advisor
Posts: 4,137

Re: SAS Invocation

I believe that options which can only be set during SAS invocation are not meant to be overwritten by users.

If - for example - a site admin decides not to allow x-commands (shell escape) for SAS EG sessions for security reasons then a user should not be able to overwrite these settings.
Community Manager
Posts: 2,889

Re: SAS Invocation

For those options that can be set in an autoexec (options you can specify with an OPTIONS statement), you can use this tip:

http://www.sascommunity.org/wiki/Tips:User_Specific_Autoexecs_in_Enterprise_Guide

For invocation options (also known as command options, dash options, config options), you must specify these on the SAS command (not the SEGuide command) -- so you'll need the help of an admin to do that.

Chris
SAS Employee
Posts: 149

Re: SAS Invocation

For version 4.1, putting a statement in that EGAuto.sas file should do it. That should be located under:

C:\Documents and Settings\\Application Data\SAS\Enterprise Guide\4\

where obviously you'd want to replace with the appropriate value. Make sure the version of EGAuto.sas you changed was for your userid. If that still doesn't work, I'd probably check with SAS tech support (http://support.sas.com/techsup/contact/). There were some issues with EGAuto in version 3.0 but those should have been resolved by version 4.1. As Chris mentions, it may be that you're trying to change an option that must be set in a config file. I've never played with sasinitialfolder= so I can't speak to any details on that.
Ask a Question
Discussion stats
  • 5 replies
  • 726 views
  • 0 likes
  • 4 in conversation