Contents SAS/IntrNet 8.2: Application Dispatcher Previous Next

Services on Windows Platforms

Numerous changes have been made to SAS/IntrNet services on Microsoft Windows for Release 8.2. The following documentation applies only to Release 8.2 and later. If you are using an earlier release of SAS/IntrNet, refer to the documentation for that release.


Creating a Service

To create a service for an Application Server running under a Windows environment, perform the following steps:

  1. If you are using a Windows environment that supports services, then it is recommended that you install the SAS Service Configuration Utility before creating a SAS/IntrNet service if you ever intend to run the SAS server as a Windows service. Instructions for installing the SAS Service Configuration Utility are in an appendix of the SAS System Installation Instructions for Microsoft Windows.

  2. From the Start menu, select Programs -> The SAS System -> IntrNet -> Create a New IntrNet Service.

  3. Read the information in the IntrNet Config Utility Welcome window. Select Next to continue.

  4. Select the type of service that you wish to create. Select Next to continue.

  5. Type the name of the new service. (Remember that service names must begin with either a letter or an underscore and may contain letter, number, underscore, or dash characters.)

    The default value for this field is default. Create this as your first service because this is what is used when you run the samples. Select Next to continue.

  6. The configuration utility selects a default service root directory based on the location that you chose for user files when you installed SAS software. This default location is recommended for most users, although you can use the Browse button to select a different directory. Select Next to continue.

  7. If you are defining a socket service, you are prompted to specify the TCP/IP port numbers or names for each Application Server that you want to define as part of this service. If you supply multiple numbers or names, use a space to separate each entry. Select Next to continue.

  8. Review the contents of the Service Created window for information about your service. Note the broker configuration sample text. You are required to enter similar text in the Broker configuration file in a later step. Select Next to continue.

  9. The Create Service window displays all of the information that you specified for this service. Verify the information in this window before continuing. If it is not correct, select the Back button to change the information. If it is correct, select Next to create the service.

  10. Select Next and then select Finish to exit the utility.

  11. If you are creating a pool service, you must install the Application Load Manager. You might also want to install the Load Manager if you have a socket service with more than one server. See Using the Load Manager for more information.

  12. If you are creating a pool service, you might need to install the SAS Spawner. The Spawner is not required if you configure the Application Load Manager to start the service directly. If you choose this method, the servers must all execute on the same system as the Load Manager and under the same userid. Refer to the SAS/CONNECT documentation for installation instructions for the SAS Spawner.

  13. The Application Broker must know about the new service before you can access it. Open the Broker configuration file on your Web server in a text editor and add a service definition block. Example service definitions are provided in the template configuration file that is installed with the Application Broker. In addition, sample configuration text was generated by the configuration utility in a preceding step. Several examples are also shown below. Values that may need to be changed for your site are shown in green.

    • The definition block for a socket service might look like
      # This service contains one server (port 5801) on yourserv.yyy.com.
      SocketService service-name "brief-text-desc"
      ServiceDescription "text-desc"
      ServiceAdmin "administrator-name"
      ServiceAdminMail "administrator-email-address@host"
      Server yourserv.yyy.com
      Port 5801

    • Launch services are defined with
      LaunchService service-name "brief-text-desc"
      ServiceDescription "text-desc"
      ServiceAdmin "administrator-name"
      ServiceAdminMail "administrator-email-address@host"
      SasCommand ""\"C:\\Program Files\\SAS Institute\\SAS\\V8\\sas\"+
      \"C:\\winnt\\Profiles\\username\\Personal\\My SAS Files\\V8\\IntrNet\\+
      service-name\\appstart.sas\"+
      -rsasuser -noterminal -noprint -nolog -SYSPARM "

    • A pool service that is started directly by the Load Manager is defined by
      # Start up to 2 servers on the same node as the Load Manager. No
      # username/password or spawner is needed for this case. Servers will
      # time out after 30 minutes.
      PoolService service-name
      ServiceDescription "text-desc"
      ServiceAdmin "administrator-name"
      ServiceAdminMail "administrator-email-address@host"
      ServiceLoadManager myserv.xxx.com:5555
      SasCommand ""\"C:\\Program Files\\SAS Institute\\SAS\\V8\\sas\"+
      \"C:\\winnt\\Profiles\\username\\Personal\\My SAS Files\\V8\\IntrNet\\+
      service-name\\appstart.sas\"+
      -rsasuser -noterminal -noprint -nolog -SYSPARM "
      IdleTimeout 30
      Server myserv.xxx.com
      Port 2

    • A pool service that is started by the SAS Spawner is defined by
      # Start up to 5 servers on node yourserv.yyy.com using the spawner started
      # at port 7777. All servers will be started with the specified
      # username/password. At least 1 server will not timeout and
      # will be kept running.
      PoolService service-name
      ServiceDescription "text-desc"
      ServiceAdmin "administrator-name"
      ServiceAdminMail "administrator-email-address@host"
      ServiceLoadManager load-manager-host:port
      SasCommand ""\"C:\\Program Files\\SAS Institute\\SAS\\V8\\sas\"+
      \"C:\\winnt\\Profiles\\username\\Personal\\My SAS Files\\V8\\IntrNet\\+
      service-name\\appstart.sas\"+
      -rsasuser -noterminal -noprint -log /dev/null -SYSPARM"
      Server yourserv.yyy.com
      Port 6000-6004
      Username appdemo
      Password xyzzy
      SpawnerPort 7777
      MinRun 1

Starting the Service

Socket services must be started manually. From the Start menu, select Programs -> The SAS System (or your Version 8 SAS program group) -> IntrNet. Select the entry for the service you just created, and then select Start Interactively.

Launch services are started automatically by the Application Broker. Pool services are started automatically by the Application Load Manager. See Using the Load Manager for more details.

After a service is started, you can test it from a Web browser. The URL depends on the platform and path where your Application Broker is installed. For typical installations, the URL to test (or ping) a service is one of the following:

Windows
http://yourserver/scripts/broker.exe?_service=service-name&_program=ping

UNIX and OS/390
http://yourserver/cgi-bin/broker?_service=service-name&_program=ping

CMS
http://yourserver/sasweb/htbin/broker.cgi?_service=service-name&_program=ping

Specify your Web server name in place of yourserver and your service name in place of service-name. You might need to use a different URL path if you chose a different path when you installed the Application Broker. If the service is running, an HTML page is returned stating that the Application Server is functioning.


Stopping the Service

Socket or pool services can be stopped from a Web browser. The URL depends on the platform and path where your Application Broker is installed. For typical installations, the URL to stop a service is one of the following:

Windows
http://yourserver/scripts/broker.exe?_service=service-name&_program=stop

UNIX and OS/390
http://yourserver/cgi-bin/broker?_service=service-name&_program=stop

CMS
http://yourserver/sasweb/htbin/broker.cgi?_service=service-name&_program=stop

Specify your Web server name in place of yourserver and your service name in place of service-name. You might need to use a different URL path if you chose a different path when you installed the Application Broker.


Modifying a Service or Accessing Service Log Files

Service configuration and log files are kept in a service directory tree. The service root directory can be accessed from the Windows Start menu. From the Start menu, select Programs -> The SAS System (or your Version 8 SAS program group) -> IntrNet. Select the entry for the service you just created, and then select Service Directory. This directory contains an appstart.sas file with the SAS code used to start the Application Servers for this service. Other scripts and configuration files for this service are also located in this directory.

Log files are placed in the logs directory under the service root directory and are named <day>_<port>.log. For example, Mon_5001.log or Tue_5001.log. By default, logs are kept for one week (six full days and one partial day) and then overwritten.


Windows Services

Socket services can be installed as Windows NT or Windows 2000 services. Installing as a Windows service enables the service to run automatically whenever the Windows system is booted, even if a user is not logged into the system. As noted above, install the SAS Service Configuration Utility before you create any service that will be installed as a Windows service. Instructions for installing the SAS Service Configuration Utility are located in an appendix of the SAS System Installation Instructions for Microsoft Windows.

From the Start menu, select Programs -> The SAS System (or your Version 8 SAS program group) -> IntrNet. Select the entry for the service you just created, and then select Install as Windows Service. This step does not start the service. Once the service has been installed as a Windows service, each time the system reboots the service is started automatically. You can manually start and stop the Windows service by using the Start Windows Service and Stop Windows Service menu selections. Note that you can still run this service interactively by using the Start Interactively menu selection, but only if the Windows service has been stopped.

A Windows service can also be uninstalled from the Uninstall Windows Service menu selection. This only uninstalls the Windows service. The SAS/IntrNet service remains and can still be run interactively.

The Services icon in the Windows Control Panel enables you to see the current status of all Windows services. Each SAS/IntrNet service display name begins with SAS App Server. Note that a separate Windows service is created for each server in a multiple server socket service. Individual servers can be started and stopped from the Services Control Panel. You can use the Start menu selections to start or stop all servers in the service.


Removing a Service

You can remove a service by deleting the service directory and removing the associated Start menu entry. Follow these steps:

  1. If the service is running, stop it.

  2. If the service is a socket service and has been installed as a Windows service, uninstall it as a Windows service. From the Start menu, select Programs -> The SAS System (or your Version 8 SAS program group) -> IntrNet. Select the entry for the service, and then select Uninstall as a Windows Service. Perform this step even if you are not sure if this service is installed as a Windows service.

  3. Find the service directory, select Start Menu, and select Programs -> The SAS System (or whatever program group under which you installed Version 8 of SAS software) -> IntrNet. Select the entry for the service, and then select Service Directory.

  4. Go up one level to the parent directory and delete the directory for the service that you wish to remove.

  5. Remove the Start menu entry for the service. To do this, right click on the Start menu and select Explore All Users (or Explore on Windows 95/98).

  6. Use the Explorer window to find the Programs folder.

  7. Select The SAS System, then select IntrNet. Delete the service entry in this folder for the service that you want to remove.

Contents SAS/IntrNet 8.2: Application Dispatcher Previous Next