applications, connected to multiple servers, connected to multiple queue managers, MQCONN, MQCONNX, connecting to a client, server, how it is used, MQSERVER, MQCHLLIB, MQCHLTAB, where to find it, client channel definition table, environment variables, role in connecting a client, mqs.ini file" /> Running applications on WebSphere MQ clients
Home

 

Running applications on WebSphere MQ clients

 

This chapter explains the various ways in which an application running in a WebSphere MQ client environment can connect to a queue manager. It covers the following topics:

When an application running in an WebSphere MQ client environment issues an MQCONN or MQCONNX call, the client identifies how it is to make the connection. When an MQCONNX call is issued by an application on a WebSphere MQ client, the MQI client library searches for the client channel information in the following order:

  1. Using the contents of the ClientConnOffset or ClientConnPtr fields of the MQCNO structure (if supplied). These identify the channel definition structure (MQCD) to be used as the definition of the client connection channel.

  2. If the MQSERVER environment variable is set, the channel it defines is used.

  3. If the MQCHLLIB and MQCHLTAB environment variables are set, the client channel definition table they point to is used.

  4. Finally, if the environment variables are not set, the client searches for a client channel definition table whose path and name are established from the

    DefaultPrefix in the

    mqs.ini file or the Registry for Windows. If this fails, the client uses the following paths:

    • UNIX systems

      /var/mqm/AMQCLCHL.TAB

    • Windows

      C:\\IBM\Websphere MQ\amqclchl.tab

The first of the options described above (using the ClientConnOffset or ClientConnPtr fields of MQCNO) is supported only by the MQCONNX call. If the application is using MQCONN rather than MQCONNX, the channel information is searched for in the remaining three ways in the order shown above. If the client fails to find any of these, the MQCONN or MQCONNX call fails.

The channel name (for the client connection) must match the server-connection channel name defined on the server for the MQCONN or MQCONNX call to succeed.

If you receive an MQRC_Q_MGR_NOT_AVAILABLE return code from your application with an error message in the error log file of AMQ9517 - File damaged, see Migrating to a later release level of WebSphere MQ.



 

Home