mqe_script_condef -create -cdname QM2 -port 1881
This command creates a connection definition to a queue manager called QM2, which is listening on port 1881. It is not necessary for QM2 to exist when the connection is created, but it must exist when you try to send a message to a remote queue on that queue manager. As no adapter is specified, the Http adapter is used by default.
For more information on using Java or C to create a connection definition, see Configuring connection definitions. For examples in Java™ and C, see Creating a connection definition and Creating a connection definition.