Chapter Contents |
Previous |
Next |
SAS Companion for the OS/2 Environment |
Starting from WarpCenter |
To start SAS from the WarpCenter:
Starting from Custom Shadows or Program Items |
For information about creating shadows, see your OS/2 documentation. Starting the SAS System shows an example of a SAS item that has been accessed from the SAS System folder.
Starting from the Command Prompt in an OS/2 Window |
When starting the SAS System using a command line, you might want to specify the SAS configuration file location using the CONFIG system option, even if you use the default name of SASV8.CFG, to ensure that the SAS System uses the configuration file that you want. For more information about how the SAS System searches for the configuration file, see How the SAS System Finds and Processes Configuration Files.
The WORK and SASUSER system options are specified in your default SASV8.CFG file as !sasfolder\sasuser and !sasfolder\SASWORK, where !sasfolder is set to the location of your SAS program files. When these options are set, the WORK and SASUSER data libraries reside in the specified paths regardless of the path from which you invoke SAS.
You can start either an interactive SAS session or a
batch SAS job by opening an OS/2 window
and typing
SAS
at the command
prompt. For example, the following command starts an interactive session,
specifies the page size and line size, and indicates the location of the SAS
configuration file:
C:\SAS\SAS.EXE -LS 80 -PS 60 -CONFIG C:\SAS\SASV8.CFG
The following command starts a batch SAS job in a similar manner:
C:\SAS\SAS.EXE -SYSIN C:\SAS\PROGRAMS\PROG1.SAS -CONFIG C:\SAS\SASV8.CFG
Invoking the SAS System in Interactive Mode Compared with Batch Mode |
You can run windowing procedures, such as those associated with SAS/GRAPH, SAS/INSIGHT, and SAS/ACCESS software, in a batch SAS job. When the SAS System reaches a point in your program where interaction is required, it opens the main SAS window.
There are several ways to submit a batch SAS job:
Setting the Current Folder |
Under OS/2, the following rules are used to determine the working folder for the SAS System:
Note: If OS/2 cannot find the SAS.EXE file in the specified
folder, the folder specified in the SAS command still becomes the working
folder, and OS/2 searches for the SAS.EXE file by using the OS/2 PATH environment
variable.
For example, if you specify the following command, C:\SAS is the working folder, regardless of whether the SAS.EXE file is actually in that folder:
C:\SAS\SAS.EXE -CONFIG C:\SAS\SASV8.CFG
You can change the SAS working folder from within your SAS session. For more information, see Changing the SAS Current Folder.
Note: Do not confuse the SAS working folder with the
SASWORK data library. See WORK Data Library.
Sample SAS Session |
This section illustrates how to invoke the SAS System from Start Application, submit a sample SAS program, examine the program output, and end the SAS session. Starting the SAS System shows a possible configuration of the SAS program item in the Start Application menu. Double-click on The SAS System for OS/2, Version 8 to start the SAS System.
Submitting the Sample SAS Program shows the Program Editor and Log windows as well as a sample SAS program that is ready to be submitted. This program creates a SAS data set called ORANGES, which contains the results of a taste test that was conducted on four varieties of oranges. Then the program sorts the data set by the total test score and prints the data set.
Submitting the Sample SAS Program
Here is the SAS code that appears in the Program Editor window:
data oranges; input variety $ flavor texture looks; total=flavor+texture+looks; cards; navel 9 8 6 temple 7 7 7 valencia 8 9 9 mandarin 5 7 8 ; proc sort data=oranges; by descending total; run; proc print data=oranges; title 'Taste Test Results for Oranges'; run;
Once you submit the program, the output appears in the Output window, as shown in Looking at the Program Output.
The items in the menu bar at the top of the main SAS window change depending on the active window within the SAS session. In addition, you can access window-specific pop-up menus that offer the same menu choices. To access the pop-up menus, click the right mouse button in the window for which you want to see menus. Pop-up Menus in the Program Editor Window shows a series of menus in the Program Editor window. This series was generated by first clicking the right mouse button in the Program Editor window, then by selecting File and View.
Pop-up Menus in the Program Editor Window
When you are ready to end your SAS session, click on the title bar Close button (the small square icon in the upper-right corner of the main SAS window) and click on [OK] when the dialog box verifies your request.
Note: If you have disabled the Confirm
Exit of SAS option in the Preferences dialog box, your SAS session
ends without asking if you are sure that you want to end the session. For
more information about how to customize your SAS session, see Setting Session Preferences.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.