SAS Connector > Introduction to SAS Connector > Configuring the Communication component
  

Configuring the Communication component

To configure the Communication component, use the SPI Server configuration tool to maintain the configuration files.
The configuration file is located in the directory when you installed the Communication component.

Configuring the Communication component on Windows

To start the configuration tool on Windows, use the SPI Server Configuration in the Start menu. Use the SPI Server Configuration tool to configure the TCP/IP port where the SPI Server listens, the location of the SPI Server log file, and the SPI Server users and passwords.
You must also configure the SAS environment.
In the SAS initialization file, you can assign SAS libraries or libnames that must be accessible by the Secure Agent to access the SAS metadata and the SAS data.
The following snippet shows a sample SAS autoexec file: xe "SAS autoexec file:
/*
Sample SAS autoexec file
*/
LIBNAME whdata 'W:\data\saswhdata' ;
LIBNAME oltp 'W:\data\sales\2008Q1' ;
For more information about the LIBNAME syntax and options, see the SAS documentation.

User administration on Windows

You can add or remove users and change the user password or the user administrator property.
Perform the following steps for the user administration on Windows:
  1. 1Click Users in the configuration page.
  2. 2Enter the changes in the User Administration dialog box.
  3. 3Click Close.

Configuring the Communication component on UNIX

To start the configuration tool on UNIX, perform the following steps:
    1 At the shell prompt, navigate to the SPI Server installation directory.
    2Enter ./spiconfig.
    3 Select an option that you want to change.
    The configuration tool prompts you for a new value.
    4Select Users to enter the user administration details.

Configuring the SAS autoexec file

Use the SAS autoexec file named autoexec.sas to configure the SAS environment.

Session and user identification

The name of the SPI Server user who accesses the SAS environment is passed to the environment where SAS runs.
The values of this property can thus be used for conditional initialization logic in the SAS autoexec script.
The following system variable provides the user name to the SAS process:
System Variable
Available
Description
TBPC_USER_NAME
client/server
Name of the connected SPI Server user.
You can use the SAS function sysget() to retrieve system variables.
For example:
/* Store system variables into SAS macro variables: */

usrname = sysget("TBPC_USER_NAME");

/* Use the SAS macro variables to code logic: */

.............

.............

/* End of logic */
When the Secure Agent initiates a connection to the SAS machine, the system variables that are unavailable for client connections contain no meaningful information. The system variable values default to "_NONE_".

Reading SAS character columns with binary zeros

SAS supports binary zero bytes in character columns. However, the Cloud Data Integration does not support characters with binary zeros. You can replace binary zeros with NULL characters before passing data to Cloud Data Integration.
To replace binary zeros with NULL characters, assign the macro variable CHCKNLLS in the SAS autoexec file. Add the following line in the SAS autoexec file:
%let CHCKNLLS=YES;

Removing leading spaces in text fields

Secure Agent removes the leading spaces in text fields in a SAS source and trims the leading spaces when you write to a SAS target.
You can add the following statement to the SAS autoexec file to remove leading spaces:
%let TRMLDSPC=YES;