Chapter Contents

Previous

Next
SAS/SHARE User's Guide

OpenVMS: Creating the Server Environment

You must perform the following steps to create the server environment on an OpenVMS host:

  1. Set SAS performance options.

  2. Create a command file for the server.

  3. Run the command file for the server.

  4. Run the SUBMIT command to create the server.

  5. Declare the server in the DECnet database.


Setting SAS System Performance Options

The following SAS system options can be used to tune server performance:

BUFNO=n | nK | nM | nG | MAX | MIN | hex
specifies the number of buffers to use for SAS data sets. The default is 1.

For SAS/SHARE, setting the value of the BUFNO= option too high may hurt performance by using too much memory because SAS/SHARE may be accessing multiple files at once.

Under OpenVMS, there is no maximum number of buffers you can allocate, except for memory constraints. However, it is unusual to specify more than 10. See All Hosts: Setting SAS System Performance Options for more information about the BUFNO= option.

BUFSIZE=n | nK | nM | nG | MAX | MIN | hex
specifies the permanent buffer size for an output SAS data set. The default is 0.

Under OpenVMS, the value of the BUFSIZE= option can range from 0 to the host maximum. The value is always rounded up to the next multiple of 512 bytes. If the value is 0, the engine picks a value based on the size of the observation.

You may want to vary the value of the BUFSIZE= option if you are trying to maximize memory usage or the number of observations per page. See All Hosts: Setting SAS System Performance Options for more information about the BUFSIZE= option.

UNBUFLOG
specifies that the SAS log file (which was specified in the ALTLOG= option) is opened so that other processes can read it, and that each line written to the log is then immediately transferred to disk. This option enables you to examine the server SAS log while the server is running. The UNBUFLOG option must be specified in a SAS command or in a SAS configuration file.

Note:   The overhead that is incurred by the UNBUFLOG option may degrade the performance of a busy server.   [cautionend]

A typical SAS configuration file follows:

bufno=2
bufsize=65024
unbuflog

See SAS Companion for the OpenVMS Operating Environment for more information about these SAS system options.


Creating a Command File for the Server

The command file performs any necessary process setup and invokes the SAS System. The SAS System runs a SAS program that contains any setup that is needed for the server environment and then runs the PROC SERVER statement. See Starting and Managing a SAS/SHARE Server for details about how to write a SAS program to start a server.

Use the following syntax to create a command file for a server:

$set noon
$!
$ SAS /ALTLOG=SYS$OUTPUT
      /ALTPRINT=SYS$OUTPUT
      /COMAMID=access-method
      sas-input-file
$!
$exit

where

ALTLOG=SYS$OUTPUT and ALTPRINT=SYS$OUTPUT
specifies the files to which SAS writes copies of the log and the procedure output, respectively. These copies of the log and the procedure output are in addition to the default .LOG and .LIS files. Specifying /ALTLOG=SYS$OUTPUT and /ALTPRINT=SYS$OUTPUT causes all SAS output from the server process to be written to the SYS$OUTPUT file, which produces a single file that contains both the OpenVMS record of the process execution and the SAS record of the server execution.

How the logical name SYS$OUTPUT is defined depends on how the command file is executed. See Executing the Command File for the Server for this information.

access-method
specifies the access method that the server uses to communicate with its clients. Assign either TCP or DECNET to the COMAMID option.

sas-input-file
specifies the name of the file that contains the SAS statements to start the server. See Starting and Managing a SAS/SHARE Server for details about writing a program to start a server.


Executing the Command File for the Server

You can execute the command file for a server in one of two ways:


Executing the SUBMIT Command to Start the Server

Use the SUBMIT command to start the server during start-up of your OpenVMS system or start a server by executing a command.

Because of its nature, a server typically runs in a detached process. Rather than execute the RUN command directly during system start-up or at other times, you should execute the RUN command in a batch command file that you submit with the SUBMIT/USER= command. This ensures that the server is created with appropriate privileges and file access authority. The SUBMIT/USER= command requires the CMKRNL privilege.

The syntax of the SUBMIT command is

$ SUBMIT/USER=user-name batch-filename

where

user-name
specifies the name of the user that executes the batch job that creates the process in which the server runs. The user must have the SYSNAM privilege to start the server when using the DECnet access method.

batch-filename
specifies the batch job to be executed. The purpose of the batch job is to create a detached process in which the server executes. Therefore, this batch job typically consists of one RUN command, shown as follows:

$ RUN /DETACHED             -
      /AUTHORIZE            -

      /INPUT=command-input-file   -
      /OUTPUT=command-output-file  -
      /ERROR=error-file   -
      /PROCESS_NAME=process-name   -
      /SYS$SYSTEM:LOGINOUT.EXE

where

command-input-file
specifies the name of the file that contains the commands that are executed in the detached process. For details about the contents of this file, see Creating a Command File for the Server.

Note:   This file must also contain device or directory specifications. If the file does not contain these specifications, then the detached process may fail.  [cautionend]

output-file
specifies the name of the file to which the record of the execution of the detached process is written. This file should be accessible to any administrator of the server and to developers of applications that use the server. This file contains any information that is written to SYS$OUTPUT.

Note:   This file must also contain device or directory specifications. If the file does not contain these specifications, then the detached process may fail.  [cautionend]

error-file
specifies the file to which OpenVMS errors are written. This should be accessible to any administrator of the server and to developers of applications that use the server. This file contains information that is written to SYS$ERROR.

Note:   This file must also contain device or directory specifications. If the file does not contain these specifications, then the detached process may fail.  [cautionend]

process-name
specifies a descriptive name of the detached process in which the server executes. This value may be the same as the server name that you specify for the SERVERID= option in the PROC SERVER statement.


Declaring the Server in the DECnet Database

Use this method to start the server automatically when the first client accesses it. The advantage of this method is that you do not have to explicitly start the server. However, the disadvantage is that this method causes the first LIBNAME statement or the first PROC OPERATE statement that accesses the server to operate more slowly than it would with an explicitly started server. Notify users of the server's delayed response to these statements.

Use the Network Control Program (NCP) syntax to declare the server as a known object. For example,

$RUN SYS$SYSTEM:NCP

NCP> DEFINE OBJECT server-name NUMBER 0 USER user-name -

_PASSWORD user-password FILE full-filename-specification -

_PROXY NONE

where

server-name
specifies the name by which the server is known to the users whose SAS programs access data through it. This name must match the value that is specified for the SERVERID= option in the PROC SERVER statement and for the SERVER= option ino the LIBNAME statements in SAS programs that start and access libraries through the server.

user-name
specifies the name of the user whose User Identification Code (UIC) default directory and file protection is used to create the process in which the server executes. The user must have the SYSNAM privilege to start the server.

full-file-specification
specifies the name of the command file for the server. For a description of the contents of this file, see Creating a Command File for the Server. If the command file for the server is named SYS$SYSTEM:server-name.COM, you can omit the FILE parameter.

When you use this method to execute the command file for the server, the logical name SYS$OUTPUT is defined to the file SYS$LOGIN:NETSERVER.LOG.

It is possible to have the DECnet network automatically start the object without first issuing the NCP DEFINE command, but this method is not recommended for starting a server. Instead, you should use the NCP DEFINE command to automatically start the server. For more information about automatically starting a server without using the NCP DEFINE command, contact SAS Institute Technical Support.


Chapter Contents

Previous

Next

Top of Page

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