Chapter 1: Getting Started with SAS in UNIX Environments


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

  • specifies SAS system options to configure your session or X command line options. See Chapter 17, "System Options under UNIX," on page 311 and "X Command Line Options" on page 11 for more information. If you omit any options (either on the command line or in the configuration file), the SAS (or site-specific) default options are in effect.

filename

  • specifies the name of the file containing the SAS program to be executed. Specifying a filename on the SAS command invokes a batch SAS session. Omit the filename to begin an interactive session.

    If the file is not in the current directory, specify its full pathname.

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.




SAS 9.1 Companion for UNIX Environments
SAS 9.1 Companion For Unix Enivronments
ISBN: 1590472101
EAN: 2147483647
Year: 2004
Pages: 185
Authors: SAS Institute

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net