HOST= LIBNAME Statement Option

Specifies an SPD Server machine by node name or IP address, and locates the name server using the SERVICE= value.

Valid in: SPD Server LIBNAME Statement
Note: Option to locate a server host.

Syntax

HOST=host-name <SERVICE=service>

Required Argument

host-name

the node name or IP address of the server machine.

Optional Argument

service

the name of the service or port number for the server’s name server.

Details

This option provides the node name of the server host machine that you want to connect to and locates the port number of the server's name server in the SERVICE= option. If the SERVICE= LIBNAME option is omitted, the server checks the client's /etc/services file (or its equivalent file) for Spdsname, which is a reserved name for the server's name server.

Example

Specify the server machine Samson. Use the default named service, Spdsname, to obtain the port number of the name server.
   libname mylib sasspds 'spdsdata'
      host='samson';
Specify the server machine Samson and provide the port number of the name server.
 libname mylib sasspds 'spdsdata'
      host='samson'
      service='5400';
Use a Macro Variable to Specify the SPD Server Host. Assign the macro variable SPDSHOST= to the server host Samson so that the LIBNAME statement does not need to specify HOST= LIBNAME statement option to locate Samson.
%let spdshost=samson;
   libname mylib sasspds 'spdsdata'
      user='yourid'
      password='swami';
Last updated: February 8, 2017