Chapter Contents

Previous

Next
_close

_close



Close a message queue.


Syntax

Syntax

CALL SEND(queueInst, '_close', rc <, attribs>);

Where... Is type... And represents...
rc N return code
attribs C (optional) attributes

When invoked on a Queue instance, _close closes the queue. The Queue instance still exists, but it is no longer open. Therefore, no subsequent messaging can occur on this instance until it is opened by using the _open method.

If an error or warning condition is encountered during the close, a non-zero return code is returned in the rc parameter. The return codes shown here are a defined set of warning conditions that can be checked by using the SYSRC macro, which is provided in the autocall library that is supplied by SAS Institute.

If the rc is not one of the messages shown here, use SYSMSG() to determine the exact error message.

_SWQDMSG
is a WARNING that indicates that the queue was successfully closed, but the queue was not deleted because messages still remain on the queue.

_SWQDADM
is a WARNING that indicates that the queue was successfully closed, but the queue cannot be deleted because it is an administrator predefined queue.

The following optional attribs may be specified with the close method:

SURVIVE
indicates that the queue will not be purged from memory. Its purpose is to allow temporary queues a way to survive an initial close. This preserves the queue for the life of the DOMAIN server without having to back messages to disk.

DELETE
causes a permanent dynamic queue to be deleted if no messages reside on the queue. If messages still exist on the queue, the queue is closed, but a warning is returned to designate that the queue was not deleted as intended. Using this attribute when closing an administrator pre-defined queue returns a warning because these types of queues can only be deleted by an administrator (PROC ADMIN). This attribute is ignored when closing temporary queues because they are automatically deleted when the creating instance closes it.

DELETE_PURGE
behaves exactly like the DELETE attribute with one difference. It causes a permanent dynamic queue to be deleted even if messages remain on the queue.


Chapter Contents

Previous

Next

Top of Page

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