Hello All,
I got into a strange problem with my SAS session. Everything is fine right after I run the code and created data. However, when the SAS session is idle for a long time (say overnight), then I can still see the work directory file name and file size. But there is no data when I click on the data file to open it. Could anyone tell me what is going on?
Thanks.
Zack
Are you using SAS UE or SAS Studio? If so, the session may be restarting without you realizing it due to timeout or connectivity issues.
Either way, save your work to a permanent library.
You can see the settings for timeouts in preferences and change it, but it's still a risk in a browser based app. If you refresh the page accidentally you may lose the connection entirely.
@rci_zackyoung wrote:
Hello All,
I got into a strange problem with my SAS session. Everything is fine right after I run the code and created data. However, when the SAS session is idle for a long time (say overnight), then I can still see the work directory file name and file size. But there is no data when I click on the data file to open it. Could anyone tell me what is going on?
Thanks.
Zack
Thanks so much for help. It's a regular sas license, not UE or SAS Studio. The strange thing is that it also starts happening recently. When you say preferences you mean I should go to SAS tool bar Tools -> Options -> Preferences but I cannot see timeout choice there. Thanks again.
@rci_zackyoung wrote:
Thanks so much for help. It's a regular sas license, not UE or SAS Studio. The strange thing is that it also starts happening recently. When you say preferences you mean I should go to SAS tool bar Tools -> Options -> Preferences but I cannot see timeout choice there. Thanks again.
Are you running SAS on your PC? Or on some larger company wide machine, such as a Unix machine or a Windows Server machine?
In either case is there any software running that will "clean" the directory where the WORK libraries live?
IT departments often have periodic cleanup jobs on desktop PC's active, to prevent overflows and the accumulation of unwanted/undetected data buckets whith personal information (GDPR!). Since desktop SAS uses the temporary spaces where such programs are most active, talk to your IT people to get more information, and create data that you want to keep outside of your WORK.
@rci_zackyoung wrote:
Thanks so much for help. It's a regular sas license, not UE or SAS Studio. The strange thing is that it also starts happening recently. When you say preferences you mean I should go to SAS tool bar Tools -> Options -> Preferences but I cannot see timeout choice there. Thanks again.
When something odd starts happening then often the first thing is to determine what may have changed.
If this is involved in an organization that sets rules and security for your computer then you likely really need to check with the staff that does such things to find what "recent changes" to protocols or software have been made.
MY IT department added a "security" program that made the SAS online help links become "network errors" for locally installed Help files.
If you are using a remote SAS server then firewall timeout rules would explain the behaviour you are seeing. Talk to your SAS administrator if you think this might be happening.
Thanks for helping but I am not using remote SAS server
Do you have some type of clean up job that removes "old" files from the disk where your WORK directory is?
No I don't have that. This also never happened before. Thanks
Hi, Zack
Does your "there is no data" mean that the file is missing, or is there a file but no data and a message when opening the dataset?
And where is your work library?
Is "%TEMP%\SAS Temporary Files"?
Hi Kawakami,
Thanks for help. The situation is like this: I started a SAS session and created some data file in my work directory, and then I kept my SAS session idle for a relatively long time (say overnight). The next time when I looked at my work directory, all the file names are still there with file size as if the datafile is still there. But when I click on the file name it says "the file does not exist" and when I go to the SAS temporary Files directory, I cannot see any file there.
Isn't the SAS Temporary folder a network drive, right?
By Windows specification, network drives are disconnected after 15 minutes of idle time (by default). This is the case when there is a red cross in the PC list of Explorer. (See below)
This restores the connection if you access it in Windows Explorer, but SAS does not automatically reconnect to the disconnected network drive in the session, so you will not be able to access your files.
I suspect this may be the case.
Do you know if the whole work folder is gone, the sas data sets are gone, or SAS somehow lost contact with the work library?
If the data set isn't there when you try to open it from the SAS Explorer, then submit this string in the program editor:
%put %sysfunc(getoption(work));
it will write the full path to the current work folder in the log, like:
C:\Users\erlu\AppData\Local\Temp\SAS Temporary Files\_TD14580_C25865_
Try also to create a new data set in the work folder, and check if that works, and the new data set becomes visible in the SAS Explorer.
Then copy the path down to, but not including, the current folder (_TDnnn...) and paste it into Windows Explorer, Check content of the current work folder, and see when the current folder was created. Check also wherher there are any older _TDnn- folders in the SAS Temporary Files-folder. Finally check if any of the older folders contains the data set you see in SAS Explorer.
It will not explain the weird behaviour, but at least put some light on what really happens overnight on your computer.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.