Verifying a local installation using the command line

For distributed platforms, you can verify a local installation by using the command line to create a simple configuration of one queue manager and one queue.

Before you begin

This procedure is for distributed platforms. [z/OS] To verify a z/OS® installation, see Running the basic installation verification program.

To verify the installation, you must first install the samples package.

Before beginning the verification procedure, you might want to check that you have the latest fixes for your system. For more information about where to find the latest updates, see Finding product requirements and updated support information.

About this task

Use the following steps to configure your default queue manager from the command line. After the queue manager is configured, use the amqsput sample program to put a message on the queue. You then use the amqsget sample program to get the message back from the queue.

IBM MQ object definitions are case-sensitive. Any text entered as an MQSC command in lowercase is converted automatically to uppercase unless you enclose it in single quotation marks. Make sure that you type the examples exactly as shown.

Procedure

  1. If you are verifying an installation on UNIX, Linux® or IBM i, log in as a user in the mqm group.
  2. If you are verifying an installation on UNIX, Linux or Windows, set up your environment:
    1. Set up environment variables for use with a particular installation by entering one of the following commands:
      • On Windows:
        
         MQ_INSTALLATION_PATH\bin\setmqenv -s
        
        where MQ_INSTALLATION_PATH refers to the location where IBM MQ is installed.
      • On UNIX and Linux:
        
        . MQ_INSTALLATION_PATH/bin/setmqenv -s
        
        where MQ_INSTALLATION_PATH refers to the location where IBM MQ is installed.
    2. Check that the environment is set up correctly by entering the following command:
      
      dspmqver
      
      If the command completes successfully, and the expected version number and installation name are returned, the environment is set up correctly.
  3. Create a queue manager called QMA by entering the following command:
    • On UNIX, Linux, and Windows:
      
      crtmqm QMA
      
    • On IBM i:
      
      CRTMQM MQMNAME(QMA) DFTQMGR(*YES)
      
      The DFTQMGR(*YES) option specifies that this queue manager is the default queue manager.
    Messages indicate when the queue manager is created, and when the default IBM MQ objects are created.
  4. Start the queue manager, by entering one of the following commands:
    • On UNIX, Linux, and Windows:
      
      strmqm QMA
      
    • On IBM i:
      
      STRMQM MQMNAME(QMA)
      
    A message indicates when the queue manager starts.
  5. On UNIX, Linux, and Windows, start MQSC by entering the following command:
    
    runmqsc QMA
    
    A message indicates when MQSC starts. MQSC has no command prompt.
  6. Define a local queue called QUEUE1 by entering one of the following commands:
    • On UNIX, Linux, and Windows:
      
      DEFINE QLOCAL (QUEUE1)
      
    • On IBM i:
      
      CRTMQMQ QNAME(QUEUE1) QTYPE(*LCL)
      
    A message indicates when the queue is created.
  7. On UNIX, Linux, and Windows, stop MQSC by entering the following command:
    
    end
    
    Messages are shown, followed by the command prompt.

Note: Subsequent steps require that the samples package is installed.

  1. If you are verifying an installation on a UNIX or Linux system, change into the MQ_INSTALLATION_PATH/samp/bin directory, which contains the sample programs. MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
  2. Put a message on the queue by entering one of the following commands:
    • On UNIX and Linux:
      
      ./amqsput QUEUE1 QMA
      
    • On Windows:
      
      amqsput QUEUE1 QMA
      
    • On IBM i:
      
      CALL PGM(QMQM/AMQSPUT0) PARM(QUEUE1)
      
    The following messages are shown:
    
    Sample AMQSPUT0 start
    target queue is QUEUE1
    
  3. Type some message text on one or more lines, where each line is a different message. Enter a blank line to end the message input.
    The following message is shown:
    
    Sample AMQSPUT0 end
    
    Your messages are now on the queue and the command prompt is shown.
  4. Get the messages from the queue, by entering one of the following commands:
    • On UNIX and Linux:
      
      ./amqsget QUEUE1 QMA
      
    • On Windows:
      
      amqsget QUEUE1 QMA
      
    • On IBM i:
      
      CALL PGM(QMQM/AMQSGET4) PARM(QUEUE1)
      
    The sample program starts, and your messages are displayed.

Results

You have successfully verified your local installation.