Chapter Contents

Previous

Next
SAS Companion for the OS/2 Environment

Submitting SAS Code

The SAS System under OS/2 provides several methods for you to submit your SAS programs for processing. SAS supports a variety of work strategies, whether you run SAS interactively or in batch, and in conjunction with other OS/2 programs or alone.


Submitting Code from the Program Editor

You issue the SUBMIT command to submit SAS code that you have typed into the Program Editor. SAS provides several ways to issue the SUBMIT command:


Submitting Code from the SAS Text Editor

SAS enables you to submit SAS code that you have typed into the SAS text editor (NOTEPAD). To invoke the SAS text editor select the Tools menu and then select Text Editor. SAS provides several ways to submit the code in the text editor:


Submitting Code from the Clipboard

You can submit SAS code that you copied from another OS/2 application (such as an editor or word processor) or from SAS System Help. When you copy text from another OS/2 application, that text is stored in the OS/2 clipboard.

From the Run menu in the Program Editor window, select Submit clipboard. The code is submitted from the clipboard directly to the SAS System (without appearing in the Program Editor), and notes and results are sent to the SAS Log and Output windows, respectively. You can still issue the RECALL command (or press F4) to recall the submitted program into the Program Editor.

You can also use the GSUBMIT command to submit SAS code that is stored in the clipboard. For more information, see GSUBMIT.


Submitting Code by Dragging and Dropping

You can drag SAS programs from other OS/2 applications onto an open SAS session and submit them. You can also drag files that contain SAS code and drop them on an open SAS session to submit them.

Dragging Text from Other Windows

If you drag text from another OS/2 application or from a SAS window to the Program Editor, that text is moved or copied to the window by default. It is not submitted until you press F8 or issue the SUBMIT command.

Dragging Files in an Interactive Session

Using the My Favorite Folders window, you can access files that exist outside the SAS windowing environment. Files that contain SAS code can be dragged and dropped into your interactive SAS session for execution. The My Favorite Folders window can be accessed from the View menu.

If you drag a file that contains SAS code and drop it on the Program Editor window, that code is included in the window (but not submitted). If you drop the file on the Log or Output window or on a minimized SAS session, the code is automatically submitted.

Dragging and dropping the file C:\MYPROG.SAS onto a window (other than the Program Editor) 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 once by selecting a group of files that contain SAS programs and then dragging and dropping them on the open SAS session. The order in which the programs are run when they are submitted as a group is determined by OS/2. Therefore, if order is important, you should drag and drop each program file separately.

Note:   If the SAS System 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.  [cautionend]

Dragging Files to Start a Batch Session

If you drag a file that contains SAS code and drop it on a SAS program icon, SAS starts in batch mode and submits the code for processing.


Submitting Code Stored in Registered SAS File Types

During installation, the SAS Setup program registers certain file types with OS/2 to start specified actions when you double-click on those types of objects. For example, files with a file extension of .SS7 or .SAS are registered as SAS programs. These registered file types are displayed in OS/2 with a special icon, as shown here:

[IMAGE]

When you double-click on a file with this extension (or with this icon) the SAS System is invoked and the contents of the file are included (using the INCLUDE command) in the 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 on the Submit tool). If you already have a SAS session running, double-clicking on a file begins a second SAS session; it does not use the already-existing session.


Chapter Contents

Previous

Next

Top of Page

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