SAS/CONNECT Client Tasks

Task List

  1. Specify TCP/IP as the communications access method.
  2. Specify encryption of client/server data transfers (optional).
  3. Sign on to the server.

Specifying TCP/IP as the Communications Access Method

TCP/IP is the default communications access method for all operating environments, except z/OS. Therefore, you do not have to explicitly specify the default.
If you choose to specify TCP/IP to connect to a server, you can use the COMAMID= option in an OPTIONS statement.
OPTIONS COMAMID=access-method-ID;
COMAMID is an acronym for Communications Access Method Identification. access-method-ID identifies the method used by the client to communicate with the server. TCP (short for TCP/IP, which is an abbreviation for Transmission Control Protocol/Internet Protocol) is an example of an access-method-ID. Alternatively, you can set this option in a SAS start-up command or in a SAS configuration file.
Example:
options comamid=tcp;

Encrypting Data in Client/Server Transfers

If an encryption service is available and is configured at the client, you can specify SAS options to encrypt all data that is transferred between a client and a server. In the following example, the NETENCRYPTALGORITHM= option specifies the RC2 encryption algorithm.
options netencryptalgorithm=rc2;
For details about encryption, see Encryption in SAS, located in the Base SAS Help and Documentation.

Choosing a Method to Use to Sign On

Based on your operating environment, you can use one of the following methods to sign on:
  • the same multiprocessor machine
    Note: This method is most useful if your client machine is equipped with symmetric multiprocessor (SMP) hardware.
  • a spawner
  • a Telnet daemon

Signing On to the Same Multiprocessor Machine

Task List

If your client machine is equipped with SMP, and if you want to run one or more server sessions on your machine, perform these tasks:
  1. Specify the server session.
  2. Specify the SASCMD command to start SAS.
  3. Sign on to the server session.

Specifying the Server Session

You can specify the server session in an OPTIONS statement:
OPTIONS PROCESS=session-ID;
You can also specify it in the SIGNON statement or command:
SIGNON session-ID;
session-ID must be a valid SAS name that is 1 to 8 characters in length, and is the name that you assign to the server session on the same multiprocessor machine.
Note: PROCESS=, REMOTE=, CREMOTE=, and CONNECTREMOTE= can be used interchangeably. For details, see CONNECTREMOTE= System Option in SAS/CONNECT User's Guide.
For details about SIGNON=, see SIGNON Statement and Command in SAS/CONNECT User's Guide.

Starting SAS Using the SASCMD Option

Use the SASCMD option to specify the SAS command and any additional options that you want to use to start SAS in the server session on the same multiprocessor machine.
The SASCMD option can be specified in an OPTIONS statement:
OPTIONS SASCMD="SAS-command" | "!SASCMD";
You can also specify it directly in the SIGNON statement or command:
SIGNON name SASCMD="SAS-command" | "!SASCMD";
The -DMR option is automatically appended to the command. If !SASCMD is specified, SAS/CONNECT starts SAS on the server by using the same command that was used to start SAS for the current (parent) session.
Note: In order to execute additional commands before starting SAS, you might write a script that contains the SAS start-up commands that are appropriate for the operating environment. Specify this script as the value in the SASCMD= option.
For details, see SASCMD= System Option in SAS/CONNECT User's Guide and SIGNON Statement and Command in SAS/CONNECT User's Guide.

Signing On to the Server Session

Example 1:
In the following example, TCP is the access method, SAS1 is the name of the server session, and SAS_START is the command that starts SAS on the same multiprocessor machine.
options comamid=tcp;
signon sas1 sascmd='sas_start';
Example 2:
In the following example, the values for the COMAMID=, SASCMD=, and PROCESS= options are set in OPTIONS statements. The SASCMD= option identifies the command that starts SAS. The PROCESS= option identifies the server session on the same multiprocessor machine. Because the SASCMD= and the PROCESS= options are defined, only a simple SIGNON statement is needed.
options comamid=tcp sascmd="sas_start";options process=sas1;signon;

Signing On Using a Spawner

Task List

  1. Ensure that the spawner is running on the server.
  2. Specify the server and an optional service.
  3. Specify the sign-on script (if you are signing on using a script), or specify a user ID and password (if you are signing on without a script).
    Note: If the SSPI is available or the server is not running secured, you do not have to specify a user ID and password. For details, see SSPI.
  4. Sign on to the server using a spawner.

Ensuring That the Spawner Is Running on the Server

Before you can access the spawner, the spawner program must be running on the server. For information about the spawner that you are connecting to, see SAS/CONNECT Spawners.
Note: The system administrator for the machine that the spawner runs on must start the spawner. The spawner program on the server cannot be started by the client.

Specifying the Server and the Spawner Service

The name of the server can be specified in an OPTIONS statement:
OPTIONS REMOTE=node-name[.service-name | .port-number];
You can also specify it directly in the SIGNON statement or command:
SIGNON node-name[.service-name | .port-number];
node-name is based on the server that you are connecting to. node-name must be a valid SAS name that is 1 to 8 characters in length and is either of the following:
  • the short machine name of the server that you are connecting to. This name must be defined in the HOSTS file in the client operating environment or in your Domain Name Server (DNS).
  • a macro variable that contains either the IP address or the name of the server that you are connecting to.
For more information, see About TCP/IP Internet Protocol (IP) Addressing.
You specify service-name when connecting to a server that runs a spawner program that is listening on a port other than the Telnet port. If the spawner was started by using the -SERVICE spawner option, you must specify an explicit service-name. The value of service-name and the value of the -SERVICE spawner option must be identical. Alternatively, you can specify the explicit port number that is associated with service-name.
Example 1:
In the following example, REMHOST is the name of the node that the spawner runs on, and PORT1 is the name of the service that is defined at the client. The client service PORT1 must be assigned to the same port that the spawner is listening on.
signon remhost.port1;
Example 2:
In the following example, the macro variable REMHOST is assigned to the fully qualified name of the machine that the server runs on. This server has a spawner running that is listening on port 5050. The server session that is specified in the SIGNON statement uses the node name REMHOST and the service-name 5050, which is the explicit port value.
%let remhost=pc.rem.us.com;
signon remhost.5050;
You can also assign a specific port number by including the port number in the definition of the macro variable. For example:
%let remhost=pc.rem.us.com 5050;
signon remhost;

Specifying a Sign-On Script or a User ID and Password

You can use a sign-on script to sign on to the spawner, or you can sign on to a spawner without a script. If you sign on to a secured spawner without a script, you must supply a user ID and password unless SSPI is available. For details, see SSPI.
Note: If you connect to a spawner, you can sign on by using a script unless the spawner is started by using the -NOSCRIPT option. If the -NOSCRIPT option is set, you cannot use a script. If there is no script, you do not assign the fileref RLINK in a FILENAME statement. For information about the spawner that you are connecting to, see SAS/CONNECT Spawners.

Specifying a Sign-On Script

If you are signing on by using a script, you must specify the script that you want to use. The script file is executed by the SIGNON statement or command. By default, the script prompts for user ID and password.
To use one of the sample script files that are provided with SAS/CONNECT for signing on and signing off, assign the fileref RLINK to the appropriate script file. The script is based on the server that you are connecting to. The sample scripts are installed at this location:
!sasroot\CONNECT\SASLINK
To specify a script, use the FILENAME statement. For example:
FILENAME RLINK '!sasroot\connect\saslink\script-name';
script–name specifies the appropriate script file for the server.
The following table lists the scripts that are provided in SAS software.
SAS/CONNECT Sign-on Scripts for TCP/IP under Windows
Server
Script Name
TSO under OS/390
tcptso.scr
TSO under z/OS, SAS 9 or later
tcptso9.scr
z/OS (without TSO)
tcpmvs.scr
z/OS (using full-screen 3270 Telnet protocol)
tcptso32.scr
OpenVMS
tcpvms.scr
UNIX
tcpunix.scr
Windows
tcpwin.scr

Specifying a User ID and Password

If SSPI is available, you can submit the SIGNON statement without a user ID and password. If SSPI is not available and you are signing on to a secured spawner without using a script, you must provide a user ID and password in order to log on. For example:
SIGNON USER=user-ID | _PROMPT_ [ PASSWORD=password | _PROMPT_ ];

Signing On Using the Spawner

To start SAS, sign on to the server using the spawner.
In the following example, a Windows client connects to a Windows server by using a spawner without a script file. In the SIGNON statement, RMTHOST.SPAWNER specifies the node RMTHOST and the service SPAWNER. This server specification presumes that a spawner is running on the node RMTHOST, and that the spawner was started using the service SPAWNER. Because SSPI is used, the client does not set the USER= and PASSWORD= options.
Example:
options comamid=tcp;
signon rmthost.spawner;

Signing On Using a Telnet Daemon

Task List

  1. Specify the server.
  2. Specify a sign-on script file.
  3. Sign on to the server session.

Specifying the Server

The name of the server can be specified in an OPTIONS statement:
OPTIONS REMOTE=node-name;
You can also specify it directly in the SIGNON statement or command:
SIGNON node-name;

Specifying a Sign-On Script File

If you are signing on by using a script, you must specify the script that you want to use. The script file is executed by the SIGNON statement or command. By default, the script prompts for user ID and password. For details, see Specifying a Sign-On Script.

Signing On to the Server Session

In the following example, you specify the statements at a Windows client to use the TCP/IP access method to connect to a z/OS server. The FILENAME statement identifies the script file that you use to sign on to a server. The script file contains a prompt for a user ID and a password that are valid on the server. The COMAMID= option specifies the TCP/IP communications access method for connecting to the server RMTNODE, which is specified in the REMOTE= option.
filename rlink '!sasroot\CONNECT\SASLINK\tcptso.scr';
options comamid=tcp remote=rmtnode;
signon;