MSMQGETQSEC

Retrieves the access control security information for the specified queue.

Syntax

CALL MSMQGETQSEC(qid, rc, owner, dacl);

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.
owner
Character, output
Returns the owner of the queue. Initialize this variable appropriately to guarantee that truncation of the returned value does not occur.
dacl
Character, output
Returns the discretionary access control list for the queue. Initialize this variable appropriately to guarantee that truncation of the returned value does not occur. This parameter is returned in the form of
Domain\Account:accessType:Permissions,...
where accessType is one of the following:
  • ALLOW (Permissions allowed)
  • DENY (Permissions denied)
Permissions is one or more of the following separated by '+':
  • Rj (Receive Journal)
  • Rq (Receive Message)
  • Pq (Peek Message)
  • Sq (Send Message)
  • Sp (Set Properties)
  • Gp (Get Properties)
  • D (Delete Queue)
  • Pg (Get Permissions)
  • Ps (Set Permissions)
  • O (Take Ownership)

Example: Example

This example gets the queue security properties and displays them.
length msg $ 200;
length owner $ 60;
length dacl $ 200;
rc=0;
CALL MSMQGETQSEC(qid, rc, owner, dacl);
if rc ^= 0 then do;
   put 'MSMQGetQSec: failed';
   msg = sysmsg();
   put msg;
end;
else do;
   put 'MSMQGetQSec: succeeded';
   put 'owner is ' owner;
   put 'dacl is ' dacl;
end;