OPTS (10-digit signed integer) - input

Options that control the action of MQCLOSE.

The OPTS parameter controls how the object is closed. Only permanent dynamic queues can be closed in more than one way, being either retained or deleted; these are queues whose DefinitionType attribute has the value QDPERM (see the DefinitionType attribute described in Attributes for queues). The close options are summarized in Table 49.

One (and only one) of the following must be specified:

CONONE
No optional close processing required.

This must be specified for:

In all of the above cases, the object is retained and not deleted.

If this option is specified for a temporary dynamic queue:

If this option is specified for a permanent dynamic queue, the queue is retained and not deleted.

CODEL
Delete the queue.

The queue is deleted if either of the following is true:

In all other cases the call fails with reason code RC2045, and the object is not deleted.

COPURG
Delete the queue, purging any messages on it.

The queue is deleted if either of the following is true:

In all other cases the call fails with reason code RC2045, and the object is not deleted.

Table 49. Effect of MQCLOSE options on various types of object and queue This table shows which close options are valid, and whether the object is retained or deleted.
Type of object or queue CONONE CODEL COPURG
Object other than a queue Retained Not valid Not valid
Predefined queue Retained Not valid Not valid
Permanent dynamic queue Retained Deleted if empty and no pending updates Messages deleted; queue deleted if no pending updates
Temporary dynamic queue (call issued by creator of queue) Deleted Deleted Deleted
Temporary dynamic queue (call not issued by creator of queue) Retained Not valid Not valid
Distribution list Retained Not valid Not valid