LIBNAME Statement, SASESOCK Engine

Associates a libref with a TCP/IP pipe (instead of a physical disk device) for processing input and output. The SASESOCK engine is required for SAS/CONNECT applications that implement MP CONNECT with piping.
Valid in: client session and server session
Category: Data Access
Operating environment: LIBNAME Statement: UNIX in SAS Companion for UNIX Environments, LIBNAME Statement: Windows in SAS Companion for Windows, and LIBNAME Statement: z/OS in SAS Companion for z/OS.
See: Base SAS LIBNAME Statement in SAS Statements: Reference

Syntax

LIBNAME libref SASESOCK “port-specifier <TIMEOUT=time-in-seconds> ;

Required Arguments

libref
specifies a reference to a TCP/IP pipe instead of to a physical disk device.
The libref that you specify must be a valid SAS name, and it must be the first argument in the LIBNAME statement.
SASESOCK “port-specifier
identifies the SASESOCK engine to process input to and output from a TCP/IP port instead of a physical disk device.
port-specifier” can be represented in these ways:
“:explicit-port
is a hardcoded port number that specifies an explicit port on the computer where the asynchronous RSUBMIT is executing.
Example:
LIBNAME payroll SASESOCK ":256";
Requirement:If the port number that you specify is in use, access will be denied until it is available again.
“:port service
specifies the name of the port service on the computer where the asynchronous RSUBMIT is executing.
Example:
LIBNAME payroll SASESOCK ":pipe1";
Requirements:If you specify a port service, it must be configured in the SERVICES file of the computers at which the client and server sessions are running.

If the port service that you specify is in use, access will be denied until it is available again.

See:For details about configuring port services in the SERVICES file, see Communications Access Methods for SAS/CONNECT and SAS/SHARE.
computer-name:port-number
specifies an explicit port number on the computer that is specified by computer-name.
Example:
LIBNAME payroll SASESOCK "apex.finance.com:256";
Requirement:If the port number that you specify is in use, access will be denied until it is available again.
computer-name:port service
specifies the name of the port service on the computer that is specified by computer-name.
Example:
LIBNAME payroll SASESOCK "apex.finance.com:pipe1";
Requirements:If you specify a port service, it must be configured in the SERVICES file of the computers at which the client and server sessions are running.

If the port service that you specify is in use, access will be denied until it is available again.

See:For details about configuring port services in the SERVICES file, see Communications Access Methods for SAS/CONNECT and SAS/SHARE.
implicit-port
is an alias that refers to an implicit port number that SAS dynamically selects from a pool of available ports when the asynchronous RSUBMIT begins execution. The actual port that SAS selects is stored automatically in the SAS Metadata Server without your knowledge of the port's identity. Because the alias is mapped to the port and is stored in the metadata server, you can always use the alias without concern about the actual port number.
Example:
LIBNAME payroll SASESOCK "mypipe";
If you use an alias that specifies an implicit port, the client and server sessions must have access to the SAS Metadata Server. The port number that is assigned to the alias that you specify is stored in the SAS Metadata Server. To have access to a SAS Metadata Server, several metadata properties must be configured via selected SAS options in the SAS session. Here is an example:
options metaserver="a123.us.company.com"
        metaport=9999
        metauser="metaid"
        metapass="metapwd"
        metaprotocol=bridge
        metarepository="myrepos";
Requirements:

If you use an implicit port, do not configure the alias in the SERVICES file.

See:If you specify an implicit port, see SAS system options METASERVER, METAPORT, METAUSER, METAPASS, METAPROTOCOL, and METAREPOSITORY in SAS Language Interfaces to Metadata.

Optional Argument

TIMEOUT=time-in-seconds
specifies the time in seconds that a SAS process will wait to successfully connect to another process.
Example:
libname in1 sasesock ":pipe1" timeout=50;
Default:10
See:For an explanation of MP CONNECT using piping, see Pipeline Parallelism .

For an example of a SAS/CONNECT application that implements MP CONNECT using piping, see Example 6: Using MP CONNECT with Piping .