If you drop a file that contains SAS code onto the Enhanced Editor window or on the
Program Editor window, that code is included in the window (but not submitted). If you
drop the file onto the Log or Output window or on a minimized SAS session, the code is
When you minimize a SAS session, its icon appears on the Windows taskbar. You cannot
drop a file onto the taskbar. Instead, you can drag the file to the SAS icon on the taskbar
and hold it there, without releasing the mouse button. After about one second, the SAS
window resumes its normal size. Then you can drop the file onto the open SAS session.
Dropping the file C:\MYPROG.SAS onto a window (other than the Enhanced Editor or
Program Editor windows) of an open SAS session is the same as issuing this command:
gsubmit "%include 'c:\myprog.sas'";
You can submit more than one file at a time by selecting a group of files that contain
SAS programs and then dropping them onto the open SAS session. The order in which
the programs are run when they are submitted as a group is determined by Windows.
Therefore, if order is important, you should drop each program file separately.
If SAS is busy when you drop a SAS program icon, the dropped file is ignored. The only
indication that the dropped file was ignored is a warning beep.
Submitting Code Stored in Registered SAS File Types
During installation, the SAS Setup procedure registers certain file types with Windows
to invoke specified actions when you double-click those types of objects. For example,
files that have a file extension of .SAS are registered as SAS programs. These registered
file types are displayed in Windows with a special icon, as shown here:
When you double-click a file that has this extension (or that has this icon), SAS is
invoked and the contents of the file are included in the Enhanced Editor or Program
Editor window. The SAS code that is contained in the file is not processed until you
submit it (for example, by pressing F8 or by clicking the Submit tool). If you already
have a SAS session running, double-clicking a file begins a second SAS session; it does
not use the already-existing session.
SAS uses the default configuration file if you start SAS by double-clicking a registered
SAS file type, such as .sas or .sas7bpgm.
Interrupting Your SAS Session
You can click the circled exclamation point
in the toolbar or press CTRL+BREAK
to interrupt processing in your SAS session. Depending on what tasks SAS is performing
at the time of the interrupt, you can cancel submitted statements or cancel an upload or
download request. SAS prompts you with various choices (such as to continue the
interrupt or cancel it) in a dialog box.
Note: Depending on what tasks are in progress when you interrupt your session, SAS
can require several seconds to stop processing.
SAS also supports the common Windows methods of issuing interrupts: you can click
the Control menu icon and choose to close the application, or you can select Close from
the pop-up menu for SAS on the Windows Taskbar (or End Task from within the
Windows Task Manager). If you use either of these methods, SAS displays a dialog box
Interrupting Your SAS Session