# MQRC 2540: Channel name unknown

Source: https://wndsoftware.com/mainframe-errors/mqrc-2540

### MQRC 2540: Channel name unknown

MQRC 2540 (MQRC_UNKNOWN_CHANNEL_NAME, hex 09EC) means a client MQCONN reached the queue manager, but the queue manager has no channel with the name the client asked for. The client is configured with the wrong channel name, or the channel isn't defined on that queue manager.


#### Other names for this code

Also written as `RC2540`, `reason code 2540`, `MQ 2540`, `MQ error 2540`, `MQRC_UNKNOWN_CHANNEL_NAME`, `09EC`, `0x09EC`, `unknown channel name`, `JMSWMQ0018 2540`, `MQ channel not found`.


### What it means

A client connection names a server-connection channel. The client sends that name to the queue manager when it connects, and the queue manager looks for a channel definition to match. If there isn't one, the connect fails with MQCC_FAILED and reason 2540. IBM's only advice is to make sure the client uses the right channel name.

Channel names are case-sensitive, and MQSC folds unquoted names to uppercase. A channel defined with `DEFINE CHANNEL(app.svrconn)` is really APP.SVRCONN, so a client asking for app.svrconn won't find it. The name comes from different places depending on how the client is set up. It may be in the MQSERVER environment variable, in the format CHANNEL/TCP/host(port), in a client channel definition table (CCDT), in a JMS connection factory, or in the MQCD passed on MQCONNX.

The network connection worked, so a listener is running at the host and port. That listener may belong to a different queue manager from the one where the channel was defined, which is a common source of confusion on hosts that run several queue managers.


### Common causes

- A typo or wrong case in the channel name in MQSERVER, the CCDT, the connection factory or the application's code.
- The server-connection channel was never defined on this queue manager, or was deleted.
- The client reaches a listener belonging to a different queue manager on the same host, where that channel doesn't exist.
- The CCDT has a CLNTCONN entry whose name doesn't match any SVRCONN on the server. The two names must be the same.


### How to find the problem

- Check the server for the channel with `DISPLAY CHANNEL(APP.SVRCONN) CHLTYPE` in runmqsc. On z/OS, use the same command with the command prefix.
- Read the queue manager error log. It records the name the client asked for, so you can compare it character by character.
- Check where the client gets its channel name. Look at `echo $MQSERVER`, the CCDT location (MQCHLLIB and MQCHLTAB, or the ChannelDefinitionDirectory in mqclient.ini), or the connection factory.
- Confirm which queue manager owns the listener on that port, with `DISPLAY LSSTATUS(*) PORT` on each queue manager.


### How to fix it

- Correct the channel name in the client configuration, matching case exactly.
- Define the server-connection channel on the right queue manager, for example `DEFINE CHANNEL(APP.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP)`, and add CHLAUTH rules for it.
- Make CLNTCONN names in the CCDT identical to the SVRCONN names on the server.
- Point the client at the port of the queue manager that owns the channel.


### What it looks like


```text
JMSWMQ0018: Failed to connect to queue manager 'QM1' with connection mode 'Client' and host name 'mqhost01(1414)'.
JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2540' ('MQRC_UNKNOWN_CHANNEL_NAME').
```


### IBM documentation

[IBM documentation: MQRC 2540](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=codes-2540-09ec-rc2540-mqrc-unknown-channel-name). Use the documentation for your installed release.

[Report a correction to WND Software](https://wndsoftware.com/contact#message).

Technical reviewer: [Albert Joseph](https://wndsoftware.com/authors/albert-joseph), WND Software.

Last reviewed 2026-10-18 by the WND Software team. Written in our own words. For the full reference, check IBM’s MQ documentation for your version.


### Related codes

[MQRC 2539 MQRC_CHANNEL_CONFIG_ERROR Read →](https://wndsoftware.com/mainframe-errors/mqrc-2539)
[MQRC 2537 MQRC_CHANNEL_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2537)
[MQRC 2538 MQRC_HOST_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2538)
[MQRC 2058 MQRC_Q_MGR_NAME_ERROR Read →](https://wndsoftware.com/mainframe-errors/mqrc-2058)
[MQRC 2059 MQRC_Q_MGR_NOT_AVAILABLE Read →](https://wndsoftware.com/mainframe-errors/mqrc-2059)

### Questions


#### Are MQ channel names case-sensitive?

Yes. MQSC changes unquoted names to uppercase, so a channel defined without quotes is uppercase even if you typed it in lowercase.


#### What is the difference between 2540 and 2538?

2538 means the client couldn't reach the host and port at all. 2540 means it reached a queue manager, which didn't know the channel name.


#### Does the client-connection channel name have to match the server-connection name?

Yes. The client sends its channel name, and the queue manager looks for a server-connection channel with exactly that name.

[IBM MQ reason codes](https://wndsoftware.com/mainframe-errors/mq-reason-codes) · [MQRC 2539](https://wndsoftware.com/mainframe-errors/mqrc-2539) · [MQRC 2002](https://wndsoftware.com/mainframe-errors/mqrc-2002)

[← All error codes](https://wndsoftware.com/mainframe-errors/)
