space
Previous Page | Next Page

Creating the SAS/SHARE Server Environment

UNIX: Creating the Server Environment


Assigning the Server a User Account

Rather than run the server process under root, assign a specific user account to the server process. Identify all SAS libraries that will be shared. Consider the appropriate file permissions that should be granted based on both the server and user account access. At minimum, the server account will need read and write permissions to the SAS libraries that it shares. By default, the processes that are initiated from /etc/inittab and /etc/rc will start under root ownership.


Starting a Server Manually

You can invoke SAS and start a server manually by using a UNIX script command. Here is the command line syntax used to invoke SAS and start a server:

 nohup sas -sysin sas-input-file -noterminal -logparm "write=immediate" 
-log "/u/system/server%W.log" -logparm "rollover=auto" &

nohup

causes the associated SAS process to ignore HUP or HangUp signals that are sent from the operating system.

sas

specifies a site-specific path to the SAS executable that initiates the process.

-sysin sas-input-file

specifies the file that contains the SAS statements to start a server. For information about the content of this file, see Managing a SAS/SHARE Server (Server Administrators).

-noterminal

specifies that no physical terminal is associated with this process.

-logparm "write=immediate"

writes server log messages to the server log immediately (without buffering).

-log "/u/system/server%W.log"

directs all log messages to the log file that is named by replacing %W with the current numeric week of the year.

For example, server02.log identifies a log that was generated during the second week of the year.

-logparm "rollover=auto"

if the pathname of the log file changes (for example, when %W is used to name weekly logs), the log is automatically saved in the current file, and a new file is opened to store the new content. For details, see LOG system option and SYSIN system option in the SAS Companion for UNIX Environments, and LOGPARM system option and TERMINAL system option in SAS Language Reference: Dictionary.

& (ampersand symbol)

allows the SAS process to run in background mode in the UNIX operating environment.

The following is an example of a SAS command that invokes SAS and starts a server:

 nohup /u/system/sas -sysin /u/system/startsrv.sas -noterminal -logparm 
"write=immediate" -log "/u/system/server%W.log" -logparm "rollover=auto" &


Starting a Server Automatically

You can configure a SAS/SHARE server to start automatically whenever the UNIX machine that the server runs on is re-started. The UNIX system administrator can insert the script command (outlined in Starting a Server Manually) into the last portion of either the /etc/inittab or /etc/rc UNIX system files. For a typical script command, see Starting a Server Manually.

Note:   The nohup parameter should be omitted from the server's UNIX script command when it is part of the /etc/inittab or /etc/rc system file.   [cautionend]


Setting SAS System Performance and Logging Options

The following options affect the operation of the server:

BUFNO=

specifies the number of buffers to use for SAS data sets. The default is 1.

BUFSIZE=

specifies the permanent buffer size for an output SAS data set. The default is 0.

LOG=

specifies a destination to which the SAS log is written in batch mode.

MEMSIZE=

specifies a limit on the total amount of memory that SAS uses at any one time. The default is 32M.

For more information, see the chapter about system options in the SAS Companion for UNIX Environments.

For best performance, run the server on the machine where the shared SAS data resides. Do not run production servers in SAS foreground mode using the SAS windowing environment.

Note:   The windowing environment supports a maximum of 32,767 lines that can be written to the SAS log.  [cautionend]

space
Previous Page | Next Page | Top of Page