Configuring MQ on iSeries
When I first started working with MQ on iSeries I noticed that the MQ commands, displays and interaction with objects differed from other OS/400 products. As you work with MQ, you'll see that some of the screen refreshes and the methods of interacting with MQ (such as function keys) take time to get used to. They're not difficult to use-just different.
MQ is installed via a standard OS/400 installation using the Restore Licensed Program (RSTLICPGM) command. Use this command:
RSTLICPGM LICPGM(5733A38) DEV(OPT01) OPTION(*BASE)
to install the base MQ code. This command:
RSTLICPGM LICPGM(5733A38) DEV(OPT01) OPTION(1)
restores the sample programs, which I suggest installing-they're helpful when you're developing your first MQ program. As mentioned in the sidebar,"More Than Software," the QMQM library is loaded in the QSYS file system, and directories and objects are created in the IFS. A number of OS/400 commands should be examined to ensure the default authority is correct. Some commands must have *PUBLIC authority granted or revoked, and others must have users QMQM and/or QMQMADM granted authority. These two user profiles are automatically added by the MQ installation. Consult the IBM documentation for a complete list of the commands that must be examined or changed. Because the MQ jobs run in the QMQM subsystem, start the subsystem before doing any configuration. To start the subsystem, use the Start Subsystem command, specifying subsystem description QMQM:
Jobs don't actually appear in the subsystem until you start a queue manager-I'll outline the queue manager configuration and startup later in the article.
When you have MQ installed and the QMQM subsystem active, use the Work with MQSeries Managers (WRKMQM) command to create a queue manager. Figure 2 shows an example of the WRKMQM command display. This screen enables you to perform MQ functions (e.g., Change, Delete, Display Start and End managers, Work with Queues and Work with Channels; other options are available for other MQ functions).
Create a queue manager by pressing F6 from the WRKMQM display or using the Create MQ Manager (CRTMQM) command. Figure 3 shows the display. While MQ provides many options, the only parameters I need are the Message Queue Manager Name (TEST.QMANAGER) and the Description. Another parameter that may be used is the Default Queue Manager parameter, which allows you to establish this queue manager as the default and enables you to specify this default when creating other objects. I usually don't make a queue manager as a default. Because a system may have multiple queue managers, I'd rather specify the queue manager I'm working with to avoid using the wrong one. Press "Enter" to create the queue manager. You'll then be returned to the Work with Queue Manager display. Option 14 starts this queue manager. (Note: The queue manager must be started to configure queues or channels.)
After creating the queue manager, I usually create the channel. In this example, the channel definition is straightforward. Select the channels display by entering option 20 next to the newly created queue manager name. When the display is shown, press F6 to create a new channel. (Note: There will be many channels already created. These are system channels used by certain MQ configurations.) Figure 4 shows the display that will be shown.
Search our new 2013 Buyer's Guide.
Web Exclusive | How to enable IBM i for management by IBM Systems Director
Cover Story | IBM eServer line delivers on the promise of virtualization