Now that a message has been put to the queue from QM1, you can get the message from QM2.
mqe_script_msg -get -qname Q2 -qmname QM2
For more information on using Java or C to get a message from a queue, see Get. For Java™ and C examples, see Example (Java) - assured get and Example (C) - assured get.