Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Server Startup Tips

To enhance Application Server startup, make these changes, each of which is described on this page:


Creating a Server Log File

If you want to log Application Server events, you need to include the -altlog SAS option when you invoke the Application Server. To instruct the server to write a log file, invoke the Application Server using a command like the one below:

   sas -altlog /usr/local/lib/IntrNet/inetsrv/appsrv.log

If the filename you specify for the server log does not exist, SAS software creates it for you. The default Application Server shortcut on Windows installations creates a log file named appsrv.log in the root SAS/IntrNet directory.

Note: Do not forget to use different names or directories for log files when starting more than one Application Server.


Using a Script to Start the Server

You can write a script that automatically starts your Application Server and runs it in the background. You can include the following in your script:

  • Invoke the SAS software with the -dmsbatch and -initcmd options, followed by the AF command enclosed in quotation marks.

  • If you created a new SAS configuration file during the installation, include a -config option on the command line and specify the full path to your configuration file.

  • If your server runs in a UNIX environment, you can suppress any icons or windows by including the option -fsd ascii.vt100 and setting your DISPLAY environment variable to blank.

The following is an example script that you could use to start the Application Server on UNIX:

   /usr/local/sas -dmsbatch -fsd ascii.vt100            \
   -initcmd "af c=sashelp.web.appstart.scl port=5001    \
             srvroot='/usr/local/lib/IntrNet/inetsrv'"

On Windows, your script would be very similar to the default Start Menu shortcut created at installation. It might contain the following:

  
   C:\Program Files\sas\sas.exe -dmsbatch
       -initcmd "af c=sashelp.web.appstart.scl port=5001   
                 srvroot='C:\Program Files\sas\IntrNet'"

For further information on invocation options, consult the SAS Companion for your operating system.


Supplying a Password When Starting the Server

When you start the server, you can optionally specify a password as a parameter to the AF command, as in the following example:

   af c=sashelp.web.appstart.scl port=5001 passwd=foobar

The password must start with a letter and contain no spaces. Specifying a password prevents anyone from running administrative programs without supplying the password. By using an HTML form with a password field, as shown in the following example, you can create an administrative interface to the server:

   <FORM ACTION="/cgi-bin/broker">
      <INPUT TYPE="hidden" NAME="_SERVICE" VALUE="default">
      <INPUT TYPE="hidden" NAME="_PROGRAM" VALUE="endsas">
      Password: 
      <INPUT TYPE="PASSWORD" NAME="_PASSWD">
      <INPUT TYPE="SUBMIT" VALUE="Shut down">
      </FORM>

Alternatively, you can create a link which simply includes _PASSWORD=<password> in the URL. For example:

 <A HREF="/cgi-bin/broker?_SERVICE=default&_PROGRAM=endsas&_PASSWD=foobar">shutdown</A>

Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next