As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Re-setting your work library on Unix - how and why

From sasCommunity
Jump to: navigation, search

There are several ways you can re-set your work library on Unix. The simplest way is when you are submitting the job, whether you are doing it at the command line or in batch, say in a .pbs (portable batch system) file you can simply add -work filename to your command.

For example:

sas -work /home/projdir/ademars

will reset my work library to be the directory ademars.

Why would you want to do this? What happens if your job crashes? Normally, the temporary files are deleted at the end of each job. However, if your job ends abnormally, say, it took longer than allotted and the system killed it. What happens to those temporary files? They may end up hanging around in the file set for your work directory, often a directory called tmp. This can be bad in two ways. It can eat up lots of space in that directory, a directory that you may not even realize exist or never give a thought and all of a sudden you're out of disk space. If this is shared space, it may make your system administrator unhappy because you are taking up a lot of space for no reason.

More important, to most people, your data may be extremely sensitive and now at least part of it is in a directory where who knows who can access it. Just to check, I went to a shared tmp space on one Unix cluster where I have access and just randomly printed some of the files I found there. I have no idea who the owners of those files are and they have no idea I am looking at their data.

So -- if you are working with confidential data, you should not leave things to chance. Set your work directory. Don't let the default do it.

Alternatively, you may wish to change the default directory. This assumes you have write permission to the sasv9.cfg file.

In the directory where SAS is installed, you'll find a sasv9.cfg file with the line

-work {some directory}  

for example

-work /tmp  

This may be setting the working directory as tmp space. You can change this to be something like

-work /var/tmp

which would be the individual user's tmp space. Of course, you can change this to any directory you want, it doesn't have to be tmp.