SAS 9.1.3 Integration Technologies » Developer's Guide


Common Messaging Interface
Writing Applications Using the Common Interface
Using TIB/Rendezvous with the Common Interface
TIB/Rendezvous Coding Example
TIB/Rendezvous Certified Messaging Coding Examples
Using a Repository with Application Messaging
CALL Routines for the Common Messaging Interface
SETALIAS
SETMAP
SETMODEL
GETALIAS
GETMAP
GETMODEL
GETQUEUEPROPS
DELETEALIAS
DELETEMAP
DELETEMODEL
INIT
TERM
OPENQUEUE
CLOSEQUEUE
SENDMESSAGE
RECEIVEMESSAGE
PARSEMESSAGE
GETATTACHMENT
ACCEPTATTACHMENT
BEGINTRANSACTION
COMMIT
ABORT
FREETRANSACTION
Attachment Layout for Websphere MQ and MSMQ Through Common Messaging Interface
Attachment Layout for TIB/Rendezvous
Attachment Error Handling for Common Messaging Interface
Application Messaging

Using an LDAP Server with the Common Messaging Interface

To specify a Lightweight Directory Access Protocol (LDAP) server, the following macro variables must be set within your application:

   /* required LDAP information */
   %let ldap_host=;  
      /* IP address of the host running LDAP server      */
   %let ldap_port=;  
      /* port associated with LDAP service (default=389) */
   %let ldap_base=;  
      /* base of SAS messaging tree within database      */

   /* authentication information */
   %let ldap_dn=;    
      /* distinguished name for authentication           */
   %let ldap_pw=;    
      /* password for authentication                     */

LDAP Object Class Definitions Required for Messaging

The following LDAP object class definitions are used for application messaging.

   objectclass sasContainer
      requires
         objectClass
      allows
         cn,
         sasComponent,
         Description

   objectclass sasTransportAlias
      requires
         objectClass,
         sasTransportAliascn,
         sasTransportName

   objectclass sasQueueAlias
      requires
         objectClass,
         sasQueueAliascn,
         sasTransportName,
         sasQueueName

   objectclass sasMap
      requires
         objectClass,
         sasMapcn,
         sasDescriptor

   objectclass sasModel
      requires
         objectClass,
         sasModelcn
      allows
         sasPermanent,
         sasMsgPsist,
         sasNotice,
         sasMaxDepth,
         sasMaxMsgl,
         sasRequired

   objectclass sasMSMQModel
      requires
         objectClass,
         sasMSMQModelcn
      allows
         sasAuthenticate,
         sasBasePriority,
         sasJournal,
         sasJournalQuota,
         sasLabel,
         sasPrivLevel,
         sasQuota,
         sasTransaction,
         sasType

   objectclass sas-MsgRendModel
      requires
         objectClass,
         sasMsgRendModelcn
      allows
         sas-msgservice,
         sas-msgnetwork,
         sas-msgdaemon,
         sas-msgcmname,
         sas-msgledger,
         sas-msgrelayagent,
         sas-msgrequestold,
         sas-msgsyncledger

Sample LDIF Entries

The following is a sample of object class definition entries in the LDAP Data Interchange Format (LDIF). This sample specifies the object definitions for the organization, SAS System, transport, queue, aliases, map, and a MSMQ model. After object classes are defined in this file, they are loaded into the LDAP repository by a network administrator.

Note: The LDAP repository uses a blank line followed by the distinguished name (DN) statement to indicate start of a definition entry.

   dn: o=Alphalite Airways,c=US
   objectclass: top
   objectclass: organization
   o: Alphalite Airways
   st: North Carolina
   st: NC
   postalAddress:  615 Alphalite Airways Dr.
   postalCode: 27504
   telephoneNumber: (919)123-4545

   dn: cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: The SAS System

   dn: sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: Common Messaging Abstraction for SAS 
      Domain Server, MQSeries, and MSMQ

   dn: cn=Transports,sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: Transport definitions

   dn: sastransportaliascn=transport1,cn=Transports,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasTransportAlias
   sastransportaliascn: transport1
   sastransportname: MQSeries

   dn: sastransportaliascn=transport2,cn=Transports,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasTransportAlias
   sastransportaliascn: transport2
   sastransportname: MSMQ

   dn: sastransportaliascn=transport3,cn=Transports,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasTransportAlias
   sastransportaliascn: transport3
   sastransportname: Rendezvous
   
   dn: sastransportaliascn=transport4,cn=Transports,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasTransportAlias
   sastransportaliascn: transport4
   sastransportname: Rendezvous-CM      
   
   dn:cn=Queues,sasComponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: Queue definitions

   dn: sasqueuealiascn=queue1,cn=Queues,
      sascomponent=sasMessaging¹,cn=SAS,
      o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasQueueAlias
   sasqueuealiascn: queue2
   sastransportname: MQSeries
   sasqueuename: QMgr:Queue

   dn: sasqueuealiascn=queue2,cn=Queues,
      sascomponent=sasMessaging¹,cn=SAS,
      o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasQueueAlias
   sasqueuealiascn: queue2
   sastransportname: MSMQ
   sasqueuename: pathname

   dn: sasqueuealiascn=queue3,cn=Queues,
      sascomponent=sasMessaging¹,cn=SAS,
      o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasQueueAlias
   sasqueuealiascn: queue3
   sastransportname: Rendezvous
   sasqueuename: subject name   
   
   dn: cn=Maps,sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: Map definitions

   dn: sasmapcn=map1,cn=Maps,
      sascomponent=sasMessaging¹,cn=SAS,
      o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasMap
   sasmapcn: map1
   sasdescriptor: type,offset,length;type,offset,length;...

   dn: cn=Models,sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasContainer
   description: Model definitions

   dn: sasmsmqmodelcn=model1,cn=Models,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasMSMQModel
   sasmsmqmodelcn: model1
   sasauthenticate: none,always   
   sasbasepriority: short
   sasjournal: none,always
   sasjournalquota: unsigned long
   saslabel: queue description
   sasprivlevel: none,body,optional
   sasquota: unsigned long
   sastransaction: none,always
   sastype: binary GUID
   
   dn: sas-msgRendModelcn=model2,cn=Models,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasMsgRendModel
   sas-msgRendModelcn: model2
   sas-msgService: name or port number   
   sas-msgNetwork: name or identifier
   sas-msgdaemon: socket number

   dn: sas-msgRendModelcn=model3,cn=Models,
      sascomponent=sasMessaging¹,
      cn=SAS,o=Alphalite Airways,c=US
   objectclass: top
   objectclass: sasMsgRendModel
   sas-msgRendModelcn: model3
   sas-msgcmname: name    
   sas-msgledger: filename
   sas-msgrelayagent: name
   sas-msgrequestold: yes,no
   sas-msgsyncledger: yes,no

Important Note

¹Prior to Version 8 (TS M1), the name of the sascomponent was "Messaging." Starting with Version 8 (TS M1), the sascomponent is renamed to "sasMessaging." In order to accommodate this change, a new macro variable, cmqmsgcomp, has been defined in Version 8 (TS M1).

If you are writing programs (using Integration Technologies Version 8 (TS M1) or later) that will access an LDAP server that was configured for SAS Integration Technologies using the containers.ldif file supplied with Version 8.0 or earlier, then you need to issue the following SAS macro statement before running any programs that access that LDAP directory through the Common Messaging interface:

   %let cmqmsgcomp=Messaging;

This macro variable enables your SAS programs running on Version 8 (TS M1) or later to access definitions that were created using the sascomponent name of "Messaging." However, any new definitions that are created will be stored in the cn=sasMessaging container.

Note: SAS Integration Technologies Version 8 (TS M1) and higher does not provide any mechanism for changing or deleting definitions that are stored in the cn=Messaging container. If you created LDAP entries for the common interface under SAS Integration Technologies Version 8.0 or earlier and you need to alter or delete these definitions, then you will need to use the administrative tools supplied by your LDAP server vendor.

Setting the LDAP Search Base

To interface with the LDAP directory successfully, you need to set the search base to the start of the SAS tree in the LDAP object hierarchy. For example, for the sample hierarchy shown above, the macro statement to set the search base correctly would be:

   %let ldap_base=cn=SAS,o=Alphalite Airways,c=US;

However, if you intend to administer (update) the LDAP with the CALL routines provided (SET***, DELETE***), you will need to set the base to a position just below the start of the SAS tree hierarchy to ensure that all DNs (distinguished names) are generated appropriately. For example,

   %let ldap_base=o=Alphalite Airways,c=US;