Now that you have created and started the two queue managers, created your queues and connection definitions, and created and started your listeners, you are in a position to send messages between the two queue managers.
mqe_script_msg -put -qname Q2 -qmname QM2
This command puts a message to queue Q2 on queue manager QM2.
For more information on using Java or C to put a message to a queue, see Put. For examples in Java™ and C, see Example (Java) - assured put and Example (C) - assured put.