Desktop productivity for business analysts and programmers

Tell EG what sasv9.cfg to use

Accepted Solution Solved
Reply
Super Contributor
Posts: 250
Accepted Solution

Tell EG what sasv9.cfg to use

[ Edited ]

 In base SAS, you can override the default sasv9.cfg by saving a sasv9.cfg file in your Documents folder.

 

However, at least as far as I can tell, EG does not use that (probably for good reason, but, anyway).  Is there a way to force EG to use a particular SASv9.cfg when it launches SAS in local server mode?  I'd accept any method, whether it be editing EGOptions.xml or setting a system variable (I've tried the two mentioned in the documentation, SAS_SYS_CONFIG and SAS_USER_CONFIG).  I'm running EG 7.13/SAS9.4 TS1M4 in Windows 7.

 

Note that I'm trying to avoid writing to the "default" sasv9.cfg, and in theory would like something that someone without write access to the SASHome folder could use (so, specifically pointing SAS to a particular sasv9.cfg, not modifying one of the already existing ones).


Accepted Solutions
Solution
‎12-21-2016 12:03 PM
Community Manager
Posts: 2,887

Re: Tell EG what sasv9.cfg to use

I think that the way SAS is installed and registered (sas.exe /regserver) ends up short-circuiting the normal search path for sasv9.cfg files, as it puts a -CONFIG option on the registered SAS command.


If you can't change the registered SAS command (requires update access to the HKEY_LOCAL_MACHINE area of Windows registry) and you can't change the default sasv9.cfg file (usually in PROGRAMFILES\SASROOT folder), then you might be pretty limited in what you can do with that.

 

I don't know how far you want to take this...but here's something you could do without additional privileges: set up a SAS Metadata Server on your local machine.  You would need SAS Management Console or some pretty good PROC METADATA skillz to define a SAS Workspace server in there, but if you made it happen then you could define that workspace to start with whatever command you want.  Using the SAS Metadata Server and a local SAS Workspace can work with just a Base license -- you don't need SAS Integration Technologies.  (Try to connect from another machine though---you'll be DENIED.)

View solution in original post


All Replies
SAS Super FREQ
Posts: 306

Re: Tell EG what sasv9.cfg to use

[ Edited ]

Yes, you can do that by editing the SAS command EG uses to launch your local server such that it uses a .cfg file you specify.  For example, append "-config <pathToYourDesiredsasv9.cfg>" to the currently registered SAS command.

 

See the last two paragraphs in this blog entry for instructions on how to change the registered SAS command (includes link to a tool for convenience, as an alternative to manually editing your registry):

http://blogs.sas.com/content/sasdummy/2009/11/19/using-the-x-and-systask-commands-from-sas-enterpris...

 

Casey

Super Contributor
Posts: 250

Re: Tell EG what sasv9.cfg to use

Thanks, Casey. I don't think a registry solution will work in my case unfortunately (due to the issues implementing that in my company) but it's good to know there is a possible solution. Thanks!
Super User
Posts: 3,233

Re: Tell EG what sasv9.cfg to use

Perhaps you could add your required config changes to the "usermods" CONFIG in your local SAS server. That way you don't need to change anything on the EG side of things. EG will pick up any of changes made automatically, as will running SAS in any other mode (batch, Display Manager).

Super Contributor
Posts: 250

Re: Tell EG what sasv9.cfg to use

If you mean the file in

 

c:\users\[username]\Documents\sasv9.cfg

 

That doesn't seem to be picked up by EG in the default installation (at least, in my site's default installation).  I've tested that several times.  EG here acts as if it has the -CONFIG option (i.e., with base SAS, if the shortcut includes -CONFIG, it will ignore the user home version and override with the option's version). 

SAS Super FREQ
Posts: 306

Re: Tell EG what sasv9.cfg to use

In EG's Tools->System Options Viewer, type "config" in the "Filter results" field, then look at the INSTALL->CONFIG option to see what sasv9.cfg files are being used.  (Or use proc options to print to the log.)

Super Contributor
Posts: 250

Re: Tell EG what sasv9.cfg to use

Yep, I can tell what options it's using; the problem is how to change that, unfortunately.

Solution
‎12-21-2016 12:03 PM
Community Manager
Posts: 2,887

Re: Tell EG what sasv9.cfg to use

I think that the way SAS is installed and registered (sas.exe /regserver) ends up short-circuiting the normal search path for sasv9.cfg files, as it puts a -CONFIG option on the registered SAS command.


If you can't change the registered SAS command (requires update access to the HKEY_LOCAL_MACHINE area of Windows registry) and you can't change the default sasv9.cfg file (usually in PROGRAMFILES\SASROOT folder), then you might be pretty limited in what you can do with that.

 

I don't know how far you want to take this...but here's something you could do without additional privileges: set up a SAS Metadata Server on your local machine.  You would need SAS Management Console or some pretty good PROC METADATA skillz to define a SAS Workspace server in there, but if you made it happen then you could define that workspace to start with whatever command you want.  Using the SAS Metadata Server and a local SAS Workspace can work with just a Base license -- you don't need SAS Integration Technologies.  (Try to connect from another machine though---you'll be DENIED.)

Super Contributor
Posts: 250

Re: Tell EG what sasv9.cfg to use

Thanks, Chris; that's what I was afraid of.  I of course can fix this on my own machine pretty easily, but it sounds like if we end up sticking with local server installs that I'll need to talk to the helpdesk folks about running a custom registry update any time they do an install or something like that (we're currently evaluating whether local installs or a grid-type server is better for our site, and obviously in the latter case we'll be managing this in a very different way).

Super User
Posts: 3,233

Re: Tell EG what sasv9.cfg to use

No I mean in this directory: <sasinstalldir>\SAS\Config\Lev1\SASApp\sasv9_usermods.cfg.

 

I don't have a local SAS install to check but it should be something like this.

Super Contributor
Posts: 250

Re: Tell EG what sasv9.cfg to use

Hmm, I don't seem to have any directory remotely similar to that.  There are a few files with similar naming schemes plus .orig in various folders, specific to various apps; there is one for workspace server for example, one for DI studio, etc.  But they look like they're templates, not actually in use; and that folder is not writable for most users in my location anyway (anything in c:\program files\ is default locked down to avoid viruses).

Community Manager
Posts: 2,887

Re: Tell EG what sasv9.cfg to use

@SASKiwi - poor @snoopy369 won't have that folder, because he's not using a configured SAS environment.  It's just EG with Local SAS, no services or servers or any of that metadata configured goodness.

Super User
Posts: 3,233

Re: Tell EG what sasv9.cfg to use

I'm modelling this off a remote SAS server so the setup might be a bit different. Maybe you could do a search for sasv9_usermods.cfg or sasv9.cfg on your local drive to find all SAS configs.

 

BTW I use this approach for customising all SAS sessions including EG and it works fine.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 12 replies
  • 1030 views
  • 5 likes
  • 4 in conversation