Previous Page | Next Page

Common Messaging Interface Call Routines

SETMODEL



For the MSMQ transport, defines a dynamic creation queue model. For the Rendezvous transport, the SETMODEL call enables you to change one or more transport attributes from the default values. For the Rendezvous-CM transport, defines a model definition for certified message delivery.
Transports supported: MSMQ, Rendezvous, Rendezvous-CM

Syntax
Arguments
Details
Example

Syntax

CALL SETMODEL(transport, name, storage, rc, props, value1 <, value2,...>)

Arguments

transport

Character, input

Specifies the transport that is associated with this model. MSMQ, Rendezvous, and Rendezvous-CM are the only valid transports for this CALL routine.

name

Character, input

Identifies the dynamic model or transport model that is assigned.

storage

Character, input

Specifies the location for the model definition. The REGISTRY location is valid.

rc

Numeric, output

Provides the return code from the CALL routine. If an error occurs, then the return code is nonzero. You can use the SAS function SYSMSG() in order to obtain a textual description of the return code.

props

Character, input

Identifies one or more properties that the queue exhibits once created. This parameter is a character string. Each applicable property is separated by a comma. You must associate a value with each property that is identified by props.

values

Character or numeric, input

Inputs the values for each property that is specified. Use one of the following values for each of the properties listed in the props parameter.

AUTHENTICATE

Character

Specifies whether the queue accepts only authenticated messages. The following values are valid:

NONE (Default)

Specifies the queue accepts either authenticated or nonauthenticated messages.

ALWAYS

Specifies the queue always requires authenticated messages.

BASEPRIORITY

Numeric

Specifies a single base priority for all messages sent to a public queue. Values range from -32768 to 32767, where 32767 is the highest priority, and 0 is the default priority.

JOURNAL

Character

Specifies whether messages retrieved from the queue are also copied to its journal queue. The following values are valid:

NONE (default)

Indicates that messages that are removed from the queue are not stored in a journal.

ALWAYS

Indicates that messages that are removed from the queue are always stored in its journal queue.

JOURNALQUOTA

Numeric

Specifies the maximum size (in kilobytes) of the journal queue. The default size is infinite.

LABEL

Character

Specifies a description of the queue. The default is a blank label ("").

PRIVLEVEL

Character

Specifies the privacy level that is required by the queue. The following values are valid:

NONE

Specifies that the queue accepts only nonprivate (clear-text) messages.

BODY

Specifies that the queue accepts only private (encrypted) messages.

OPTIONAL (default)

Specifies that the queue accepts both private and nonprivate messages.

QUOTA

Numeric

Specifies the maximum size (in kilobytes) of the queue. The default size is infinite.

TRANSACTION

Character

Specifies whether the queue is a transactional queue or a nontransactional queue. The following values are valid:

NONE (default)

Indicates that the queue does not accept transactional operations.

ALWAYS

Indicates that all messages that are sent to the queue must be done through an MSMQ transaction.

TYPE

Binary string

Specifies the type of service that is provided by the queue. The value of the TYPE property is a universal unique identifier (UUID) character string that represents binary data. The default is NULL_GUID.

For Rendezvous and Rendezvous-CM, the following transport properties are valid:
SERVICE

Character

Specifies the service name or port number. If you specify a null value, the transport creation function looks for the service name "rendezvous" and uses 7500 if "rendezvous" is not found. The TIB/Rendezvous documentation strongly recommends that administrators define "rendezvous" as a service, especially if UDP port 7500 is already in use. For more information, consult the TIB/Rendezvous documentation.

NETWORK

Character

Specifies the network name, Host IP, host name, or other identifier of the network. For more information, see the TIB/Rendezvous documentation.

DAEMON

Character

Specifies the TCP socket number for a local daemon, or the remote host name and socket number for a remote daemon. For more information, consult the TIB/Rendezvous documentation.

Note:    A model is not required if you are using default Rendezvous values.  [cautionend]

For Rendezvous-CM only, the following transport properties are valid:
CMNAME

Character

Specifies the reusable name of a certified message (CM) transport. This is the CM Correspondent name, which can be omitted if persistent correspondents are not required.

LEDGER

Character

Specifies the name of the file in which to store a file-based ledger. This property can be omitted if persistent correspondents are not required.

RELAYAGENT

Character

Specifies the name of the relay agent. If you use this property, then it must be configured by the Rendezvous administrator.

REQUESTOLD

Character

Indicates whether a persistent correspondent requires delivery of unacknowledged messages that were sent to a previous certified delivery transport with the same CMNAME. Possible types are as follows:

NO (default)

Specifies that the new CM transport does not require certified senders to retain unacknowledged messages. Certified senders can delete those messages from their ledgers.

YES

Specifies that the new CM transport requires certified senders to retain unacknowledged messages sent to this persistent correspondent. When the new CM transport begins listening to the appropriate subjects, the senders can complete delivery. It is an error to specify YES when CMNAME is null.

SYNCLEDGER

Character

Specifies how to synchronize the ledger to its storage medium. Possible types are as follows:

NO (default)

Specifies that the operating system writes changes to the storage medium asynchronously.

YES

Specifies that the operations updating the ledger file do not return until the changes are written to the storage medium.


Details

Dynamic models for MQSeries are defined within its own configuration.


Example

The following example defines an MSMQ model queue in the SAS registry:

length msg $ 200;
length rc 8;
rc=0;

/* private queue model */
call setmodel('MSMQ', 'MYMODEL', 'REGISTRY', rc,
'AUTHENTICATE,PRIVLEVEL,LABEL', 'ALWAYS',
'BODY', 'Private dynamic queue');
if rc ^= 0 then do;
  put 'SETMODEL: failed';
  msg = sysmsg();
  put msg;
end;
else put 'SETMODEL: succeeded';

Previous Page | Next Page | Top of Page