Change MQ Subscription (CHGMQMSUB)
- Where allowed to run
- All environments (*ALL)
- Threadsafe
- Yes
The Change MQ Subscription (CHGMQMSUB) command changes the specified attributes of an existing MQ subscription.
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
SUBID | Subscription identifier | Character value, *SAME | Optional, Key, Positional 2 |
SUBNAME | Subscription name | Character value, *SAME | Optional, Key, Positional 1 |
MQMNAME | Message Queue Manager name | Character value, *DFT | Optional, Key, Positional 3 |
TOPICSTR | Topic string | Character value, *NONE, *SAME | Optional, Positional 4 |
TOPICOBJ | Topic object | Character value, *NONE, *SAME | Optional, Positional 5 |
DEST | Destination | Character value, *SAME | Optional, Positional 6 |
DESTMQM | Destination Queue Manager | Character value, *NONE, *SAME | Optional, Positional 7 |
DESTCRRLID | Destination Correlation Id | Character value, *NONE, *SAME | Optional, Positional 8 |
PUBACCT | Publish Accounting Token | Character value, *NONE, *SAME | Optional, Positional 9 |
PUBAPPID | Publish Application Id | Character value, *NONE, *SAME | Optional, Positional 10 |
SUBUSER | Subscription User Id | Character value, *SAME | Optional, Positional 11 |
USERDATA | Subscription User Data | Character value, *NONE, *SAME | Optional, Positional 12 |
SELECTOR | Selector String | Character value, *NONE, *SAME | Optional, Positional 13 |
PSPROP | PubSub Property | *SAME, *NONE, *COMPAT, *RFH2, *MSGPROP | Optional, Positional 14 |
DESTCLASS | Destination Class | *SAME, *MANAGED, *PROVIDED | Optional, Positional 15 |
VARUSER | Variable User | *SAME, *ANY, *FIXED | Optional, Positional 16 |
REQONLY | Request Publications | *SAME, *YES, *NO | Optional, Positional 17 |
PUBPTY | Publish Priority | 0-9, *SAME, *ASPUB, *ASQDEF | Optional, Positional 18 |
WSCHEMA | Wildcard Schema | *SAME, *CHAR, *TOPIC | Optional, Positional 19 |
EXPIRY | Expiry Time | 0-999999999, *SAME, *UNLIMITED | Optional, Positional 20 |
Subscription identifier (SUBID)
>The subscription identifier of the subscription to be changed.
The possible values are:
- subscription-identifier
- Specify the 48 character hexadecimal string representing the 24 byte subscription identifier.
Subscription name (SUBNAME)
>The name of the subscription to be changed.
The possible values are:
- subscription-name
- Specify a maximum of 256 bytes for the subscription name.
Note: Subscription names of greater than 256 bytes can be specified using MQSC.
Message Queue Manager name (MQMNAME)
>Specifies the name of the Queue Manager.
The possible values are:
- *DFT
- Use the default Queue Manager.
- queue-manager-name
- The name of a Queue Manager.
Topic string (TOPICSTR)
>Specifies the topic string associated with this subscription.
The possible values are:
- topic-string
- Specify a maximum of 256 bytes for the topic string.
Note: Topic strings of greater than 256 bytes can be specified using MQSC.
Topic object (TOPICOBJ)
>Specifies the topic object associated with this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- topic-object
- Specify the name of the topic object.
Destination (DEST)
>Specifies the destination queue for messages published to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- destination-queue
- Specify the name of the destination queue.
Destination Queue Manager (DESTMQM)
>Specifies the destination queue manager for messages published to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- No destination queue manager is specified.
- destination-queue
- Specify the name of the destination queue manager.
Destination Correlation Id (DESTCRRLID)
>Specifies the correlation identifier for messages published to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- Messages are placed on the destination with a correlation identifier of MQCI_NONE.
- correlation-identifier
- Specify the 48 character hexadecimal string representing the 24 byte correlation identifier.
Publish Accounting Token (PUBACCT)
>Specifies the accounting token for messages published to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- Messages are placed on the destination with an accounting token of MQACT_NONE.
- publish-accounting-token
- Specify the 64 character hexadecimal string representing the 32 byte publish accounting token.
Publish Application Id (PUBAPPID)
>Specifies the publish application identity for messages published to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- No publish application identifier is specified.
- publish-application-identifier
- Specify the publish application identifier.
Subscription User Id (SUBUSER)
>Specifies the user profile that owns this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- user-profile
- Specify the user profile.
Subscription User Data (USERDATA)
>Specifies the user data associated with the subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- No user data is specified.
- user-data
- Specify a maximum of 256 bytes for user data.
Note: User data of greater than 256 bytes can be specified using MQSC.
Selector String (SELECTOR)
>Specifies the SQL 92 selector string to be applied to messages published on the named topic to select whether they are eligible for this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- No selection string is specified.
- selection-string
- Specify a maximum of 256 bytes for selection string.
Note: Selection strings of greater than 256 bytes can be specified using MQSC.
PubSub Property (PSPROP)
>Specifies the manner in which publish / subscribe related message properties are added to messages sent to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *NONE
- Publish / subscribe properties are not added to the message.
- *COMPAT
- Publish / subscribe properties are added to the message to maintain compatibility with IBM MQ V6.0 Publish / Subscribe.
- *RFH2
- Publish / subscribe properties are added to the message within an RFH Version 2 header.
- *MSGPROP
- Publish / subscribe properties are added as message properties.
Destination Class (DESTCLASS)
>Specifies whether this is a managed subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *MANAGED
- The destination is managed.
- *PROVIDED
- The destination is a queue.
Variable User (VARUSER)
>Specifies whether user profiles other than the creator of the subscription can connect to it (subject to topic and destination authority checks).
The possible values are:
- *SAME
- The attribute is unchanged.
- *ANY
- Any user profiles can connect to the subscription.
- *FIXED
- Only the user profile that created the subscription can connect to it.
Request Publications (REQONLY)
>Specifies whether the subscriber will poll for updates via MQSUBRQ API, or whether all publications are delivered to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *YES
- Publications are only delivered to this subscription in response to an MQSUBRQ API.
- *NO
- All publications on the topic are delivered to this subscription.
Publish Priority (PUBPTY)
>Specifies the priority of the message sent to this subscription.
The possible values are:
- *SAME
- The attribute is unchanged.
- *ASPUB
- The priority of the message sent to this subscription is taken from that supplied in the published message.
- *ASQDEF
- The priority of the message sent to this subscription is taken from the default priority of the queue defined as the destination.
- priority-value
- Specify a priority ranging from 0 through 9.
Wildcard Schema (WSCHEMA)
>Specifies the schema to be used when interpreting wildcard characters in the topic string.
The possible values are:
- *SAME
- The attribute is unchanged.
- *TOPIC
- Wildcard characters represent portions of the topic hierarchy.
- *CHAR
- Wildcard characters represent portions of strings.
Expiry Time (EXPIRY)
>Specifies the expiry time of the subscription. After a subscription's expiry time has elapsed, it becomes eligible to be discarded by the queue manager and will receive no further publications.
The possible values are:
- *SAME
- The attribute is unchanged.
- *UNLIMITED
- The subscription does not expire.
- expiry-time
- Specify an expiry time in tenths of a second ranging from 0 through 999999999.
Examples
>None
Error messages
>Unknown
Parent topic: CL commands reference for IBM i