+

Search Tips | Advanced Search

Set up the client on Windows and Linux


Before starting

Before setting up the client to communicate with queue manager QM_ORANGE, we must ensure that the IBM MQ MQI client has been installed on the client machine.


About this task

In this part of the tutorial, we must set up the client component on the server using the MQSERVER environment variable. We must find out the network name of the machine which hosts queue manager QM_ORANGE from the system administrator.

To set up the client on Windows or Linux, complete the steps for the platform that we are using:

Parent topic: Tutorial 3: Sending a message on a client-server configuration Previous topic: Set up the server Next topic: Send a message from a client to a server


Set up the client on Windows


About this task

In this task, we will set up the client component using the MQSERVER environment variable. You will need to find out the network name of the machine which hosts queue manager QM_ORANGE from the system administrator.


Procedure

  1. Open the Control Panel: Click Start > Sets > Control Panel
  2. Double-click System.
  3. Click the Advanced tab.
  4. Click Environment Variables.
  5. In the User Variables pane, click New.
  6. Type MQSERVER into the Variable Name field.
  7. Type CLIENT.QM_ORANGE/TCP/hostname into the Variable Value field, where hostname is the computer name or IP address that identifies the machine hosting queue manager QM_ORANGE. If we do not use the default port number 1414, you must also specify the port number where the listener is listening. For example: MQSERVER=CLIENT.QM_ORANGE/TCP/hostname (1415)
  8. Click OK. The MQSERVER environment variable is visible in the User Variables pane.


Results

We have now set up the client and server components needed on your Windows machine.


Set up the client on Linux


About this task

In this task, we will set up the client component using the MQSERVER environment variable. You will need to find out the network name of the machine which hosts queue manager QM_ORANGE from the system administrator.


Procedure

  1. Log in as the user who will be running Express File Transfer, who must be a member of the mqm group.
  2. Open a command prompt
  3. Type
    cd $HOME
  4. Use a text editor to edit the profile. This example assumes that we are using the bash shell, so we need to edit the file $HOME/.bashrc. If we are using a different system shell, consult the system documentation. Add the following text to the end of the file:
    MQSERVER=CLIENT.QM_ORANGE/TCP/'hostname'; export MQSERVER
    Replace hostname with the name that identifies the server machine on the network.
  5. Close the command prompt.
  6. Log out and log back in for the change to take effect.


Results

We have now set up the client and server components needed. The next task is to send a message from the client to the server queue manager QM_ORANGE.

Last updated: 2020-10-04