SAS/IntrNet 1.2: Application Dispatcher |
Creating Your Own Configuration FileTo help you create your own configuration file, we have provided a configuration file template. You must modify the template file to create your configuration file. The template includes comments about each of the directives. The instructions provided here and the comments provided in the template guide you through the creation process. Guidelines for Creating a Configuration File
Hints for working with the template
Creating a Configuration FileBefore you can use the Application Dispatcher, you must copy and modify the template configuration file to create your own configuration. The configuration file is part of the Broker; therefore, it is located in the same directory where you installed the Broker, which is the directory on your Web server for CGI programs. This directory is usually created during the installation of the Web server and is often called cgi-bin or scripts. (For documentation purposes, these instructions refer to your CGI directory as cgi-bin.) To create your configuration file:
Specifying the Self-Referencing URLThe self-referencing URL identifies the Broker program URL. Most of the time you will not need to set this value. The URL is passed to the SAS program in a macro variable called You may need to change the self-referencing URL in the following situations:
Specifying Global AdministratorThe global administrator is the designated contact for service definition requests and general Broker problems. You can specify a single person or a group of people. At least one administrator must have write access to the configuration file and understand the information required to define a service. To specify information about the global administrator,
These two values become the macro variables Defining a ServiceThe configuration file defines the services that are available for Dispatcher applications to use. A service definition identifies an installed Application Server and, if using the socket service, the TCP/IP port number that the Broker should use to send requests to that server. When you create the HTML portion for your Dispatcher applications, you specify the service name in the HTML to ensure that the Broker sends the processing request to the proper location. Your configuration file can contain as many services as you need. You might include multiple services because you have:
We recommend that you create a service named You may have more than one of these sections, each defining a different service. You can create additional service definitions by copying and then modifying this Example SocketService definition: SocketService default "Reuse existing session" ServiceDescription "Pages reference this generic server when they don't care which service is used." ServiceAdmin "YOUR NAME" ServiceAdminMail "YOURNAME@YOURSITE" Server APPSRV.YOURCOMP.COM Port 5001 ServiceTimeout 90 See the Configuration File Directives page for a description of all directives. TIPWhen creating SocketService definitions, the minimum information needed is SocketService default "Reuse existing session" Server APPSRV.YOURCOMP.COM Port 5001 Although this example is sufficient, adding the remaining service directives makes the definition more understandable. Example LaunchService definition:LaunchService newsas "Start a new 6.12 SAS session" ServiceDescription "Applications should use this service to start a new SAS session (release 6.12) on the Web server." ServiceAdmin "YOUR NAME" ServiceAdminMail "YOURNAME@YOURSITE" SasBin /pathname/sas SasOpts "-dmsbatch" TmpDir /tmp/ InitCmd "af c=sashelp.web.appstart.scl srvroot='/pathname/IntrNet/inetsrv'" ServiceTimeout 60 Note: For Windows systems, include the .exe extension on the SAS executable and specify pathnames using the double backslashes as shown in the Windows configuration file template.
Optional Configuration SettingsYou can control the following additional settings in the configuration file:
Specifying HTTP MethodsThe HTTP methods specified in the
To specify which HTTP methods the Broker should allow, locate the following line in the configuration file: Allow get post. If you want to allow both methods, leave the line as it is. If you want to allow only one method, delete the method that you do not want to allow. By default both methods are allowed so commenting or omitting the directive allows both As stated, the Setting the Default Value of _DEBUGIf you are writing your own Dispatcher applications or are having problems with some of the samples we provide, you may want to specify a different default See the List of Valid Values for a current list of debug values. Remember that you can set more than one debug option.
Simply add the option values together. For example, to set both the 256 and 4 options, enter Restricting Value Allowed in _DEBUG with the DebugMask and ServiceDebugMask DirectivesYou can also specify the debug values that users are not
allowed to set. The The default value for the For a chart showing another way of looking at the debug flags, see Disabling Debug Flags in the Reference section. Exporting Environment Variables to Dispatcher ApplicationsThe Web server makes essential information available to CGI programs as environment variables. You can pass some or all of this information on to your Dispatcher programs by using the Export directive. The syntax is Export <environment-variable> <SAS variable name>
The Export directive instructs the Broker to retrieve the contents of the specified environment variable and make it available to Dispatcher programs in the specified SAS macro variable or SCL list item. The sample configuration file includes several Export directives; activate a directive by changing the information to match your site and removing the # that appears at the left of the export line. Some Export directives, for example, Export REMOTE_HOST _RMTHOST, are activated by default, as they are not preceded by a # in the default configuration file. If you omit the SAS name, the name of the environment variable will be used as the SAS macro name. Be sure to name the variable using eight characters or fewer or the Broker will return an error message. If the value of the environment variable is greater than your field width (as set in _FLDWDTH), then the variable splits up like any field into multiple variables. You can avoid this by beginning SAS variable names with an underscore. Dispatcher variables that begin with an underscore are not split according to _FLDWDTH. These variables are truncated at 200 characters. Remember, the default _FLDWDTH is 80. For ideas about what environment variables you might find useful in your Dispatcher applications, see the list of Common Environment Variables. |
SAS/IntrNet 1.2: Application Dispatcher |