[UNIX, Linux, Windows, IBM i]

DEFINE LISTENER (define a new listener) on Multiplatforms

Use the MQSC command DEFINE LISTENER to define a new IBM® MQ listener definition, and set its parameters.

Using MQSC commands

For information on how you use MQSC commands, see Administering IBM MQ using MQSC commands.

Syntax diagram for DEFINE LISTENER

Synonym: DEF LSTR

Values shown above the main line in the syntax diagram are the defaults supplied with IBM MQ, but your installation might have changed them. For an explanation of how to use these diagrams, see How to read syntax diagrams.

DEFINE LISTENER

Read syntax diagramSkip visual syntax diagram DEFINE LISTENER ( name ) TRPTYPE(LU62)LU62 attrs1TRPTYPE(NETBIOS)NETBIOS attrs1TRPTYPE(SPX)SPX attrs1TRPTYPE(TCP)TCP attrsdefine attrsCONTROL(MANUAL)CONTROL(QMGR)CONTROL(STARTONLY)
LU62 attrs
Read syntax diagramSkip visual syntax diagramTPNAME(' ')TPNAME(string)
NETBIOS attrs
Read syntax diagramSkip visual syntax diagramADAPTER(0)ADAPTER(integer)COMMANDS(0)COMMANDS(integer)LOCLNAME(' ')LOCLNAME(string)NTBNAMES(0)NTBNAMES(integer)SESSIONS(0)SESSIONS(integer)
SPX attrs
Read syntax diagramSkip visual syntax diagramBACKLOG2(integer)SOCKET(0)SOCKET(integer)
TCP attrs
Read syntax diagramSkip visual syntax diagramBACKLOG2(integer)IPADDR(' ')IPADDR(string)PORT(0)PORT(integer)
Define attrs
Read syntax diagramSkip visual syntax diagramDESCR(' ')DESCR(string)LIKE(listener-name)NOREPLACEREPLACE
Notes:
  • 1 Valid only on Windows.
  • 2 When the BACKLOG attribute is left unchanged or when it is explicitly set to zero, the attribute is stored as zero by default in the listener object created by the DEFINE LISTENER command. However, when the listener is started, the default backlog value takes effect. For information about the default value of the BACKLOG attribute, see Using the TCP listener backlog option.

Parameter descriptions for DEFINE LISTENER

(listener-name)
Name of the IBM MQ listener definition (see Rules for naming IBM MQ objects ). This is required.

The name must not be the same as any other listener definition currently defined on this queue manager (unless REPLACE is specified).

[Windows]ADAPTER(integer)
The adapter number on which NetBIOS listens. This parameter is valid only on Windows when TRPTYPE is NETBIOS.
BACKLOG(integer)
The number of concurrent connection requests that the listener supports.
[Windows]COMMANDS(integer)
The number of commands that the listener can use. This parameter is valid only on Windows when TRPTYPE is NETBIOS.
CONTROL(string)
Specifies how the listener is to be started and stopped.:
MANUAL
The listener is not to be started automatically or stopped automatically. It is to be controlled by use of the START LISTENER and STOP LISTENER commands.
QMGR
The listener being defined is to be started and stopped at the same time as the queue manager is started and stopped.
STARTONLY
The listener is to be started at the same time as the queue manager is started, but is not requested to stop when the queue manager is stopped.
DESCR(string)
Plain-text comment. It provides descriptive information about the listener when an operator issues the DISPLAY LISTENER command (see DISPLAY LISTENER (display listener information) on Multiplatforms ).

It should contain only displayable characters. The maximum length is 64 characters. In a DBCS installation, it can contain DBCS characters (subject to a maximum length of 64 bytes).

Note: If characters are used that are not in the coded character set identifier (CCSID) for this queue manager, they might be translated incorrectly if the information is sent to another queue manager.
IPADDR(string)
IP address for the listener specified in IPv4 dotted decimal, IPv6 hexadecimal notation, or alphanumeric host name form. If you do not specify a value for this parameter, the listener listens on all configured IPv4 and IPv6 stacks.
LIKE(listener-name)
The name of a listener, with parameters that are used to model this definition.

This parameter applies only to the DEFINE LISTENER command.

If this field is not filled in, and you do not complete the parameter fields related to the command, the values are taken from the default definition for listeners on this queue manager. This is equivalent to specifying:

LIKE(SYSTEM.DEFAULT.LISTENER)

A default listener is provided but it can be altered by the installation of the default values required. See Rules for naming IBM MQ objects.

[Windows]LOCLNAME(string)
The NetBIOS local name that the listener uses. This parameter is valid only on Windows when TRPTYPE is NETBIOS.
[Windows]NTBNAMES(integer)
The number of names that the listener can use. This parameter is valid only on Windows when TRPTYPE is NETBIOS.
PORT(integer)
The port number for TCP/IP. This is valid only when TRPTYPE is TCP. It must not exceed 65535.
[Windows]SESSIONS(integer)
The number of sessions that the listener can use. This parameter is valid only on Windows when TRPTYPE is NETBIOS.
SOCKET(integer)
The SPX socket on which to listen. This is valid only if TRPTYPE is SPX.
[Windows]TPNAME(string)
The LU 6.2 transaction program name (maximum length 64 characters). This parameter is valid only on Windows when TRPTYPE is LU62.
TRPTYPE( string )
The transmission protocol to be used:
[Windows]LU62
SNA LU 6.2. This is valid only on Windows.
[Windows]NETBIOS
NetBIOS. This is valid only on Windows.
[Windows]SPX
Sequenced packet exchange. This is valid only on Windows.
TCP
TCP/IP.