Copy MQ Listener (CPYMQMLSR)

    Where allowed to run
    All environments (*ALL)

    Threadsafe
    Yes

The Copy MQ Listener (CPYMQMLSR) command creates an MQ listener definition of the same type and, for attributes not specified in the command, with the same attribute values as an existing listener definition.


Parameters

Keyword Description Choices Notes
FROMLSR From Listener Character value Required, Key, Positional 1
TOLSR To Listener Character value Required, Key, Positional 2
MQMNAME Message Queue Manager name Character value, *DFT Optional, Key, Positional 3
REPLACE Replace *NO, *YES Optional, Positional 4
TEXT Text 'description' Character value, *BLANK, *SAME Optional, Positional 5
CONTROL Listener control *SAME, *MANUAL, *QMGR, *STARTONLY Optional, Positional 6
PORT Port number 0-65535, *SAME Optional, Positional 7
IPADDR IP Address Character value, *BLANK, *SAME Optional, Positional 8
BACKLOG Listener backlog 0-999999999, *SAME Optional, Positional 9


From Listener (FROMLSR)

>

Specifies the name of the existing listener definition to provide values for the attributes not specified in this command.

The possible values are:

    from-listener-name
    Specify the name of the source MQ listener.


To Listener (TOLSR)

>

Specifies the name of the new listener definition to be created. The name can contain a maximum of 48 characters.

If a listener definition with this name already exists, REPLACE(*YES) must be specified.

The possible values are:

    to-listener-name
    Specify the name of the new listener being created.


Message Queue Manager name (MQMNAME)

>

Specifies the name of the queue manager.

The possible values are:


Replace (REPLACE)

>

Specifies whether the new listener definition will replace an existing listener definition with the same name.

The possible values are:

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

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


Text 'description' (TEXT)

>

Specifies text that briefly describes the listener definition.

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:

    *SAME
    The attribute is unchanged.

    *BLANK
    The text is set to a blank string.

    description
    Specify no more than 64 characters enclosed in apostrophes.


Listener control (CONTROL)

>

Whether the listener starts automatically when the queue manager is started.

The possible values are:

    *SAME
    The attribute is unchanged.

    *MANUAL
    The listener is not automatically started or stopped.

    *QMGR
    The listener is started and stopped as the queue manager is started and stopped.

    *STARTONLY
    The listener is started as the queue manager is started, but is not automatically stopped when the queue manager is stopped.


Port number (PORT)

>

The port number to be used by the listener.

The possible values are:

    *SAME
    The attribute is unchanged.

    port-number
    The port number to be used.


IP Address (IPADDR)

>

The IP address to be used by the listener.

The possible values are:

    *SAME
    The attribute is unchanged.

    ip-addr
    The IP address to be used.


Listener backlog (BACKLOG)

>

The number of concurrent connection requests the listener supports.

The possible values are:

    *SAME
    The attribute is unchanged.

    backlog
    The number of concurrent connection requests supported.


Examples

>

None


Error messages

>

Unknown

Parent topic: CL commands reference for IBM i