Chapter Contents




Get queue properties.



CALL QUEUE_GETPROP(queueId, rc, type, def, msgpsist, dlvrmode, crdt, depth, maxdepth, maxmsgl);

Where... Is type... And represents...
queueId N queue identifier
rc N return code
type C indicates what happens to a queue after the queue is closed
def C defines how the queue was created
msgpsist C message persistence enablement
dlvrmode C message delivery mode
crdt N queue creation date/time stamp
depth N queue current depth
maxdepth N queue maximum depth allowed
maxmsgl N queue maximum message length allowed

The QUEUE_GETPROP routine is used to retrieve the properties that are associated with a queue.

If an error or a warning condition is encountered, a non-zero return code is returned in the rc parameter. Use the SYSMSG() function to print the message that is associated with the non-zero rc.

The type parameter indicates if the queue is defined to be temporary or permanent.

The queue is deleted after it is closed.

The queue continues to exist after it is closed.

The def parameter is used to specify if the queue is defined by using pre-defined attributes or dynamic creation attributes.

The msgpsist parameter indicates whether messages delivered to this queue will persist on the queue indefinitely or until they are explicitly fetched from the queue or until the queue is closed.
YES Messages will persist.
NO Messages will not persist.

The dlvrmode parameter indicates the queue's message delivery mode:

A query on the queue retrieves the message header information as well as the actual message.

A query on the queue retrieves the message header information only.

The crdt parameter is the date and time when the queue was created.

The depth parameter indicates the current number of messages on the queue (depth of the queue).

The maxdepth parameter indicates the maximum number of messages that can be held by the queue (-1 is unlimited).

The maxmsgl parameter indicates the maximum length of a message for the queue (-1 is unlimited).


This example prints the information that is obtained about a queue.

length type def msgpsist dlvrmode $20;
length crdt depth maxdepth maxmsgl 8;

call queue_getprop(qid, rc, type, def, msgpsist, 
   dlvrmode, crdt, depth, maxdepth, maxmsgl);

if rc = 0 then do;
   put 'Queue properties:';
   put 'type = ' type;
   put 'definition = ' def;
   put 'msgpsist = ' msgpsist;
   put 'dlvrmode = ' dlvrmode;
   put 'creation date/time = ' crdt datetime.;
   put 'depth = ' depth;
   put 'maxdepth = ' maxdepth;
   put 'maxmsgl = ' maxmsgl;
else do;
   msg = sysmsg();
   put msg;

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.