Chapter Contents

Previous

Next
_getprop

_getprop



Get queue properties.


Syntax
Example

Syntax

CALL SEND(queueInst, '_getprop', rc, type, def, msgpsist, dlvrmode, crdt, depth, maxdepth, maxmsgl);

Where... Is type... And represents...
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 _getprop method retrieves the properties that are associated with a queue.

If an error or warning condition is encountered when retrieving the queue properties, a non-zero return code is returned in the rc parameter. Use SYSMSG() to determine the exact error message.

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

TEMPORARY
The queue is deleted after it is closed.

PERMANENT
The queue continues to exist after it is closed.

The def parameter specifies whether the queue is defined by using predefined attributes or dynamic creation attributes.
PREDEFINED
DYNAMIC

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:

DEFAULT
A query on the queue retrieves the message header information in addition to the actual message.

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

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 held by the queue (-1 is unlimited).

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


Example

This example prints the information obtained about a queue.

rc = 0;
type = '';
def = '';
msgpsist = '';
dlvrmode = '';
crdt = 0;
depth = 0;
maxdepth = 0;
maxmsgl = 0;
msg = '';
datetime '';

call send(queueInst, '_getprop', rc,
          type, def, msgpsist, dlvrmode, 
          crdt, depth, maxdepth, maxmsgl);
if (rc NE 0) then do;
   msg = sysmsg();
   put msg;
end;
else do;
   put 'Queue properties:';
   put 'type = ' type;
   put 'definition = ' def;
   put 'msg persistence = ' msgpsist;
   put 'delivery mode = ' dlvrmode;
   datetime = putn(crdt, 'datetime.');
   put 'creation date/time = ' datetime;
   put 'current depth = ' depth;
   put 'maximum depth = ' maxdepth;
   put 'maximum message length = ' maxmsgl;
end;


Chapter Contents

Previous

Next

Top of Page

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