Configuring the SAS Environment File

Customizing the SAS Environment File

The sas-environment.xml is located in the SAS-config-dir\Lev1\Web\Common directory.
Because Web application servers are likely to be rebooted, it is not recommended that this file be placed in a Web application server. Instead, place the customized file on an HTTP server.
Here is a sample sas-environment.xml file that is configured for two environments:
<?xml version="1.0"  encoding="UTF-8">
<environments xmlns="http://www.sas.com/xml/schema/sas-environment-9.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.sas.com/xml/schema/sas-environment-9.2
    http://www.sas.com/xml/schema/sas-environment-9.2/sas-environment-9.2.xsd">
  <environment name="Red" default="false">
    <desc>test server Red for SAS Financial Management Studio</desc>
    <service-registry>http://red.na.sas.com:8080/SASWIPClientAccess/
remote/ServiceRegistry</service-registry>
  </environment>
  <environment name="Blue" default="true">
    <desc>test server Blue for SAS Financial Management Studio</desc>
    <service-registry>http://blue.na.sas.com:7001/SASWIPClientAccess/
remote/ServiceRegistry</service-registry>
  </environment>
</environment>
The service registry that is specified in the file enables desktop client applications to determine the location of required services on the middle tier. It also enables the applications to obtain a list of services available in the environment. Note that this sas-environment.xml file resides on an HTTP server, but the configuration in the file refers to the Web application servers and their port numbers.
If SSL is configured at your site, specify the https protocol and the SSL port number for the service registry.
If your site has multilingual users, you can configure the sas-environment.xml file to include localized descriptions. In the next example, the Blue environment is specified in German:
<environment name="Blue">
  <desc>test2 Blue</desc>
  <desc xml:lang="de">Blau</desc>
  <service-registry>http://blue.na.sas.com:7001/SASWIPClientAccess
/remote/ServiceRegistry</service-registry>
</environment>
When the customized sas-environment.xml file is available for multiple environments, refer to the documentation for your SAS application or solution for instructions about how to enable the availability of these environments for the users. If you change the location of the sas-environment.xml file, be aware that SAS desktop applications such as SAS Enterprise Miner need to be updated with the new location. The SAS desktop applications that integrate with the middle tier use the -Denv.definition.location JVM option in INI files to identify the location of the sas-environment.xml file. Refer the documentation for the SAS desktop applications that you use. The SAS-install-dir/sassw.config file is also used to identify the location of the sas-environments.xml file. Update the SASENVIRONMENTSURL= value in the sassw.config file.

Element Description

The following list identifies and describes the elements that can be used in the sas-environment.xml file:
environment
has a name attribute that cannot contain space characters. This attribute is used internally by SAS software to identify each of the environments that are available in the deployment. This element has an attribute that is named default. This attribute is used to identify a default environment for client applications. If more than one environment element has this attribute set to true, then the last environment in the file with the attribute set to true is set as the default environment. It is not necessary to set the attribute to false for all other environments.
desc
used in the client applications to provide a menu of environment choices. As shown in the previous example, this field can provide a localized message when the xml:lang attribute is set.
service-registry
contains the URL to the service registry for the environment. Use the protocol, host name, and port number of the Web application server that is running the SAS Web Infrastructure Platform.