Contents Common Messaging Interface Previous Next

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

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=Alpine Airways,c=US
objectclass: top
objectclass: organization
o: Alpine Airways
st: North Carolina
st: NC
postalAddress:  615 Alpine Airways Dr.
postalCode: 27504
telephoneNumber: (919)123-4545

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

dn: sascomponent=sasMessaging¹,cn=SAS,o=Alpine 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=Alpine Airways,c=US
objectclass: top
objectclass: sasContainer
description: Transport definitions

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

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

dn:cn=Queues,sasComponent=sasMessaging¹,cn=SAS,o=Alpine Airways,c=US
objectclass: top
objectclass: sasContainer
description: Queue definitions

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

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

dn: cn=Maps,sascomponent=sasMessaging¹,cn=SAS,o=Alpine Airways,c=US
objectclass: top
objectclass: sasContainer
description: Map definitions

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

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

dn: sasmsmqmodelcn=model1,cn=Models,sascomponent=sasMessaging¹,cn=SAS,o=Alpine 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

¹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 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=Alpine Airways,c=US;

However, if you intend to administer (update) the LDAP with the CALL routines provided below (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=Alpine Airways,c=US;

Contents Common Messaging Interface Previous Next

Copyright © 2025 SAS Institute Inc. All Rights Reserved.