Spawner Connection Examples

Scripted Sign-on to a UNIX Spawner

Server

From the UNIX node that the server will run on, use the following command to start the spawner.
sastcpd -service spawner -sascmd /u/username/mystartup
The -SERVICE option specifies the name of the service SPAWNER that listens for incoming connections. The -SASCMD option specifies the path to the MYSTARTUP file, which starts the SAS session on the server. For a description of the -SASCMD option and an example of the content of the MYSTARTUP executable file, see UNIX Spawner.

Client

At a Windows client, the following statements are entered to sign on to the UNIX node RMTHOST by using the TCP/IP access method. A script file that is assigned to the RLINK fileref prompts the user at the client for the user ID and the password that are needed to log on to the UNIX server. The server name (in this example, RMTHOST) must be either the name of the UNIX node or a macro variable that contains the IP address or the name of the UNIX node that runs the spawner. For more information, see About TCP/IP Internet Protocol (IP) Addressing. The SIGNON statement contains the ID of the server session, which is specified as a two-level name: the node name and the service name. A two-level name is needed when signing on to a UNIX node that runs a spawner.
options comamid=tcp;
filename rlink '!sasroot\connect\saslink\tcpunx.scr';
signon rmthost.spawner;

Scriptless Sign-on to a Windows Spawner That Runs as a Service

Server

The following command installs the spawner service on a Windows computer:
C:\SAS> spawner -install -authserver ntdomain
In this example, the -INSTALL option installs the spawner as a service on a Windows computer. The -AUTHSERVER option specifies NTDOMAIN as the database to be used for performing user authentication of the user ID and password for connecting clients.
After the service is installed, it must be started before it can be used. You can start the service using either of the following:
  • the NET START command
  • the services applet
  • a reboot of the computer

Client

From any client, the following statements connect to the spawner program by using the TCP/IP access method. The SIGNON statement specifies the ID of the server session REMNODE. This ID must be the name of the Windows computer or a macro variable that contains the IP address of the Windows computer that the spawner runs on. Because a script file is not used, the user ID and password to the server must be specified as options in the SIGNON statement. The value _PROMPT_ in the SIGNON statement causes SAS to prompt for the password.
options comamid=tcp;
signon remnode user=joeblack password=_prompt_;
Note: The password is displayed as Xs in the SAS log.

Encrypted Sign-on to a z/OS Spawner

Server

The following z/OS command starts the spawner on the z/OS server.
START SPAWNER
This command activates the started task procedure. SPAWNER is the name of the service that is defined in the started task procedure.
Here is an example:
//SPAWNER  PROC PROG=SASTCPD,
//         SERVICE='spawner',
//         PARMFILE='SAS.SPAWNER.PARMS'
//*
//SPAWNER  EXEC PGM&PROG,REGION=40M,
//         PARM='-service &SERVICE =<//DDN:PARMS'
//*
//STEPLIB  DD   
//PARMS DD DISP=SHR,DSN=<customer.high.level.pfx>.LIBRARY
//         DD     
// DISP=SHR,DSN=<customer.high.level.pfx>.LIBE   
// DISP=SHR,DSN=&PARMFILE,FREE=CLOSE
//SYSPRINT DD   SYSOUT=*
//SYSTERM  DD   SYSOUT=*
//SYSUDUMP DD   SYSOUT=*
PARMFILE contains the options that start a spawner. For example:
-netencryptalgorithm rc2
-sascmd "/usr/local/bin/spawnsas.sh nosasuser -dmr -noterminal -comamid tcp"
The -NETENCRYPTALGORITHM option specifies that the spawner is started using the RC2 encryption algorithm. The -SASCMD option specifies a UNIX System Services shell script that starts SAS. This command assumes that a shell script named spawnsas.sh is installed in /usr/local/bin. The command specifies the SAS CLIST option NOSASUSER, which specifies that a user's SASUSER file should not be allocated. NOSASUSER allows a client to sign on to a server multiple times using the same user ID and password. The parentheses enclose the SAS system options DMR and COMAMID=TCP. NOTERMINAL prevents the display of dialog boxes in the server session.

Client

In the following example, the client specifies user ID and password encryption by setting the RC2 encryption algorithm. In this example, the two-level name, which represents the node name and the service name, specifies the ID of the server session in the SIGNON statement. A two-level name is needed when signing on to a z/OS operating environment that runs a spawner. The user must supply a valid user ID and password as values for the USER= and PASSWORD= options in the SIGNON statement.
options netencryptalgorithm=rc2;
signon rmthost.spawner user=joeblack password=born2run;