Spawner Connection Examples

List of Examples

The following examples show how to manually configure the spawner. Most spawners now are deployed using the SAS Deployment Wizard and manual configuration is not required. Information used by the spawner is contained in metadata.

Scripted Sign-on to a UNIX Spawner

Server

From the UNIX node that the server runs on, specify the following command to start the spawner.
cntspawn -service spawn1 -mgmtport 5030 
The -MGMTPORT option specifies the operator port to be used for administrative purposes. The -SERVICE option specifies the name of the service, spawn1, that listens for incoming server requests. The -service option can specify a defined TCP/IP service or a numeric port value. What is used when the spawner is started determines what will be used by the client. In the following example the-SERVICE option is used to specify the numeric port value of the service during spawner start-up:
cntspawn -service 5020 -mgmtport 5030 
A user can then sign on using the same port-number in the SIGNON statement:
filename rlink '!sasroot\connect\saslink\tcpunx.scr';
signon rmthost.5020;
The -SERVICE option values used to start the spawner determine what will be used by the client to sign on.
As in the first example, the -MGMTPORT option specifies the operator port to be used for administrative purposes.

Client

At a Windows client, the statements shown in Scripted Sign-on to a UNIX Spawner: Client 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.
Scripted Sign-on to a UNIX Spawner: Client
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:
cntspawn -install 
For this example, note the following:
  • The spawner is being installed as a Windows service, but since the -SERVICE option is not used to specify the port number or name, the spawner will listen on the default Telnet port (23) and be named SAS Connect Spawner by default.
  • Because a sign-on script is not being used and the -SASCMD= option is not specified, the spawner will look for the SAS executable in the SAS installation directory.
  • Since the -MGMTPORT is not specified, the operator port will default to 7541.
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 ConnectSpawner.bat script file command
  • 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. The user ID and password to the server are 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_;
For Windows users, if SSPI has been enabled, then you do not need to specify the user ID and password in the SIGNON statement. See SSPI for more information about SSPI.
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 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=CNTSPAWN,
//         SERVICE='spawner',
//         MGMTPORT=7541,
//         PARMFILE='SAS.SPAWNER.PARMS'
//*
//SPAWNER  EXEC PGM&PROG,REGION=40M,
//         PARM='-service &SERVICE -MGMTPORT &MGMTPORT=<//DDN:PARMS'
//*
//STEPLIB   DD DISP=SHR  
//     DSN=<customer.high.level.pfx>.LIBRARY
//          DD DISP=SHR,
//     DSN=<customer.high.level.pfx>.LIBE   
// PARMS DD 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
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 enables a client to sign on to a server multiple times using the same user ID and password.
The -MGMTPORT option specifies port 7451 as the port for operator connections.

Client

In the following example, the client specifies a 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. You 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;