Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next

Services on OpenVMS

Creating a Service

To create a service on OpenVMS:

  1. From a system prompt, submit @sas$root:[tools]inetcfg.com.

    Note: Square brackets in syntax indicates that an attribute is optional; do not include the square brackets in your code.

    As the configuration utility runs, you are prompted for information about the service that you are creating.

  2. At the first prompt, type the name of the service. Press Return to accept the default value, which names the service default. To create a service other than default, type the service name and then press Return.

  3. The next prompt asks for the name of the directory where all of the service control files should be stored. Press Return to accept the suggested value, or type the desired directory name and then press Return.

  4. Specify the type of service you are defining. Type S for a socket service or P for a pool service. Press Return to continue.

  5. If you choose a socket service, specify the number of servers that you want to include in this service. The number you specify here represents only those servers running on this physical machine.

    If there is only one server, press Return. If you plan to have multiple servers, type the number and then press Return.

  6. If you have selected a socket service, you are prompted to enter a TCP/IP port number or name for each of the servers that you requested as the answer to the previous prompt. Type the value and press Return.

  7. You are asked whether you want to protect this service with an administrator password. Answer Y or N, and press Return. Type a password and press Return.

  8. The utility displays the information that you entered for this service. Verify that the information is correct.

    If the information is correct, press Return. The utility creates the service. Read the messages printed by the utility to determine if the service was created correctly. One of these messages contains the path for the service root directory created by the utility. Note this path for use later in this process.

    If you want to change the information, type N and press Return. The utility exits and you can start over.

  9. If you are creating a pool service, you must install the SAS Spawner. Refer to the SAS/CONNECT documentation for installation instructions for the SAS Spawner.

  10. The Application Broker must know about this service for you to access it. Open the Broker configuration file on your Web server in a text editor and add a service definition block.

    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 yourserver Port 5801

    A pool service definition might look like # 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 be kept running.
    PoolService service-name "brief-text-desc"
    ServiceDescription "text-desc"
    ServiceAdmin "administrator-name"
    ServiceAdminMail "administrator-email-address@host"
    ServiceLoadManager load-manager-host:port
    SasCommand "sas9 disk:[username.INTRNET.service-name]APPSTART.SAS+
    /rsasuser /noterminal /noprint /nolog /SYSPARM "
    Server yourserver
    Port 6000-6004
    Username your-username
    Password your-password
    SpawnerPort 7777
    MinRun 1

Starting the Service

Socket services must be started with the START.COM created by the configuration utility. To start the service, change to the service root directory created by the utility. Then submit the command

   @START.COM

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

Once 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 z/OS:
http://yourserver/cgi-bin/broker?_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 will be returned stating that the Application Server is functioning.

Stopping the Service

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 z/OS:
http://yourserver/cgi-bin/broker?_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.

Service Log Files

Log files are placed in the LOGS directory under the service root directory and are named <day>_<port>.LOG, for example, MON_5001.LOG;1 or TUE_5001.LOG;1. By default, logs are kept for one week (six full days and one partial day) and then overwritten.

SAS 9 has implemented a set of % codes that can be used in the -log parameter. You must add a -logparm option in order to get the codes translated into the log. For example adding

   -log 'disk:[service-root.service-name.LOGS]appsrv_%v.log'
   -logparm rollover=auto

creates log files with unique log filenames. The rollover=auto option causes an automatic "rollover" of the log when the directives in the value of the LOG option change. This is particularly useful for generating log files for pool services. This example creates log filenames such as APPSRV_1.LOG;1, APPSRV_2.LOG;1, and APPSRV_3.LOG;1.

Note: You must use a full path to specify the log file because there is limited control over what path the Load Manager or spawner will use as the current directory for each Application Server.

For more information, see the documentation on the LOGPARM= system option in SAS Language Elements.

Removing a Service

You can remove a service by deleting the service root directory and its contents. Any active servers must be stopped before you delete this directory.


Contents SAS/IntrNet 9.1: Application Dispatcher Previous Next