SAS RFC Server on UNIX

Overview

In a UNIX environment, the SAS RFC Server is installed in the !SASROOT/saspgm/dbi/bin directory. You must add this directory to the PATH environment variable and add the location of the SAP shared libraries to the appropriate environment variable. For more detailed information about how to set up the environment variables, see Post-Installation Instructions for SAS/ACCESS Interface to R/3.

Starting the SAS RFC Server

To start the SAS RFC Server in a UNIX environment, use sasrfc_server command. The command syntax follows:
sasrfc_server [-d 0|1|2|3|4|5|6] [-n name] [-p port_number] [-w workdir] [-V variant] [-help] [-c dialog_compat_port] [-b "-p port_number -V variant_name -R report_name"] [-B number_of_bytes] [-S "-a program_id -g gateway_host -x gateway_service"]
Optional parameters are enclosed in brackets [].

Stopping the SAS RFC Server

To stop the SAS RFC Server in a UNIX environment, use the sasrfc_server command with the -k parameter. Here is the command syntax:
sasrfc_server [-k] [-p port_number]
Enclose optional parameters in brackets [].
For information about other setup requirements for using the SAS RFC Server Monitor, see the SAS RFC Server Monitor help in the SAP NetWeaver Portal.

SAS RFC Server Command Parameters

Here are the parameters for the SAS RFC Server command for UNIX.
n-d
specifies the diagnostic level and whether to run the server as a daemon process or as an application. The server is run as a daemon process when you specify -d n (where n=0) or when you do not specify the -d n option. After successful initialization, all messages are routed to syslog. When you specify the -d n option (where n= any number between 1 and 6), the program runs as an application and messages are routed to standard error. Higher diagnostic levels route more detailed messages to standard error.
-k
stops the service.
-n name
specifies the name of the service to distinguish multiple daemon processes. For example, a test service might be started as -n test.
-p port_number
identifies the port number where the service listens. The default is 6999.
-w workdir
specifies the working directory. For example, if your working directory is tmp, use -w /tmp to specify this option.
-V variant
specifies the report variant that is assigned to this server. You must assign a report variant for each SAS RFC Server that accesses an SAP application server in batch mode. The variant parameter G_DEST specifies a unique destination to call back to the SAS RFC Server.
-help
specifies that you want to display command line Help.
-c dialog_compat_port
identifies the option that, when specified, runs the SAS RFC Server in SAS 8 compatibility mode on the port indicated by the dialog_compat_port parameter. The port number must be different from the one that is used for SAS 9 requests. If you omit the -c option, no dialog compatibility is available.
-b "-p port_number -V variant_name -R report_name"
enables batch compatibility so that you can process SAS 8 ACCR3 requests while you are using a SAS 9 SAS RFC Server. You must use the double quotation marks in the batch compatibility option to separate batch compatibility parameters from the SAS 9 parameters that use the same syntax. The port parameter is optional. If you omit it, the port number defaults to 6995. The report variant parameter is required and must be a valid variant of the report. The report parameter is optional and is usually omitted. If you omit the report parameter, report_name defaults to /SAS/ZSASV8BCOMPAT. The values in port_number, variant_name, and report_name must be different from the values that SAS 9 and dialog compatibility use.
-B number_of_bytes
sets the minimum buffer size for data transfers in batch and dialog modes. The number of bytes should be greater than 10,000 and no more than eight digits or it is ignored. If you omit this option, the default is 10,000 bytes. If you specify a value for the G_BUFMAX parameter that is less than the value of -B in batch mode, the -B value is used.
-S "-a program_id -g gateway_host -x gateway_service"
permanently registers the SAS RFC Server at an SAP gateway. You must specify this option to use the SAS RFC Monitor in the SAP NetWeaver Portal. It enables the server to receive requests for information from the SAS RFC Server Monitor through a remote function call that uses an SM59 destination. To register the server at more than one gateway, specify this option multiple times.
-a program_id
the program_id that you specify must match the program ID that you assign in the SM59 destination of type registration. The destination that you use must not be the same as other destinations that are used for batch extractions.
-g gateway_host
A valid SAP gateway host.
-x gateway_service
A valid SAP service.

Examples

To use to start the SAS RFC Server as a daemon process with the name of test on port number 6991, use this command:
sasrfc_server -n test -p 6991
To start the SAS RFC Server with debug level 4 on port number 6991, use this command:
sasrfc_server -d 4 -p 6991
To stop a SAS RFC Server that is running on port number 6991, use this command:
sasrfc_server -k -p 6991