Use the WebSphere MQ commands (MQSC) or the WebSphere MQ Explorer on Windows systems to:
The objects you may need to define are:
Channels must be completely defined, and their associated objects must exist and be available for use, before a channel can be started. This chapter shows you how to do this.
In addition, the particular communication link for each channel must be defined and available before a channel can be run. For a description of how LU 6.2, TCP/IP, NetBIOS, SPX, and DECnet links are defined, see the particular communication guide for your installation. See also the example configuration chapters in this book.
Use MQSC to create the queue and alias objects: transmission queues, remote queue definitions, queue manager alias definitions, reply-to queue alias definitions, and reply-to local queues.
Also create the definitions of processes for triggering (MCAs) in a similar way.
For an example showing how to create all the required objects see Chapter 21, Message channel planning example for distributed platforms.
In WebSphere MQ for AIX, iSeries, HP-UX, Linux, Solaris, and Windows systems, and MQSeries V5.1 for Compaq Tru64 UNIX, and OS/2 Warp, default objects are created automatically when a queue manager is created. These objects are queues, channels, a process definition, and administration queues. They correspond to the objects that are created when you run the amqscoma.tst sample command file on earlier releases of these products and on other WebSphere MQ products.
When you use the CRTMQM command to create a queue manager, the command also initiates a program to create a set of default objects.
When the program has finished running, you can use the STRMQM command to start the queue manager.
See the WebSphere MQ System Administration Guide book for information about the CRTMQM and STRMQM commands and a list of default objects.
Once the default objects have been created, you can replace them at any time by running the STRMQM command with the -c option. When you specify the -c option, the queue manager is started temporarily while the objects are created and is then shut down again. You must use the STRMQM command again, without the -c option, if you want to start the queue manager.
If you wish to make any changes to the default objects, you can create your own version of the old amqscoma.tst file and edit it.
To create a new channel you have to create two channel definitions, one at each end of the connection. You create the first channel definition at the first queue manager. Then you create the second channel definition at the second queue manager, on the other end of the link.
Both ends must be defined using the same channel name. The two ends must have compatible channel types, for example: Sender and Receiver.
To create a channel definition for one end of the link use the MQSC command DEFINE CHANNEL. Include the name of the channel, the channel type for this end of the connection, a connection name, a description (if required), the name of the transmission queue (if required), and the transmission protocol. Also include any other attributes that you want to be different from the system default values for the required channel type, using the information you have gathered previously.
You are provided with help in deciding on the values of the channel attributes in Chapter 6, Channel attributes.
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(SDR) + DESCR('Sender channel to QM2') + CONNAME(QM2) TRPTYPE(TCP) XMITQ(QM2) CONVERT(YES)
In all the examples of MQSC the command is shown as it would appear in a file of commands, and as it would be typed in OS/2, Windows NT, UNIX systems, Compaq OpenVMS Alpha, or Compaq NonStop Kernel. The two methods look identical, except that to issue a command interactively, you must first start an MQSC session. Type runmqsc, for the default queue manager, or runmqsc qmname where QMNAME is the name of the required queue manager. Then type any number of commands, as shown in the examples.
For portability, you should restrict the line length of your commands to 72 characters. Use a concatenation character as shown to continue over more than one line. On Compaq NonStop Kernel, use Ctrl-y to end the input at the command line, or enter exit or quit. On OS/2, Windows NT, or Compaq OpenVMS Alpha use Ctrl-z. On UNIX systems, use Ctrl-d. Alternatively, on V5.3 of WebSphere MQ for AIX, Compaq Tru64 UNIX, HP-UX, OS/2 Warp, Solaris, and Windows, use the end command.
Use the MQSC command DISPLAY CHANNEL, specifying the channel name, the channel type (optional), and the attributes you want to see, or specifying that all attributes are to be displayed. In WebSphere MQ for AIX, iSeries, HP-UX, Linux, Solaris, and Windows systems, and MQSeries V5.1 for Compaq Tru64 UNIX, and OS/2 Warp the ALL parameter of the DISPLAY CHANNEL command is assumed by default if no specific attributes are requested and the channel name specified is not generic.
The attributes are described in Chapter 6, Channel attributes.
DISPLAY CHANNEL(QM1.TO.QM2) TRPTYPE,CONVERT DISPLAY CHANNEL(QM1.TO.*) TRPTYPE,CONVERT DISPLAY CHANNEL(*) TRPTYPE,CONVERT DISPLAY CHANNEL(QM1.TO.QMR34) ALL
Use the MQSC command DISPLAY CHSTATUS, specifying the channel name and whether you want the current status of channels or the status of saved information.
DISPLAY CHSTATUS(*) CURRENT DISPLAY CHSTATUS(QM1.TO.*) SAVED
Note that the saved status does not apply until at least one batch of messages has been transmitted on the channel. In WebSphere MQ for AIX, iSeries, HP-UX, Linux, Solaris, and Windows systems, and MQSeries V5.1 for Compaq Tru64 UNIX, and OS/2 Warp status is also saved when a channel is stopped (using the STOP CHL command) and when the queue manager is ended.
For applications to be able to exchange messages you must start a listener program for inbound connections (or, in the case of UNIX systems, create a listener attachment). In OS/2, Windows systems, and Compaq NonStop Kernel, use the runmqlsr command to start the WebSphere MQ listener process. Any inbound requests for channel attachment start MCAs as threads of this listener process. In Compaq OpenVMS Alpha, each receiver or server channel requires a listener process that then starts a channel process.
runmqlsr -t tcp -m QM2
For outbound connections you must start the channel in one of the following three ways:
START CHANNEL(QM1.TO.QM2)
runmqchl -c QM1.TO.QM2 -m QM1
To rename a message channel, use MQSC to carry out the following steps:
If you decide to rename a message channel, remember that a channel has two channel definitions, one at each end. Make sure you rename the channel at both ends at the same time.