Work with MQ Subscriptions (WRKMQMSUB)
- Where allowed to run
- All environments (*ALL)
- Threadsafe
- Yes
The Work with MQ Subscriptions (WRKMQMSUB) command allows you to work with multiple subscriptions that are defined on the local queue manager. This enables you to copy, change, display and delete IBM MQ subscriptions.
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
SUBNAME | Subscription name | Character value, *ALL | Optional, Positional 1 |
MQMNAME | Message Queue Manager name | Character value, *DFT | Optional, Positional 2 |
WHERE | Filter command | Single values: *NONE Other values: Element list | Optional, Positional 3 |
Element 1: Filter keyword | *DEST, *DESTCLASS, *DESTCRRLID, *DESTMQM, *EXPIRY, *PSPROP, *PUBACCT, *PUBAPPID, *PUBPTY, *REQONLY, *SELECTOR, *SELTYPE, *SUBSCOPE, *SUBID, *TOPICOBJ, *TOPICSTR, *USERDATA, *VARUSER, *WSCHEMA | ||
Element 2: Filter operator | *GT, *LT, *EQ, *NE, *GE, *LE, *LK, *NL, *CT, *EX, *CTG, *EXG | ||
Element 3: Filter value | Character value |
Subscription name (SUBNAME)
>Specifies the name or names of the subscriptions.
The possible values are:
- *ALL
- All subscriptions are selected.
- generic-subscription-name
- Specify the generic name of the MQ subscriptions. A generic name is a character string followed
by an asterisk (*). For example ABC*, it selects all subscriptions having names that start with the
character string.
You are recommended to specify the name required within quotation marks. Using this format ensures that your selection is precisely what you entered.
We cannot select all the uppercase and lowercase versions of a generic name on a single panel, without requesting all the names.
- subscription-name
- Specify the name of the MQ subscription.
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.
Filter command (WHERE)
>This parameter can be used to selectively display only those subscriptions with particular subscription attributes.
The parameter takes three arguments, a keyword, an operator and a value.
Generic strings are allowed for values which are names.
The operator can take one of the following values:
- *GT
- Greater than.
Applicable to integer and non-generic string values.
- *LT
- Less than.
Applicable to integer and non-generic string values
- *EQ
- Equal to.
Applicable to integer and non-generic string values.
- *NE
- Not equal to.
Applicable to integer and non-generic string values.
- *GE
- Greater than or equal to.
Applicable to integer and non-generic string values.
- *LE
- Less than or equal to.
Applicable to integer and non-generic string values.
- *LK
- Like.
Applicable to generic string values.
- *NL
- Not like.
Applicable to generic string values.
- *CT
- Contains.
Applicable to non-generic list values.
- *EX
- Excludes.
Applicable to non-generic list values.
- *CTG
- Contains generic.
Applicable to generic list values.
- *EXG
- Excludes generic.
Applicable to generic list values.
The keyword can take one of the following values:
- *DEST
- The destination queue for messages published to this subscription.
The filter value is the name of the queue.
- *DESTCLASS
- Specifies whether this is a managed subscription.
The filter value is one of the following:
- *MANAGED
- The destination is managed.
- *PROVIDED
- The destination is a queue.
- *DESTCRRLID
- The correlation identifier for messages published to this subscription.
The filter value is the 48 character hexadecimal string representing the 24 byte correlation identifier.
- *DESTMQM
- The destination queue manager for messages published to this subscription.
The filter value is the name of the queue manager.
- *EXPIRY
- The expiry time of the subscription.
The filter value is the integer expiry time.
- *PSPROP
- The manner in which publish / subscribe related message properties are added to messages sent to
this subscription.
The filter value is one of the following:
- *NONE
- Publish / subscribe properties are not added to the message.
- *COMPAT
- Publish / subscribe properties are added to the message to maintain compatibility with V6 Publish / Subscribe.
- *RFH2
- Publish / subscribe properties are added to the message within an RFH Version 2 header.
- *PUBACCT
- The accounting token for messages published to this subscription.
The filter value is the 64 character hexadecimal string representing the 32 byte publish accounting token.
- *PUBAPPID
- The publish application identity for messages published to this subscription.
The filter value is the publish application identifier.
- *PUBPTY
- The priority of the message sent to this subscription.
The filter value is the integer priority.
- *REQONLY
- Whether the subscriber will poll for updates via MQSUBRQ API, or whether all publications are
delivered to this subscription.
The filter value is one of the following:
- *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.
- *SELECTOR
- 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 filter value is the selector string.
- *SELTYPE
- The type of SQL 92 selector string that has been specified.
The filter value is one of the following:
- *NONE
- No selector has been specified.
- *STANDARD
- A selector string has been specified that only references properties of the message and uses the standard selector syntax.
- *EXTENDED
- A selector string has been specified that uses extended selectors syntax, typically by referencing the content of the message. Selector strings of this type cannot be handled internally by the queue manager; the use of extended message selectors can only be handled by another program, such as IBM Integration Bus.
- *SUBSCOPE
- Determines whether this subscription is forwarded to other queue managers, so
that the subscriber receives messages published at those other queue managers.
The filter value is one of the following:
- *ALL
- The subscription is forwarded to all queue managers directly connected through a publish/subscribe collective or hierarchy.
- *QMGR
- The subscription forwards messages published on the topic only within this queue manager.
Note: Individual subscribers can only restrict SUBSCOPE. If the parameter is set to ALL at topic level, then an individual subscriber can restrict it to QMGR for this subscription. However, if the parameter is set to QMGR at topic level, then setting an individual subscriber to ALL has no effect.
- *SUBID
- The subscription identifier associated with the subscription.
The filter value is the 48 character hexadecimal string representing the 24 byte subscription identifier.
- *TOPICOBJ
- The topic object associated with the subscription.
The filter value is the name of the topic object.
- *TOPICSTR
- The topic string associated with the subscription.
The filter value is the topic string.
- *USERDATA
- The user data associated with the subscription.
The filter value is the user data.
- *VARUSER
- Whether user profiles other than the creator of the subscription can connect to it.
The filter value is one of the following:
- *ANY
- Any user profiles can connect to the subscription.
- *FIXED
- Only the user profile that created the subscription can connect to it.
- *WSCHEMA
- The schema to be used when interpreting wildcard characters in the topic string.
The filter value is one of the following:
- *TOPIC
- Wildcard characters represent portions of the topic hierarchy.
- *CHAR
- Wildcard characters represent portions of strings.
Examples
>None
Error messages
>Unknown
Parent topic: CL commands reference for IBM i