Chapter Contents

Previous

Next
SAS/CONNECT User's Guide

Introduction

The following sections of code are part of a sample store-and-forward application called "The Application Development Manager (ADM)" that was developed by using the SAS System and its direct messaging and queuing facilities. The ADM is designed to facilitate application development in a work group by allowing a restricted number of people to work on a shared set of SAS catalogs. The ADM server maintains a single centralized copies of the application catalogs and allows users to check-out and check-in individual entries.

A message is broadcast to all members of the work group to notify them whenever an updated entry is checked back into the central catalogs or a new entry is added to the central catalogs. They have the option of receiving any number of the updated entries so that they can be assured of running the most current version of the application. Because the notifications are sent to message queues, the members of the work group can also choose to request the entries at the time of the notification or at any time in the future.

The following actions are available to the users of this application:

register
add your identity to the work group that is defined for a specific application. A broadcast queue is also created for you as part of the registration.

check-out
get a copy of a specific entry from the central catalogs and put it into your private work area for development

check-in
return an updated entry to the central catalogs. The entry is updated in its central catalog, and a message about the updated entry is broadcast to each of the work group members' queues.

add
add a new entry to a central catalog. The entry is updated in the central catalog, and a message about the new entry is broadcast to each of the work group members' queues.

query
query your message queue for any outstanding messages.

receive
receive one or more new or updated entries from the central catalogs.

purge
delete any broadcast messages that you may have accumulated.

de-register
remove yourself from the work group that is associated with a specific application.

To implement the ADM application, each of the above actions is mapped to a message type. In order to perform an action, the client sends the ADM server a message. The message contains a message type that represents an action, as well as any information needed by the ADM server to process the requested action.

The following sections contain code segments to illustrate the implementation of the check-out, query, and check-in actions. Initialization code and error checking have been taken out of these code segments to draw attention to the messaging interface.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.