Indiana University
University Information Technology Services
  
What are archived documents?

During a SAS session, how do I redirect the work files?

During a SAS session, SAS creates interim work files (scratch files) which the system normally then deletes at the end of the session. Depending upon the size of your job, SAS work files can become quite large and can even exhaust your disk space. If this happens, your job will be terminated with a message indicating that you have insufficient work space to complete the job.

To avoid filling up your disk space with work files, you can redirect the SAS work files (work data library) to a temporary disk space using the -work parameter.

When working with SAS for Windows from a personal workstation, you can edit the config.sas file in the SAS directory to change the path specification for the -work parameter.

When running your job from a shared Unix system (e.g., Libra at Indiana University), you can redirect your work files to the /tmp directory, which is set up with a large file storage capacity. Files from this disk are purged periodically by the system administrator to avoid filling up the disk. It is a good habit to use the the -work parameter whenever you execute a SAS job from a shared Unix system.

For example, suppose you have a file on your Libra account called test.sas that requires a fairly large amount of disk space to write the work library. To redirect the work library to /tmp during SAS execution, use the following command:

sas -work /tmp test.sas

When the program finishes, the resulting .log and .lst files will be stored in the default directory, and SAS will have removed its temporary work files from the /tmp directory.

Note: On most Unix systems, the /scr directory is also is available for redirecting work files or for temporarily storing large files.

Note: UITS will retire Libra in spring 2009. Accounts are available on Quarry, a general-purpose Unix computing environment. For more, see About the Libra retirement.

For more information about statistical and mathematical software, email the UITS Stat/Math Center, visit the center's web page, or phone 812-855-4724 (IUB) or 317-278-4740 (IUPUI). The center is located in Bloomington at 410 N. Park Avenue, and is open for consultation by appointment Monday-Friday 9am-5pm.

Also see:

This is document addl in domain all.
Last modified on December 04, 2008.
Please tell us, did you find the answer to your question?