Create MQ Topic (CRTMQMTOP)

    Where allowed to run
    All environments (*ALL)

    Threadsafe
    Yes

The Create MQ Topic (CRTMQMTOP) command creates a new MQ topic object, specifying those attributes that are different from the default.


Parameters

Keyword Description Choices Notes
TOPNAME Topic name Character value Required, Key, Positional 1
MQMNAME Message Queue Manager name Character value, *DFT Optional, Key, Positional 2
REPLACE Replace *NO, *YES Optional, Positional 3
TEXT Text 'description' Character value, *BLANK, *SYSDFTTOP Optional, Positional 4
TOPICSTR Topic string Character value, *BLANK, *SYSDFTTOP Optional, Positional 5
DURSUB Durable subscriptions *SYSDFTTOP, *ASPARENT, *YES, *NO Optional, Positional 6
MGDDURMDL Durable model queue Character value, *NONE, *SYSDFTTOP Optional, Positional 7
MGDNDURMDL Non-durable model queue Character value, *NONE, *SYSDFTTOP Optional, Positional 8
PUBENBL Publish *SYSDFTTOP, *ASPARENT, *YES, *NO Optional, Positional 9
SUBENBL Subscribe *SYSDFTTOP, *ASPARENT, *YES, *NO Optional, Positional 10
DFTPTY Default message priority 0-9, *SYSDFTTOP, *ASPARENT Optional, Positional 11
DFTMSGPST Default message persistence *SYSDFTTOP, *ASPARENT, *YES, *NO Optional, Positional 12
DFTPUTRESP Default Put Response *SYSDFTTOP, *ASPARENT, *SYNC, *ASYNC Optional, Positional 13
WILDCARD Wildcard behavior *SYSDFTTOP, *PASSTHRU, *BLOCK Optional, Positional 14
PMSGDLV Persistent message delivery *SYSDFTTOP, *ASPARENT, *ALL, *ALLDUR, *ALLAVAIL Optional, Positional 15
NPMSGDLV Non-persistent message deliver *SYSDFTTOP, *ASPARENT, *ALL, *ALLDUR, *ALLAVAIL Optional, Positional 16
CUSTOM Custom attribute Character value, *BLANK, *SYSDFTTOP Optional, Positional 17


Topic name (TOPNAME)

The name of the new MQ topic object to be created.

The possible values are:

    topic-name
    Specify the name of the new MQ topic object. The name can contain up to 48 characters.


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.


Replace (REPLACE)

If a topic object with the same name already exists, this specifies whether it is replaced.

The possible values are:

    *NO
    This object does not replace any existing topic object with the same name. The command fails if the named topic object already exists.

    *YES
    Replace the existing topic object. If there is no object with the same name, a new object is created.


Text 'description' (TEXT)

Specifies text that briefly describes the topic object.

Note: The field length is 64 bytes and the maximum number of characters is reduced if the system is using a double-byte character set (DBCS).

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *BLANK
    The text is set to a blank string.

    description
    Specify the new descriptive information.


Topic string (TOPICSTR)

Specifies the topic string represented by this topic object definition.

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.


Durable subscriptions (DURSUB)

Specifies whether applications are permitted to make durable subscriptions on this topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    Whether durable subscriptions can be made on this topic is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *YES
    Durable subscriptions can be made on this topic.

    *NO
    Durable subscriptions cannot be made on this topic.


Durable model queue (MGDDURMDL)

Specifies the name of the model queue to be used for durable subscriptions which request the queue manager manage the destination of publications.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    durable-model-queue
    Specify the name of the model queue.


Non-durable model queue (MGDNDURMDL)

Specifies the name of the model queue to be used for non-durable subscriptions which request the queue manager manage the destination of publications.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    non-durable-model-queue
    Specify the name of the model queue.


Publish (PUBENBL)

Specifies whether messages can be published to the topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    Whether messages can be published to this topic is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *YES
    Messages can be published to the topic.

    *NO
    Messages cannot be published to the topic.


Subscribe (SUBENBL)

Specifies whether applications are to be permitted to subscribe to this topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    Whether applications can subscribe to this topic is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *YES
    Subscriptions can be made to this topic.

    *NO
    Applications cannot subscribe to this topic.


Default message priority (DFTPTY)

Specifies the default priority of messages published to the topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    The default priority is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    priority-value
    Specify a value ranging from 0 through 9.


Default message persistence (DFTMSGPST)

Specifies the message persistence to be used when applications specify the MQPER_PERSISTENCE_AS_TOPIC_DEF option.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    The default persistence is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *YES
    Messages on this queue survive a restart of the queue manager.

    *NO
    Messages on this queue are lost across a restart of the queue manager.


Default Put Response (DFTPUTRESP)

Specifies the type of response required for MQPUT and MQPUT1 calls when applications specify the MQPMO_RESPONSE_AS_Q_DEF option.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    The default response type is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *SYNC
    Specifying this value ensures that the put operations to the queue that specify MQPMO_RESPONSE_AS_Q_DEF are issued as if MQPMO_SYNC_RESPONSE had been specified instead. Fields in the MQMD and MQPMO are returned by the queue manager to the application.

    *ASYNC
    Specifying this value ensures that the put operations to the queue that specify MQPMO_RESPONSE_AS_Q_DEF are always issued as if MQPMO_ASYNC_RESPONSE had been specified instead. Some fields in the MQMD and MQPMO are not returned by the queue manager to the application. An improvement in performance may be seen for messages put in a transaction or any non-persistent messages.


Wildcard behavior (WILDCARD)

Specifies the behavior of wildcard subscriptions with respect to this topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *PASSTHRU
    Subscriptions made to a wildcarded topic less specific than the topic string at this topic object will receive publications made to this topic and to topic strings more specific than this topic.

    *BLOCK
    Subscriptions made to a wildcarded topic less specific than the topic string at this topic object will not receive publications made to this topic or to topic strings more specific than this topic.


Persistent message delivery (PMSGDLV)

Specifies the delivery mechanism for persistent messages published to this topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    The delivery mechanism used is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *ALL
    Persistent messages must be delivered to all subscribers, irrespective of durability for the MQPUT call to report success. If a delivery failure to any subscriber occurs, no other subscribers receive the message and the MQPUT call fails.

    *ALLDUR
    Persistent messages must be delivered to all durable subscribers. Failure to deliver a persistent message to any non-durable subscribers does not return an error to the MQPUT call. If a delivery failure to a durable subscriber occurs, no subscribers receive the message and the MQPUT call fails.

    *ALLAVAIL
    Persistent messages are delivered to all subscribers that can accept the message. Failure to deliver the message to any subscriber does not prevent other subscribers from receiving the message.


Non-persistent message delivery (NPMSGDLV)

Specifies the delivery mechanism for non-persistent messages published to this topic.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *ASPARENT
    The delivery mechanism used is based on the setting of the first parent administrative node found in the topic tree relating to this topic.

    *ALL
    Non-persistent messages must be delivered to all subscribers, irrespective of durability for the MQPUT call to report success. If a delivery failure to any subscriber occurs, no other subscribers receive the message and the MQPUT call fails.

    *ALLDUR
    Non-persistent messages must be delivered to all durable subscribers. Failure to deliver a persistent message to any non-durable subscribers does not return an error to the MQPUT call. If a delivery failure to a durable subscriber occurs, no subscribers receive the message and the MQPUT call fails.

    *ALLAVAIL
    Non-persistent messages are delivered to all subscribers that can accept the message. Failure to deliver the message to any subscriber does not prevent other subscribers from receiving the message.


Custom attribute (CUSTOM)

This attribute is reserved for the configuration of new features before separate attributes have been introduced. This description will be updated when features using this attribute are introduced. At the moment there are no meaningful values for CUSTOM, so leave it empty.

The possible values are:

    *SYSDFTTOP
    The value of this attribute is taken from the system default topic.

    *BLANK
    The text is set to a blank string.

    custom
    Specify zero or more attributes as pairs of attribute name and value, separated by at least one space. The attribute name-value pairs must have the form NAME(VALUE) and be specified in uppercase. Single quotes must be escaped with another single quote.


Examples

None


Error messages

Unknown