SAS/SHARE Client Tasks

Task List

  1. Configure the server service.
  2. Specify TCP/IP as the communications access method.
  3. Access a secured server.
  4. Specify encryption of client/server data transfers (optional).
  5. Specify the server.

Configuring the Server Service

Each server must be defined as a service in the SERVICES file on each computer that a client will access the server from. For details about editing the SERVICES file, see Configuring the SERVICES File.

Specifying TCP/IP as the Communications Access Method

You must specify the TCP/IP communications access method at the server before you can start a server. You can use the COMAMID= option in an OPTIONS statement. For example:
options comamid=tcp;
The COMAMID= option specifies the communications access method. TCP specifies the TCP/IP access method.
Alternatively, you can specify the COMAMID= option in a SAS configuration file or in a SAS start-up command.
The COMAUX1= specifies an auxiliary communications access method and can be specified only in a SAS configuration file or in a SAS start-up command. Here is the syntax for the COMAUX1= option:
COMAUX1=alternate-method
If the first method that you specify in the COMAMID= option fails to access a server, the second method is used. You can specify one auxiliary access method.
Example:
comamid=tcp
comaux1=xms

Accessing a Secured Server

Requiring clients to supply a valid user ID and password when attempting to access a server enforces server security. The values for a user ID and a password are provided in the USER= and PASSWORD= options in the LIBNAME statement and the PROC OPERATE statement. For details, see LIBNAME Statement in SAS/SHARE User's Guide and The OPERATE Procedure in SAS/SHARE User's Guide.
Example:
libname sasdata 'edc/prog2/sasdata' server=rmtnode.share user=_prompt_
;
The value _PROMPT_ requires the client to provide a user ID and password when a client attempts to access the server.

Encrypting Data in Client/Server Transfers

If network security is configured at the client, you can specify SAS options to encrypt data that a client transfers to a server. For example:
options netencrypt netencryptalgorithm=rc4;
The NETENCRYPT option specifies that all data transfers between a client and a server will be encrypted. The RC4 encryption algorithm is assigned in the NETENCRYPTALGORITHM= option. For details about encryption services, see Encryption in SAS, located in the Base SAS Help and Documentation.

Specifying the Server

If the client and server sessions are running on different network nodes, you must include the TCP/IP node in the server ID in the LIBNAME or in the PROC OPERATE statement by using a two-level server name as follows:
SERVER=node.server
node must be specified by using either a server-ID or a port number.
If the server and the client sessions are running on the same node, you can omit the node name.
server can be either a server-ID or a port.
The server-ID must be identical to the service name that is specified in the SERVICES file. For details, see Configuring the SERVICES File .
The value for port is the unique number that is associated with the service that is used for passing data to and receiving data from the server.
Precede the port number with two consecutive underscores.
Note: Do not space after the first underscore or the second underscore.
Example:
libname mylib '.' server=srvnode._ _5000;
If the TCP/IP node name is not a valid SAS name, assign the name of the server node to a SAS macro variable, then use the name of that macro variable for node in the two-level server name.
The access method evaluates the node name in this order of priority:
  1. SAS macro variable
  2. acceptable node name
Example:
You might assign the node name and the server ID to a macro variable:
%let srvnode=mktserver.acme.com 5000;
libname sales server=srvnode;
or
%let srvnode=mktserve.acme.com;
libname sales server=srvnode.server1;
Note: Do not use an ampersand (&) in a two-level server name. An ampersand causes a macro variable to be resolved by the SAS parser before syntactic evaluation of the SERVER= option.
For details about SAS naming rules, see SAS Language Reference: Concepts. For details about LIBNAME, see LIBNAME Statement in SAS/SHARE User's Guide, and for details about PROC OPERATE, see The OPERATE Procedure in SAS/SHARE User's Guide.

SAS/SHARE Client Example

The following example shows the statements that are used at a z/OS client to access a server by using the TCP/IP access method:
options comamid=tcp;
libname sasdata 'edc.prog2.sasdata' user=_prompt_ server=rmtnode.share1;
        
The COMAMID= option specifies the TCP/IP access method. The LIBNAME statement specifies the SAS library that is accessed through the server. The value _PROMPT_ in the USER= option specifies that the client must provide a valid user ID and password. The SERVER= option specifies the two-level server name RMTNODE.SHARE1.