BookmarkSubscribeRSS Feed
basinbasin
Fluorite | Level 6

Posting this, in the hope that it helps someone else, and if it happens to me again in a year's time, I don't go on the same wild goose chase trying to fix it.Smiley Happy

 

In SAS 9.4, I lost the ability to launch a .SAS file in the editor window by double-clicking on it in Windows Explorer. Whilst there are lots of potential solutions online, most of them cater for issues on 9.2 or 9.3 which tell you to run the SAS File Type Management Tool, which no longer exists in 9.4.

 

For 9.4 you can now fix the issue using the Manage File Types Utility in the SAS Deployment Manager. However, this didn't work for me, as the Deployment Manager was just hanging when running. Apparently, this is due to the issue described in Problem Note 57391: The Manage SAS File Types utility in the SAS® Deployment Manager fails to associ.... The fix in the KB article didn't work for me either, as the reinstall BASE SAS option wasn't available in my setup.

 

By far the most useful information to help me find the solution was in Double-Clicking a SAS® File: What Happens Next? (although again, it is aimed at 9.2 / 9.3 rather than 9.4.)

 

What fixed it for me was the following. (This assumes that you have access to, and are comfortable with modifying your Windows registry):

  1. Deleted the UserChoice registry key as discussed in the Double-clicking paper.
  2. Running the SASFileTypeRegFix.reg registry fix as discussed in the paper.
  3. Using the windows registry editor. (Modify at your own risk, take a back-up before modifying):

    • Browse to HKEY_CLASSES_ROOT\SAS.Program.701\shell

    • Have a look and see if there is a populated value for the following key:
      HKEY_CLASSES_ROOT\SAS.Program.701\shell\OpenwithSAS940\command

    • If there is, copy the value from here, and paste it over the existing value in
      HKEY_CLASSES_ROOT\SAS.Program.701\shell\Open\command

    • For 9.4 the value that works for me is as follows:
      "C:\Program Files\SASHome\SASFoundation\9.4\core\sasexe\sasoact.exe" action=Open datatype=SASFile filename="%1" progid=SAS.Application.940 

    • Your situation may differ. You may have to create the keys/ subkeys from scratch. You may not have a OpenwithSAS940 key to copy from. But there should be enough in the above to get you on your way.

Regedit screenRegedit screen

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Maybe I am misunderstanding your point here, however SAS Base - i.e. a locally installed SAS to the machine should be easily able to open SAS files just by associating the file type with the application - much the same as you would do with any other application.  If it does not do this automatically, or you want to change it, right click on a .sas file, select Open With.  Then find the SAS application and make sure that set as default is checked.  Should work fine from there.  Really wouldn't go editing registry and such like for something so simple?

cminard
Obsidian | Level 7

This does not always work, and is not the recommended method. Please see the Gibbs paper.

cminard
Obsidian | Level 7

Thanks for posting. I had a similar problem and was able to use this information to fix it. My solution was a little different, but the steps I followed were:

 

1. Deleted the UserChoice registry key as discussed in the Double-clicking paper.

  • Mine was located here: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sas\UserChoice

2. Running the SASFileTypeRegFix.reg registry fix as discussed in the paper.

  • downloaded and ran that file.

3. Using the windows registry editor. (Modify at your own risk, take a back-up before modifying):

  • Browse to HKEY_CLASSES_ROOT\SAS.Program.701\shell\OpenwithSAS940\command
    • Change value to:
      • "C:\Program Files\SASHome\SASFoundation\9.4\core\sasexe\sasoact.exe" action=Open datatype=SASFile filename="%1" progid=SAS.Application.940
  • Browse to HKEY_CLASSES_ROOT\SAS.Program.701\shell\Open\command
    • Change value to:
      • "C:\Program Files\SASHome\SASFoundation\9.4\core\sasexe\sasoact.exe" action=Open datatype=SASFile filename="%1" progid=SAS.Application.940
BrNiel
SAS Employee

Here is one other method of resolution that has worked for me in stubborn situations before (you may need I.T. assistance), but doesn't require quite so many edits to the registry.  Again, always back up the registry before, just in case!

 

  1. Open regedit, as that Windows User having the issue
    1. Navigate to the "HKEY_CLASSES_ROOT" registry node, then look for the ".sas" folder underneath it
    2. Look at the Data value for the "(Default)" key
      1. Make sure it is set to "SAS.Program.701" - instead of the incorrect value of "sas_auto_file"

 

  1. Close regedit and go back out to your Windows Explorer

 

  1. Right-Mouse click on any .SAS file, and choose the 'Open With' option
    1. You should now see 'The SAS System for Windows' program (with the grey triangle) in the list
      Note: Select the checkbox option to "Always use this program"

Now - if the issue is with any other file type other than .sas - note the folder name underneath each file type on the left (expand the node) - there is a pattern in which the folder name equates to that Data Value for the "(Default)" Key.

 

So, for example instead of 'SAS.Program.701', for a .sas7bdat file, you would specify 'SAS.DataSet.701'.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 5749 views
  • 1 like
  • 4 in conversation