MSMQ Call Routines |
Syntax | |
Arguments | |
Details | |
Example |
Syntax |
CALL MSMQCREATEQUEUE(qid, rc, propids, value1 <,value2, ...>); |
Numeric, output
Returns the queue identifier that represents the format name of the queue that is created. The format name of the queue is a unique name generated by MSMQ.
Numeric, output
Provides the return code from the CALL routine. If an error occurs, then the return code is nonzero. A return code of -1 reflects a SAS internal error. Otherwise, it represents an MSMQ error code. You can use the SAS function SYSMSG() to obtain a textual description of the return code.
Character, input
Specifies one or more properties that the queue exhibits when it is created. This parameter is a character string with each applicable property separated by a comma. PATHNAME is the only required property. You must provide a value parameter for each property specified in the propids string. Each property ID in the propids string is associated positionally with a value parameter.
The following creation properties are valid:
Specifies whether the queue accepts only authenticated messages. The following values are valid:
Specifies the queue accepts either authenticated or non-authenticated messages.
Specifies the queue always requires authenticated messages.
Specifies a single base priority for all messages that are sent to a public queue. Values range from -32768 to 32767, where 32767 is the highest priority and 0 is the default priority.
Determines whether messages retrieved from the queue are also copied to its journal queue. The following values are valid:
Specifies that messages that are removed from the queue are discarded.
Specifies that messages removed from the queue are always stored in its journal queue.
Specifies the maximum size (in kilobytes) of the journal queue. The default size is infinite.
Describes the queue. The default is a blank label ().
Specifies the MSMQ pathname of the queue. The format of a public queue is:
MachineName\QueueNameThe format of a private queue is:
MachineName\PRIVATE$\QueueName
Specifies the privacy level that is required by the queue. The following values are valid:
Specifies that the queue accepts only non-private (clear) messages.
Specifies that the queue accepts only private (encrypted) messages.
Specifies that the queue accepts both private and non-private messages.
Specifies the maximum size (in kilobytes) of the queue. The default size is infinite.
Specifies whether the queue is a transaction queue or a non-transaction queue. The following values are valid:
Specifies that the queue does not accept transaction operations.
Specifies that all messages that are sent to the queue must always be done through an MSMQ transaction.
Specifies the type of service that is provided by the queue. The value of the TYPE property is a universal unique identifier (UUID) in the form of a character string that represents the binary data.
Note: Security of the queue defaults as follows:
Owner: process user
Group: process group
DACL: queue creator - has full control
Queue users
get queue properties
get queue security
send messages
These defaults can either be changed programmatically by using the MSMQSETQSEC routine or via the MSMQ Explorer interface.
Details |
The routine also registers the queue in the MSMQ Information Store (MQIS) for public queues or registers it on the local computer for private queues.
Example |
This example creates a public queue.
length msg $ 200; qid=0; rc=0; CALL MSMQCREATEQUEUE(qid, rc, "PATHNAME,LABEL", "pcpad\testq", "Test Queue"); if rc ^= 0 then do; put 'MSMQCreateQueue: failed'; msg = sysmsg(); put msg; end; else put 'MSMQCreateQueue: succeeded';
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.