Delete Subscription
The Delete Subscription (MQCMD_DELETE_SUBSCRIPTION) command deletes a subscription.
Required parameters
- SubName (MQCFST)
- Subscription name (parameter identifier: MQCACF_SUB_NAME).
Specifies the unique subscription name. The subscription name, if provided, must be fully specified; a wildcard is not acceptable.
The subscription name must refer to a durable subscription.
If SubName is not provided, SubId must be specified to identify the subscription to be deleted.
The maximum length of the string is MQ_SUB_NAME_LENGTH.
- SubId (MQCFBS)
- Subscription identifier (parameter identifier: MQBACF_SUB_ID).
Specifies the unique internal subscription identifier.
We must supply a value for SubId if you have not supplied a value for SubName.
The maximum length of the string is MQ_CORREL_ID_LENGTH.
Optional parameters
- CommandScope (MQCFST)
- Command scope (parameter identifier: MQCACF_COMMAND_SCOPE). This parameter applies to z/OS only.
Specifies how the command is processed when the queue manager is a member of a queue sharing
group. We can specify one of the following:
- Blank (or omit the parameter altogether). The command is processed on the queue manager on which it was entered.
- A queue manager name. The command is processed on the queue manager you specify, providing it is active within the queue sharing group. If you specify a queue manager name other than the queue manager on which it was entered, we must be using a queue sharing group environment, and the command server must be enabled.
- An asterisk (*). The command is processed on the local queue manager and is also passed to every active queue manager in the queue sharing group.
The maximum length is MQ_QSG_NAME_LENGTH.
We cannot use CommandScope as a parameter on which to filter.
Parent topic: Definitions of the Programmable Command Formats