Previous Page | Next Page

Common Messaging Interface Call Routines

GETQUEUEPROPS



Gets information pertaining to a queue's properties and security.
Transports supported: MQSeries, MQSeries-C, MSMQ, Rendezvous, Rendezvous-CM

Syntax
Arguments
Details
Example

Syntax

CALL GETQUEUEPROPS(qid, rc, ttype, pmask, depth,maxdepth, maxmsgl, ctime, desc<, inbox>);

Arguments

qid

Numeric, input

Specifies the handle to an open queue that is obtained from a previous OPENQUEUE function call.

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.

ttype

Character, output

Identifies the transport type of the queue. Possible values are as follows:

  • MQSeries

  • MQSeries-C

  • MSMQ

  • Rendezvous

  • Rendezvous-CM

pmask

Numeric, output

Returns the property assertion mask that the queue accepts. This property is valid only for the MQSeries, MQSeries-C, and MSMQ transports. Possible values are as follows:

bit 0

In MSMQ, specifies that the queue only accepts authenticated messages.

bit 1

In MSMQ, specifies that the queue only accepts private messages.

bit 2

In MSMQ, specifies that the queue only accepts public messages.

bit 4

In MSMQ, specifies that the queue only accepts transactional messages. In MQSeries, bit 4 specifies that the QMgr supports synchpoint.

depth

Numeric, output

Returns the current depth of the queue.

maxdepth

Numeric, output

Returns the maximum depth that is configured for the queue. This property is valid only for the MQSeries, MQSeries-C, and MSMQ transports.

maxmsgl

Numeric, output

Returns the maximum length that is configured for the queue. This property is valid only for the MQSeries, MQSeries-C, and MSMQ transports.

ctime

Character, output

Returns the queue creation time stamp. This property is valid only for the MQSeries, MQSeries-C, and MSMQ transports.

desc

Character, output

Returns a description of the queue. This property is valid only for the MQSeries, MQSeries-C, and MSMQ transports.

inbox

Character, output

Returns the name of the private inbox created for a session opened with FETCHX. This property is valid only for the Rendezvous transports. This parameter is optional.


Details

If a transport does not support a particular property, then the routine returns -2 for numeric property values but does not change character property values.


Example

The following example obtains the properties of a queue:

length msg $ 200;
length qid rc 8;
length ttype $ 13;
length pmask depth maxdepth maxmsgl 8;
length ctime desc $ 80;

rc=0;
ttype='';
pmask=0;
depth=0;
maxdepth=0;
maxmsgl=0;
ctime='';
desc='';

call getqueueprops(qid, rc, ttype, pmask, depth,
   maxdepth, maxmsgl, ctime, desc);
if rc ^= 0 then do;
   put 'GETQUEUEPROPS: failed';
   msg = sysmsg();
   put msg;
end;
else do;
   put 'GETQUEUEPROPS: succeeded';
   put 'transport type = ' ttype;
   if ttype eq 'MQSERIES' then do;
      if pmask='1...'b then put 'Syncpoint is enabled';
      else put 'Syncpoint is disabled';
   end;
   else if ttype eq 'MSMQ' then do;
      if pmask='1'b then put 'Authenticated
         messages are required';
      if pmask='1.'b then put 'Private
         messages are required';
      else if pmask='1..'b then put 'Public
         messages are required';
      else put 'Privacy is optional';
      if pmask='1...'b then put 'Transactional
         messages are required';
      else put 'Transactional messages
         are not permitted';
   end;
   put 'depth = ' depth;
   put 'maxdepth = ' maxdepth;
   put 'maxmsgl = ' maxmsgl;
   put 'creation time = ' ctime;
   put 'description = ' desc;
end;

Previous Page | Next Page | Top of Page