Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Testing the Installation

At this point you should have an Application Server running, and the Application Broker should be installed in your Web server directory. Before trying to write applications of your own, take a moment to verify that everything is working correctly.

Testing the Application Broker

To make sure the Broker was installed correctly and can access its configuration file, point your Web browser at this URL:

   http://myserver/cgi-bin/broker?_DEBUG=6

Replace myserver and cgi-bin with values specific to your site. The value broker denotes the name of the Broker CGI program (use "broker.exe" for Windows).

If the CGI program is working and you did not mask out the DEBUG value of 4, you will be greeted with a screen like this:

List of all services

SocketService default - Reuse existing session

Pages reference this generic server when they don't care which service is used.
Administrator: Your Name, yourname@yoursite
Defined servers and ports:
  • host appsrv.yourcomp.com, port 5001, weight 1
...

Testing the Application Server

Pinging the Application Server

After you install and configure the Broker properly, you have at least one service defined for an Application Server. The next step is to test the combination of the Broker and the server by pinging the Application Server. Invoke a Web browser and try a URL similar to this:

   http://myserver/cgi-bin/broker?_SERVICE=default&_PROGRAM=ping

After you tell the Web browser to retrieve this page, you should see activity in your previously dormant SAS session. If this works properly, an HTML page returns to your Web browser indicating that the Application Server is functioning properly.

Trying Some Sample Applications

We supply several sample applications with the Application Server package. To finish testing, try some of these. Before using an application, you must have the sample application library assigned. If you supplied the srvroot parameter correctly when starting the Application Server, then the server has found the srvauto.sas file and defined the sample application library.

Invoke a URL similar to this:

http://myserver/cgi-bin/broker?_service=default&_program=sample.hello.sas

If this works properly, you should see the words "Hello World!" displayed in your Web browser. Next you will attempt to use the sample html forms to run the sample programs.

All the sample application HTML files are contained in the Broker package. They use FORM tags with the ACTION= attribute set to /cgi-bin/broker (UNIX) or /cgi-bin/broker.exe (Windows). If you did not install the Application Broker CGI program in the Web server's /cgi-bin directory or had to rename the Broker, you must edit the .html files and supply the correct value for your site before they will work. Edit the sample html files in the Web servable directory that you copied them to. Once you are done editing the sample html, use your Web browser to view these files. Try submitting the various forms and viewing the pages produced by the applications.

If you receive a message indicating that the program library is not defined, stop the Application Server and examine the log. You can stop the Application Server on Windows by using Ctrl+Break and on UNIX by using the Session Manager interrupt button. Check the log for any errors. The libname statement in the srvauto.sas file may not have been submitted or may have failed due to an error in the path. If you receive a message indicating that the program itself does not exist, stop the Application Server and examine the log. The libname statement could have been successfully processed, but may point to the wrong directory. Ensure that the libname statement defining the sample application library is being submitted by the Application Server and is successfully assigned.

Try a few more sample applications. See the section in What is a Dispatcher Application that lists the sample applications.

Finishing Up

Congratulations! If you followed all the steps, you now have a working Application Dispatcher. While you should find this setup sufficient for many simple applications, the Dispatcher includes additional features that easily handle more complex ones. For details about enhancing the Application Server startup process, see Server Startup Tips, and for details about fine-tuning performance, see Enhancing Performance.

Later, you can set up as many different application libraries as needed. Just add libname statements to the srvauto.sas file and restart the server. Then, use the libref of a specific application library as the first level of the program name. Specify it in the _PROGRAM variable in the URL or in your HTML form.

You can run four types of applications with the Application Dispatcher: SAS, SOURCE, SCL, or MACRO. See Application Dispatcher Reference for more details.


Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next