Using the SAS RFC Server on UNIX

In a UNIX environment, the SAS RFC Server for SAP 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 shared libraries to the appropriate environment variable. For more detailed information about how to set up the environment variables, see Installation Instructions—SAS/ACCESS Interface to R/3.
To start the SAS RFC Server in a UNIX environment, use this command:
sasrfc_server [-d 0|1|2|3|4|5|6] [-n name] [-p port] [-w workdir] [-N namespace] 
     [-V variant] [-help] [-c dialog_compat_port] 
     [-b "-p port-number -V variant_name -R report_name"] 
     [-B number_of_bytes]
Optional parameters are enclosed in brackets [ ].
To stop the SAS RFC Server in a UNIX environment, use this command:
sasrfc_server [-k] [-p port]
Optional parameters are enclosed in brackets [ ].
Here are the options for the SAS RFC Server command for UNIX.
-d n
specifies whether to run the server as a daemon process or as an application and specifies the diagnostic level. The server is run as a daemon process when you specify -dn (where n=0) or when you do not specify the -dn option. After successful initialization, all messages are routed to syslog. When you specify the -dn 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. This option distinguishes among multiple daemon processes. For example, a test service might be started as -n test.
-p port
identifies the port number on which the service listens. The default is 6999.
-w workdir
specifies the working directory. For example, if your working directory is named tmp, use -w /tmp to specify this option.
-N namespace
specifies the namespace for ABAP functions and programs that SAS uses. The default is /SAS/. If the ABAP programs are installed in the customer namespace instead of in the /SAS/ namespace, this parameter identifies where ABAP programs are installed.
-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 than the one used for the SAS 9 requests. If you omit the -c option, no dialog compatibility is available.
-b“-p port_number [optional] -V variant_name [required] -R report_name” [optional]
enables batch compatibility so that you can process SAS 8 ACCR3 requests while you are using a SAS 9 RFC Server. You must use double quotation marks in the batch compatibility option to separate batch compatibility parameters from SAS 9 parameters that use the same syntax. If you omit the port parameter, the port number defaults to 6999. The report variant parameter must be a valid variant of the report. The values in port_number, variant_name, and report_name must be different from the values that SAS 9 and dialog compatibility uses.
-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 8 digits, or it is ignored. If you omit the -B option, the default is 10,000 bytes. In batch mode, if you specify a value for the G_BUFMAX parameter that is less than the value of -B, the -B value is used.
For example, 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
This sample command shows how to display command line Help:
sasrfc_server
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