OpenVMS: Creating the Server Environment

Overview of Tasks to Create the Server Environment

You must perform the following tasks to create the server environment under an OpenVMS operating environment:
  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.

Setting SAS System Performance and Logging Options

The following SAS system options can be used to tune server performance and logging:
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. The default is SYS$PRINT (the default printer queue) or SYS$OUTPUT (the default output stream).
LOGPARM=
controls when SAS log files are opened and closed.

Creating a Command File for the Server

The command file performs any necessary process setup and invokes SAS. SAS runs a program that contains any setup that is needed for the server environment and then runs the PROC SERVER statement. For details about how to write a SAS program to start a server, see Managing a SAS/SHARE Server (Server Administrators) .
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
ALTLOG=SYS$OUTPUT
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 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. For this information, see Executing the Command File for the Server.
COMAMID=access-method
specifies the access method that the server uses to communicate with its clients. Assign TCP to the COMAMID= option.
sas-input-file
specifies the name of the file that contains the SAS statements to start the server. For details about writing a program to start a server, see Managing a SAS/SHARE Server (Server Administrators).

Executing the Command File for the Server

You can execute the command file for a server by using the SUBMIT command to submit a batch job. The batch job creates a detached process, which then executes the command file.
Use the SUBMIT command to start the server during start-up of your OpenVMS operating environment or start a server by executing a command.
Because of its nature, a server usually runs in a detached process. Instead of executing 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.
Here is the syntax of the SUBMIT command:
$ SUBMIT/USER=user-name batch-filename
user-name
specifies the name of the user that executes the batch job that creates the process in which the server runs.
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 usually consists of one RUN command. For example:
$ RUN /DETACHED             -
      /AUTHORIZE            -

      /INPUT=command-input-file   -
      /OUTPUT=command-output-file  -
      /ERROR=error-file   -
      /PROCESS_NAME=process-name   -
      /SYS$SYSTEM:LOGINOUT.EXE
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 might fail.
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 might fail.
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 might fail.
process-name
specifies a descriptive name of the detached process in which the server executes. This value can be the same as the server name that you specify for the SERVERID= option in the PROC SERVER statement.