Chapter Contents

Previous

Next
SAS Companion for UNIX Environments

Selecting a Mode of Execution

UNIX is a multitasking system, so you can run multiple processes at the same time. For example, you can have one process running in the foreground and three in the background. A foreground process executes while you wait for the prompt; that is, you cannot execute additional commands while the current command is being executed. After you enter a command, the shell starts a process to execute the command. After the system executes the command, the shell displays the prompt and you can enter additional commands. A background process executes independently of the shell. After you enter a command, the shell starts a process to execute the command and then issues the system prompt. You can enter other commands or start other background tasks without waiting for your initial command to execute. You can run the SAS System in the foreground or in the background.

Note:   Both the C shell and the Korn shell include commands that allow you to move jobs among three possible states: running in the foreground, running in the background, and suspended.  [cautionend]

You can run SAS in the SAS windowing environment, in interactive line mode, or in batch mode.

Windowing environment
You interact with SAS through windows using your keyboard, mouse, pull-down menus, pop-up menus, and icons. The windowing environment includes, but is not limited to, the Explorer, Program Editor, Output, Log, and Results windows. Explorer is a windowing environment for managing basic SAS software tasks such as viewing and managing data sets, libraries and members, applications, and output. The SAS Explorer is a central access point from which you can

The Program Editor, Log, and Output windows enable you to edit and execute SAS programs and display output.

If you want to use the windowing environment, you can start your SAS session as a foreground process or as a background process (by adding an ampersand (&) to your SAS command line).

Interactive line mode
You enter SAS statements line by line in response to prompts issued by the SAS System. SAS reads the source statements from the terminal as you enter them. DATA and PROC steps execute when

To use interactive line mode, you must run SAS in the foreground.

Batch mode
To run SAS in batch mode, you specify your SAS application name in the SAS command. You can run batch mode in the foreground, in the background by specifying an ampersand at the end of the SAS command, or submit your application to the batch queue by using the batch, at, nohup, or cron UNIX commands. If you start your application with one of these UNIX commands, then you log off of your system and your application will complete execution. If your application contains statements that start an interactive procedure such as FSEDIT, then you need to run your batch application in the foreground.

Ask your system manager which interface or mode of operation is the default at your site.


Chapter Contents

Previous

Next

Top of Page

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