Interfaces for Starting and Stopping SAS/CONNECT

Types of Interfaces for Starting and Stopping SAS/CONNECT

Using the SAS Windowing Environment to Start and Stop SAS/CONNECT

The Signon Window

To start a SAS/CONNECT session:
  1. Select Runthen selectSignon from the menu bar in the SAS Program Editor window.
  2. Complete the following fields in the Signon window.
    The Signon Window
    Script file name:
    If you use the TCP/IP access method and choose to use a script file, type the full path and the name of the script file. For example, to connect to the z/OS operating environment by using the TCP/IP access method, type the following: pathname/tcptso.scr
    The default location of the script file varies according to operating environment. For details, see Using a Script to Start and Stop SAS/CONNECT.
    Remote session name:
    Type the name of the session that you are connecting to. For details, see CONNECTREMOTE= System Option.
    Communications access method ID:
    Type the value for the COMAMID= option. For example, for the TCP/IP access method, type the following: tcp
    For complete details about access methods, see Communications Access Methods for SAS/CONNECT and SAS/SHARE.
    Transmission buffer size:
    Type the value of the buffer size that SAS/CONNECT uses for transferring data. For details, see TBUFSIZE= System Option.
    Remote session macro variable/macvar:
    Type the name of the macro variable that you want to use to associate with the server session. For details about the CMACVAR= option, see CMACVAR=value.
    Display transfer status (yes/no):
    Type yes or no to specify whether the status window is displayed during data transfers. For details, see CONNECTSTATUS System Option.
    Execute remote submit synchronously (yes/no):
    Type yes or no to specify whether remote submits are to be executed synchronously or asynchronously.
    YES
    specifies synchronous remote submits, which means that control is not returned to the client session until the remote submit is finished processing. This is the default.
    NO
    specifies asynchronous remote submits, which means that control is immediately returned to the client session after processing begins on the server session.
    For details, see CONNECTWAIT System Option.
    SAS command to be used for multi-process signon:
    If you do not use SMP hardware, omit this field. If you use SMP hardware, specify a command and options in this field to invoke a server session that executes on the multiprocessor computer. For details about multiprocessing, see MP CONNECT.
    Note: If you have defined an RLINK fileref, you must clear the reference as follows: filename rlink clear;
  3. Select OK to sign on, or select Cancel to return to the Program Editor window without signing on.

The Signoff Window

  1. To stop a SAS/CONNECT session by signing off, from the menu in the Program Editor window, select Runthen selectSignoff.
    The Signoff Window
  2. If you are signed on to only one server session, you can click OK to end that session.
    If you are signed on to multiple server sessions, verify that the field entries are valid for the session you want to end.

Using the Program Editor Window

Using the Program Editor Window to Sign On SAS/CONNECT

  1. Type an OPTIONS statement in the Program Editor window of the client session.
    Use the SUBMIT command, statement, or function key to execute the OPTIONS statement. You use the OPTIONS statement to specify the COMAMID= and REMOTE= system options. For example:
    options comamid=communications-method 
       remote=server-ID;
    For details about specifying values for these options, see COMAMID= System Option and CONNECTREMOTE= System Option .
  2. Issue the SIGNON command or type the SIGNON statement in the client session. Specify the appropriate sample script (if necessary) for the operating environment:
    signon cscript='external-file-name-of-script';
    Note: Sample automatic sign-on scripts should be modified with installation-specific information before you can use them to start the connection.
Here is an example of signing on to a server that is running a spawner program:
options comamid=communications-method
   remote=nodename.servicename;
signon user=_prompt_;
After the SIGNON command executes successfully, a message in the Log window indicates that the connection is established.

Using the Program Editor Window to Sign Off SAS/CONNECT

Issue the SIGNOFF command, or type the SIGNOFF statement in the client session:
signoff cscript='external-file-name-of-script'
Note: If you used a script to sign on, the same script can be used to stop the connection.
After the SIGNOFF command executes successfully, a message in the Log window indicates that the connection has ended.
The sample scripts that are used for automatic sign-on are used for signing off your server session.

Using the Autoexec File

The autoexec file contains SAS statements that can be executed automatically when you begin a client session. You can simplify the process of starting and stopping the connection by following these recommendations:
  • Include a FILENAME statement in the autoexec file that defines the fileref RLINK. Make sure that it gives the correct file specification for the script that you use to start SAS/CONNECT. For details, see Syntax for the SIGNON and the SIGNOFF Statements and Commands.
    By assigning the fileref RLINK to your script, you can start the connection without specifying the script name in the SIGNON command.
    Also, you can stop the connection without specifying the script name in the SIGNOFF command because RLINK is the reserved fileref for script files.
    When SAS executes a SIGNON or a SIGNOFF command without a fileref, SAS automatically searches for a file that is defined with RLINK as the fileref. If RLINK has been defined, SAS executes the corresponding script.
  • Include an OPTIONS statement in your autoexec file to specify the COMAMID= and CONNECTREMOTE= system options.
    Windows Example:
    options comamid=tcp 
       remote=remhost;
    Using the autoexec file to specify system options is a convenience over having to execute an OPTIONS statement in each SAS session when using SAS/CONNECT.
Modifying your autoexec file as recommended eliminates a step in the process of starting the connection, and you can use the short form of the SIGNON and SIGNOFF commands.
For example, to start a connection from a SAS session that was invoked by using a modified autoexec file, issue the SIGNON command or submit the SIGNON statement:
   signon
or
   signon;
After you have completed your server processing, in order to end the connection, issue the SIGNOFF command or submit the SIGNOFF statement :
   signoff
or
   signoff;