SAS 9.1 Companion For Unix Enivronments

Starting SAS Sessions in UNIX Environments

Invoking SAS

The command that you use to invoke your SAS session is defined during the SAS installation process and is added to the list of commands that are recognized by the operating environment. Ask your system administrator what the command is that invokes SAS at your site. At many sites, the command to invoke SAS is simply sas , but a different command might have been defined during the SAS installation process at your site. This documentation assumes that SAS is invoked by the sas command.

Note  

Before you start your SAS session, review the different techniques for interrupting and terminating your SAS session (see "Interrupting or Terminating Your SAS Session in UNIX Environments" on page 22). Also, if you cannot stop your session, contact your system administrator; do not turn off your machine, especially if your machine is part of a network.

Syntax of the SAS Command

The general form of the SAS command is as follows :

sas < -option1 -option-n >< filename >

You can use these arguments with the SAS command:

- option1 ... - option-n

filename

Example: Invoking an Interactive SAS Session

To invoke an interactive SAS session, without specifying any SAS system options, enter

sas

The execution mode will depend on your default settings. For more information, see "Selecting a Method of Running SAS in UNIX Environments" on page 6.

To specify the NODATE and LINESIZE system options, you could enter

sas -nodate -linesize 80

To run a SAS program and pass parameters to it, enter

sas -sysparm 'A B C' progparm.sas

The value A B C is assigned to the SYSPARM macro variable, which can be read by the program ProgParm.sas.

What If SAS Does Not Start?

If SAS does not start, the SAS log might contain error messages that explain the failure. However, error messages that SAS issues before the SAS log is initialized are written to the SAS console log.

Under UNIX, the STDOUT fileref specifies the location of the console log.

Категории