DISPLAY SUB (display subscription information)

Use the MQSC command DISPLAY SUB to display the attributes associated with a subscription.

Using MQSC commands

For information on how you use MQSC commands, see Performing local administration tasks using MQSC commands.

[z/OS]You can issue this command from sources CR. For an explanation of the source symbols, see Sources from which you can issue MQSC commands on z/OS®.

Synonym: DIS SUB

DISPLAY SUB

Read syntax diagramSkip visual syntax diagram DISPLAY SUB (generic name)SUBID(id) WHERE(FilterCondition)ALLDISTYPE(RESOLVED)DISTYPE(DEFINED)DURABLE(ALL)DURABLE(NOYES)SUBTYPE(USER)SUBTYPE(PROXYADMINAPIALL)summary attrsstandard attrsCMDSCOPE(' ')CMDSCOPE(qmgr-name)1CMDSCOPE(*)12
summary attributes
Read syntax diagramSkip visual syntax diagram ,DESTDESTCORLDESTQMGRDURABLESUBSUBIDSUBTYPESUBUSERTOPICSTR
standard attributes
Read syntax diagramSkip visual syntax diagram,ALTDATEALTTIMECRDATECRTIMEDESTCLASEXPIRYPSPROPPUBACCTPUBAPPIDPUBPRTYREQONLYSELECTORSELTYPESUBLEVELSUBSCOPETOPICOBJUSERDATAVARUSERWSCHEMA
Notes:
  • 1 Valid only on z/OS when the queue manager is a member of a queue sharing group.
  • 2 Valid only on z/OS.

Usage notes for DISPLAY SUB

The TOPICSTR parameter might contain characters that cannot be translated into printable characters when the command output is displayed.

[z/OS]On z/OS, these non-printable characters are displayed as blanks.

[UNIX, Linux, Windows, IBM i]On Multiplatforms using runmqsc, these non-printable characters are displayed as dots.

Parameter descriptions for DISPLAY SUB

You must specify either the name or the identifier of subscription you want to display. This can be a specific subscription name, or SUBID, or a generic subscription name. By using a generic subscription name, you can display either:
  • All subscription definitions
  • One or more subscriptions that match the specified name
The following forms are valid:

DIS SUB(xyz)
DIS SUB SUBID(123)
DIS SUB(xyz*)
(generic-name)
The local name of the subscription definition to be displayed. A trailing asterisk (*) matches all subscriptions with the specified stem followed by zero or more characters. An asterisk (*) on its own specifies all subscriptions.
WHERE
Specify a filter condition to display only those subscriptions that satisfy the selection criterion of the filter condition. The filter condition is in three parts: filter-keyword, operator, and filter-value:
filter-keyword
Almost any parameter that can be used to display attributes for this DISPLAY command. However, you cannot use the CMDSCOPE parameter as a filter keyword. Subscriptions of a type for which the filter keyword is not a valid attribute are not displayed.
operator
This is used to determine whether a subscription satisfies the filter value on the given filter keyword. The operators are:
LT
Less than
GT
Greater than
EQ
Equal to
NE
Not equal to
LE
Less than or equal to
GE
Greater than or equal to
LK
Matches a generic string that you provide as a filter-value
NL
Does not match a generic string that you provide as a filter-value
filter-value
The value that the attribute value must be tested against using the operator. Depending on the filter-keyword, this can be:
  • An explicit value, that is a valid value for the attribute being tested.

    You can use operators LT, GT, EQ, NE, LE or GE only. However, if the attribute value is one from a possible set of values on a parameter (for example, the value QALIAS on the CLUSQT parameter), you can only use EQ or NE. For the parameters HARDENBO, SHARE, and TRIGGER, use either EQ YES or EQ NO.

  • A generic value. This is a character string (such as the character string you supply for the DESCR parameter) with an asterisk at the end, for example ABC*. If the operator is LK, all items where the attribute value begins with the string (ABC in the example) are listed. If the operator is NL, all items where the attribute value does not begin with the string are listed. Only a single trailing wildcard character (asterisk) is permitted.

    You cannot use a generic filter-value for parameters with numeric values or with one of a set of values.

[z/OS]Note: On z/OS there is a 256 character limit for the filter-value of the MQSC WHERE clause. This limit is not in place for other platforms.
SUMMARY
Specify this to display the set of summary attributes that you want displayed.
ALL
Specify this to display all the attributes.

If this parameter is specified, any attributes that are also requested specifically have no effect; all attributes are still displayed.

This is the default if you do not specify a generic name and do not request any specific attributes.

ALTDATE( string )
The date of the most recent MQSUB or ALTER SUB command that modified the properties of the subscription.
ALTTIME( string )
The time of the most recent MQSUB or ALTER SUB command that modified the properties of the subscription.
[z/OS]CMDSCOPE
This parameter applies to z/OS only and specifies how the command runs when the queue manager is a member of a queue sharing group.
' '
The command runs on the queue manager on which it was entered. This is the default value.
qmgr-name
The command runs on the queue manager you specify, providing the queue manager is active within the queue sharing group.

You can specify a queue manager name, other than the queue manager on which the command was entered, only if you are using a queue sharing group environment and if the command server is enabled.

*
The command runs on the local queue manager and is also passed to every active queue manager in the queue sharing group. The effect of setting this value is the same as entering the command on every queue manager in the queue sharing group.

You cannot use CMDSCOPE as a filter keyword.

CRDATE( string )
The date of the first MQSUB or DEF SUB command that created this subscription.
CRTIME( string )
The time of the first MQSUB or DEF SUB command that created this subscription.
DEST(string)
The destination for messages published to this subscription; this parameter is the name of a queue.
DESTCLAS
System managed destination.
PROVIDED
The destination is a queue.
MANAGED
The destination is managed.
DESTCORL(string)
The CorrelId used for messages published to this subscription.

A blank value (default) results in a system generated correlation identifier being used.

If set to ' 000000000000000000000000000000000000000000000000 ' (48 zeros) the CorrelId set by the publishing application will be maintained in the copy of the message delivered to the subscription, unless messages are propagated across a publish/subscribe hierarchy.

If this byte string is enclosed in quotation marks, characters in the range A-F must be specified in uppercase.

Note: It is not possible to set the DESTCORL property programmatically with JMS.
DESTQMGR(string)
The destination queue manager for messages published to this subscription.
DISTYPE
Controls the output returned in the TOPICSTR and TOPICOBJ attributes.
RESOLVED
Returns the resolved (full) topic string in the TOPICSTR attribute. The value of the TOPICOBJ attribute is also returned. This is the default value.
DEFINED
Returns the values of the TOPICOBJ and TOPICSTR attributes provided when the subscription was created. The TOPICSTR attribute will contain the application part of the topic string only. You can use the values returned with TOPICOBJ and TOPICSTR to fully re-create the subscription by using DISTYPE(DEFINED).
DURABLE
A durable subscription is not deleted when the creating application closes its subscription handle.
ALL
Display all subscriptions.
NO
The subscription is removed when the application that created it, is closed or disconnected from the queue manager.
YES
The subscription persists even when the creating application is no longer running or has been disconnected. The subscription is reinstated when the queue manager restarts.
EXPIRY
The time to expiry of the subscription object from the creation date and time.
(integer)
The time to expiry, in tenths of a second, from the creation date and time.
UNLIMITED
There is no expiry time. This is the default option supplied with the product.
PSPROP
The manner in which publish subscribe related message properties are added to messages sent to this subscription.
NONE
Do not add publish subscribe properties to the message.
COMPAT
Publish/subscribe properties are added within an MQRFH version 1 header unless the message was published in PCF format.
MSGPROP
Publish/subscribe properties are added as message properties.
RFH2
Publish/subscribe properties are added within an MQRFH version 2 header.
PUBACCT(string)
Accounting token passed by the subscriber, for propagation into messages published to this subscription in the AccountingToken field of the MQMD.

If this byte string is enclosed in quotation marks, characters in the range A-F must be specified in uppercase.

PUBAPPID(string)
Identity data passed by the subscriber, for propagation into messages published to this subscription in the ApplIdentityData field of the MQMD.
PUBPRTY
The priority of the message sent to this subscription.
ASPUB
Priority of the message sent to this subscription is taken from the priority supplied in the published message.
ASQDEF
Priority of the message sent to this subscription is taken from the default priority of the queue defined as a destination.
(integer)
An integer providing an explicit priority for messages published to this subscription.
REQONLY
Indicates whether the subscriber polls for updates using the MQSUBRQ API call, or whether all publications are delivered to this subscription.
NO
All publications on the topic are delivered to this subscription. This is the default value.
YES
Publications are only delivered to this subscription in response to an MQSUBRQ API call.
This parameter is equivalent to the subscribe option MQSO_PUBLICATIONS_ON_REQUEST.
SELECTOR(string)
A selector that is applied to messages published to the topic.
SELTYPE
The type of selector string that has been specified.
NONE
No selector has been specified.
STANDARD
The selector references only the properties of the message, not its content, using the standard IBM® MQ selector syntax. Selectors of this type are to be handled internally by the queue manager.
EXTENDED
The selector uses extended selector syntax, typically referencing the content of the message. Selectors of this type cannot be handled internally by the queue manager; extended selectors can be handled only by another program such as IBM Integration Bus.
SUB(string)
The application's unique identifier for a subscription.
SUBID(string)
The internal, unique key identifying a subscription.
SUBLEVEL(integer)
The level within the subscription hierarchy at which this subscription is made. The range is zero through 9.
SUBSCOPE
Determines whether this subscription is forwarded to other queue managers, so that the subscriber receives messages published at those other queue managers.
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.
SUBTYPE
Indicates how the subscription was created.
USER
Displays only API and ADMIN subscriptions.
PROXY
An internally created subscription used for routing publications through a queue manager.

Subscriptions of type PROXY are not modified to ADMIN when alterations are attempted.

ADMIN
Created using DEF SUB MQSC or PCF command. This SUBTYPE also indicates that a subscription has been modified using an administrative command.
API
Created using an MQSUB API request.
ALL
All.
SUBUSER(string)
Specifies the user ID that is used for security checks that are performed to ensure that publications can be put to the destination queue associated with the subscription. This ID is either the user ID associated with the creator of the subscription or, if subscription takeover is permitted, the user ID that last took over the subscription. The length of this parameter must not exceed 12 characters.
TOPICOBJ(string)
The name of a topic object used by this subscription.
TOPICSTR(string)
Returns a topic string, that can contain wildcard characters to match a set of topic strings, for the subscription. The topic string is either the application provided portion only, or fully qualified, depending on the value of DISTYPE.
USERDATA(string)
Specifies the user data associated with the subscription. The string is a variable length value that can be retrieved by the application on an MQSUB API call and passed in a message sent to this subscription as a message property. The USERDATA is stored in the RFH2 header in the mqps folder with the key Sud.
An IBM MQ classes for JMS application can retrieve the subscription user data from the message by using the constant JMS_IBM_SUBSCRIPTION_USER_DATA. For more information, see Retrieval of user subscription data.
VARUSER
Specifies whether a user other than the subscription creator can connect to and take over ownership of the subscription.
ANY
Any user can connect to and takeover ownership of the subscription.
FIXED
Takeover by another USERID is not permitted.
WSCHEMA
The schema to be used when interpreting any wildcard characters in the topic string.
CHAR
Wildcard characters represent portions of strings.
TOPIC
Wildcard characters represent portions of the topic hierarchy.