MSMQSETQPROP
Sets the properties of a specific queue.
Syntax
CALL MSMQSETQPROP(qid, rc, propids, value1 ,value2, ...>);
Required Arguments
- qid
-
Numeric, input
Specifies the queue
identifier that represents the format name of the queue.
- rc
-
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.
- propids
-
Character, input
Identifies one or more
properties that you want to set. This parameter is a character string
with each applicable property separated by a comma. For each property
identified by
propids , you
must provide a
value parameter
that specifies the value to use to set the property. The following
propids and
values are valid:
- AUTHENTICATE
-
Specifies whether the
queue accepts only authenticated messages. The following values are
valid:
- NONE
-
Specifies the queue
accepts either authenticated or non-authenticated messages.
- ALWAYS
-
Specifies the queue
always requires authenticated messages.
- BASEPRIORITY
-
Specifies the base
priority for all messages that are sent to a public queue. The value
is a numeric that ranges from -32768 to 32767, where 32767 is the
highest priority and 0 is the default priority.
- JOURNAL
-
Specifies if messages
are also copied to its journal queue. The following values are valid:
- NONE
-
Specifies that messages
removed from the queue are discarded.
- ALWAYS
-
Specifies that messages
removed from the queue are always stored in its journal queue.
- JOURNAL_QUOTA
-
Specifies the maximum
size (in kilobytes) of the journal queue.
- LABEL
-
Specifies a description
of the queue. The value is a character string.
- PRIV_LEVEL
-
Specifies the privacy
level that is required by the queue. The value is a character string.
The following values are valid:
- NONE
-
Specifies that the
queue accepts only non-private (clear-text) messages.
- BODY
-
Specifies that the
queue accepts only private (encrypted) messages.
- OPTIONAL
-
Specifies that the
queue accepts both private and non-private messages.
- QUOTA
-
Specifies the maximum
size (in kilobytes) of the queue.
- TYPE
-
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.
Example
This example sets the
queue properties.
length msg $ 200;
rc=0;
CALL MSMQSETQPROP(qid, rc, "AUTHENTICATE,BASEPRIORITY,JOURNAL,
JOURNAL_QUOTA,LABEL,PRIV_LEVEL,QUOTA,
TYPE", "ALWAYS", 1, "ALWAYS", 32767,
"New Label", "BODY", 32767,
"0A0B0C0D0E0F0102030405060708090A");
if rc ^= 0 then do;
put 'MSMQSetQProp: failed';
msg = sysmsg();
put msg;
end;
else put 'MSMQSetQProp: succeeded';