Chapter Contents

Previous

Next
SAS/CONNECT User's Guide

The Direct-Messaging Concept

Typically, one program communicates with another program by directly calling it. This can put unnatural restrictions on your applications that add complexity and hinder the flow of information. Messaging allows applications to communicate by sending each other data in messages. Any action can be taken upon receipt of a message, and acknowledgments can be returned to the sender if and when appropriate.

In its simplest form, messaging requires that both the client and the server portions of the application be active at the same time. This is called direct messaging. In other words, the client cannot send a message unless a server is listening for a message.

Basic Structure of Direct-Messaging illustrates the basic structure of direct-messaging. In this figure, Program 1 sends Program 2 a message with a message type of 100 as shown by path 1. Program 2 receives message type 100 and generates a response with message type 200 that is sent back to Program 1 as shown by path 2. Programs 1 and 2 are shown running on separate platforms. These programs could run on a single platform or separate platforms of the same or of a unique type. Also, any number of programs can communicate simultaneously by using direct-messaging.

Basic Structure of Direct-Messaging

[IMAGE]

The direct-messaging facility allows basic and flexible message construction, transmission, and notification services that span operating system and hardware boundaries across the enterprise. Messages are free-form. Their structure, which is defined by the application developer, may range from a simple collection of variables to complex hierarchies of SCL lists. Additionally, messages may include one or more attachments in the form of SAS data sets or filtered subsets, catalogs or catalog entries, and external files.

Each message contains a message type field. This field is used to define the set of message types that are meaningful to a particular program. When a program receives a message that has a known message type, it knows the layout of the data that is contained in the message body, and it can take the appropriate action based on the values of the data.


Chapter Contents

Previous

Next

Top of Page

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