Chapter Contents

Previous

Next
_setprop

_setprop



Set queue properties.


Syntax
Example

Syntax

CALL SEND(queueInst, '_setprop', rc, dlvrmode, maxdepth, maxmsgl);

Where... Is type... And represents...
rc N return code
dlvrmode C message delivery mode
maxdepth N queue maximum depth allowed
maxmsgl N queue maximum message length allowed

The _setprop method allows you to set certain queue properties. In particular, you may set the message delivery mode if there are no open FETCH or BROWSE queue instances. You may also set the maximum queue depth as well as the maximum message length.

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

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 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).

Note:   If you do not want to set a particular queue property, set its value to an empty string if its type is character or set its value to missing if its type is numeric.  [cautionend]


Example

This example sets the message queue delivery mode to NOTICE, the maximum depth to 50, and maximum message length to 4K bytes.

rc = 0;
dlvrmode = 'notice';
maxdepth = 50;
maxmsgl = 4096;
msg = '';

call send(queueInst, '_setprop', rc, dlvrmode, 
          maxdepth, maxmsgl);
if (rc NE 0) then do;
   msg = sysmsg();
   put msg;
end;
else put 'SetProp was successful';


Chapter Contents

Previous

Next

Top of Page

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