Chapter Contents


Doing More with SAS/ASSIST Software

Saving Source Code to an External File

SAS/ASSIST software creates source code, with descriptive comments, each time you perform a task. In the "Saving Source Code for Editing and Re-execution" chapter of Getting Started with the SAS System Using SAS/ASSIST Software, you learned how to save source code to a SAS catalog. This section describes how to save source code to an external file.


  1. Use the Tasks window to access the desired SAS/ASSIST task.

  2. Make task window selections. You do not need to run the task in order to save the source code.

  3. Follow this selection path:

    View source
    The View SAS Program window appears with the source code for the report.

  4. Follow this selection path to save the source code to an external file:

    Save As File
    The Save As window appears.

  5. If appropriate to your operating environment, select a folder or directory in which to save the file. Type the filename in accordance with the conventions of your operating environment.

  6. Select OK. If the external file already exists, a message appears prompting you to type R to replace the existing file with the new file, to type A to append the new file to the existing file, or to type C to cancel and not save the program to the external file. Type the letter corresponding to the desired action and press ENTER.

  7. The View SAS Program window reappears with a message indicating the number of lines written to the external file.

Note:   If you have saved a task (catalog type ASSIST) using Save from the task window's File menu, you can write the saved program to an external file by typing F in the Cmd field to left of the task in the Result Manager window and pressing ENTER.  [cautionend]

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.