Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

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 on 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 SASV9.CFG 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., Quarry 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 Quarry 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, you can also use the /scr directory for redirecting work files or for temporarily storing large files.

For more 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.

This is document addl in domain all.
Last modified on May 04, 2011.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.