BookmarkSubscribeRSS Feed
kpberger
Obsidian | Level 7

Hi all,

I have always included a formatting step when processing my data sets. Something to the effect of:

 

libname library "C:\Users\me\Desktop";

proc format library=library; value xf 1="First" 2="Second" 3="Third"; run; data want; set have; format x xf.; run;

 

And then I save the data set into the same "library" directory. A "formats" folder appears in this directory and has the xf format in it. I've then always been able to open my data sets by double clicking on them and they open just fine. Great.

 

Then, today, I must have done something because this no longer works. I can't open my data sets via double click. I can still open them with SAS code by specifying:

libname library "C:\Users\me\Desktop";
data want; set library.have; run;

 

What have I done? How can I turn back time to the glorious days of mindless double-clicking? Much appreciated.

 

18 REPLIES 18
JackHamilton
Lapis Lazuli | Level 10
The default value for fmtsearch should be (WORK LIBRARY). What does "proc options option=fmtsearch; run;" show if you run it at the beginning of a session before your OPTIONS FMTSEARCH?

Perhaps someone has added their own FMTSEARCH option in a configuration file somewhere, and omitted the LIBRARY catalog. It's safest to use the INSERT or APPEND option when setting FMTSEARCH.
kpberger
Obsidian | Level 7

It returns "FMTSEARCH=(WORK LIBRARY)".

 

I had to edit the original post. I can in fact open the data sets with SAS code as normal; I just can't double-click to open them.

ballardw
Super User

Which environment are you working in? Display manager, SAS University Edition, Enterprise Guide, connected to a server where an admin may have changed a setting?

Click on where? In a SAS file menu? on the actual desktop?

 

Have you tried restarting SAS and see if this happens in a new session?

smantha
Lapis Lazuli | Level 10

1. Is there an error message you get when you open. Options nofmterr; will allow you to open SAS datasets with no formatting. You can follow the other options for format search as suggested by the community. 

2. Are you trying to open the sas dataset from the physical location(i.e. the folder) itself by double clicking and it is not opening then there is a display manager setting that is messed up. I do not remember this option off the top of my head.

 

 

kpberger
Obsidian | Level 7
I get this error message: "ERROR: Unable to open the table TMP1.have. TMP1.have cannot be opened. Do you want to select a different table to open?" When I press cancel the log then list an error for each of the formats I have previously assigned to variables in the data set: "ERROR: Format xf not found or couldn't be loaded for variable x." I can use the option nofmterr, but it only lasts as long as the current session and the data set doesn't load in with the formats.

I am trying to double-click from Windows Explorer.
kpberger
Obsidian | Level 7
I'm working in SAS 9.4. It's on my work computer that no one else has access to. I am trying to double click from Windows Explorer, and I have restarted SAS many times. Thanks!
smantha
Lapis Lazuli | Level 10

Can you set the options nofmterr in SAS sas config file and try. How is the behavior when you double click on it ? Is there a flash like it is trying to open and then nothing happens?

kpberger
Obsidian | Level 7
So unfortunately I can't change the config file: it's on my work computer and I don't have administrator access to change it. But if I specify nofmterr in an individual SAS session it allows me to open the file, but it still doesn't load with the formats. And it only lasts as long as the SAS session. The formats used to load in fine. Maybe it's something about SAS no longer recognizing the working directory as the "library" directory?
smantha
Lapis Lazuli | Level 10

When you right click on SAS Icon on your laptop you can see where sas is launched from and the corresponding config file can be changed to any file you want. Can you try doing that?

kpberger
Obsidian | Level 7
Sorry, how do you change what configuration file SAS references? I see where SAS is launched from, but I don't understand how that connects to specifying a new configuration file. Thanks!
Ksharp
Super User
Did you try
options nofmterr ;
kpberger
Obsidian | Level 7
Yes, but it doesn't fix the problem really. After opening SAS and setting nofmterr I can double-click the data set from Windows Explorer and it will load in the current SAS session, but once I close SAS I still can not open the data-set by double clicking. Also, when the data set does open it opens without the formats.
smantha
Lapis Lazuli | Level 10

"C:\Program Files\SASHome\SASFoundation\9.4\sas.exe" -CONFIG "C:\Program Files\SASHome\SASFoundation\9.4\nls\en\sasv9.cfg"2020_06_10_15_04_31_Clipboard.png

kpberger
Obsidian | Level 7
I see, thank you for clarifying. Unfortunately, I don't have administrator privileges to change that either. I can file a ticket with IT, but I'm not sure this will solve my whole problem. I will be able to open the files via double-click, but they still won't load in with the formats. That is what happens when I specify nofmterr in a SAS session. For some reason SAS doesn't recognize anymore that the "formats" folder it needs is in the same folder as the data set.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 18 replies
  • 2872 views
  • 0 likes
  • 5 in conversation