Previous Page | Next Page

OpenVMS: TCP/IP Access Method

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. The SERVICES file usually is located in the directory in which the TCP/IP software is installed. For details about editing the SERVICES file, see Configuring the SERVICES File.


Specifying TCP/IP as the Communications Access Method

You must specify TCP/IP as the communications access method at the client before you access a server. Here is an example:

/comamid=tcp 

The COMAMID= option specifies the communications access method. TCP specifies the TCP/IP access method.

You can specify the COMAMID= option in an OPTIONS statement, in a SAS configuration file, or in a SAS start-up command.


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 about supplying a user ID and a password, see the LIBNAME statement and the OPERATE procedure in the 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 encryption 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=rc2;

The NETENCRYPT option specifies that all data transfers between a client and a server will be encrypted. The RC2 encryption algorithm is specified. For details about encryption services, see Encryption in SAS.


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 the PROC OPERATE statement by using a two-level name as follows:

SERVER=node.server

Note:   Do not use the pound sign (#) in a server node name.  [cautionend]

node must be a valid SAS node name. If the server and the client sessions are running on the same node, you can omit the node name. If the TCP/IP node name is not a valid SAS name, you must assign the name of the server node to a SAS macro variable and do either of the following:

The access method evaluates the node name, using this order of precedence:

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.

Example 1:

A SAS macro variable is used to contain the name of a server node.

%let srvnode=mktserve.acme.com;
libname sales server=srvnode.server1;

Example 2:

The DCL symbol SRVNODE is assigned to the fully qualified node name and is then used in the two-level node name.

$srvnode:==mktserve.acme.com
libname mylib server=srvnode.server;

Example 3:

A 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.  [cautionend]

libname mylib '.' server=srvnode._ _5000;

Example 4:

You can also include the server's port number or service by using a macro variable that specifies the port or service.

%let server2=host.name.com 5000;
libname servf1 'pathname' server=server2;

or

%let server2=12.34.56.78 5000;
libname servf1 'pathname' server=server2;

Note:   Do not use an ampersand (&) in a two-level server name. An ampersand causes the macro variable to be resolved by the SAS parser before syntactic evaluation of the SERVER= option.  [cautionend]

For details about creating valid SAS names, see SAS Language Reference: Concepts. For details about the LIBNAME and PROC OPERATE statements, see SAS/SHARE User's Guide.


SAS/SHARE Client Example

The following example shows the statements that are specified at an OpenVMS client to access a server by using the TCP/IP access method. The LIBNAME statement specifies the 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 to access the server. The SERVER= option specifies the two-level server name RMTNODE.SHARE1.

options comamid=tcp; 
libname sasdata [edc.prog2.sasdata] user=_prompt_ server=rmtnode.share1;

Previous Page | Next Page | Top of Page