Administering WebSphere MQ
Administering WebSphere MQ
Administering WebSphere MQ
Note
Before using this information and the product it supports, read the information in Notices on page 1175.
This edition applies to version 7 release 5 of WebSphere MQ and to all subsequent releases and modifications until
otherwise indicated in new editions.
When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any
way it believes appropriate without incurring any obligation to you.
Copyright IBM Corporation 2007, 2014.
US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . vii
Tables . . . . . . . . . . . . . . . ix
Administering WebSphere MQ . . . . . 1
Local and remote administration. . . . . . . . 3
How to use WebSphere MQ control commands . . . 4
Automating administration tasks . . . . . . . 4
Introduction to Programmable Command Formats 5
Using the MQAI to simplify the use of PCFs . . 15
Introduction to the WebSphere MQ Administration
Interface (MQAI) . . . . . . . . . . . . 16
WebSphere MQ Administration Interface (MQAI) 17
Administration using the WebSphere MQ Explorer 52
What you can do with the WebSphere MQ
Explorer . . . . . . . . . . . . . . 53
Setting up the WebSphere MQ Explorer . . . . 55
Security on Windows . . . . . . . . . . 61
Extending the WebSphere MQ Explorer . . . . 64
Using the WebSphere MQ Taskbar application
(Windows only) . . . . . . . . . . . . . 64
The WebSphere MQ alert monitor application
(Windows only) . . . . . . . . . . . . 64
Administering local WebSphere MQ objects . . . 65
Starting and stopping a queue manager . . . . 65
Stopping a queue manager manually . . . . . 67
Performing local administration tasks using
MQSC commands . . . . . . . . . . . 69
Working with queue managers . . . . . . . 77
Working with local queues . . . . . . . . 79
Working with alias queues . . . . . . . . 85
Working with model queues. . . . . . . . 86
Working with administrative topics . . . . . 87
Working with subscriptions . . . . . . . . 90
Working with services . . . . . . . . . . 93
Managing objects for triggering . . . . . . 100
Administering remote WebSphere MQ objects . . 102
Channels, clusters, and remote queuing . . . 102
Remote administration from a local queue
manager . . . . . . . . . . . . . . 104
Creating a local definition of a remote queue
110
Using remote queue definitions as aliases . . . 112
Data conversion . . . . . . . . . . . 113
Administering WebSphere MQ Telemetry . . . . 114
Configuring a queue manager for telemetry on
Linux and AIX . . . . . . . . . . . . 115
Configuring a queue manager for telemetry on
Windows . . . . . . . . . . . . . . 117
Configure distributed queuing to send messages
to MQTT clients . . . . . . . . . . . 119
MQTT client identification, authorization, and
authentication . . . . . . . . . . . . 121
Telemetry channel authentication using SSL . . 128
Publication privacy on telemetry channels . . . 130
. 131
. 136
.
.
.
.
.
138
149
150
151
152
.
.
.
.
.
154
154
155
156
159
. 159
. 159
Security. . . . . . . . . . . . . . 161
Security overview . . . . . . . . . . . .
Security concepts and mechanisms . . . . .
WebSphere MQ security mechanisms . . . .
Planning for your security requirements . . . .
Planning identification and authentication . . .
Planning authorization . . . . . . . . .
Planning confidentiality . . . . . . . . .
Planning data integrity . . . . . . . . .
Planning auditing . . . . . . . . . . .
Planning security by topology . . . . . . .
Firewalls and Internet pass-thru . . . . . .
Setting up security . . . . . . . . . . .
Setting up security on Windows, UNIX and
Linux systems . . . . . . . . . . . .
Setting up security on HP Integrity NonStop
Server . . . . . . . . . . . . . . .
Setting up WebSphere MQ MQI client security
Working with SSL or TLS . . . . . . . .
Identifying and authenticating users. . . . . .
Privileged users . . . . . . . . . . .
Identifying and authenticating users using the
MQCSP structure . . . . . . . . . . .
Implementing identification and authentication
in security exits . . . . . . . . . . .
Identity mapping in message exits . . . . .
Identity mapping in the API exit and
API-crossing exit . . . . . . . . . . .
Working with revoked certificates . . . . .
Authorizing access to objects . . . . . . . .
Controlling access to objects by using the OAM
on UNIX, Linux and Windows systems. . . .
Granting required access to resources . . . .
Authority to administer WebSphere MQ on
UNIX, Linux, and Windows systems . . . .
161
161
177
203
204
206
217
226
226
228
239
239
239
265
266
269
300
302
303
303
304
305
306
315
315
324
352
iii
354
359
360
361
361
361
367
373
377
378
380
381
389
394
398
398
398
399
399
400
401
402
402
404
412
421
422
423
445
445
453
469
iv
.
.
.
.
.
.
.
.
.
.
.
.
471
472
485
502
506
508
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
515
523
523
525
527
532
546
565
590
601
603
604
608
613
618
666
666
673
738
739
740
742
744
750
751
753
754
754
755
756
756
756
757
759
759
760
761
762
762
762
762
763
763
764
775
776
786
787
787
787
790
790
792
793
794
. 795
. 796
. 798
. 799
. 802
. 803
. 803
. 803
. 804
.
.
.
.
804
804
805
807
.
.
.
.
.
.
807
810
811
812
813
816
. 817
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
818
821
822
822
822
823
823
823
823
824
826
826
826
826
827
827
Index . . . . . . . . . . . . . . 1163
Notices
. . . . . . . . . . . . . 1175
.
.
.
.
.
.
.
.
. 1176
. 1177
Contents
vi
Figures
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
. 144
.
.
.
.
.
.
.
.
144
149
149
149
164
164
169
170
173
. 176
205
. 218
. 224
233
. 235
. 310
. 311
362
364
. 366
368
370
. 372
383
385
. 387
390
392
. 393
405
. 412
. 413
. 414
. 416
. 417
. 418
. 420
473
vii
viii
. 475
487
491
493
494
. 499
. 501
554
555
556
557
. 558
. 559
. 559
. 560
. 561
. 561
. 564
. 788
. 788
. 789
. 800
. 800
. 800
801
. 801
. 801
802
. 808
. 811
. 820
. 831
. 833
. 835
. 849
Tables
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
ix
Administering WebSphere MQ
Administering queue managers and associated resources includes the tasks that you perform frequently
to activate and manage those resources. Choose the method you prefer to administer your queue
managers and associated resources.
You can administer WebSphere MQ objects locally or remotely, see Local and remote administration
on page 3.
There are a number of different methods that you can use to create and administer your queue managers
and their related resources in WebSphere MQ. These methods include command-line interfaces, a
graphical user interface, and an administration API. See the sections and links in this topic for more
information about each of these interfaces.
There are different sets of commands that you can use to administer WebSphere MQ depending on your
platform:
v WebSphere MQ control commands
v WebSphere MQ Script (MQSC) commands
v Programmable Command Formats (PCFs) on page 2
There are also the other following options for creating and managing WebSphere MQ objects:
v The WebSphere MQ Explorer on page 2
v The Windows Default Configuration application on page 3
v The Microsoft Cluster Service (MSCS) on page 3
You can automate some administration and monitoring tasks for both local and remote queue managers
by using PCF commands. These commands can also be simplified through the use of the WebSphere MQ
Administration Interface (MQAI) on some platforms. For more information about automating
administration tasks, see Automating administration tasks on page 4.
You can run the runmqsc command in three modes, depending on the flags set on the command:
v Verification mode, where the MQSC commands are verified on a local queue manager, but are not run
v Direct mode, where the MQSC commands are run on a local queue manager
v Indirect mode, where the MQSC commands are run on a remote queue manager
Object attributes specified in MQSC commands are shown in this section in uppercase (for example,
RQMNAME), although they are not case-sensitive. MQSC command attribute names are limited to eight
characters.
MQSC commands are available on all platforms. MQSC commands are summarized in Comparing
command sets.
On Windows, UNIX or Linux, you can use the MQSC as single commands issued at the system
command line. To issue more complicated, or multiple commands, the MQSC can be built into a file that
you run from the Windows, UNIX or Linux system command line. MQSC can be sent to a remote queue
manager. For full details, see MQSC reference.
Script (MQSC) Commands on page 69 contains a description of each MQSC command and its syntax.
See Performing local administration tasks using MQSC commands on page 69 for more information
about using MQSC commands in local administration.
On Windows and Linux systems, you can start WebSphere MQ Explorer by using the system menu, the
MQExplorer executable file, or the strmqcfg command.
On Linux, to start the WebSphere MQ Explorer successfully, you must be able to write a file to your
home directory, and the home directory must exist.
You can use WebSphere MQ Explorer to administer remote queue managers on other platforms including
z/OS, for details and to download the SupportPac MS0T, see http://www.ibm.com/support/
docview.wss?uid=swg24021041.
See Administration using the WebSphere MQ Explorer on page 52 for more information.
WebSphere MQ supports administration from a single point of contact through what is known as remote
administration. This allows you to issue commands from your local system that are processed on another
system and applies also to the WebSphere MQ Explorer. For example, you can issue a remote command
to change a queue definition on a remote queue manager. You do not have to log on to that system,
although you do need to have the appropriate channels defined. The queue manager and command
server on the target system must be running.
Some commands cannot be issued in this way, in particular, creating or starting queue managers and
starting command servers. To perform this type of task, you must either log onto the remote system and
issue the commands from there or create a process that can issue the commands for you. This restriction
applies also to the WebSphere MQ Explorer.
Administering remote WebSphere MQ objects on page 102 describes the subject of remote
administration in greater detail.
PCF commands
WebSphere MQ programmable command format (PCF) commands can be used to program
administration tasks into an administration program. In this way, from a program you can manipulate
queue manager objects (queues, process definitions, namelists, channels, client connection channels,
listeners, services, and authentication information objects), and even manipulate the queue managers
themselves.
PCF commands cover the same range of functions provided by MQSC commands. You can write a
program to issue PCF commands to any queue manager in the network from a single node. In this way,
you can both centralize and automate administration tasks.
Each PCF command is a data structure that is embedded in the application data part of a WebSphere MQ
message. Each command is sent to the target queue manager using the MQI function MQPUT in the
same way as any other message. Providing the command server is running on the queue manager
receiving the message, the command server interprets it as a command message and runs the command.
To get the replies, the application issues an MQGET call and the reply data is returned in another data
structure. The application can then process the reply and act accordingly.
Note: Unlike MQSC commands, PCF commands and their replies are not in a text format that you can
read.
Briefly, these are some of the things needed to create a PCF command message:
Message descriptor
This is a standard WebSphere MQ message descriptor, in which:
v Message type (MsqType) is MQMT_REQUEST.
v Message format (Format) is MQFMT_ADMIN.
Application data
Contains the PCF message including the PCF header, in which:
v The PCF message type (Type) specifies MQCFT_COMMAND.
v The command identifier specifies the command, for example, Change Queue
(MQCMD_CHANGE_Q).
For a complete description of the PCF data structures and how to implement them, see Introduction to
Programmable Command Formats.
Escape PCFs
Escape PCFs are PCF commands that contain MQSC commands within the message text. You can use
PCFs to send commands to a remote queue manager. For more information about escape PCFs, see
Escape.
Administering WebSphere MQ
Priority
Any valid value, as required.
Persistence
Any valid value, as required.
MsgId
The sending application can specify any value, or MQMI_NONE can be specified to request the
queue manager to generate a unique message identifier.
CorrelId
The sending application can specify any value, or MQCI_NONE can be specified to indicate no
correlation identifier.
ReplyToQ
The name of the queue to receive the response.
ReplyToQMgr
The name of the queue manager for the response (or blank).
Message context fields
These fields can be set to any valid values, as required. Normally the Put message option
MQPMO_DEFAULT_CONTEXT is used to set the message context fields to the default values.
If you are using a version-2 MQMD structure, you must set the following additional fields:
GroupId
Set to MQGI_NONE
MsgSeqNumber
Set to 1
Offset
Set to 0
MsgFlags
Set to MQMF_NONE
OriginalLength
Set to MQOL_UNDEFINED
Sending user data
The PCF structures can also be used to send user-defined message data. In this case the message
descriptor Format field must be set to MQFMT_PCF.
Sending and receiving PCF messages in a specified queue:
Sending PCF messages to a specified queue
To send a message to a specified queue, the mqPutBag call converts the contents of the specified bag into
a PCF message and sends the message to the specified queue. The contents of the bag are left unchanged
after the call.
As input to this call, you must supply:
v An MQI connection handle.
v An object handle for the queue on which the message is to be placed.
v A message descriptor. For more information about the message descriptor, see MQMD - Message
descriptor.
v Put Message Options using the MQPMO structure. For more information about the MQPMO structure,
see MQPMO - Put-message options.
Administering WebSphere MQ
Certain PCF responses might return a structure even when it is not requested. This structure is shown in
the definition of the response (Definitions of the Programmable Command Formats) as always returned.
The reason that, for these responses, it is necessary to name the objects in the response to identify which
object the data applies.
Message descriptor for a response
A response message has the following fields in the message descriptor:
MsgType
This field is MQMT_REPLY.
MsgId
This field is generated by the queue manager.
CorrelId
This field is generated according to the report options of the command message.
Format
This field is MQFMT_ADMIN.
Encoding
Set to MQENC_NATIVE.
CodedCharSetId
Set to MQCCSI_Q_MGR.
Persistence
The same as in the command message.
Priority
The same as in the command message.
The response is generated with MQPMO_PASS_IDENTITY_CONTEXT.
Standard responses:
Command messages with a header type of MQCFT_COMMAND, standard responses are generated. Such
commands are supported on all platforms except z/OS.
There are three types of standard response:
v OK response
v Error response
v Data response
OK response
This response consists of a message starting with a command format header, with a CompCode field of
MQCC_OK or MQCC_WARNING.
For MQCC_OK, the Reason is MQRC_NONE.
For MQCC_WARNING, the Reason identifies the nature of the warning. In this case the command format
header might be followed by one or more warning parameter structures appropriate to this reason code.
In either case, for an inquire command further parameter structures might follow as described in the
following sections.
10
Error response
If the command has an error, one or more error response messages are sent (more than one might be sent
even for a command that would normally have only a single response message). These error response
messages have MQCFC_LAST or MQCFC_NOT_LAST set as appropriate.
Each such message starts with a response format header, with a CompCode value of MQCC_FAILED and a
Reason field that identifies the particular error. In general, each message describes a different error. In
addition, each message has either zero or one (never more than one) error parameter structures following
the header. This parameter structure, if there is one, is an MQCFIN structure, with a Parameter field
containing one of the following:
v MQIACF_PARAMETER_ID
The Value field in the structure is the parameter identifier of the parameter that was in error (for
example, MQCA_Q_NAME).
v MQIACF_ERROR_ID
This value is used with a Reason value (in the command format header) of
MQRC_UNEXPECTED_ERROR. The Value field in the MQCFIN structure is the unexpected reason
code received by the command server.
v MQIACF_SELECTOR
This value occurs if a list structure (MQCFIL) sent with the command contains a duplicate selector or
one that is not valid. The Reason field in the command format header identifies the error, and the Value
field in the MQCFIN structure is the parameter value in the MQCFIL structure of the command that
was in error.
v MQIACF_ERROR_OFFSET
This value occurs when there is a data compare error on the Ping Channel command. The Value field
in the structure is the offset of the Ping Channel compare error.
v MQIA_CODED_CHAR_SET_ID
This value occurs when the coded character-set identifier in the message descriptor of the incoming
PCF command message does not match that of the target queue manager. The Value field in the
structure is the coded character-set identifier of the queue manager.
The last (or only) error response message is a summary response, with a CompCode field of
MQCC_FAILED, and a Reason field of MQRCCF_COMMAND_FAILED. This message has no parameter
structure following the header.
Data response
This response consists of an OK response (as described earlier) to an inquire command. The OK response
is followed by additional structures containing the requested data as described in Definitions of the
Programmable Command Formats.
Applications must not depend upon these additional parameter structures being returned in any
particular order.
Administering WebSphere MQ
11
UNIX
Linux
Change Channel
Copy Channel
Create Channel
Delete Channel
v Ping Channel
v Reset Channel
v
v
v
v
v
Start Channel
Stop Channel
Start Channel Initiator
Start Channel Listener
Resolve Channel
v Reset Cluster
v Refresh Cluster
v Suspend Queue Manager
v Resume Queue Manager
WebSphere MQ for HP Integrity NonStop Server
In order to process any PCF command, the user ID must have dsp authority for the queue manager object
on the target system. In addition, WebSphere MQ object authority checks are performed for certain PCF
commands, as shown in Table 1 on page 13.
To process any of the following commands the user ID must belong to group mqm:
v
v
v
v
v
Change Channel
Copy Channel
Create Channel
Delete Channel
Ping Channel
v Reset Channel
12
v
v
v
v
v
Start Channel
Stop Channel
Start Channel Initiator
Start Channel Listener
Resolve Channel
v
v
v
v
Reset Cluster
Refresh Cluster
Suspend Queue Manager
Resume Queue Manager
n/a
Change Channel
n/a
n/a
n/a
Change Namelist
n/a
Change Process
n/a
Change Queue
n/a
n/a
Change Service
n/a
Clear Queue
clr
n/a
dsp
crt
crt
Copy Channel
dsp
crt
crt
dsp
crt
crt
dsp
crt
crt
Copy Namelist
dsp
crt
crt
Copy Process
dsp
crt
crt
Copy Queue
dsp
crt
crt
crt
crt
Administering WebSphere MQ
13
Table 1. Windows, HP Integrity NonStop Server, UNIX and Linux systems - object authorities (continued)
Command
Create Channel
crt
crt
crt
crt
crt
crt
Create Namelist
crt
crt
Create Process
crt
crt
Create Queue
crt
crt
Create Service
crt
crt
n/a
see Note 4
Delete Channel
n/a
n/a
n/a
Delete Namelist
n/a
Delete Process
n/a
Delete Queue
n/a
Delete Service
n/a
dsp
n/a
see Note 4
see Note 4
Inquire Channel
dsp
n/a
dsp
n/a
inq
n/a
dsp
n/a
Inquire Namelist
dsp
n/a
Inquire Process
dsp
n/a
Inquire Queue
dsp
n/a
see note 3
n/a
dsp
n/a
Inquire Service
dsp
n/a
Ping Channel
ctrl
n/a
see note 3
n/a
14
Table 1. Windows, HP Integrity NonStop Server, UNIX and Linux systems - object authorities (continued)
Command
n/a
n/a
Reset Channel
ctrlx
n/a
n/a
n/a
Resolve Channel
ctrlx
n/a
see Note 4
Start Channel
ctrl
n/a
Stop Channel
ctrl
n/a
Stop Connection
n/a
Start Listener
ctrl
n/a
Stop Listener
ctrl
n/a
Start Service
ctrl
n/a
Stop Service
ctrl
n/a
Escape
see Note 2
see Note 2
Notes:
1. This command applies if the object to be replaced does exist, otherwise the authority check is as for
Create, or Copy without Replace.
2. The required authority is determined by the MQSC command defined by the escape text, and it is
equivalent to one of the previous commands.
3. In order to process any PCF command, the user ID must have dsp authority for the queue manager
object on the target system.
4. This PCF command is authorized unless the command server has been started with the -a parameter.
By default the command server starts when the Queue Manager is started, and without the -a
parameter. See the System Administration Guide for further information.
5. Granting a user ID chg authority for a queue manager gives the ability to set authority records for all
groups and users. Do not grant this authority to ordinary users or applications.
WebSphere MQ also supplies some channel security exit points so that you can supply your own user
exit programs for security checking. Details are given in Displaying a channel manual.
15
To pass parameters in programs written using MQI calls, the PCF message must contain the
command and details of the string or integer data. To do this, you need several statements in
your program for every structure, and memory space must be allocated. This task can be long
and laborious.
Programs written using the MQAI pass parameters into the appropriate data bag and you need
only one statement for each structure. The use of MQAI data bags removes the need for you to
handle arrays and allocate storage, and provides some degree of isolation from the details of the
PCF.
To handle error conditions more easily
It is difficult to get return codes back from PCF commands, but the MQAI makes it easier for the
program to handle error conditions.
After you have created and populated your data bag, you can send an administration command message
to the command server of a queue manager, using the mqExecute call, which waits for any response
messages. The mqExecute call handles the exchange with the command server and returns responses in a
response bag.
For more information about the MQAI, see Introduction to the WebSphere MQ Administration Interface
(MQAI).
16
17
/*
(C) Copyright IBM Corp. 1999, 2005
*/
/*
*/
/******************************************************************************/
/*
*/
/* Function:
*/
/*
AMQSAICQ is a sample C program that creates a local queue and is an
*/
/*
example of the use of the mqExecute call.
*/
/*
*/
/*
- The name of the queue to be created is a parameter to the program.
*/
/*
*/
/*
- A PCF command is built by placing items into an MQAI bag.
*/
/*
These are:*/
/*
- The name of the queue
*/
/*
- The type of queue required, which, in this case, is local.
*/
/*
*/
/*
- The mqExecute call is executed with the command MQCMD_CREATE_Q.
*/
/*
The call generates the correct PCF structure.
*/
/*
The call receives the reply from the command server and formats into */
/*
the response bag.
*/
/*
*/
/*
- The completion code from the mqExecute call is checked and if there */
/*
is a failure from the command server then the code returned by the
*/
/*
command server is retrieved from the system bag that is
*/
/*
embedded in the response bag to the mqExecute call.
*/
/*
*/
/* Note: The command server must be running.
*/
/*
*/
/*
*/
/******************************************************************************/
/*
*/
/* AMQSAICQ has 2 parameters - the name of the local queue to be created
*/
/*
- the queue manager name (optional)
*/
/*
*/
/******************************************************************************/
/******************************************************************************/
/* Includes
*/
/******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <cmqc.h>
#include <cmqcfc.h>
#include <cmqbc.h>
/* MQI
/* PCF
/* MQAI
*/
*/
*/
18
/***************************************************************************/
/* Connect to the queue manager
*/
/***************************************************************************/
if (argc > 2)
strncpy(QMName, argv[2], (size_t)MQ_Q_MGR_NAME_LENGTH);
MQCONN(QMName, &hConn, &compCode, &connReason);
/******************************************************************************/
/* Report reason and stop if connection failed
*/
/******************************************************************************/
if (compCode == MQCC_FAILED)
{
CheckCallResult("MQCONN", compCode, connReason);
exit( (int)connReason);
}
/******************************************************************************/
/* Call the routine to create a local queue, passing the handle to the
*/
/* queue manager and also passing the name of the queue to be created.
*/
/******************************************************************************/
CreateLocalQueue(hConn, argv[1]);
/***************************************************************************/
/* Disconnect from the queue manager if not already connected
*/
/***************************************************************************/
if (connReason != MQRC_ALREADY_CONNECTED)
{
MQDISC(&hConn, &compCode, &reason);
CheckCallResult("MQDISC", compCode, reason);
}
return 0;
}
/******************************************************************************/
/*
*/
/* Function:
CreateLocalQueue
*/
/* Description: Create a local queue by sending a PCF command to the command */
/*
server.
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Handle to the queue manager
*/
/*
Name of the queue to be created
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Logic: The mqExecute call is executed with the command MQCMD_CREATE_Q.
*/
/*
The call generates the correct PCF structure.
*/
/*
The default options to the call are used so that the command is sent*/
/*
to the SYSTEM.ADMIN.COMMAND.QUEUE.
*/
/*
The reply from the command server is placed on a temporary dynamic */
/*
queue.
*/
/*
The reply is read from the temporary queue and formatted into the
*/
/*
response bag.
*/
/*
*/
/*
The completion code from the mqExecute call is checked and if there */
/*
is a failure from the command server then the code returned by the */
/*
command server is retrieved from the system bag that is
*/
/*
embedded in the response bag to the mqExecute call.
*/
/*
*/
/******************************************************************************/
void CreateLocalQueue(MQHCONN hConn, MQCHAR *qName)
{
MQLONG reason;
/* reason code
*/
MQLONG compCode;
/* completion code
*/
Administering WebSphere MQ
19
MQHBAG
MQHBAG
MQHBAG
MQLONG
MQLONG
commandBag = MQHB_UNUSABLE_HBAG; /*
responseBag = MQHB_UNUSABLE_HBAG;/*
resultBag;
/*
mqExecuteCC;
/*
mqExecuteRC;
/*
*/
*/
*/
*/
*/
20
/***************************************************************************/
/* Check the result from mqExecute call and find the error if it failed.
*/
/***************************************************************************/
if ( compCode == MQCC_OK )
printf("Local queue %s successfully created\n", qName);
else
{
printf("Creation of local queue %s failed: Completion Code = %d
qName, compCode, reason);
if (reason == MQRCCF_COMMAND_FAILED)
{
/*********************************************************************/
/* Get the system bag handle out of the mqExecute response bag.
*/
/* This bag contains the reason from the command server why the
*/
/* command failed.
*/
/*********************************************************************/
mqInquireBag(responseBag, MQHA_BAG_HANDLE, 0, &resultBag, &compCode,
&reason);
CheckCallResult("Get the result bag handle", compCode, reason);
/*********************************************************************/
/* Get the completion code and reason code, returned by the command */
/* server, from the embedded error bag.
*/
/*********************************************************************/
mqInquireInteger(resultBag, MQIASY_COMP_CODE, MQIND_NONE, &mqExecuteCC,
&compCode, &reason);
CheckCallResult("Get the completion code from the result bag",
compCode, reason);
mqInquireInteger(resultBag, MQIASY_REASON, MQIND_NONE, &mqExecuteRC,
&compCode, &reason);
CheckCallResult("Get the reason code from the result bag", compCode,
reason);
printf("Error returned by the command server: Completion code = %d :
Reason = %d\n", mqExecuteCC, mqExecuteRC);
}
}
/***************************************************************************/
/* Delete the command bag if successfully created.
*/
/***************************************************************************/
if (commandBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&commandBag, &compCode, &reason);
CheckCallResult("Delete the command bag", compCode, reason);
}
/***************************************************************************/
/* Delete the response bag if successfully created.
*/
/***************************************************************************/
if (responseBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&responseBag, &compCode, &reason);
CheckCallResult("Delete the response bag", compCode, reason);
}
} /* end of CreateLocalQueue */
/******************************************************************************/
/*
*/
/* Function: CheckCallResult
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Description of call
*/
/*
Completion code
*/
/*
Reason code
*/
/*
*/
/* Output Parameters: None
*/
Administering WebSphere MQ
21
/*
*/
/* Logic: Display the description of the call, the completion code and the
*/
/*
reason code if the completion code is not successful
*/
/*
*/
/******************************************************************************/
void CheckCallResult(char *callText, MQLONG cc, MQLONG rc)
{
if (cc != MQCC_OK)
printf("%s failed: Completion Code = %d :
Reason = %d\n", callText, cc, rc);
}
22
/* Includes
*/
/******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <cmqc.h>
#include <cmqcfc.h>
#include <cmqbc.h>
/* MQI
/* PCF
/* MQAI
*/
*/
*/
/******************************************************************************/
/* Macros
*/
/******************************************************************************/
#if MQAT_DEFAULT == MQAT_WINDOWS_NT
#define Int64 "I64"
#elif defined(MQ_64_BIT)
#define Int64 "l"
#else
#define Int64 "ll"
#endif
/******************************************************************************/
/* Function prototypes
*/
/******************************************************************************/
void CheckCallResult(MQCHAR *, MQLONG , MQLONG);
void GetQEvents(MQHCONN, MQCHAR *);
int PrintBag(MQHBAG);
int PrintBagContents(MQHBAG, int);
/******************************************************************************/
/* Function: main
*/
/******************************************************************************/
int main(int argc, char *argv[])
{
MQHCONN hConn;
/* handle to connection
*/
MQCHAR QMName[MQ_Q_MGR_NAME_LENGTH+1]=""; /* default QM name
*/
MQLONG reason;
/* reason code
*/
MQLONG connReason;
/* MQCONN reason code
*/
MQLONG compCode;
/* completion code
*/
/***************************************************************************/
/* First check the required parameters
*/
/***************************************************************************/
printf("Sample Event Monitor (times out after 30 secs)\n");
if (argc < 2)
{
printf("Required parameter missing - event queue to be monitored\n");
exit(99);
}
/**************************************************************************/
/* Connect to the queue manager
*/
/**************************************************************************/
if (argc > 2)
strncpy(QMName, argv[2], (size_t)MQ_Q_MGR_NAME_LENGTH);
MQCONN(QMName, &hConn, &compCode, &connReason);
/***************************************************************************/
/* Report the reason and stop if the connection failed
*/
/***************************************************************************/
if (compCode == MQCC_FAILED)
{
CheckCallResult("MQCONN", compCode, connReason);
exit( (int)connReason);
}
/***************************************************************************/
Administering WebSphere MQ
23
/* Call the routine to open the event queue and format any event messages */
/* read from the queue.
*/
/***************************************************************************/
GetQEvents(hConn, argv[1]);
/***************************************************************************/
/* Disconnect from the queue manager if not already connected
*/
/***************************************************************************/
if (connReason != MQRC_ALREADY_CONNECTED)
{
MQDISC(&hConn, &compCode, &reason);
CheckCallResult("MQDISC", compCode, reason);
}
return 0;
}
/******************************************************************************/
/*
*/
/* Function: CheckCallResult
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Description of call
*/
/*
Completion code
*/
/*
Reason code
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Logic: Display the description of the call, the completion code and the
*/
/*
reason code if the completion code is not successful
*/
/*
*/
/******************************************************************************/
void CheckCallResult(char *callText, MQLONG cc, MQLONG rc)
{
if (cc != MQCC_OK)
printf("%s failed: Completion Code = %d : Reason = %d\n",
callText, cc, rc);
}
/******************************************************************************/
/*
*/
/* Function: GetQEvents
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Handle to the queue manager
*/
/*
Name of the event queue to be monitored
*/
/*
*/
/* Output Parameters: None
*/
/*
/* Logic: Open the event queue.
*/
/*
Get a message off the event queue and format the message into
*/
/*
a bag.
*/
/*
A real event monitor would need to be programmed to deal with
*/
/*
each type of event that it receives from the queue. This is
*/
/*
outside the scope of this sample, so instead, the contents of
*/
/*
the bag are printed.
*/
/*
The program waits for 30 seconds for an event message and then
*/
/*
terminates if no more messages are available.
*/
/*
*/
/******************************************************************************/
void GetQEvents(MQHCONN hConn, MQCHAR *qName)
{
MQLONG openReason;
/* MQOPEN reason code
*/
24
MQLONG reason;
MQLONG compCode;
MQHOBJ eventQueue;
/* reason code
/* completion code
/* handle to event queue
*/
*/
*/
MQHBAG
MQOD
MQMD
MQGMO
MQLONG
/*
/*
/*
/*
/*
*/
*/
*/
*/
*/
eventBag = MQHB_UNUSABLE_HBAG;
od = {MQOD_DEFAULT};
md = {MQMD_DEFAULT};
gmo = {MQGMO_DEFAULT};
bQueueOK = 1;
/***************************************************************************/
/* Create an Event Bag in which to receive the event.
*/
/* Exit the function if the create fails.
*/
/***************************************************************************/
mqCreateBag(MQCBO_USER_BAG, &eventBag, &compCode, &reason);
CheckCallResult("Create event bag", compCode, reason);
if (compCode !=MQCC_OK)
return;
/***************************************************************************/
/* Open the event queue chosen by the user
*/
/***************************************************************************/
strncpy(od.ObjectName, qName, (size_t)MQ_Q_NAME_LENGTH);
MQOPEN(hConn, &od, MQOO_INPUT_AS_Q_DEF+MQOO_FAIL_IF_QUIESCING, &eventQueue,
&compCode, &openReason);
CheckCallResult("Open event queue", compCode, openReason);
/***************************************************************************/
/* Set the GMO options to control the action of the get message from the
*/
/* queue.
*/
/***************************************************************************/
gmo.WaitInterval = 30000;
/* 30 second wait for message
*/
gmo.Options = MQGMO_WAIT + MQGMO_FAIL_IF_QUIESCING + MQGMO_CONVERT;
gmo.Version = MQGMO_VERSION_2;
/* Avoid need to reset Message ID */
gmo.MatchOptions = MQMO_NONE;
/* and Correlation ID after every */
/* mqGetBag
/***************************************************************************/
/* If open fails, we cannot access the queue and must stop the monitor.
*/
/***************************************************************************/
if (compCode != MQCC_OK)
bQueueOK = 0;
/***************************************************************************/
/* Main loop to get an event message when it arrives
*/
/***************************************************************************/
while (bQueueOK)
{
printf("\nWaiting for an event\n");
/*************************************************************************/
/* Get the message from the event queue and convert it into the event
*/
/* bag.
*/
/*************************************************************************/
mqGetBag(hConn, eventQueue, &md, &gmo, eventBag, &compCode, &reason);
/*************************************************************************/
/* If get fails, we cannot access the queue and must stop the monitor.
*/
/*************************************************************************/
if (compCode != MQCC_OK)
{
bQueueOK = 0;
/*********************************************************************/
/* If get fails because no message available then we have timed out, */
/* so report this, otherwise report an error.
*/
/*********************************************************************/
if (reason == MQRC_NO_MSG_AVAILABLE)
Administering WebSphere MQ
25
{
printf("No more messages\n");
}
else
{
CheckCallResult("Get bag", compCode, reason);
}
}
/*************************************************************************/
/* Event message read - Print the contents of the event bag
*/
/*************************************************************************/
else
{
if ( PrintBag(eventBag) )
printf("\nError found while printing bag contents\n");
} /* end of msg found */
} /* end of main loop */
/***************************************************************************/
/* Close the event queue if successfully opened
*/
/***************************************************************************/
if (openReason == MQRC_NONE)
{
MQCLOSE(hConn, &eventQueue, MQCO_NONE, &compCode, &reason);
CheckCallResult("Close event queue", compCode, reason);
}
/***************************************************************************/
/* Delete the event bag if successfully created.
*/
/***************************************************************************/
if (eventBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&eventBag, &compCode, &reason);
CheckCallResult("Delete the event bag", compCode, reason);
}
} /* end of GetQEvents */
/******************************************************************************/
/*
*/
/* Function: PrintBag
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Bag Handle
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Returns:
Number of errors found
*/
/*
*/
/* Logic: Calls PrintBagContents to display the contents of the bag.
*/
/*
*/
/*****************************************************************************
int PrintBag(MQHBAG dataBag)
{
int errors;
printf("\n");
errors = PrintBagContents(dataBag, 0);
printf("\n");
return errors;
}
/******************************************************************************/
26
/*
*/
/* Function: PrintBagContents
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Bag Handle
*/
/*
Indentation level of bag
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Returns:
Number of errors found
*/
/*
*/
/* Logic: Count the number of items in the bag
*/
/*
Obtain selector and item type for each item in the bag.
*/
/*
Obtain the value of the item depending on item type and display the */
/*
index of the item, the selector and the value.
*/
/*
If the item is an embedded bag handle then call this function again */
/*
to print the contents of the embedded bag increasing the
*/
/*
indentation level.
*/
/*
*/
/******************************************************************************/
int PrintBagContents(MQHBAG dataBag, int indent)
{
/***************************************************************************/
/* Definitions
*/
/***************************************************************************/
#define LENGTH 500
/* Max length of string to be read*/
#define INDENT 4
/* Number of spaces to indent
*/
/* embedded bag display
*/
/***************************************************************************/
/* Variables
*/
/***************************************************************************/
MQLONG itemCount;
/* Number of items in the bag
*/
MQLONG itemType;
/* Type of the item
*/
int
i;
/* Index of item in the bag
*/
MQCHAR stringVal[LENGTH+1];
/* Value if item is a string
*/
MQBYTE byteStringVal[LENGTH];
/* Value if item is a byte string */
MQLONG stringLength;
/* Length of string value
*/
MQLONG ccsid;
/* CCSID of string value
*/
MQINT32 iValue;
/* Value if item is an integer
*/
MQINT64 i64Value;
/* Value if item is a 64-bit
*/
/* integer
*/
MQLONG selector;
/* Selector of item
*/
MQHBAG bagHandle;
/* Value if item is a bag handle */
MQLONG reason;
/* reason code
*/
MQLONG compCode;
/* completion code
*/
MQLONG trimLength;
/* Length of string to be trimmed */
int
errors = 0;
/* Count of errors found
*/
char
blanks[] = "
"; /* Blank string used to
*/
/* indent display
*/
/***************************************************************************/
/* Count the number of items in the bag
*/
/***************************************************************************/
mqCountItems(dataBag, MQSEL_ALL_SELECTORS, &itemCount, &compCode, &reason);
if (compCode != MQCC_OK)
errors++;
else
{
printf("
printf("
printf("
}
Administering WebSphere MQ
27
/***************************************************************************/
/* If no errors found, display each item in the bag
*/
/***************************************************************************/
if (!errors)
{
for (i = 0; i < itemCount; i++)
{
/********************************************************************/
/* First inquire the type of the item for each item in the bag
*/
/********************************************************************/
mqInquireItemInfo(dataBag,
/* Bag handle
*/
MQSEL_ANY_SELECTOR, /* Item can have any selector*/
i,
/* Index position in the bag */
&selector,
/* Actual value of selector */
/* returned by call
*/
&itemType,
/* Actual type of item
*/
/* returned by call
*/
&compCode,
/* Completion code
*/
&reason);
/* Reason Code
*/
if (compCode != MQCC_OK)
errors++;
switch(itemType)
{
case MQITEM_INTEGER:
/***************************************************************/
/* Item is an integer. Find its value and display its index,
*/
/* selector and value.
*/
/***************************************************************/
mqInquireInteger(dataBag,
/* Bag handle
*/
MQSEL_ANY_SELECTOR, /* Allow any selector
*/
i,
/* Index position in the bag */
&iValue,
/* Returned integer value
&compCode,
/* Completion code
*/
&reason);
/* Reason Code
*/
if (compCode != MQCC_OK)
errors++;
else
printf("%.*s %-2d
%-4d
(%d)\n",
indent, blanks, i, selector, iValue);
break
case MQITEM_INTEGER64:
/***************************************************************/
/* Item is a 64-bit integer. Find its value and display its
*/
/* index, selector and value.
*/
/***************************************************************/
mqInquireInteger64(dataBag,
/* Bag handle
*/
MQSEL_ANY_SELECTOR, /* Allow any selector
*/
i,
/* Index position in the bag */
&i64Value,
/* Returned integer value
*/
&compCode,
/* Completion code
*/
&reason);
/* Reason Code
*/
if (compCode != MQCC_OK)
errors++;
else
printf("%.*s %-2d
%-4d
(%"Int64"d)\n",
indent, blanks, i, selector, i64Value);
break;
case MQITEM_STRING:
/***************************************************************/
28
29
printf("\n");
}
break;
case MQITEM_BAG:
/***************************************************************/
/* Item is an embedded bag handle, so call the PrintBagContents*/
/* function again to display the contents.
*/
/***************************************************************/
mqInquireBag(dataBag,
/* Bag handle
*/
MQSEL_ANY_SELECTOR, /* Allow any selector
*/
i,
/* Index position in the bag */
&bagHandle,
/* Returned embedded bag hdle*/
&compCode,
/* Completion code
*/
&reason);
/* Reason Code
*/
if (compCode != MQCC_OK)
errors++;
else
{
printf("%.*s %-2d
%-4d
(%d)\n", indent, blanks, i,
selector, bagHandle);
if (selector == MQHA_BAG_HANDLE)
printf("
else
printf("
PrintBagContents(bagHandle, indent+INDENT);
}
break;
default:
printf("
}
}
}
return errors;
}
30
/*
- The generic channel name "*"
*/
/*
- The attributes to be inquired. In this sample we just want
*/
/*
name and type attributes
*/
/*
*/
/*
- The mqExecute MQCMD_INQUIRE_CHANNEL call is executed.
*/
/*
The call generates the correct PCF structure.
*/
/*
The default options to the call are used so that the command is sent */
/*
to the SYSTEM.ADMIN.COMMAND.QUEUE.
*/
/*
The reply from the command server is placed on a temporary dynamic
*/
/*
queue.
*/
/*
The reply from the MQCMD_INQUIRE_CHANNEL is read from the
*/
/*
temporary queue and formatted into the response bag.
*/
/*
*/
/*
- The completion code from the mqExecute call is checked and if there */
/*
is a failure from the command server, then the code returned by the */
/*
command server is retrieved from the system bag that has been
*/
/*
embedded in the response bag to the mqExecute call.
*/
/*
*/
/* Note: The command server must be running.
*/
/*
*/
/******************************************************************************/
/*
*/
/* AMQSAICL has 2 parameter - the queue manager name (optional)
*/
/*
- output file (optional) default varies
*/
/******************************************************************************/
/******************************************************************************/
/* Includes
*/
/******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#if (MQAT_DEFAULT == MQAT_OS400)
#include <recio.h>
#endif
#include
#include
#include
#include
<cmqc.h>
<cmqcfc.h>
<cmqbc.h>
<cmqxc.h>
/*
/*
/*
/*
MQI
PCF
MQAI
MQCD
*/
*/
*/
*/
/******************************************************************************/
/* Function prototypes
*/
/******************************************************************************/
void CheckCallResult(MQCHAR *, MQLONG , MQLONG);
/******************************************************************************/
/* DataTypes
*/
/******************************************************************************/
#if (MQAT_DEFAULT == MQAT_OS400)
typedef _RFILE OUTFILEHDL;
#else
typedef FILE OUTFILEHDL;
#endif
/******************************************************************************/
/* Constants
*/
/******************************************************************************/
#if (MQAT_DEFAULT == MQAT_OS400)
const struct
{
char name[9];
} ChlTypeMap[9] =
{
"*SDR
",
/* MQCHT_SENDER
*/
"*SVR
",
/* MQCHT_SERVER
*/
Administering WebSphere MQ
31
"*RCVR
",
"*RQSTR ",
"*ALL
",
"*CLTCN ",
"*SVRCONN ",
"*CLUSRCVR",
"*CLUSSDR "
/*
/*
/*
/*
/*
/*
/*
MQCHT_RECEIVER
MQCHT_REQUESTER
MQCHT_ALL
MQCHT_CLNTCONN
MQCHT_SVRCONN
MQCHT_CLUSRCVR
MQCHT_CLUSSDR
};
#else
const struct
{
char name[9];
} ChlTypeMap[9] =
{
"sdr
",
/* MQCHT_SENDER
"svr
",
/* MQCHT_SERVER
"rcvr
",
/* MQCHT_RECEIVER
"rqstr
",
/* MQCHT_REQUESTER
"all
",
/* MQCHT_ALL
"cltconn ",
/* MQCHT_CLNTCONN
"svrcn
",
/* MQCHT_SVRCONN
"clusrcvr ",
/* MQCHT_CLUSRCVR
"clussdr "
/* MQCHT_CLUSSDR
};
#endif
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
/******************************************************************************/
/* Macros
*/
/******************************************************************************/
#if (MQAT_DEFAULT == MQAT_OS400)
#define OUTFILE "QTEMP/AMQSAICL(AMQSAICL)"
#define OPENOUTFILE(hdl, fname) \
(hdl) = _Ropen((fname),"wr, rtncode=Y");
#define CLOSEOUTFILE(hdl) \
_Rclose((hdl));
#define WRITEOUTFILE(hdl, buf, buflen) \
_Rwrite((hdl),(buf),(buflen));
#elif (MQAT_DEFAULT == MQAT_UNIX)
#define OUTFILE "/tmp/amqsaicl.txt"
#define OPENOUTFILE(hdl, fname) \
(hdl) = fopen((fname),"w");
#define CLOSEOUTFILE(hdl) \
fclose((hdl));
#define WRITEOUTFILE(hdl, buf, buflen) \
fwrite((buf),(buflen),1,(hdl)); fflush((hdl));
#else
#define OUTFILE "amqsaicl.txt"
#define OPENOUTFILE(fname) \
fopen((fname),"w");
#define CLOSEOUTFILE(hdl) \
fclose((hdl));
#define WRITEOUTFILE(hdl, buf, buflen) \
fwrite((buf),(buflen),1,(hdl)); fflush((hdl));
#endif
#define ChlType2String(t) ChlTypeMap[(t)-1].name
/******************************************************************************/
/* Function: main
*/
/******************************************************************************/
int main(int argc, char *argv[])
{
/***************************************************************************/
/* MQAI variables
*/
32
/***************************************************************************/
MQHCONN hConn;
/* handle to MQ connection
*/
MQCHAR qmName[MQ_Q_MGR_NAME_LENGTH+1]=""; /* default QMgr name
*/
MQLONG reason;
/* reason code
*/
MQLONG connReason;
/* MQCONN reason code
*/
MQLONG compCode;
/* completion code
*/
MQHBAG adminBag = MQHB_UNUSABLE_HBAG;
/* admin bag for mqExecute
*/
MQHBAG responseBag = MQHB_UNUSABLE_HBAG;/* response bag for mqExecute
*/
MQHBAG cAttrsBag;
/* bag containing chl attributes
*/
MQHBAG errorBag;
/* bag containing cmd server error */
MQLONG mqExecuteCC;
/* mqExecute completion code
*/
MQLONG mqExecuteRC;
/* mqExecute reason code
*/
MQLONG chlNameLength;
/* Actual length of chl name
*/
MQLONG chlType;
/* Channel type
*/
MQLONG i;
/* loop counter
*/
MQLONG numberOfBags;
/* number of bags in response bag */
MQCHAR chlName[MQ_OBJECT_NAME_LENGTH+1];/* name of chl extracted from bag */
MQCHAR OutputBuffer[100];
/* output data buffer
*/
OUTFILEHDL *outfp = NULL;
/* output file handle
*/
/***************************************************************************/
/* Connect to the queue manager
*/
/***************************************************************************/
if (argc > 1)
strncpy(qmName, argv[1], (size_t)MQ_Q_MGR_NAME_LENGTH);
MQCONN(qmName, &hConn;, &compCode;, &connReason;);
/***************************************************************************/
/* Report the reason and stop if the connection failed.
*/
/***************************************************************************/
if (compCode == MQCC_FAILED)
{
CheckCallResult("Queue Manager connection", compCode, connReason);
exit( (int)connReason);
}
/***************************************************************************/
/* Open the output file
*/
/***************************************************************************/
if (argc > 2)
{
OPENOUTFILE(outfp, argv[2]);
}
else
{
OPENOUTFILE(outfp, OUTFILE);
}
if(outfp == NULL)
{
printf("Could not open output file.\n");
goto MOD_EXIT;
}
/***************************************************************************/
/* Create an admin bag for the mqExecute call
*/
/***************************************************************************/
mqCreateBag(MQCBO_ADMIN_BAG, &adminBag;, &compCode;, &reason;);
CheckCallResult("Create admin bag", compCode, reason);
/***************************************************************************/
/* Create a response bag for the mqExecute call
*/
/***************************************************************************/
mqCreateBag(MQCBO_ADMIN_BAG, &responseBag;, &compCode;, &reason;);
CheckCallResult("Create response bag", compCode, reason);
/***************************************************************************/
/* Put the generic channel name into the admin bag
*/
Administering WebSphere MQ
33
/***************************************************************************/
mqAddString(adminBag, MQCACH_CHANNEL_NAME, MQBL_NULL_TERMINATED, "*",
&compCode;, &reason;);
CheckCallResult("Add channel name", compCode, reason);
/***************************************************************************/
/* Put the channel type into the admin bag
*/
/***************************************************************************/
mqAddInteger(adminBag, MQIACH_CHANNEL_TYPE, MQCHT_ALL, &compCode;, &reason;);
CheckCallResult("Add channel type", compCode, reason);
/***************************************************************************/
/* Add an inquiry for various attributes
*/
/***************************************************************************/
mqAddInquiry(adminBag, MQIACH_CHANNEL_TYPE, &compCode;, &reason;);
CheckCallResult("Add inquiry", compCode, reason);
/***************************************************************************/
/* Send the command to find all the channel names and channel types.
*/
/* The mqExecute call creates the PCF structure required, sends it to
*/
/* the command server, and receives the reply from the command server into */
/* the response bag. The attributes are contained in system bags that are */
/* embedded in the response bag, one set of attributes per bag.
*/
/***************************************************************************/
mqExecute(hConn,
/* MQ connection handle
*/
MQCMD_INQUIRE_CHANNEL,
/* Command to be executed
*/
MQHB_NONE,
/* No options bag
*/
adminBag,
/* Handle to bag containing commands
*/
responseBag,
/* Handle to bag to receive the response*/
MQHO_NONE,
/* Put msg on SYSTEM.ADMIN.COMMAND.QUEUE*/
MQHO_NONE,
/* Create a dynamic q for the response */
&compCode;,
/* Completion code from the mqexecute
*/
&reason;);
/* Reason code from mqexecute call
*/
/***************************************************************************/
/* Check the command server is started. If not exit.
*/
/***************************************************************************/
if (reason == MQRC_CMD_SERVER_NOT_AVAILABLE)
{
printf("Please start the command server: <strmqcsv QMgrName="">\n");
goto MOD_EXIT;
}
/***************************************************************************/
/* Check the result from mqExecute call. If successful find the channel
*/
/* types for all the channels. If failed find the error.
*/
/***************************************************************************/
if ( compCode == MQCC_OK )
/* Successful mqExecute
*/
{
/*************************************************************************/
/* Count the number of system bags embedded in the response bag from the */
/* mqExecute call. The attributes for each channel are in separate bags. */
/*************************************************************************/
mqCountItems(responseBag, MQHA_BAG_HANDLE, &numberOfBags;,
&compCode;, &reason;);
CheckCallResult("Count number of bag handles", compCode, reason);
for ( i=0; i<numberOfbags; i++)
{
/***********************************************************************/
/* Get the next system bag handle out of the mqExecute response bag.
*/
/* This bag contains the channel attributes
*/
/***********************************************************************/
mqInquireBag(responseBag, MQHA_BAG_HANDLE, i, &cAttrsbag,
&compCode, &reason);
CheckCallResult("Get the result bag handle", compCode, reason);
34
/***********************************************************************/
/* Get the channel name out of the channel attributes bag
*/
/***********************************************************************/
mqInquireString(cAttrsBag, MQCACH_CHANNEL_NAME, 0, MQ_OBJECT_NAME_LENGTH,
chlName, &chlNameLength, NULL, &compCode, &reason);
CheckCallResult("Get channel name", compCode, reason);
/***********************************************************************/
/* Get the channel type out of the channel attributes bag
*/
/***********************************************************************/
mqInquireInteger(cAttrsBag, MQIACH_CHANNEL_TYPE, MQIND_NONE, &chlType,
&compCode, &reason);
CheckCallResult("Get type", compCode, reason);
/***********************************************************************/
/* Use mqTrim to prepare the channel name for printing.
*/
/* Print the result.
*/
/***********************************************************************/
mqTrim(MQ_CHANNEL_NAME_LENGTH, chlName, chlName, &compCode, &reason);
sprintf(OutputBuffer, "%-20s%-9s", chlName, ChlType2String(chlType));
WRITEOUTFILE(outfp,OutputBuffer,29)
}
}
else
/* Failed mqExecute
*/
{
printf("Call to get channel attributes failed: Cc = %ld : Rc = %ld\n",
compCode, reason);
/*************************************************************************/
/* If the command fails get the system bag handle out of the mqexecute
*/
/* response bag.This bag contains the reason from the command server
*/
/* why the command failed.
*/
/*************************************************************************/
if (reason == MQRCCF_COMMAND_FAILED)
{
mqInquireBag(responseBag, MQHA_BAG_HANDLE, 0, &errorBag,
&compCode, &reason);
CheckCallResult("Get the result bag handle", compCode, reason);
/***********************************************************************/
/* Get the completion code and reason code, returned by the command
*/
/* server, from the embedded error bag.
*/
/***********************************************************************/
mqInquireInteger(errorBag, MQIASY_COMP_CODE, MQIND_NONE, &mqExecuteCC,
&compCode, &reason );
CheckCallResult("Get the completion code from the result bag",
compCode, reason);
mqInquireInteger(errorBag, MQIASY_REASON, MQIND_NONE, &mqExecuteRC,
&compCode, &reason);
CheckCallResult("Get the reason code from the result bag",
compCode, reason);
printf("Error returned by the command server: Cc = %ld : Rc = %ld\n",
mqExecuteCC, mqExecuteRC);
}
}
MOD_EXIT:
/***************************************************************************/
/* Delete the admin bag if successfully created.
*/
/***************************************************************************/
if (adminBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&adminBag, &compCode, &reason);
CheckCallResult("Delete the admin bag", compCode, reason);
}
Administering WebSphere MQ
35
/***************************************************************************/
/* Delete the response bag if successfully created.
*/
/***************************************************************************/
if (responseBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&responseBag, &compCode, &reason);
CheckCallResult("Delete the response bag", compCode, reason);
}
/***************************************************************************/
/* Disconnect from the queue manager if not already connected
*/
/***************************************************************************/
if (connReason != MQRC_ALREADY_CONNECTED)
{
MQDISC(&hConn, &compCode, &reason);
CheckCallResult("Disconnect from Queue Manager", compCode, reason);
}
/***************************************************************************/
/* Close the output file if open
*/
/***************************************************************************/
if(outfp != NULL)
CLOSEOUTFILE(outfp);
return 0;
}
/******************************************************************************/
/*
*/
/* Function: CheckCallResult
*/
/*
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Description of call
*/
/*
Completion code
*/
/*
Reason code
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Logic: Display the description of the call, the completion code and the
*/
/*
reason code if the completion code is not successful
*/
/*
*/
/******************************************************************************/
void CheckCallResult(char *callText, MQLONG cc, MQLONG rc)
{
if (cc != MQCC_OK)
printf("%s failed: Completion Code = %ld : Reason = %ld\n", callText,
cc, rc);
}
36
/*
(C) Copyright IBM Corp. 1999, 2005
*/
/*
*/
/******************************************************************************/
/*
*/
/* Function:
*/
/*
AMQSAILQ is a sample C program that demonstrates how to inquire
*/
/*
attributes of the local queue manager using the MQAI interface. In
*/
/*
particular, it inquires the current depths of all the local queues.
*/
/*
*/
/*
- A PCF command is built by placing items into an MQAI administration */
/*
bag.
*/
/*
These are:*/
/*
- The generic queue name "*"
*/
/*
- The type of queue required. In this sample we want to
*/
/*
inquire local queues.
*/
/*
- The attribute to be inquired. In this sample we want the
*/
/*
current depths.
*/
/*
*/
/*
- The mqExecute call is executed with the command MQCMD_INQUIRE_Q.
*/
/*
The call generates the correct PCF structure.
*/
/*
The default options to the call are used so that the command is sent */
/*
to the SYSTEM.ADMIN.COMMAND.QUEUE.
*/
/*
The reply from the command server is placed on a temporary dynamic
*/
/*
queue.
*/
/*
The reply from the MQCMD_INQUIRE_Q command is read from the
*/
/*
temporary queue and formatted into the response bag.
*/
/*
*/
/*
- The completion code from the mqExecute call is checked and if there */
/*
is a failure from the command server, then the code returned by
*/
/*
command server is retrieved from the system bag that has been
*/
/*
embedded in the response bag to the mqExecute call.
*/
/*
*/
/*
- If the call is successful, the depth of each local queue is placed
*/
/*
in system bags embedded in the response bag of the mqExecute call.
*/
/*
The name and depth of each queue is obtained from each of the bags
*/
/*
and the result displayed on the screen.
*/
/*
*/
/* Note: The command server must be running.
*/
/*
*/
/******************************************************************************/
/*
*/
/* AMQSAILQ has 1 parameter - the queue manager name (optional)
*/
/*
*/
/******************************************************************************/
/******************************************************************************/
/* Includes
*/
/******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <cmqc.h>
#include <cmqcfc.h>
#include <cmqbc.h>
/* MQI
/* PCF
/* MQAI
*/
*/
*/
/******************************************************************************/
/* Function prototypes
*/
/******************************************************************************/
void CheckCallResult(MQCHAR *, MQLONG , MQLONG);
/******************************************************************************/
/* Function: main
*/
/******************************************************************************/
int main(int argc, char *argv[])
{
Administering WebSphere MQ
37
/***************************************************************************/
/* MQAI variables
*/
/***************************************************************************/
MQHCONN hConn;
/* handle to WebSphere MQ connection
*/
MQCHAR qmName[MQ_Q_MGR_NAME_LENGTH+1]=""; /* default QMgr name
*/
MQLONG reason;
/* reason code
*/
MQLONG connReason;
/* MQCONN reason code
*/
MQLONG compCode;
/* completion code
*/
MQHBAG adminBag = MQHB_UNUSABLE_HBAG;
/* admin bag for mqExecute
*/
MQHBAG responseBag = MQHB_UNUSABLE_HBAG;/* response bag for mqExecute
*/
MQHBAG qAttrsBag;
/* bag containing q attributes
*/
MQHBAG errorBag;
/* bag containing cmd server error */
MQLONG mqExecuteCC;
/* mqExecute completion code
*/
MQLONG mqExecuteRC;
/* mqExecute reason code
*/
MQLONG qNameLength;
/* Actual length of q name
*/
MQLONG qDepth;
/* depth of queue
*/
MQLONG i;
/* loop counter
*/
MQLONG numberOfBags;
/* number of bags in response bag */
MQCHAR qName[MQ_Q_NAME_LENGTH+1];
/* name of queue extracted from bag*/
printf("Display current depths of local queues\n\n");
/***************************************************************************/
/* Connect to the queue manager
*/
/***************************************************************************/
if (argc > 1)
strncpy(qmName, argv[1], (size_t)MQ_Q_MGR_NAME_LENGTH);
MQCONN(qmName, &hConn, &compCode, &connReason);
/***************************************************************************/
/* Report the reason and stop if the connection failed.
*/
/***************************************************************************/
if (compCode == MQCC_FAILED)
{
CheckCallResult("Queue Manager connection", compCode, connReason
);
exit( (int)connReason);
}
/***************************************************************************/
/* Create an admin bag for the mqExecute call
*/
/***************************************************************************/
mqCreateBag(MQCBO_ADMIN_BAG, &adminBag, &compCode, &reason);
CheckCallResult("Create admin bag", compCode, reason);
/***************************************************************************/
/* Create a response bag for the mqExecute call
*/
/***************************************************************************/
mqCreateBag(MQCBO_ADMIN_BAG, &responseBag, &compCode, &reason);
CheckCallResult("Create response bag", compCode, reason);
/***************************************************************************/
/* Put the generic queue name into the admin bag
*/
/***************************************************************************/
mqAddString(adminBag, MQCA_Q_NAME, MQBL_NULL_TERMINATED, "*",
&compCode, &reason);
CheckCallResult("Add q name", compCode, reason);
/***************************************************************************/
/* Put the local queue type into the admin bag
*/
/***************************************************************************/
mqAddInteger(adminBag, MQIA_Q_TYPE, MQQT_LOCAL, &compCode, &reason);
CheckCallResult("Add q type", compCode, reason);
/***************************************************************************/
/* Add an inquiry for current queue depths
*/
/***************************************************************************/
38
39
&compCode, &reason);
CheckCallResult("Get depth", compCode, reason);
/***********************************************************************/
/* Use mqTrim to prepare the queue name for printing.
*/
/* Print the result.
*/
/***********************************************************************/
mqTrim(MQ_Q_NAME_LENGTH, qName, qName, &compCode, &reason)
printf("%4d %-48s\n", qDepth, qName);
}
}
else
/* Failed mqExecute
{
printf("Call to get queue attributes failed: Completion Code = %d :
Reason = %d\n", compCode, reason);
*/
/*************************************************************************/
/* If the command fails get the system bag handle out of the mqExecute
*/
/* response bag. This bag contains the reason from the command server
*/
/* why the command failed.
*/
/*************************************************************************/
if (reason == MQRCCF_COMMAND_FAILED)
{
mqInquireBag(responseBag, MQHA_BAG_HANDLE, 0, &errorBag, &compCode,
&reason);
CheckCallResult("Get the result bag handle", compCode, reason);
/************************************************************************/
/* Get the completion code and reason code, returned by the command
*/
/* server, from the embedded error bag.
*/
/************************************************************************/
mqInquireInteger(errorBag, MQIASY_COMP_CODE, MQIND_NONE, &mqExecuteCC,
&compCode, &reason );
CheckCallResult("Get the completion code from the result bag",
compCode, reason);
mqInquireInteger(errorBag, MQIASY_REASON, MQIND_NONE, &mqExecuteRC,
&compCode, &reason);
CheckCallResult("Get the reason code from the result bag",
compCode, reason);
printf("Error returned by the command server: Completion Code = %d :
Reason = %d\n", mqExecuteCC, mqExecuteRC);
}
}
/****************************************************************************/
/* Delete the admin bag if successfully created.
*/
/****************************************************************************/
if (adminBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&adminBag, &compCode, &reason);
CheckCallResult("Delete the admin bag", compCode, reason);
}
/****************************************************************************/
/* Delete the response bag if successfully created.
*/
/****************************************************************************/
if (responseBag != MQHB_UNUSABLE_HBAG)
{
mqDeleteBag(&responseBag, &compCode, &reason);
CheckCallResult("Delete the response bag", compCode, reason);
}
/****************************************************************************/
/* Disconnect from the queue manager if not already connected
*/
/****************************************************************************/
if (connReason != MQRC_ALREADY_CONNECTED)
40
{
MQDISC(&hConn, &compCode, &reason);
CheckCallResult("Disconnect from queue manager", compCode, reason);
}
return 0;
}
*******************************************************************************/
*
*/
* Function: CheckCallResult
*/
*
*/
*******************************************************************************/
*
*/
* Input Parameters: Description of call
*/
*
Completion code
*/
*
Reason code
*/
*
*/
* Output Parameters: None
*/
*
*/
* Logic: Display the description of the call, the completion code and the
*/
*
reason code if the completion code is not successful
*/
*
*/
*******************************************************************************/
void CheckCallResult(char *callText, MQLONG cc, MQLONG rc)
{
if (cc != MQCC_OK)
printf("%s failed: Completion Code = %d : Reason = %d\n",
callText, cc, rc);
}
Administering WebSphere MQ
41
MQCC_FAILED
MQRCCF_COMMAND_FAILED
Response bag
MQIASY_COMP_CODE
MQIASY_REASON
MQCC_FAILDED
MQRCCF_COMMAND_FAILED
MQHA_BAG_HANDLE
MQHA_BAG_HANDLE
nested
bag
nested
bag
MQIASY_COMP_CODE
MQIASY_REASON
MQCC_FAILED
MQRCCF_COMMAND_FAILED
MQIASY_CONTROL
MQCFC_LAST
MQIASY_MSG_SEQ_NIMBER 2
Advanced topics
Information on indexing, data conversion and use of message descriptor
v Indexing
Indexes are used when replacing or removing existing data items from a bag to preserve insertion
order. Full details on indexing can be found in Indexing.
v Data conversion
The strings contained in an MQAI data bag can be in a variety of coded character sets and these can be
converted using the mqSetInteger call. Full details on data conversion can be found in Data conversion.
v Use of the message descriptor
MQAI generates a message descriptor which is set to an initial value when the data bag is created. Full
details of the use of the message descriptor can be found in Use of the message descriptor.
Data bags
A data bag is a means of handling properties or parameters of objects using the MQAI.
Data Bags
v The data bag contains zero or more data items. These data items are ordered within the bag as they are
placed into the bag. This is called the insertion order. Each data item contains a selector that identifies
the data item and a value of that data item that can be either an integer, a 64-bit integer, an integer
filter, a string, a string filter, a byte string, a byte string filter, or a handle of another bag. Data items
are described in details in Data item on page 45
There are two types of selector; user selectors and system selectors. These are described in MQAI
Selectors. The selectors are usually unique, but it is possible to have multiple values for the same
selector. In this case, an index identifies the particular occurrence of selector that is required. Indexes
are described in Indexing.
A hierarchy of the these concepts is shown in Figure 1.
42
Selector
of type
System
User
Integer
of type
Integer filter
64-Bit integer
String filter
String
Bag handle
43
v You can
v You can
46.
v You can
v You can
v You can
v You can
v You can
add data items to data bags Adding data items to bags on page 46.
add an inquiry command within a data bag Adding an inquiry command to a bag on page
inquire within data bags Inquiring within data bags on page 47.
count data items within a data bag Counting data items on page 50.
change information within a data bag Changing information within a bag on page 48.
clear a data bag Clearing a bag using the mqClearBag call on page 49.
truncate a data bag Truncating a bag using the mqTruncateBag call on page 49.
v You can convert bags and buffers Converting bags and buffers on page 49.
Creating and deleting data bags:
Creating data bags
To use the MQAI, you first create a data bag using the mqCreateBag call. As input to this call, you
supply one or more options to control the creation of the bag.
The Options parameter of the MQCreateBag call lets you choose whether to create a user bag, a
command bag, a group bag, or an administration bag.
To create a user bag, a command bag, or a group bag, you can choose one or more further options to:
v Use the list form when there are two or more adjacent occurrences of the same selector in a bag.
v Reorder the data items as they are added to a PCF message to ensure that the parameters are in their
correct order. For more information on data items, see Data item on page 45.
v Check the values of user selectors for items that you add to the bag.
Administration bags automatically imply these options.
A data bag is identified by its handle. The bag handle is returned from mqCreateBag and must be
supplied on all other calls that use the data bag.
For a full description of the mqCreateBag call, see mqCreateBag.
Deleting data bags
Any data bag that is created by the user must also be deleted using the mqDeleteBag call. For example, if
a bag is created in the user code, it must also be deleted in the user code.
System bags are created and deleted automatically by the MQAI. For more information about this, see
Sending administration commands to the command server using the mqExecute call on page 51. User
code cannot delete a system bag.
For a full description of the mqDeleteBag call, see mqDeleteBag.
Putting and receiving data bags:
Data can also be sent between applications by putting and getting data bags using the mqPutBag and
mqGetBag calls. This lets the MQAI handle the buffer rather than the application. The mqPutBag call
converts the contents of the specified bag into a PCF message and sends the message to the specified
queue and the mqGetBag call removes the message from the specified queue and converts it back into a
data bag. Therefore, the mqPutBag call is the equivalent of the mqBagToBuffer call followed by MQPUT,
and the mqGetBag is the equivalent of the MQGET call followed by mqBufferToBag.
44
For more information on sending and receiving PCF messages in a specific queue, see Sending and
receiving PCF messages in a specified queue on page 8
Note: If you choose to use the mqGetBag call, the PCF details within the message must be correct; if they
are not, an appropriate error results and the PCF message is not returned.
Data item:
Data items are used to populate Data bags when they are created. These data items can be user or system
items.
These user items contain user data such as attributes of objects that are being administered. System items
should be used for more control over the messages generated: for example, the generation of message
headers. For more information about system items, see System items.
Types of Data Items
When you have created a data bag, you can populate it with integer or character-string items. You can
inquire about all three types of item.
The data item can either be integer or character-string items. Here are the types of data item available
within the MQAI:
v
v
v
v
Integer
64-bit integer
Integer filter
Character-string
v String filter
v Byte string
v Byte string filter
v Bag handle
Using Data Items
These are the following ways of using data items:
v Counting data items on page 50.
v Deleting data items on page 50.
v Adding data items to bags on page 46.
v Filtering and querying data items on page 47.
System items:
System items can be used for:
v The generation of PCF headers. System items can control the PCF command identifier, control options,
message sequence number, and command type.
v Data conversion. System items handle the character-set identifier for the character-string items in the
bag.
Like all data items, system items consist of a selector and a value. For information about these selectors
and what they are for, see MQAI Selectors.
System items are unique. One or more system items can be identified by a system selector. There is only
one occurrence of each system selector.
Administering WebSphere MQ
45
Most system items can be modified (see Changing information within a bag on page 48), but the
bag-creation options cannot be changed by the user. You cannot delete system items. (See Deleting data
items on page 50.)
Adding data items to bags:
When a data bag is created, you can populate it with data items. These data items can be user or system
items. For more information about data items, see Data item on page 45.
The MQAI lets you add integer items, 64-bit integer items, integer filter items, character-string items,
string filter, byte string items, and byte string filter items to bags and this is shown in Figure 2. The items
are identified by a selector. Usually one selector identifies one item only, but this is not always the case. If
a data item with the specified selector is already present in the bag, an additional instance of that selector
is added to the end of the bag.
add
data
item
0
data
item
1
...
...
data
item
4
data
item
5
data bag
Figure 2. Adding data items
For more information on adding data items to a bag, see System items on page 45.
Adding an inquiry command to a bag:
The mqAddInquiry call is used to add an inquiry command to a bag. The call is specifically for
administration purposes, so it can be used with administration bags only. It lets you specify the selectors
of attributes on which you want to inquire from WebSphere MQ.
For a full description of the mqAddInquiry call, see mqAddInquiry.
46
This example specifies that the queue type (Selector) must be local (ItemValue) and this specification
must match the attributes of the object (in this case, a queue) about which you are inquiring.
Other attributes that can be filtered correspond to the PCF Inquire* commands that can be found in
Introduction to Programmable Command Formats on page 5. For example, to inquire about the
attributes of a channel, see the Inquire Channel command in this product documentation. The
"Required parameters" and "Optional parameters" of the Inquire Channel command identify the
selectors that you can use for filtering.
v You can query particular attributes of an object using the mqAddInquiry call. This specifies the selector
in which you are interested. If you do not specify the selector, all attributes of the object are returned.
Here is an example of filtering and querying the attributes of a queue:
/* Request information about all queues */
mqAddString(adminbag, MQCA_Q_NAME, "*")
/* Filter attributes so that local queues only are returned */
mqAddInteger(adminbag, MQIA_Q_TYPE, MQQT_LOCAL)
/* Query the names and current depths of the local queues */
mqAddInquiry(adminbag, MQCA_Q_NAME)
mqAddInquiry(adminbag, MQIA_CURRENT_Q_DEPTH)
/* Send inquiry to the command server and wait for reply */
mqExecute(MQCMD_INQUIRE_Q, ...)
For more examples of filtering and querying data items, see Examples of using the MQAI on page 17.
Inquiring within data bags:
You can inquire about:
v The value of an integer item using the mqInquireInteger call. See mqInquireInteger.
v The value of a 64-bit integer item using the mqInquireInteger64 call. See mqInquireInteger64.
v The value of an integer filter item using the mqInquireIntegerFilter call. See mqInquireIntegerFilter.
v The value of a character-string item using the mqInquireString call. See mqInquireString.
v The value of a string filter item using the mqInquireStringFilter call. See mqInquireStringFilter.
v The value of a byte string item using the mqInquireByteString call. See mqInquireByteString.
v The value of a byte string filter item using the mqInquireByteStringFilter call. See
mqInquireByteStringFilter.
v The value of a bag handle using the mqInquireBag call. See mqInquireBag.
You can also inquire about the type (integer, 64-bit integer, integer filter, character string, string filter, byte
string, byte string filter or bag handle) of a specific item using the mqInquireItemInfo call. See
mqInquireItemInfo.
Administering WebSphere MQ
47
data
item
0
data
item
1
...
...
data
item
4
data bag
Figure 3. Modifying a single data item
2. Delete all existing occurrences of the specified selector and add a new occurrence to the end of the
bag. (See Figure 4.) A special index value allows all instances of a parameter to be replaced.
INDEX
data
item
0
data
item
1
...
add
...
data
item
4
data
item
5
data bag
Figure 4. Modifying all data items
Note: The index preserves the insertion order within the bag but can affect the indices of other data
items.
The mqSetInteger call lets you modify integer items within a bag. The mqSetInteger64 call lets you
modify 64-bit integer items. The mqSetIntegerFilter call lets you modify integer filter items. The
mqSetString call lets you modify character-string items. The mqSetStringFilter call lets you modify string
filter items. The mqSetByteString call lets you modify byte string items. The mqSetByteStringFilter call
lets you modify byte string filter items. Alternatively, you can use these calls to delete all existing
occurrences of the specified selector and add a new occurrence at the end of the bag. The data item can
be a user item or a system item.
For a full description of these calls, see:
v
v
v
v
v
v
v
mqSetInteger
mqSetInteger64
mqSetIntegerFilter
mqSetString
mqSetStringFilter
mqSetByteString
mqSetByteStringFilter
48
data
item
0
data
item
1
...
...
data
item
4
data bag
Figure 5. Truncating a bag
message
data
bag
mqBagToBuffer
PCF
message
buffer
PCF
message
MQPUT
queue
To receive data, the message is received into a buffer using the MQGET call. The data in the buffer is
then converted into a bag using the mqBufferToBag call, providing the buffer contains a valid PCF
message. This is shown in Figure Figure 7 on page 50. For a full description of the mqBufferToBag call,
see mqBufferToBag.
Administering WebSphere MQ
49
PCF
message
PCF
message
MQGET
mqBufferToBag
message
data
buffer
queue
bag
Counting data items: The mqCountItems call counts the number of user items, system items, or both, that
are stored in a data bag, and returns this number. For example, mqCountItems(Bag, 7, ...), returns the
number of items in the bag with a selector of 7. It can count items by individual selector, by user
selectors, by system selectors, or by all selectors.
Note: This call counts the number of data items, not the number of unique selectors in the bag. A selector
can occur multiple times, so there might be fewer unique selectors in the bag than data items.
For a full description of the mqCountItems call, see mqCountItems.
Deleting data items:
You can delete items from bags in a number of ways. You can:
v Remove one or more user items from a bag. For detailed information, see Deleting data items from a
bag using the mqDeleteItem call.
v Delete all user items from a bag, that is, clear a bag. For detailed information see Clearing a bag using
the mqClearBag call on page 49.
v Delete user items from the end of a bag, that is, truncate a bag. For detailed information, see
Truncating a bag using the mqTruncateBag call on page 49.
Deleting data items from a bag using the mqDeleteItem call:
The mqDeleteItem call removes one or more user items from a bag. The index is used to delete either:
1. A single occurrence of the specified selector. (See Figure 8.)
INDEX
data
item
0
data
item
1
...
...
data
item
4
data bag
Figure 8. Deleting a single data item
or
2. All occurrences of the specified selector. (See Figure 9 on page 51.)
50
INDEX
data
item
0
data
item
1
selector A selector B
...
data
item
3
...
data
item
4
selector B selector C
data bag
Figure 9. Deleting all data items
Note: The index preserves the insertion order within the bag but can affect the indices of other data
items. For example, the mqDeleteItem call does not preserve the index values of the data items that
follow the deleted item because the indices are reorganized to fill the gap that remains from the deleted
item.
For a full description of the mqDeleteItem call, see mqDeleteItem.
Administering WebSphere MQ
51
NESTED
response
message
bag
handle
system bag
user/response bag
system bag
Figure 10. Nesting
52
the queue managers and clusters you are interested in. The platforms and levels of WebSphere MQ that
can be administered using the WebSphere MQ Explorer are described in Remote queue managers on
page 54.
To configure remote WebSphere MQ queue managers so that WebSphere MQ Explorer can administer
them, see Prerequisite software and definitions on page 55.
It allows you to perform tasks, typically associated with setting up and fine-tuning the working
environment for WebSphere MQ, either locally or remotely within a Windows or Linux (x86 and x86-64
platforms) system domain.
On Linux, the WebSphere MQ Explorer might fail to start if you have more than one Eclipse installation.
If this happens, start the WebSphere MQ Explorer using a different user ID to the one you use for the
other Eclipse installation.
On Linux, to start the WebSphere MQ Explorer successfully, you must be able to write a file to your
home directory, and the home directory must exist.
Start or stop the command servers, channel initiators, trigger monitors, and listeners.
Set specific services to start automatically when a queue manager is started.
Modify the properties of queue managers.
Change the local default queue manager.
Invoke the ikeyman GUI to manage secure sockets layer (SSL) certificates, associate certificates with
queue managers, and configure and setup certificate stores (on your local machine only).
v Create JMS objects from WebSphere MQ objects, and WebSphere MQ objects from JMS objects.
v Create a JMS Connection Factory for any of the currently supported types.
v Modify the parameters for any service, such as the TCP port number for a listener, or a channel
initiator queue name.
v
v
v
v
v
53
54
This command creates a basic channel definition. If you want a more sophisticated definition (to set
up security, for example), you need additional parameters. For more information, see DEFINE
CHANNEL.
4. The system queue, SYSTEM.MQEXPLORER.REPLY.MODEL, must exist.
Security
If you are using WebSphere MQ in an environment where it is important for you to control user access to
particular objects, you might need to consider the security aspects of using the WebSphere MQ Explorer.
Authorization to use the WebSphere MQ Explorer:
Any user can use the WebSphere MQ Explorer, but certain authorities are required to connect, access, and
manage queue managers.
To perform local administrative tasks using the WebSphere MQ Explorer, a user is required to have the
necessary authority to perform the administrative tasks. If the user is a member of the mqm group, the
user has authority to perform all local administrative tasks.
To connect to a remote queue manager and perform remote administrative tasks using the WebSphere
MQ Explorer, the user executing the WebSphere MQ Explorer is required to have the following
authorities:
v CONNECT authority on the target queue manager object
v INQUIRE authority on the target queue manager object
v DISPLAY authority to the target queue manager object
v
v
v
v
v
55
56
57
2. Add the CA certificates to the key database created in the previous step.
3. Import the personal certificate for the queue manager into the key database.
4. On Windows and Linux systems, start MQ Explorer by using the system menu, the MQExplorer
executable file, or the strmqcfg command.
5. From the WebSphere MQ Explorer toolbar, click Window -> Preferences, then expand WebSphere
MQ Explorer and click SSL Client Certificate Stores. Enter the name of, and password for, the JKS
file created in step 1 of Tasks on the system that hosts the WebSphere MQ Explorer on page 57, in
both the Trusted Certificate Store and the Personal Certificate Store, then click OK.
6. Close the Preferences window, and right-click Queue Managers. Click Show/Hide Queue Managers,
and then click Add on the Show/Hide Queue Managers screen.
7. Type the name of the queue manager, and select the Connect directly option. Click next.
8. Select Use client channel definition table (CCDT) and specify the location of the channel table file
that you transferred from the remote queue manager in step 2 in Tasks on the system that hosts the
remote queue manager on page 57 on the system hosting the remote queue manager.
9. Click Finish. You can now access the remote queue manager from the WebSphere MQ Explorer.
Connecting through another queue manager:
The WebSphere MQ Explorer allows you to connect to a queue manager through an intermediate queue
manager, to which the WebSphere MQ Explorer is already connected.
In this case, the WebSphere MQ Explorer puts PCF command messages to the intermediate queue
manager, specifying the following:
v The ObjectQMgrName parameter in the object descriptor (MQOD) as the name of the target queue
manager. For more information on queue name resolution, see the Name resolution.
v The UserIdentifier parameter in the message descriptor (MQMD) as the local userId.
If the connection is then used to connect to the target queue manager via an intermediate queue manager,
the userId is flowed in the UserIdentifier parameter of the message descriptor (MQMD) again. In order for
the MCA listener on the target queue manager to accept this message, either the MCAUSER attribute
must be set, or the userId must already exist with put authority.
The command server on the target queue manager puts messages to the transmission queue specifying
the userId in the UserIdentifier parameter in the message descriptor (MQMD). For this put to succeed the
userId must already exist on the target queue manager with put authority.
The following example shows you how to connect a queue manager, through an intermediate queue
manager, to the WebSphere MQ Explorer.
Establish a remote administration connection to a queue manager. Verify that the:
Queue manager on the server is active and has a server-connection channel (SVRCONN) defined.
Listener is active.
Command server is active.
SYSTEM.MQ EXPLORER.REPLY.MODEL queue has been created and that you have sufficient
authority.
v Queue manager listeners, command servers, and sender channels are started.
v
v
v
v
58
MQ Client
MQ Explorer
Server 1
Server 2
QMGRA
QMGRB
SVRCONN
SDR
RCVR
XMITQ = QMGRB
RCVR
SDR
XMITQ = QMGRA
In this example:
v WebSphere MQ Explorer is connected to queue manager QMGRA (running on Server1) using a client
connection.
v Queue manager QMGRB on Server2 can be now connected to WebSphere MQ Explorer through an
intermediate queue manager (QMGRA)
v When connecting to QMGRB with WebSphere MQ Explorer, select QMGRA as the intermediate queue
manager
In this situation, there is no direct connection to QMGRB from WebSphere MQ Explorer; the connection to
QMGRB is through QMGRA.
Queue manager QMGRB on Server2 is connected to QMGRA on Server1 using sender-receiver channels. The
channel between QMGRA and QMGRB must be set up in such a way that remote administration is possible;
see Preparing channels and transmission queues for remote administration on page 105.
59
3.
4.
5.
6.
Cluster membership
WebSphere MQ Explorer requires information about queue managers that are members of a cluster.
If a queue manager is a member of a cluster, then the cluster tree node will be populated automatically.
If queue managers become members of clusters while the WebSphere MQ Explorer is running, then you
must maintain the WebSphere MQ Explorer with up-to-date administration data about clusters so that it
can communicate effectively with them and display correct cluster information when requested. In order
to do this, the WebSphere MQ Explorer needs the following information:
v The name of a repository queue manager
v The connection name of the repository queue manager if it is on a remote queue manager
With this information, the WebSphere MQ Explorer can:
v Use the repository queue manager to obtain a list of queue managers in the cluster.
v Administer the queue managers that are members of the cluster and are on supported platforms and
command levels.
Administration is not possible if:
v The chosen repository becomes unavailable. The WebSphere MQ Explorer does not automatically
switch to an alternative repository.
v The chosen repository cannot be contacted over TCP/IP.
v The chosen repository is running on a queue manager that is running on a platform and command
level not supported by the WebSphere MQ Explorer.
The cluster members that can be administered can be local, or they can be remote if they can be contacted
using TCP/IP. The WebSphere MQ Explorer connects to local queue managers that are members of a
cluster directly, without using a client connection.
60
Data conversion
The WebSphere MQ Explorer works in CCSID 1208 (UTF-8). This enables the WebSphere MQ Explorer to
display the data from remote queue managers correctly. Whether connecting to a queue manager directly,
or by using an intermediate queue manager, the WebSphere MQ Explorer requires all incoming messages
to be converted to CCSID 1208 (UTF-8).
An error message is issued if you try to establish a connection between the WebSphere MQ Explorer and
a queue manager with a CCSID that the WebSphere MQ Explorer does not recognize.
Supported conversions are described in Code page conversion.
Security on Windows
The Prepare WebSphere MQ wizard creates a special user account so that the Windows service can be
shared by processes that need to use it.
A Windows service is shared between client processes for a WebSphere MQ installation. One service is
created for each installation. Each service is named MQ_InstallationName, and has a display name of IBM
WebSphere MQ(InstallationName). Before version 7.1, with only one installation on a server the single,
Windows service was named MQSeriesServices with the display name IBM MQSeries.
Because each service must be shared between non-interactive and interactive logon sessions, you must
launch each under a special user account. You can use one special user account for all the services, or
create different special user accounts. Each special user account must have the user right to Logon as a
service, for more information see User rights required for a WebSphere MQ Windows Service on page
62
When you install WebSphere MQ and run the Prepare WebSphere MQ wizard for the first time, it
creates a local user account for the service called MUSR_MQADMIN with the required settings and
permissions, including Logon as a service.
For subsequent installations, the Prepare WebSphere MQ wizard creates a user account named
MUSR_MQADMINx, where x is the next available number representing a user ID that does not exist. The
password for MUSR_MQADMINx is randomly generated when the account is created, and used to
configure the logon environment for the service. The generated password does not expire.
This WebSphere MQ account is not affected by any account policies that are set up on the system to
require that account passwords are changed after a certain period.
The password is not known outside this one-time processing and is stored by the Windows operating
system in a secure part of the registry.
Related information:
Windows: "Logon as a service" required
Administering WebSphere MQ
61
the domain user account into the Prepare WebSphere MQ Wizard, it configures a WebSphere MQ
Windows service to run under the new account. The account details are held in the secure part of the
Registry and cannot be read by users.
When the service is running, a WebSphere MQ Windows service is launched and remains running for as
long as the service is running. A WebSphere MQ administrator who logs on to the server after the
Windows service is launched can use the WebSphere MQ Explorer to administer queue managers on the
server. This connects the WebSphere MQ Explorer to the existing Windows service process. These two
actions need different levels of permission before they can work:
v The launch process requires a launch permission.
v The WebSphere MQ administrator requires Access permission.
Log on as service
Debug programs
Increase quotas
Your domain user account must have these Windows user rights set as effective user rights as listed in
the Local Security Policy application. If they are not, set them using either the Local Security Policy
application locally on the server, or by using the Domain Security Application domain wide.
Procedure
1. Create a new user account (for example NEW_NAME)
2. Use the Prepare WebSphere MQ Wizard to enter the details of the new user account.
Procedure
1. Identify the user the service is running under.
2. Stop the IBMWebSphere MQ service from the Computer Management panel.
3. Change the required password in the same way that you would change the password of an
individual.
62
4.
5.
6.
7.
Go to the properties for the IBM WebSphere MQ service from the Computer Management panel.
Select the Log On Page.
Confirm that the account name specified matches the user for which the password was modified.
Type the password into the Password and Confirm password fields and click OK.
WebSphere MQ Windows service for an installation running under a domain user account:
About this task
If the WebSphere MQ Windows service for an installation is running under a domain user account, you
can also change the password for the account as follows:
Procedure
1. Change the password for the domain account on the domain controller. You might need to ask your
domain administrator to do this for you.
2. Follow the steps to modify the Log On page for the IBMWebSphere MQ service.
The user account that WebSphere MQ Windows service runs under executes any MQSC commands
that are issued by user interface applications, or performed automatically on system startup,
shutdown, or service recovery. This user account must therefore have WebSphere MQ administration
rights. By default it is added to the local mqm group on the server. If this membership is removed,
the WebSphere MQ Windows service does not work. For more information about user rights, see
User rights required for a WebSphere MQ Windows Service on page 62
If a security problem arises with the user account that the WebSphere MQ Windows service runs
under, error messages and descriptions appear in the system event log.
Related concepts:
Using Active directory (Windows only) on page 61
In some network configurations, where user accounts are defined on domain controllers that are using
Active Directory, the local user account WebSphere MQ is running under might not have the authority it
requires to query the group membership of other domain user accounts. The Prepare WebSphere MQ
Wizard identifies whether this is the case by carrying out tests and asking the user questions about the
network configuration.
Explanation: The user ID (default name is MUSR_MQADMIN) which runs theWebSphere MQ Service
process amqsvc.exe is still running with an access token which does not contain group membership
information for the group DB2USERS.
Solve: After you have ensured that the WebSphere MQ Service user ID is a member of DB2USERS, use
the following sequence of commands:
v stop the service.
v stop any other processes running under the same user ID.
v restart these processes.
Rebooting the machine would ensure the previous steps, but is not necessary.
Administering WebSphere MQ
63
Blue
Yellow
Click
Click
Click
Click
64
v Route alert messages over the network to a configurable user account, or to a Windows workstation or
server
On WebSphere MQ for Windows and WebSphere MQ for Linux (x86 and x86-64 platforms) systems, you
can start a queue manager as follows:
1. Open the WebSphere MQ Explorer.
2. Select the queue manager from the Navigator View.
3. Click Start. The queue manager starts.
If the queue manager start-up takes more than a few seconds WebSphere MQ issues information
messages intermittently detailing the start-up progress.
The strmqm command does not return control until the queue manager has started and is ready to accept
connection requests.
65
Note: You must use the endmqm command from the installation associated with the queue manager that
you are working with. You can find out which installation a queue manager is associated with using the
dspmq -o installation command.
For example, to stop a queue manager called QMB, enter the following command:
endmqm QMB
On WebSphere MQ for Windows and WebSphere MQ for Linux (x86 and x86-64 platforms) systems, you
can stop a queue manager as follows:
1. Open the WebSphere MQ Explorer.
2. Select the queue manager from the Navigator View.
3. Click Stop.... The End Queue Manager panel is displayed.
4. Select Controlled, or Immediate.
5. Click OK. The queue manager stops.
Quiesced shutdown
By default, the endmqm command performs a quiesced shutdown of the specified queue manager. This
might take a while to complete. A quiesced shutdown waits until all connected applications have
disconnected.
Use this type of shutdown to notify applications to stop. If you issue:
endmqm -c QMB
you are not told when all applications have stopped. (An endmqm -c QMB command is equivalent to an
endmqm QMB command.)
However, if you issue:
endmqm -w QMB
the command waits until all applications have stopped and the queue manager has ended.
Immediate shutdown
For an immediate shutdown any current MQI calls are allowed to complete, but any new calls fail. This
type of shutdown does not wait for applications to disconnect from the queue manager.
For an immediate shutdown, type:
endmqm -i QMB
Preemptive shutdown
Note: Do not use this method unless all other attempts to stop the queue manager using the endmqm
command have failed. This method can have unpredictable consequences for connected applications.
If an immediate shutdown does not work, you must resort to a preemptive shutdown, specifying the -p
flag. For example:
endmqm -p QMB
This stops the queue manager immediately. If this method still does not work, see Stopping a queue
manager manually on page 67 for an alternative solution.
For a detailed description of the endmqm command and its options, see endmqm.
66
3. Stop the WebSphere MQ service from Administration tools > Services on the Windows Control
Panel.
4. If you have tried all methods and the queue manager has not stopped, reboot your system.
Administering WebSphere MQ
67
The Windows Task Manager and the tasklist command give limited information about tasks. For more
information to help to determine which processes relate to a particular queue manager, consider using a
tool such as Process Explorer (procexp.exe), available for download from the Microsoft website at
http://www.microsoft.com.
2. End any queue manager processes that are still running. Use the kill command, specifying the process
IDs discovered by using the ps command.
End the processes in the following order:
amqzmuc0
amqzxma0
amqzfuma
amqzlaa0
amqzlsa0
amqzmuf0
amqzmur0
amqzmgr0
amqfqpub
amqfcxba
amqrmppa
amqcrsta
amqcrs6b
amqrrmfa
amqzdmaa
amqpcsea
runmqtrm
runmqdlq
runmqchi
runmqlsr
Note: You can use the kill -9 command to end processes that fail to stop.
If you stop the queue manager manually, FFSTs might be taken, and FDC files placed in
/var/mqm/errors. Do not regard this as a defect in the queue manager.
The queue manager will restart normally, even after you have stopped it using this method.
68
Administering WebSphere MQ
69
v Any number of blanks can occur at the beginning or end of the command, and between parameters,
punctuation, and values. For example, the following command is valid:
ALTER QLOCAL
(Account
TRIGDPTH
1)
70
To find out how you can build scripts using MQSC commands, see Building command scripts.
For the full list of MQSC commands, see The MQSC commands.
Related information:
Building command scripts
The LOCAL.QUEUE part of the name is to illustrate that this queue is a local queue. It is not required for the
names of local queues in general.
We also use the name saturn.queue.manager as a queue manager name. The queue.manager part of the
name is to illustrate that this object is a queue manager. It is not required for the names of queue
managers in general.
In this command, a queue manager name has not been specified, so the MQSC commands are processed
by the default queue manager. If you want to use a different queue manager, specify the queue manager
name on the runmqsc command. For example, to run MQSC commands on queue manager
jupiter.queue.manager, use the command:
runmqsc jupiter.queue.manager
Administering WebSphere MQ
71
After this, all the MQSC commands you type in are processed by this queue manager, assuming that it is
on the same node and is already running.
Now you can type in any MQSC commands, as required. For example, try this one:
DEFINE QLOCAL (ORANGE.LOCAL.QUEUE)
For commands that have too many parameters to fit on one line, use continuation characters to indicate
that a command is continued on the following line:
v A minus sign (-) indicates that the command is to be continued from the start of the following line.
v A plus sign (+) indicates that the command is to be continued from the first nonblank character on the
following line.
Command input terminates with the final character of a nonblank line that is not a continuation
character. You can also terminate command input explicitly by entering a semicolon (;). (This is especially
useful if you accidentally enter a continuation character at the end of the final line of command input.)
72
Similarly, you can also redirect the output to a file. A file containing the MQSC commands for input is
called an MQSC command file. The output file containing replies from the queue manager is called the
output file.
To redirect both stdin and stdout on the runmqsc command, use this form of the command:
runmqsc < myprog.in > myprog.out
This command invokes the MQSC commands contained in the MQSC command file myprog.in. Because
we have not specified a queue manager name, the MQSC commands run against the default queue
manager. The output is sent to the text file myprog.out. Figure 11 shows an extract from the MQSC
command file myprog.in and Figure 12 on page 74 shows the corresponding extract of the output in
myprog.out.
To redirect stdin and stdout on the runmqsc command, for a queue manager (saturn.queue.manager)
that is not the default, use this form of the command:
runmqsc saturn.queue.manager < myprog.in > myprog.out
For portability among WebSphere MQ environments, limit the line length in MQSC command files to 72
characters. The plus sign indicates that the command is continued on the next line.
Administering WebSphere MQ
73
v Other messages resulting from general errors when running the script file.
v A brief statistical summary of the report indicating the number of commands read, the number of
commands with syntax errors, and the number of commands that could not be processed.
Note: The queue manager attempts to process only those commands that have no syntax errors.
74
On UNIX and Linux systems these files are located in the directory MQ_INSTALLATION_PATH/samp.
MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed.
The command that runs them is:
runmqsc < amqscos0.tst >test.out
When you invoke runmqsc against an MQSC command file, the queue manager verifies each command
and returns a report without actually running the MQSC commands. This allows you to check the syntax
of the commands in your command file. This is particularly important if you are:
v Running a large number of commands from a command file.
v Using an MQSC command file many times over.
The returned report is similar to that shown in Figure 12 on page 74.
You cannot use this method to verify MQSC commands remotely. For example, if you attempt this
command:
runmqsc -w 30 -v jupiter.queue.manager < myprog.in > myprog.out
the -w flag, which you use to indicate that the queue manager is remote, is ignored, and the command is
run locally in verification mode. 30 is the number of seconds that WebSphere MQ waits for replies from
the remote queue manager.
Administering WebSphere MQ
75
export MYTEMPQM=TESTQM
export MYPORT=1600
export MQCHLLIB=/var/mqm/qmgrs/$MQTEMPQM/@ipcc
crtmqm $MYTEMPQM
strmqm $MYTEMPQM
runmqlsr -m $MYTEMPQM -t TCP -p $MYPORT &
runmqsc $MYTEMPQM << EOF
DEFINE CHANNEL(NTLM) CHLTYPE(SVRCONN) TRPTYPE(TCP)
DEFINE CHANNEL(NTLM) CHLTYPE(CLNTCONN) QMNAME($MYTEMPQM) CONNAME(hostname($MYPORT))
ALTER CHANNEL(NTLM) CHLTYPE(CLNTCONN)
DEFINE QLOCAL(TESTQ)
EOF
amqsputc TESTQ $MYTEMPQM << EOF
hello world
EOF
endmqm -i $MYTEMPQM
Figure 13. Example script for running MQSC commands from a batch file
v If you redirect output to a file, use the > redirection operator. By default, the file is put in the current
working directory at the time runmqsc is invoked. Specify a fully-qualified file name to send your
output to a specific file and directory.
v Check that you have created the queue manager that is going to run the commands, by using the
following command to display all queue managers:
dspmq
v The queue manager must be running. If it is not, start it; (see Starting a queue manager). You get an
error message if you try to start a queue manager that is already running.
v Specify a queue manager name on the runmqsc command if you have not defined a default queue
manager, or you get this error:
AMQ8146: WebSphere MQ queue manager not available.
v You cannot specify an MQSC command as a parameter of the runmqsc command. For example, this is
not valid:
runmqsc DEFINE QLOCAL(FRED)
v You cannot enter MQSC commands before you issue the runmqsc command.
v You cannot run control commands from runmqsc. For example, you cannot issue the strmqm
command to start a queue manager while you are running MQSC commands interactively. If you do
this, you receive error messages similar to the following:
runmqsc
.
.
76
Administering WebSphere MQ
77
DISPLAY QMGR
1 : DISPLAY QMGR
AMQ8408: Display Queue Manager details.
QMNAME(QM1)
ACCTINT(1800)
ACCTQ(OFF)
ACTVCONO (DISABLED)
ALTDATE(2012-05-27)
AUTHOREV(DISABLED)
CHAD(DISABLED)
CHADEXIT( )
CLWLDATA( )
CLWLLEN(100)
CLWLUSEQ(LOCAL)
CMDLEVEL(750)
CONFIGEV(DISABLED)
CRTIME(16.14.01)
DEFXMITQ( )
DISTL(YES)
IPADDRV(IPV4)
LOGGEREV(DISABLED)
MAXHANDS(256)
MAXPROPL(NOLIMIT)
MAXUMSGS(10000)
MONCHL(OFF)
PARENT( )
PLATFORM(WINDOWSNT)
PSNPMSG(DISCARD)
PSSYNCPT(IFPER)
PSMODE(ENABLED)
REPOS( )
ROUTEREC(MSG)
SCMDSERV(QMGR)
SSLCRYP( )
SSLFIPS(NO)
MQ\Data\qmgrs\QM1\ssl\key)
SSLRKEYC(0)
STATCHL(OFF)
STATMQI(OFF)
STRSTPEV(ENABLED)
TREELIFE(1800)
ACCTCONO(DISABLED)
ACCTMQI(OFF)
ACTIVREC(MSG)
ACTVTRC (OFF)
ALTTIME(16.14.01)
CCSID(850)
CHADEV(DISABLED)
CHLEV(DISABLED)
CLWLEXIT( )
CLWLMRUC(999999999)
CMDEV(DISABLED)
COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE)
CRDATE(2011-05-27)
DEADQ()
DESCR( )
INHIBTEV(DISABLED)
LOCALEV(DISABLED)
MARKINT(5000)
MAXMSGL(4194304)
MAXPRTY(9)
MONACLS(QMGR)
MONQ(OFF)
PERFMEV(DISABLED)
PSRTYCNT(5)
PSNPRES(NORMAL)
QMID(QM1_2011-05-27_16.14.01)
REMOTEEV(DISABLED)
REPOSNL( )
SCHINIT(QMGR)
SSLCRLNL( )
SSLEV(DISABLED)
SSLKEYR(C:\Program Files\IBM\WebSphere
STATACLS(QMGR)
STATINT(1800)
STATQ(OFF)
SYNCPT
TRIGINT(999999999)
The ALL parameter is the default on the DISPLAY QMGR command. It displays all the queue manager
attributes. In particular, the output tells you the default queue manager name, the dead-letter queue
name, and the command queue name.
You can confirm that these queues exist by entering the command:
DISPLAY QUEUE (SYSTEM.*)
This displays a list of queues that match the stem SYSTEM.*. The parentheses are required.
The ALTER QMGR command changes the dead-letter queue used, and enables inhibit events.
78
Related information:
Attributes for the queue manager
Note:
1. With the exception of the value for the description, all the attribute values shown are the default
values. We have shown them here for purposes of illustration. You can omit them if you are sure that
the defaults are what you want or have not been changed. See also Displaying default object
attributes on page 80.
2. USAGE (NORMAL) indicates that this queue is not a transmission queue.
3. If you already have a local queue on the same queue manager with the name
ORANGE.LOCAL.QUEUE, this command fails. Use the REPLACE attribute if you want to overwrite
the existing definition of a queue, but see also Changing local queue attributes on page 82.
Administering WebSphere MQ
79
80
The syntax of this command is different from that of the corresponding DEFINE command. On the
DISPLAY command you can give just the queue name, whereas on the DEFINE command you have to
specify the type of the queue, that is, QLOCAL, QALIAS, QMODEL, or QREMOTE.
You can selectively display attributes by specifying them individually. For example:
DISPLAY QUEUE (ORANGE.LOCAL.QUEUE) +
MAXDEPTH +
MAXMSGL +
CURDEPTH;
TYPE(QLOCAL)
MAXDEPTH(5000)
CURDEPTH is the current queue depth, that is, the number of messages on the queue. This is a useful
attribute to display, because by monitoring the queue depth you can ensure that the queue does not
become full.
This command creates a queue with the same attributes as our original queue ORANGE.LOCAL.QUEUE,
rather than those of the system default local queue. Enter the name of the queue to be copied exactly as
it was entered when you created the queue. If the name contains lower case characters, enclose the name
in single quotation marks.
You can also use this form of the DEFINE command to copy a queue definition, but substitute one or
more changes to the attributes of the original. For example:
DEFINE QLOCAL (THIRD.QUEUE) +
LIKE (ORANGE.LOCAL.QUEUE) +
MAXMSGL(1024);
This command copies the attributes of the queue ORANGE.LOCAL.QUEUE to the queue THIRD.QUEUE,
but specifies that the maximum message length on the new queue is to be 1024 bytes, rather than
4194304.
Note:
1. When you use the LIKE attribute on a DEFINE command, you are copying the queue attributes only.
You are not copying the messages on the queue.
2. If you a define a local queue, without specifying LIKE, it is the same as DEFINE
LIKE(SYSTEM.DEFAULT.LOCAL.QUEUE).
Administering WebSphere MQ
81
This command changes a single attribute, that of the maximum message length; all the other attributes
remain the same.
v Using the DEFINE command with the REPLACE option, for example:
DEFINE QLOCAL (ORANGE.LOCAL.QUEUE) MAXMSGL(10000) REPLACE
This command changes not only the maximum message length, but also all the other attributes, which
are given their default values. The queue is now put enabled whereas previously it was put inhibited.
Put enabled is the default, as specified by the queue SYSTEM.DEFAULT.LOCAL.QUEUE.
If you decrease the maximum message length on an existing queue, existing messages are not affected.
Any new messages, however, must meet the new criteria.
Note: There is no prompt that enables you to change your mind; once you press the Enter key the
messages are lost.
You cannot clear a queue if:
v There are uncommitted messages that have been put on the queue under sync point.
v An application currently has the queue open.
Specifying NOPURGE instead of PURGE ensures that the queue is not deleted if it contains any
committed messages.
Browsing queues
WebSphere MQ provides a sample queue browser that you can use to look at the contents of the
messages on a queue. The browser is supplied in both source and executable formats.
MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed.
In WebSphere MQ for Windows, the file names and paths for the sample queue browser are as follows:
Source
MQ_INSTALLATION_PATH\tools\c\samples\
82
Executable
MQ_INSTALLATION_PATH\tools\c\samples\bin\amqsbcg.exe
In WebSphere MQ for UNIX and Linux, the file names and paths are as follows:
Source
MQ_INSTALLATION_PATH/samp/amqsbcg0.c
Executable
MQ_INSTALLATION_PATH/samp/bin/amqsbcg
The sample requires two input parameters, the queue name and the queue manager name. For example:
amqsbcg SYSTEM.ADMIN.QMGREVENT.tpp01 saturn.queue.manager
Typical results from this command are shown in Figure 15 on page 84.
Administering WebSphere MQ
83
ReplyToQMgr
: saturn.queue.manager
** Identity Context
UserIdentifier :
AccountingToken :
X0000000000000000000000000000000000000000000000000000000000000000
ApplIdentityData :
** Origin Context
PutApplType
: 7
PutApplName
: saturn.queue.manager
PutDate : 19970417
PutTime : 15115208
ApplOriginData :
GroupId : X000000000000000000000000000000000000000000000000
MsgSeqNumber
: 1
Offset
: 0
MsgFlags
: 0
OriginalLength : 104
****
Message
****
0700
0100
0100
0000
7565
2020
2020
0000
0000
0000
0000
7565
2020
2020
2400
0100
0400
3000
2E6D
2020
2020
0000
0000
0000
0000
616E
2020
2020
0100
0100
4400
7361
6167
2020
0000
0000
0000
7475
6572
2020
2C00
AE08
DF07
726E
2020
2020
0000
0000
0000
2E71
2020
2020
...........,...
................
........D.......
....0...saturn.q
ueue.manager
No more messages
MQCLOSE
MQDISC
Figure 15. Typical results from queue browser
84
Some utilities, such as tar, cannot cope with files greater than 2 GB. Before enabling large file support,
check your operating system documentation for information on restrictions on utilities you use.
For information about planning the amount of storage you need for queues, visit the WebSphere MQ
website for platform-specific performance reports:
http://www.ibm.com/software/integration/ts/mqseries/
This command redirects MQI calls that specify MY.ALIAS.QUEUE to the queue YELLOW.QUEUE. The
command does not create the target queue; the MQI calls fail if the queue YELLOW.QUEUE does not
exist at run time.
If you change the alias definition, you can redirect the MQI calls to another queue. For example:
ALTER QALIAS (MY.ALIAS.QUEUE) TARGET (MAGENTA.QUEUE)
Administering WebSphere MQ
85
You can also use alias queues to make a single queue (the target queue) appear to have different
attributes for different applications. You do this by defining two aliases, one for each application. Suppose
there are two applications:
v Application ALPHA can put messages on YELLOW.QUEUE, but is not allowed to get messages from
it.
v Application BETA can get messages from YELLOW.QUEUE, but is not allowed to put messages on it.
The following command defines an alias that is put enabled and get disabled for application ALPHA:
DEFINE QALIAS (ALPHAS.ALIAS.QUEUE) +
TARGET (YELLOW.QUEUE) +
PUT (ENABLED) +
GET (DISABLED)
The following command defines an alias that is put disabled and get enabled for application BETA:
DEFINE QALIAS (BETAS.ALIAS.QUEUE) +
TARGET (YELLOW.QUEUE) +
PUT (DISABLED) +
GET (ENABLED)
ALPHA uses the queue name ALPHAS.ALIAS.QUEUE in its MQI calls; BETA uses the queue name
BETAS.ALIAS.QUEUE. They both access the same queue, but in different ways.
You can use the LIKE and REPLACE attributes when you define queue aliases, in the same way that you
use these attributes with local queues.
Use the following command to alter the base queue name, to which the alias resolves, where the force
option forces the change even if the queue is open:
ALTER QALIAS (ALPHAS.ALIAS.QUEUE) TARGQ(ORANGE.LOCAL.QUEUE) FORCE
You cannot delete an alias queue if an application currently has the queue open. See the MQSC reference
for more information about this and other alias queue commands.
86
whether the dynamic queues created are temporary or permanent. (Permanent queues are maintained
across queue manager restarts, temporary ones are not.) For example:
DEFINE QMODEL (GREEN.MODEL.QUEUE) +
DESCR(Queue for messages from application X) +
PUT (DISABLED) +
GET (ENABLED) +
NOTRIGGER +
MSGDLVSQ (FIFO) +
MAXDEPTH (1000) +
MAXMSGL (2000) +
USAGE (NORMAL) +
DEFTYPE (PERMDYN)
This command creates a model queue definition. From the DEFTYPE attribute, you can see that the actual
queues created from this template are permanent dynamic queues. Any attributes not specified are
automatically copied from the SYSYTEM.DEFAULT.MODEL.QUEUE default queue.
You can use the LIKE and REPLACE attributes when you define model queues, in the same way that you
use them with local queues.
Use the following command to alter the model to enable puts on any dynamic queue created from this
model:
ALTER QMODEL (BLUE.MODEL.QUEUE) PUT(ENABLED)
87
Note:
v Except for the value of the topic string, all the attribute values shown are the default values. They are
shown here only as an illustration. You can omit them if you are sure that the defaults are what you
want or have not been changed. See also Displaying administrative topic object attributes.
v If you already have an administrative topic on the same queue manager with the name
ORANGE.TOPIC, this command fails. Use the REPLACE attribute if you want to overwrite the
existing definition of a topic, but see also Changing administrative topic attributes on page 89
You can selectively display attributes by specifying them individually. For example:
DISPLAY TOPIC(ORANGE.TOPIC) +
TOPICSTR +
DEFPRTY +
NPMSGDLV
TYPE(LOCAL)
DEFPRTY(ASPARENT)
To display the topic ASPARENT values as they are used at Runtime use DISPLAY TPSTATUS. For
example, use:
DISPLAY TPSTATUS(ORANGE) DEFPRTY NPMSGDLV
88
DEFPRTY(0)
When you define an administrative topic, it takes any attributes that you do not specify explicitly from
the default administrative topic, which is called SYSTEM.DEFAULT.TOPIC. To see what these default
attributes are, use the following command:
DISPLAY TOPIC (SYSTEM.DEFAULT.TOPIC)
This command changes a single attribute, that of the default priority of message delivered to this topic
to 5; all other attributes remain the same.
v Using the DEFINE command:
DEFINE TOPIC(ORANGE.TOPIC) DEFPRTY(5) REPLACE
This command changes the default priority of messages delivered to this topic. All the other attributes
are given their default values.
If you alter the priority of messages sent to this topic, existing messages are not affected. Any new
message, however, use the specified priority if not provided by the publishing application.
This command creates a topic, MAGENTA.TOPIC, with the same attributes as the original topic,
ORANGE.TOPIC, rather than those of the system default administrative topic. Enter the name of the
topic to be copied exactly as it was entered when you created the topic. If the name contains lowercase
characters, enclose the name in single quotation marks.
You can also use this form of the DEFINE command to copy a topic definition, but make changes to the
attributes of the original. For example:
DEFINE TOPIC(BLUE.TOPIC) +
TOPICSTR(BLUE) +
LIKE(ORANGE.TOPIC)
You can also copy the attributes of the topic BLUE.TOPIC to the topic GREEN.TOPIC and specify that
when publications cannot be delivered to their correct subscriber queue they are not placed onto the
dead-letter queue. For example:
DEFINE TOPIC(GREEN.TOPIC) +
TOPICSTR(GREEN) +
LIKE(BLUE.TOPIC) +
USEDLQ(NO)
Administering WebSphere MQ
89
Applications will no longer be able to open the topic for publication or make new subscriptions using the
object name, ORANGE.TOPIC. Publishing applications that have the topic open are able to continue
publishing the resolved topic string. Any subscriptions already made to this topic continue receiving
publications after the topic has been deleted.
Applications that are not referencing this topic object but are using the resolved topic string that this
topic object represented, 'ORANGE' in this example, continue to work. In this case they inherit the
properties from a topic object higher in the topic tree. For more information about topic trees, see Topic
trees.
See the MQSC reference for detailed information about these commands.
Related concepts:
Defining an administrative subscription
Use the MQSC command DEFINE SUB to create an administrative subscription. You can also use the
default defined in the default local subscription definition. Or, you can modify the subscription
characteristics from those of the default local subscription, SYSTEM.DEFAULT.SUB that was created when
the system was installed.
Displaying attributes of subscriptions on page 91
You can use the DISPLAY SUB command to display configured attributes of any subscription known to the
queue manager.
Changing local subscription attributes on page 92
You can change subscription attributes in two ways, using either the ALTER SUB command or the
DEFINE SUB command with the REPLACE attribute.
Copying a local subscription definition on page 92
You can copy a subscription definition using the LIKE attribute on the DEFINE command.
Deleting a subscription on page 93
You can use the MQSC command DELETE SUB to delete a local subscription.
90
v Receive publications made on the ORANGE topic string, with the message priorities as set by the
publishing applications.
v Publications delivered for this subscription are sent to the local queue SUBQ, this queue must be
defined before the definition of the subscription.
DEFINE SUB (ORANGE) +
TOPICSTR (ORANGE) +
DESTCLAS (PROVIDED) +
DEST (SUBQ) +
EXPIRY (UNLIMITED) +
PUBPRTY (ASPUB)
Note:
v The subscription and topic string name do not have to match.
v Except for the values of the description and topic string, all the attribute values shown are the default
values. They are shown here only as an illustration. You can omit them if you are sure that the
defaults are what you want or have not been changed. See also Displaying attributes of
subscriptions.
v If you already have a local subscription on the same queue manager with the name TEST, this
command fails. Use the REPLACE attribute if you want to overwrite the existing definition of a queue,
but see also Changing local subscription attributes on page 92.
v If the queue SUBQ does not exist, this command fails.
You can selectively display attributes by specifying them individually. For example:
DISPLAY SUB (ORANGE) +
SUBID +
TOPICSTR +
DURABLE
TOPICSTR is the resolved topic string on which this subscriber is operating. When a subscription is
defined to use a topic object the topic string from that object is used as a prefix to the topic string
provided when making the subscription. SUBID is a unique identifier assigned by the queue manager
when a subscription is created. This is a useful attribute to display because some subscription names
might be long or in a different character sets for which it might become impractical.
An alternate method for displaying subscriptions is to use the SUBID:
DISPLAY SUB +
SUBID(414D5120414141202020202020202020EE921E4E20002A03) +
TOPICSTR +
DURABLE
Administering WebSphere MQ
91
Proxy subscriptions on a queue manager are not displayed by default. To display them specify a SUBTYPE
of PROXY or ALL.
You can use the DISPLAY SBSTATUS command to display the Runtime attributes. For example, use the
command:
DISPLAY SBSTATUS(ORANGE) NUMMSGS
When you define an administrative subscription, it takes any attributes that you do not specify explicitly
from the default subscription, which is called SYSTEM.DEFAULT.SUB. To see what these default
attributes are, use the following command:
DISPLAY SUB (SYSTEM.DEFAULT.SUB)
This command changes a single attribute, that of the priority of messages delivered to this subscription
to 5; all other attributes remain the same.
v Using the DEFINE command:
DEFINE SUB (ORANGE) PUBPRTY(5) REPLACE
This command changes not only the priority of messages delivered to this subscription, but all the
other attributes which are given their default values.
If you alter the priority of messages sent to this subscription, existing messages are not affected. Any
new messages, however, are of the specified priority.
You can also copy the attributes of the sub REAL to the sub THIRD.SUB, and specify that the correlID of
delivered publications is THIRD, rather than the publishers correlID. For example:
DEFINE SUB(THIRD.SUB) +
LIKE(BLUE) +
DESTCORL(ORANGE)
92
Deleting a subscription
You can use the MQSC command DELETE SUB to delete a local subscription.
DELETE SUB(ORANGE)
Procedure
1. To check for messages queued for a subscription type DISPLAY SBSTATUS(<sub_name>) NUMMSGS, see
Displaying attributes of subscriptions on page 91.
2. If the NUMMSGS value is greater than zero identify the queue associated with the subscription by typing
DISPLAY SUB(<sub_name>)DEST.
3. Using the name of the queue returned you can view the messages by following the technique
described in Browsing queues on page 82.
Administering WebSphere MQ
93
94
Related concepts:
Managing services
By using the CONTROL parameter, an instance of a service object can be either started and stopped
automatically by the queue manager, or started and stopped using the MQSC commands START
SERVICE and STOP SERVICE.
Managing services
By using the CONTROL parameter, an instance of a service object can be either started and stopped
automatically by the queue manager, or started and stopped using the MQSC commands START
SERVICE and STOP SERVICE.
When an instance of a service object is started, a message is written to the queue manager error log
containing the name of the service object and the process ID of the started process. An example log entry
for a server service object starting follows:
02/15/2005 11:54:24 AM - Process(10363.1) User(mqm) Program(amqzmgr0)
Host(HOST_1) Installation(Installation1)
VRMF(7.1.0.0) QMgr(A.B.C)
AMQ5028: The Server S1 has started. ProcessId(13031).
EXPLANATION:
The Server process has started.
ACTION:
None.
When an instance server service stops, a message is written to the queue manager error logs containing
the name of the service and the process ID of the ending process. An example log entry for a server
service object stopping follows:
02/15/2005 11:54:54 AM - Process(10363.1) User(mqm) Program(amqzmgr0)
Host(HOST_1) Installation(Installation1)
VRMF(7.1.0.0) QMgr(A.B.C)
AMQ5029: The Server S1 has ended. ProcessId(13031).
EXPLANATION:
The Server process has ended.
ACTION:
None.
Related reference:
Additional environment variables
When a service is started, the environment in which the service process is started is inherited from the
environment of the queue manager. It is possible to define additional environment variables to be set in
the environment of the service process by adding the variables you want to define to one of the
service.env environment override files.
95
Note:
There are two possible files to which you can add environment variables:
v The machine scope service.env file, which is located in /var/mqm on UNIX and Linux systems, or in
the data directory selected during installation on Windows systems.
v The queue manager scope service.env file, which is located in the queue manager data directory. For
example, the location of the environment override file for a queue manager named QMNAME is:
On UNIX and Linux systems, /var/mqm/qmgrs/QMNAME/service.env
On Windows systems, C:\Program Files\IBM\WebSphere MQ\qmgrs\QMNAME\service.env
Both files are processed, if available, with definitions in the queue manager scope file taking precedence
over those definitions in the machine scope file.
Any environment variable can be specified in service.env. For example, if the WebSphere MQ service
runs a number of commands, it might be useful to set the PATH user variable in the service.env file.
The values that you set the variable to can't be environment variables; for example CLASSPATH=
%CLASSPATH% is incorrect. Similarly, on Linux PATH=$PATH:/opt/mqm/bin would give unexpected
results.
CLASSPATH must be capitalized, and the class path statement can contain only literals. Some services
(Telemetry for example) set their own class path. The CLASSPATH defined in service.env is added to it.
The format of the variables defined in the file,service.env is a list of name and value variable pairs. Each
variable must be defined on a new line, and each variable is taken as it is explicitly defined, including
white space. An example of the file,service.env follows:
#********************************************************************#
#*
*#
#* <N_OCO_COPYRIGHT>
*#
#* Licensed Materials - Property of IBM
*#
#*
*#
#* 63H9336
*#
#* (C) Copyright IBM Corporation 2005
*#
#*
*#
#* <NOC_COPYRIGHT>
*#
#*
*#
#********************************************************************#
#***********************************************************************#
#* Module Name: service.env
*#
#* Type
: WebSphere MQ service environment file
*#
#* Function : Define additional environment variables to be set
*#
#*
for SERVICE programs.
*#
#* Usage
: <VARIABLE>=<VALUE>
*#
#*
*#
#***********************************************************************#
MYLOC=/opt/myloc/bin
MYTMP=/tmp
TRACEDIR=/tmp/trace
MYINITQ=ACCOUNTS.INITIATION.QUEUE
96
Related reference:
Replaceable inserts on service definitions
In the definition of a service object, it is possible to substitute tokens. Tokens that are substituted are
automatically replaced with their expanded text when the service program is executed. Substitute tokens
can be taken from the following list of common tokens, or from any variables that are defined in the file,
service.env.
Administering WebSphere MQ
97
Where:
+MQ_INSTALL_PATH+ is a token representing the installation directory.
+QMNAME+ is a token representing the name of the queue manager.
ACCOUNTS.INITIATION.QUEUE is the initiation queue.
amqsstop is a sample program provided with WebSphere MQ which requests the queue manager
to break all connections for the process id. amqsstop generates PCF commands, therefore the
command server must be running.
+MQ_SERVER_PID+ is a token representing the process id passed to the stop program.
See Replaceable inserts on service definitions on page 97 for a list of the common tokens.
2. An instance of the server service object will execute when the queue manager is next started.
However, we will start an instance of the server service object immediately with the following MQSC
command:
START SERVICE(S1)
3. The status of the server service process is displayed, using the following MQSC command:
DISPLAY SVSTATUS(S1)
4. This example now shows how to alter the server service object and have the updates picked up by
manually restarting the server service process. The server service object is altered so that the initiation
queue is specified as JUPITER.INITIATION.QUEUE . The following MQSC command is used:
ALTER SERVICE(S1) +
STARTARG(-m +QMNAME+ -q JUPITER.INITIATION.QUEUE)
Note: A running service will not pick up any updates to its service definition until it is restarted.
5. The server service process is restarted so that the alteration is picked up, using the following MQSC
commands:
STOP SERVICE(S1)
Followed by:
START SERVICE(S1)
The server service process is restarted and picks up the alterations made in 4.
Note: The MQSC command, STOP SERVICE, can only be used if a STOPCMD argument is specified in
the service definition.
98
Where:
logger is the UNIX and Linux system supplied command to write to the system log.
+QMNAME+ is a token representing the name of the queue manager.
Using a command service object when a queue manager ends only:
This example shows how to define a command service object to start a program that writes entries to the
operating system's system log when a queue manager is stopped only.
1. The command service object is defined, using the following MQSC command:
DEFINE SERVICE(S3) +
CONTROL(QMGR) +
SERVTYPE(COMMAND) +
STOPCMD(/usr/bin/logger) +
STOPARG(Queue manager +QMNAME+ stopping)
Where:
logger is a sample program provided with WebSphere MQ that can write entries to the operating
system's system log.
+QMNAME+ is a token representing the name of the queue manager.
More on passing arguments:
This example shows how to define a server service object to start a program called runserv when a queue
manager is started.
This example is written with Windows style path separator characters.
One of the arguments that is to be passed to the starting program is a string containing a space. This
argument needs to be passed as a single string. To achieve this, double quotation marks are used as
shown in the following command to define the command service object:
1. The server service object is defined, using the following MQSC command:
DEFINE SERVICE(S1) SERVTYPE(SERVER) CONTROL(QMGR) +
STARTCMD(C:\Program Files\Tools\runserv.exe) +
STARTARG(-m +QMNAME+ -d "C:\Program Files\Tools\") +
STDOUT(C:\Program Files\Tools\+MQ_SERVICE_NAME+.out)
DEFINE SERVICE(S4) +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
STARTCMD(C:\Program Files\Tools\runserv.exe) +
STARTARG(-m +QMNAME+ -d "C:\Program Files\Tools\") +
STDOUT(C:\Program Files\Tools\+MQ_SERVICE_NAME+.out)
Administering WebSphere MQ
99
Where:
+QMNAME+ is a token representing the name of the queue manager.
"C:\Program Files\Tools\" is a string containing a space, which will be passed as a single string.
Autostarting a Service:
This example shows how to define a server service object that can be used to automatically start the
Trigger Monitor when the queue manager starts.
1. The server service object is defined, using the following MQSC command:
DEFINE SERVICE(TRIG_MON_START) +
CONTROL(QMGR) +
SERVTYPE(SERVER) +
STARTCMD(runmqtrm) +
STARTARG(-m +QMNAME+ -q +IQNAME+)
Where:
+QMNAME+ is a token representing the name of the queue manager.
+IQNAME+ is an environment variable defined by the user in one of the service.env files representing
the name of the initiation queue.
where:
QLOCAL (MOTOR.INSURANCE.QUEUE)
Is the name of the application queue being defined.
PROCESS (MOTOR.INSURANCE.QUOTE.PROCESS)
Is the name of the process definition that defines the application to be started by a trigger
monitor program.
MAXMSGL (2000)
Is the maximum length of messages on the queue.
100
DEFPSIST (YES)
Specifies that messages on this queue are persistent by default.
INITQ (MOTOR.INS.INIT.QUEUE)
Is the name of the initiation queue on which the queue manager is to put the trigger message.
TRIGGER
Is the trigger attribute value.
TRIGTYPE (DEPTH)
Specifies that a trigger event is generated when the number of messages of the required priority
(TRIGMPRI) reaches the number specified in TRIGDPTH.
TRIGDPTH (100)
Is the number of messages required to generate a trigger event.
TRIGMPRI (5)
Is the priority of messages that are to be counted by the queue manager in deciding whether to
generate a trigger event. Only messages with priority 5 or higher are counted.
Defining a process
Use the DEFINE PROCESS command to create a process definition. A process definition defines the
application to be used to process messages from the application queue. The application queue definition
names the process to be used and thereby associates the application queue with the application to be
used to process its messages. This is done through the PROCESS attribute on the application queue
MOTOR.INSURANCE.QUEUE. The following MQSC command defines the required process,
MOTOR.INSURANCE.QUOTE.PROCESS, identified in this example:
DEFINE PROCESS (MOTOR.INSURANCE.QUOTE.PROCESS) +
DESCR (Insurance request message processing) +
APPLTYPE (UNIX) +
APPLICID (/u/admin/test/IRMP01) +
USERDATA (open, close, 235)
Where:
MOTOR.INSURANCE.QUOTE.PROCESS
Is the name of the process definition.
DESCR (Insurance request message processing)
Describes the application program to which this definition relates. This text is displayed when
you use the DISPLAY PROCESS command. This can help you to identify what the process does.
If you use spaces in the string, you must enclose the string in single quotation marks.
APPLTYPE (UNIX)
Is the type of application to be started.
APPLICID (/u/admin/test/IRMP01)
Is the name of the application executable file, specified as a fully qualified file name. In Windows
systems, a typical APPLICID value would be c:\appl\test\irmp01.exe.
Administering WebSphere MQ
101
You can also use the MQSC command ALTER PROCESS to alter an existing process definition, and the
DELETE PROCESS command to delete a process definition.
102
Administering WebSphere MQ
103
To set up a cluster, you need one cluster sender (CLUSSDR) and one cluster receiver (CLUSRCVR)
definition for each queue manager. You do not need any transmission queue definitions or remote queue
definitions. The principles of remote administration are the same when used within a cluster, but the
definitions themselves are greatly simplified.
For more information about clusters, their attributes, and how to set them up, see Queue manager
clusters.
104
source.queue.manager
target.queue.manager
runmqsc
MQSC commands
replies
Local system
Process commands
for example:
DEFINE QLOCAL
Remote system
Administering WebSphere MQ
105
source.queue.manager
target.queue.manager
runmqsc
commands
source.to.target
XMITQ=target.queue.manager
SYSTEM.ADMIN.COMMAND.QUEUE
r epl ies
target.to.source
SYSTEM.MQSC.REPLY.QUEUE
Local system
XMITQ=source.queue.manager
Remote system
See Connecting applications using distributed queuing for more information about setting up channels.
Defining channels, listeners, and transmission queues:
On the source queue manager (source.queue.manager), issue the following MQSC commands to define
the channels, listener, and the transmission queue:
1. Define the sender channel at the source queue manager:
DEFINE CHANNEL (source.to.target) +
CHLTYPE(SDR) +
CONNAME (RHX5498) +
XMITQ (target.queue.manager) +
TRPTYPE(TCP)
Issue the following commands on the target queue manager (target.queue.manager), to create the
channels, listener, and the transmission queue:
1. Define the sender channel on the target queue manager:
DEFINE CHANNEL (target.to.source) +
CHLTYPE(SDR) +
CONNAME (RHX7721) +
XMITQ (source.queue.manager) +
TRPTYPE(TCP)
106
Note: The TCP/IP connection names specified for the CONNAME attribute in the sender channel
definitions are for illustration only. This is the network name of the machine at the other end of the
connection. Use the values appropriate for your network.
Starting the listeners and channels:
How to use MQSC commands to start listeners and channels.
Start both listeners by using the following MQSC commands:
1. Start the listener on the source queue manager, source.queue.manager, by issuing the following MQSC
command:
START LISTENER (source.queue.manager)
2. Start the listener on the target queue manager, target.queue.manager, by issuing the following MQSC
command:
START LISTENER (target.queue.manager)
2. Start the sender channel on the target queue manager, target.queue.manager, by issuing the following
MQSC command:
START CHANNEL (target.to.source)
Administering WebSphere MQ
107
Note: For remote administration, ensure that the target queue manager is running. Otherwise, the
messages containing commands cannot leave the queue manager from which they are issued. Instead,
these messages are queued in the local transmission queue that serves the remote queue manager. Avoid
this situation.
There are separate control commands for starting and stopping the command server. Providing the
command server is running, users of WebSphere MQ for Windows or WebSphere MQ for Linux (x86 and
x86-64 platforms) can perform the operations described in the following sections using the WebSphere
MQ Explorer. For more information, see Administration using the WebSphere MQ Explorer on page 52.
where saturn.queue.manager is the queue manager for which the command server is being started.
108
This form of the runmqsc command, with the -w flag, runs the MQSC commands in indirect mode,
where commands are put (in a modified form) on the command server input queue and executed in
order.
When you type in an MQSC command, it is redirected to the remote queue manager, in this case,
target.queue.manager. The timeout is set to 30 seconds; if a reply is not received within 30 seconds, the
following message is generated on the local (source) queue manager:
AMQ8416: MQSC timed out waiting for a response from the command server.
When you stop issuing MQSC commands, the local queue manager displays any timed-out responses
that have arrived and discards any further responses.
The source queue manager defaults to the default local queue manager. If you specify the -m
LocalQmgrName option in the runmqsc command, you can direct the commands to be issued by way of
any local queue manager.
In indirect mode, you can also run an MQSC command file on a remote queue manager. For example:
runmqsc -w 60 target.queue.manager < mycomds.in > report.out
where mycomds.in is a file containing MQSC commands and report.out is the report file.
Administering WebSphere MQ
109
Description
ObjectName
CYAN.REMOTE.QUEUE
ObjectType
(Queue)
After this, the application issues an MQPUT call to put a message onto this queue.
On the local queue manager, you can create a local definition of a remote queue using the following
MQSC commands:
DEFINE QREMOTE (CYAN.REMOTE.QUEUE) +
DESCR (Queue for auto insurance requests from the branches) +
RNAME (AUTOMOBILE.INSURANCE.QUOTE.QUEUE) +
RQMNAME (jupiter.queue.manager) +
XMITQ (INQUOTE.XMIT.QUEUE)
where:
QREMOTE (CYAN.REMOTE.QUEUE)
Specifies the local name of the remote queue object. This is the name that applications connected
to this queue manager must specify in the MQOPEN call to open the queue
AUTOMOBILE.INSURANCE.QUOTE.QUEUE on the remote queue manager
jupiter.queue.manager.
110
v To change the remote queue to enable puts. This does not affect the target queue, only applications that
specify this remote queue:
ALTER QREMOTE (CYAN.REMOTE.QUEUE) PUT(ENABLED)
v To delete this remote queue. This does not affect the target queue, only its local definition:
DELETE QREMOTE (CYAN.REMOTE.QUEUE)
Note: When you delete a remote queue, you delete only the local representation of the remote queue.
You do not delete the remote queue itself or any messages on it.
111
1. The transmission queue named on the XMITQ attribute of the local definition of a remote queue.
2. A transmission queue with the same name as the target queue manager. (This value is the default
value on XMITQ of the local definition of a remote queue.)
3. The transmission queue named on the DEFXMITQ attribute of the local queue manager.
For example, the following MQSC command creates a default transmission queue on
source.queue.manager for messages going to target.queue.manager:
DEFINE QLOCAL (target.queue.manager) +
DESCR (Default transmission queue for target qm) +
USAGE (XMITQ)
Applications can put messages directly on a transmission queue, or indirectly through a remote queue
definition. See also Creating a local definition of a remote queue on page 110.
112
Data conversion
Message data in WebSphere MQ defined formats (also known as built-in formats) can be converted by the
queue manager from one coded character set to another, provided that both character sets relate to a
single language or a group of similar languages.
For example, conversion between coded character sets with identifiers (CCSIDs) 850 and 500 is
supported, because both apply to Western European languages.
For EBCDIC newline (NL) character conversions to ASCII, see All queue managers .
Supported conversions are defined in Data conversion.
File ccsid.tbl
The file ccsid.tbl is used for the following purposes:
v In WebSphere MQ for Windows it records all the supported code sets.
v On AIX and HP-UX platforms, the supported code sets are held internally by the operating system.
v For all other UNIX and Linux platforms, the supported code sets are held in conversion tables
provided by WebSphere MQ.
v It specifies any additional code sets. To specify additional code sets, you need to edit ccsid.tbl
(guidance on how to do this is provided in the file).
v It specifies any default data conversion.
You can update the information recorded in ccsid.tbl; you might want to do this if, for example, a future
release of your operating system supports additional coded character sets.
In WebSphere MQ for Windows, ccsid.tbl is located in directory C:\Program Files\IBM\WebSphere
MQ\conv\table by default.
In WebSphere MQ for UNIX and Linux systems, ccsid.tbl is located in directory /var/mqm/conv/table.
113
v If one CCSID represents an ASCII coded character set, and the other represents an EBCDIC coded
character set, WebSphere MQ converts the data using the default data-conversion CCSIDs defined in
ccsid.tbl.
Note: Try to restrict the characters being converted to those that have the same code values in the coded
character set specified for the message and in the default coded character set. If you use only the set of
characters that is valid for WebSphere MQ object names (as defined in Naming WebSphere MQ objects)
you will, in general, satisfy this requirement. Exceptions occur with EBCDIC CCSIDs 290, 930, 1279, and
5026 used in Japan, where the lowercase characters have different codes from those used in other
EBCDIC CCSIDs.
114
Related concepts:
Configure distributed queuing to send messages to MQTT clients on page 119
WebSphere MQ applications can send MQTT v3 clients messages by publishing to subscription created by
a client, or by sending a message directly. Whichever method is used, the message is placed on
SYSTEM.MQTT.TRANSMIT.QUEUE, and sent to the client by the telemetry (MQXR) service. There are a number
of ways to place a message on SYSTEM.MQTT.TRANSMIT.QUEUE.
MQTT client identification, authorization, and authentication on page 121
To authorize an MQTT client to access WebSphere MQ objects, authorize the ClientIdentifier, or
Username of the client, or authorize a common client identity. To permit a client to connect to WebSphere
MQ, authenticate the Username, or use a client certificate. Configure JAAS to authenticate the Username,
and configure SSL to authenticate a client certificate.
Telemetry channel authentication using SSL on page 128
The client always attempts to authenticate the server, unless the client is configured to use a CipherSpec
that supports anonymous connection. If the authentication fails, then the connection is not established.
Publication privacy on telemetry channels on page 130
MQTT clients that connect to telemetry channels use SSL to secure the privacy of publications transmitted
on the channel using symmetric key cryptography. Because the endpoints are not authenticated, you
cannot trust channel encryption alone. Combine securing privacy with server or mutual authentication.
SSL configuration of MQTT clients and telemetry channels on page 131
Configure SSL to authenticate the telemetry channel, the MQTT client, and encrypt the transfer of
messages between clients and the telemetry channel.
Telemetry channel JAAS configuration on page 136
Configure JAAS to authenticate the Username sent by the client.
WebSphere MQ Telemetry daemon for devices concepts on page 138
The WebSphere MQ Telemetry daemon for devices is an advanced MQTT V3 client application. Use it to
store and forward messages from other MQTT clients. It connects to WebSphere MQ like an MQTT client,
but you can also connect other MQTT clients to it.
Related tasks:
Configuring a queue manager for telemetry on Linux and AIX
Follow these manual steps to configure a queue manager to run WebSphere MQ Telemetry. You can run
an automated procedure to set up a simpler configuration using the WebSphere MQ Telemetry support
for WebSphere MQ Explorer.
Configuring a queue manager for telemetry on Windows on page 117
Follow these manual steps to configure a queue manager to run WebSphere MQ Telemetry. You can run
an automated procedure to set up a simpler configuration using the WebSphere MQ Telemetry support
for WebSphere MQ Explorer.
Related information:
WebSphere MQ Telemetry
MQXR properties
115
not normally need to edit the MQXR properties file directly, because almost all settings can be
configured through MQSC admin commands or MQ Explorer. If you do decide to edit the file directly,
stop the queue manager before you make your changes. See MQXR properties.
Procedure
1. Open a command window at the telemetry samples directory.
The telemetry samples directory is /opt/mqm/mqxr/samples.
2. Create the telemetry transmission queue.
echo "DEFINE QLOCAL(SYSTEM.MQTT.TRANSMIT.QUEUE) USAGE(XMITQ) MAXDEPTH(100000)" | runmqsc qMgr
When the telemetry (MQXR) service is first started, it does not alter the queue manager to make
SYSTEM.MQTT.TRANSMIT.QUEUE the default transmission queue.
To make SYSTEM.MQTT.TRANSMIT.QUEUE the default transmission queue alter the default transmission
queue property. Alter the property using the WebSphere MQ Explorer or with the command in
Figure 19 on page 118.
Altering the default transmission queue might interfere with your existing configuration. The reason
for altering the default transmission queue to SYSTEM.MQTT.TRANSMIT.QUEUE is to make sending
messages directly to MQTT clients easier. Without altering the default transmission queue you must
add a remote queue definition for every client that receives WebSphere MQ messages; see Sending a
message to a client directly on page 120.
4. Follow a procedure in Authorizing MQTT clients to access WebSphere MQ objects on page 123 to
create one or more user IDs. The user IDs have the authority to publish, subscribe, and send
publications to MQTT clients.
5. Install the telemetry (MQXR) service
cat installMQXRService_unix.mqsc | runmqsc qMgr
The telemetry (MQXR) service is started automatically when the queue manager is started.
It is started manually in this task, because the queue manager is already running.
7. Using WebSphere MQ Explorer, configure telemetry channels to accept connections from MQTT
clients.
8. Verify the configuration by running the sample client.
For the sample client to work with your telemetry channel, the channel must authorize the client to
publish, subscribe, and receive publications. The sample client connects to the telemetry channel on
port 1883 by default.
116
Example
Figure 18 shows the runmqsc command to create the SYSTEM.MQXR.SERVICE manually on Linux.
DEF SERVICE(SYSTEM.MQXR.SERVICE) +
CONTROL(QMGR) +
DESCR(Manages clients using MQXR protocols such as MQTT) +
SERVTYPE(SERVER) +
STARTCMD(+MQ_INSTALL_PATH+/mqxr/bin/runMQXRService.sh) +
STARTARG(-m +QMNAME+ -d "+MQ_Q_MGR_DATA_PATH+" -g "+MQ_DATA_PATH+") +
STOPCMD(+MQ_INSTALL_PATH+/mqxr/bin/endMQXRService.sh) +
STOPARG(-m +QMNAME+) +
STDOUT(+MQ_Q_MGR_DATA_PATH+/mqxr.stdout) +
STDERR(+MQ_Q_MGR_DATA_PATH+/mqxr.stderr)
Figure 18. installMQXRService_unix.mqsc
Procedure
1. Open a command window at the telemetry samples directory.
The telemetry samples directory is WMQ program installation directory\mqxr\samples.
2. Create the telemetry transmission queue.
echo DEFINE QLOCAL(SYSTEM.MQTT.TRANSMIT.QUEUE) USAGE(XMITQ) MAXDEPTH(100000) | runmqsc qMgr
Administering WebSphere MQ
117
When the telemetry (MQXR) service is first started, it does not alter the queue manager to make
SYSTEM.MQTT.TRANSMIT.QUEUE the default transmission queue.
To make SYSTEM.MQTT.TRANSMIT.QUEUE the default transmission queue alter the default transmission
queue property. Alter the property using the WebSphere MQ Explorer or with the command in
Figure 19.
Altering the default transmission queue might interfere with your existing configuration. The reason
for altering the default transmission queue to SYSTEM.MQTT.TRANSMIT.QUEUE is to make sending
messages directly to MQTT clients easier. Without altering the default transmission queue you must
add a remote queue definition for every client that receives WebSphere MQ messages; see Sending a
message to a client directly on page 120.
4. Follow a procedure in Authorizing MQTT clients to access WebSphere MQ objects on page 123 to
create one or more user IDs. The user IDs have the authority to publish, subscribe, and send
publications to MQTT clients.
5. Install the telemetry (MQXR) service
type installMQXRService_win.mqsc | runmqsc qMgr
The telemetry (MQXR) service is started automatically when the queue manager is started.
It is started manually in this task, because the queue manager is already running.
7. Using WebSphere MQ Explorer, configure telemetry channels to accept connections from MQTT
clients.
The telemetry channels must be configured such that their identities are one of the user IDs defined in
step 4.
8. Verify the configuration by running the sample client.
For the sample client to work with your telemetry channel, the channel must authorize the client to
publish, subscribe, and receive publications. The sample client connects to the telemetry channel on
port 1883 by default.
118
Queue name
ClientIdentifier undefined
Output
Queue manager
name
Queue name
ClientIdentifier undefined
Transmission
queue
Default
transmission
queue.
SYSTEM.MQTT.
TRANSMIT.QUEUE
Administering WebSphere MQ
119
Queue name
Output
Queue manager
name
Queue name
ClientIdentifier undefined
Transmission
queue
SYSTEM.MQTT.
TRANSMIT.QUEUE
MQOD.ObjectQmgrName = ClientIdentifier;
MQOD.ObjectName = name;
Figure 22. MQI Object descriptor to send a message to an MQTT v3 client destination
If the application is written using JMS, create a point-to-point destination; for example:
120
javax.jms.Destination jmsDestination =
(javax.jms.Destination)jmsFactory.createQueue
("queue://ClientIdentifier/name");
To send an unsolicited message to an MQTT client use a remote queue definition. The remote queue
manager name must resolvedto the ClientIdentifier of the client. The transmission queue must resolve
to SYSTEM.MQTT.TRANSMIT.QUEUE; see Table 3. The remote queue name can be anything. The client receives
it as a topic string.
Table 3. Name resolution of an MQTT client remote queue definition
Input
Output
Queue name
Queue manager
name
Queue name
Name of remote
queue definition
Queue manager
name
ClientIdentifier
Transmission queue
SYSTEM.MQTT.
TRANSMIT.QUEUE
If the client is connected, the message is sent directly to the MQTT client, which calls the messageArrived
method; see messageArrived method.
If the client has disconnected with a persistent session, the message is stored in
SYSTEM.MQTT.TRANSMIT.QUEUE; see MQTT stateless and stateful sessions . It is forwarded to the client when
the client reconnects to the session again.
If you send a non-persistent message it is sent to the client with "at most once" quality of service, QoS=0.
If you send a persistent message directly to a client, by default, it is sent with "exactly once" quality of
service, QoS=2. As the client might not have a persistence mechanism, the client can lower the quality of
service it accepts for messages sent directly. To lower the quality of service for messages sent directly to a
client, make a subscription to the topic DEFAULT.QoS. Specify the maximum quality of service the client
can support.
Administering WebSphere MQ
121
122
The result of the models is to assign mqttUsers sets of permissions to publish and subscribe to WebSphere
MQ, and receive publications from WebSphere MQ.
Administering WebSphere MQ
123
No access control:
MQTT clients are given WebSphere MQ administrative authority, and can perform any action on any
object.
Procedure
1. Create a user ID mqttUser to act as the identity of all MQTT clients.
2. Add mqttUser to the mqm group; see Adding a user to a group on Windows, or Adding a user to a
group on Linux
Coarse-grained access control:
MQTT clients have authority to publish and subscribe, and to send messages to MQTT clients. They do
not have authority to perform other actions, or to access other objects.
Procedure
1. Create a user ID mqttUser to act as the identity of all MQTT clients.
2. Authorize mqttUser to publish and subscribe to all topics and to send publications to MQTT clients.
setmqaut -m qMgr -t topic -n SYSTEM.BASE.TOPIC -p mqttUser -all +pub +sub
setmqaut -m qMgr -t q -n SYSTEM.MQTT.TRANSMIT.QUEUE -p mqttUser -all +put
124
Procedure
1. Create multiple groups, PublishX and SubscribeY that are allocated to multiple administrative topics
in the publish/subscribe topic tree.
2. Create a group mqtt.
3. Create multiple user IDs, mqttUsers, and add the users to any of the groups, depending on what they
are authorized to do.
4. Authorize different PublishX and SubscribeX groups to different topics, and authorize the mqtt group
to send messages to MQTT clients.
setmqaut -m qMgr -t topic -n topic1 -p PublishX -all +pub
setmqaut -m qMgr -t topic -n topic1 -p SubscribeX -all +pub +sub
setmqaut -m qMgr -t q -n SYSTEM.MQTT.TRANSMIT.QUEUE -p mqtt -all +put
3. The MQTT client application developer creates an MqttConnectOptions object and sets Username and
Password before connecting to the server.
4. The security developer creates a JAAS LoginModule to authenticate the Username with the Password
and includes it in the JAAS configuration file.
5. The WebSphere MQ administrator configures the MQTT channel to authenticate the UserName of the
client using JAAS.
125
Client authentication using SSL relies upon the client having a secret. The secret is the private key of the
client in the case of a self-signed certificate, or a key provided by a certificate authority. The key is used
to sign the digital certificate of the client. Anyone in possession of the corresponding public key can
verify the digital certificate. Certificates can be trusted, or if they are chained, traced back through a
certificate chain to a trusted root certificate. Client verification sends all the certificates in the certificate
chain provided by the client to the server. The server checks the certificate chain until it finds a certificate
it trusts. The trusted certificate is either the public certificate generated from a self-signed certificate, or a
root certificate typically issued by a certificate authority. As a final, optional, step the trusted certificate
can be compared with a "live" certificate revocation list.
The trusted certificate might be issued by a certificate authority and already included in the JRE
certificate store. It might be a self-signed certificate, or any certificate that has been added to the
telemetry channel keystore as a trusted certificate.
Note: The telemetry channel has a combined keystore/truststore that holds both the private keys to one
or more telemetry channels, and any public certificates needed to authenticate clients. Because an SSL
channel must have a keystore, and it is the same file as the channel truststore, the JRE certificate store is
never referenced. The implication is that if authentication of a client requires a CA root certificate, you
must place the root certificate in the keystore for the channel, even if the CA root certificate is already in
the JRE certificate store. The JRE certificate store is never referenced.
Think about the threats that client authentication is intended to counter, and the roles the client and
server play in countering the threats. Authenticating the client certificate alone is insufficient to prevent
unauthorized access to a system. If someone else has got hold of the client device, the client device is not
necessarily acting with the authority of the certificate holder. Never rely on a single defense against
unwanted attacks. At least use a two-factor authentication approach and supplement possession of a
certificate with knowledge of private information. For example, use JAAS, and authenticate the client
using a password issued by the server.
The primary threat to the client certificate is that it gets into the wrong hands. The certificate is held in a
password protected keystore at the client. How does it get placed in the keystore? How does the MQTT
client get the password to the keystore? How secure is the password protection? Telemetry devices are
often easy to remove, and then can be hacked in private. Must the device hardware be tamper-proof?
Distributing and protecting client-side certificates is recognized to be hard; it is called the
key-management problem.
A secondary threat is that the device is misused to access servers in unintended ways. For example, if the
MQTT application is tampered with, it might be possible to use a weakness in the server configuration
using the authenticated client identity.
To authenticate an MQTT client using SSL, configure the telemetry channel, and the client.
Telemetry channel configuration for MQTT client authentication using SSL:
The WebSphere MQ administrator configures telemetry channels at the server. Each channel is configured
to accept a TCP/IP connection on a different port number. The channels are configured either as
com.ibm.mq.MQTT.channel/PlainText or com.ibm.mq.MQTT.channel/SSL. SSL channels are configured with
passphrase protected access to key files. If an SSL channel is defined with no passphrase or key file, the
channel does not accept SSL connections.
Set the property, com.ibm.mq.MQTT.ClientAuth of an SSL telemetry channel to REQUIRED to force all clients
connecting on that channel to provide proof that they have verified digital certificates. The client
certificates are authenticated using certificates from certificate authorities, leading to a trusted root
certificate. If the client certificate is self-signed, or is signed by a certificate that is from a certificate
authority, the publicly signed certificates of the client, or certificate authority, must be stored securely at
the server.
126
Place the publicly signed client certificate or the certificate from the certificate authority in the telemetry
channel keystore. At the server, publicly signed certificates are stored in the same key file as privately
signed certificates, rather than in a separate truststore.
The server verifies the signature of any client certificates it is sent using all the public certificates and
cipher suites it has. The server verifies the key chain. The queue manager can be configured to test the
certificate against the certificate revocation list. The queue manager revocation namelist property is
SSLCRLNL.
If any of the certificates a client sends is verified by a certificate in the server keystore, then the client is
authenticated.
The WebSphere MQ administrator can configure the same telemetry channel to use JAAS to check the
UserName or ClientIdentifier of the client with the client Password.
You can use the same keystore for multiple telemetry channels.
Verification of at least one digital certificate in the password protected client keystore on the device
authenticates the client to the server. The digital certificate is only used for authentication by WebSphere
MQ. It is not used to verify the TCP/IP address of the client, set the identity of the client for
authorization or accounting. The identity of the client adopted by the server is either the Username or
ClientIdentifier of the client, or an identity created by the WebSphere MQ administrator.
You can also use SSL cipher suites for client authentication. Here is an alphabetic list of the SSL cipher
suites that are currently supported:
v SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA
v SSL_DH_anon_EXPORT_WITH_RC4_40_MD5
v SSL_DH_anon_WITH_3DES_EDE_CBC_SHA
v SSL_DH_anon_WITH_AES_128_CBC_SHA
v SSL_DH_anon_WITH_DES_CBC_SHA
v SSL_DH_anon_WITH_RC4_128_MD5
v SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA
v
v
v
v
v
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_AES_128_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_RC4_128_SHA
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
v SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
v SSL_DHE_RSA_WITH_AES_128_CBC_SHA
v
v
v
v
v
v
v
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_KRB5_EXPORT_WITH_DES_CBC_40_MD5
SSL_KRB5_EXPORT_WITH_DES_CBC_40_SHA
SSL_KRB5_EXPORT_WITH_RC4_40_MD5
SSL_KRB5_EXPORT_WITH_RC4_40_SHA
SSL_KRB5_WITH_3DES_EDE_CBC_MD5
SSL_KRB5_WITH_3DES_EDE_CBC_SHA
v
v
v
v
SSL_KRB5_WITH_DES_CBC_MD5
SSL_KRB5_WITH_DES_CBC_SHA
SSL_KRB5_WITH_RC4_128_MD5
SSL_KRB5_WITH_RC4_128_SHA
Administering WebSphere MQ
127
v
v
v
v
v
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_RSA_EXPORT_WITH_RC4_40_MD5
SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA
SSL_RSA_FIPS_WITH_AES_128_CBC_SHA256
SSL_RSA_FIPS_WITH_AES_256_CBC_SHA256
v
v
v
v
v
v
v
SSL_RSA_FIPS_WITH_DES_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_AES_128_CBC_SHA
SSL_RSA_WITH_AES_128_CBC_SHA256
SSL_RSA_WITH_AES_256_CBC_SHA256
SSL_RSA_WITH_DES_CBC_SHA
SSL_RSA_WITH_NULL_MD5
v
v
v
v
SSL_RSA_WITH_NULL_SHA
SSL_RSA_WITH_NULL_SHA256
SSL_RSA_WITH_RC4_128_MD5
SSL_RSA_WITH_RC4_128_SHA
If you plan to use SHA-2 cipher suites, see System requirements for using SHA-2 cipher suites with
MQTT channels.
Related concepts:
Telemetry channel configuration for channel authentication using SSL on page 129
The WebSphere MQ administrator configures telemetry channels at the server. Each channel is configured
to accept a TCP/IP connection on a different port number. The channels are configured either as
com.ibm.mq.MQTT.channel/PlainText or com.ibm.mq.MQTT.channel/SSL. SSL channels are configured with
passphrase protected access to key files. If an SSL channel is defined with no passphrase or key file, the
channel does not accept SSL connections.
Related information:
DEFINE CHANNEL (MQTT)
ALTER CHANNEL (MQTT)
CipherSpecs and CipherSuites
Cryptographic security protocols must agree the algorithms used by a secure connection. CipherSpecs
and CipherSuites define specific combinations of algorithms.
128
The JRE certificate store is a JKS file, cacerts. It is located in JRE InstallPath\lib\security\. It is
installed with the default password changeit. You can either store certificates you trust in the JRE
certificate store, or in the client truststore. You cannot use both stores. Use the client truststore if you
want to keep the public certificates the client trusts separate from certificates other Java applications use.
Use the JRE certificate store if you want to use a common certificate store for all Java applications
running on the client. If you decide to use the JRE certificate store review the certificates it contains, to
make sure you trust them.
You can modify the JSSE configuration by supplying a different trust provider. You can customize a trust
provider to perform different checks on a certificate. In some OGSi environments that have used the
MQTT client, the environment provides a different trust provider.
To authenticate the telemetry channel using SSL, configure the server, and the client.
SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA
SSL_DHE_DSS_WITH_AES_128_CBC_SHA
SSL_DHE_DSS_WITH_DES_CBC_SHA
SSL_DHE_DSS_WITH_RC4_128_SHA
SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA
v SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA
v SSL_DHE_RSA_WITH_AES_128_CBC_SHA
v
v
v
v
v
SSL_DHE_RSA_WITH_DES_CBC_SHA
SSL_KRB5_EXPORT_WITH_DES_CBC_40_MD5
SSL_KRB5_EXPORT_WITH_DES_CBC_40_SHA
SSL_KRB5_EXPORT_WITH_RC4_40_MD5
SSL_KRB5_EXPORT_WITH_RC4_40_SHA
v SSL_KRB5_WITH_3DES_EDE_CBC_MD5
v SSL_KRB5_WITH_3DES_EDE_CBC_SHA
v SSL_KRB5_WITH_DES_CBC_MD5
Administering WebSphere MQ
129
v
v
v
v
v
SSL_KRB5_WITH_DES_CBC_SHA
SSL_KRB5_WITH_RC4_128_MD5
SSL_KRB5_WITH_RC4_128_SHA
SSL_RSA_EXPORT_WITH_DES40_CBC_SHA
SSL_RSA_EXPORT_WITH_RC4_40_MD5
v
v
v
v
v
v
v
SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA
SSL_RSA_FIPS_WITH_AES_128_CBC_SHA256
SSL_RSA_FIPS_WITH_AES_256_CBC_SHA256
SSL_RSA_FIPS_WITH_DES_CBC_SHA
SSL_RSA_WITH_3DES_EDE_CBC_SHA
SSL_RSA_WITH_AES_128_CBC_SHA
SSL_RSA_WITH_AES_128_CBC_SHA256
v
v
v
v
v
v
SSL_RSA_WITH_AES_256_CBC_SHA256
SSL_RSA_WITH_DES_CBC_SHA
SSL_RSA_WITH_NULL_MD5
SSL_RSA_WITH_NULL_SHA
SSL_RSA_WITH_NULL_SHA256
SSL_RSA_WITH_RC4_128_MD5
v SSL_RSA_WITH_RC4_128_SHA
If you plan to use SHA-2 cipher suites, see System requirements for using SHA-2 cipher suites with
MQTT channels on page 793.
Related concepts:
Telemetry channel configuration for MQTT client authentication using SSL on page 126
The WebSphere MQ administrator configures telemetry channels at the server. Each channel is configured
to accept a TCP/IP connection on a different port number. The channels are configured either as
com.ibm.mq.MQTT.channel/PlainText or com.ibm.mq.MQTT.channel/SSL. SSL channels are configured with
passphrase protected access to key files. If an SSL channel is defined with no passphrase or key file, the
channel does not accept SSL connections.
CipherSpecs and CipherSuites on page 175
Cryptographic security protocols must agree the algorithms used by a secure connection. CipherSpecs
and CipherSuites define specific combinations of algorithms.
Related reference:
../com.ibm.mq.ref.adm.doc/q085610_.dita
Syntax diagram for a telemetry channel when using the DEFINE CHANNEL command.
../com.ibm.mq.ref.adm.doc/q085260_.dita
Syntax diagram for a telemetry channel when using the ALTER CHANNEL command. This is separate
from the regular ALTER CHANNEL syntax diagram and parameter descriptions.
130
such a VPN connection is established, you have established a trusted network. You can connect MQTT
clients to telemetry channels using TCP/IP over the VPN network.
For a typical configuration, which encrypts the channel and authenticates the server, consult Telemetry
channel authentication using SSL on page 128.
Encrypting SSL connections without authenticating the server exposes the connection to
man-in-the-middle attacks. Although the information you exchange is protected against eavesdropping,
you do not know who you are exchanging it with. Unless you control the network, you are exposed to
someone intercepting your IP transmissions, and masquerading as the endpoint.
You can create an encrypted SSL connection, without authenticating the server, by using a Diffie-Hellman
key exchange CipherSpec that supports anonymous SSL. The master secret, shared between the client and
server, and used to encrypt SSL transmissions, is established without exchanging a privately signed
server certificate.
Because anonymous connections are insecure, most SSL implementations do not default to using
anonymous CipherSpecs. If a client request for SSL connection is accepted by a telemetry channel, the
channel must have a keystore protected by a passphrase. By default, since SSL implementations do not
use anonymous CipherSpecs, the keystore must contain a privately signed certificate that the client can
authenticate.
If you use anonymous CipherSpecs, the server keystore must exist, but it need not contain any privately
signed certificates.
Another way to establish an encrypted connection is to replace the trust provider at the client with your
own implementation. Your trust provider would not authenticate the server certificate, but the connection
would be encrypted.
Administering WebSphere MQ
131
KeyFileName
KeyFileName is a required parameter for SSL channels. It must be omitted for TCP
channels.
KeyFileName is the path to the Java keystore containing digital certificates that you
provide. Use JKS, JCEKS or PKCS12 as the type of keystore on the server.
Identify the keystore type by using one of the following file extensions:
.jks
.jceks
.p12
.pkcs12
A keystore with any other file extension is assumed to be a JKS keystore.
You can combine one type of keystore at the server with other types of keystore at the
client.
Place the private certificate of the server in the keystore. The certificate is known as the
server certificate. The certificate can be self-signed, or part of a certificate chain that is
signed by a signing authority.
If you are using a certificate chain, place the associated certificates in the server keystore.
The server certificate, and any certificates in its certificate chain, are sent to clients to
authenticate the identity of the server.
132
If you have set ClientAuth to Required, the keystore must contain any certificates
necessary to authenticate the client. The client sends a self-signed certificate, or a
certificate chain, and the client is authenticated by the first verification of this material
against a certificate in the keystore. Using a certificate chain, one certificate can verify
many clients, even if they are issued with different client certificates.
PassPhrase
PassPhrase is a required parameter for SSL channels. It must be omitted for TCP
channels.
The passphrase is used to protect the keystore.
ClientAuth
ClientAuth is an optional SSL parameter. It defaults to no client authentication. It must be
omitted for TCP channels.
Set ClientAuth if you want the telemetry (MQXR) service to authenticate the client, before
permitting the client to connect to the telemetry channel.
If you set ClientAuth, the client must connect to the server using SSL, and authenticate
the server. In response to setting ClientAuth, the client sends its digital certificate to the
server, and any other certificates in its keystore. Its digital certificate is known as the
client certificate. These certificates are authenticated against certificates held in the
channel keystore, and in the JRE cacerts store.
CipherSuite
CipherSuite is an optional SSL parameter. It defaults to try all the enabled CipherSpecs. It
must be omitted for TCP channels.
If you want to use a particular CipherSpec, set CipherSuite to the name of the
CipherSpec that must be used to establish the SSL connection.
The telemetry service and MQTT client negotiate a common CipherSpec from all the
CipherSpecs that are enabled at each end. If a specific CipherSpec is specified at either or
both ends of the connection, it must match the CipherSpec at the other end.
Install additional ciphers by adding additional providers to JSSE.
Federal Information Processing Standards (FIPS)
FIPS is an optional setting. By default it is not set.
Either in the properties panel of the queue manager, or using runmqsc, set SSLFIPS.
SSLFIPS specifies whether only FIPS-certified algorithms are to be used.
Revocation namelist
Revocation namelist is an optional setting. By default it is not set.
Either in the properties panel of the queue manager, or using runmqsc, set SSLCRLNL.
SSLCRLNL specifies a namelist of authentication information objects which are used to
provide certificate revocation locations.
No other queue manager parameters that set SSL properties are used.
MQTT Java client
Set SSL properties for the Java client in MqttConnectionOptions.SSLProperties; for example:
java.util.Properties sslClientProperties = new Properties();
sslClientProperties.setProperty("com.ibm.ssl.keyStoreType", "JKS");
com.ibm.micro.client.mqttv3.MqttConnectOptions conOptions = new MqttConnectOptions();
conOptions.setSSLProperties(sslClientProperties);
Administering WebSphere MQ
133
The names and values of specific properties are described in the MqttConnectOptions class. For
links to client API documentation for the MQTT client libraries, see MQTT client programming
reference.
Protocol
Protocol is optional.
The protocol is selected in negotiation with the telemetry server. If you require a specific
protocol you can select one. If the telemetry server does not support the protocol the
connection fails.
ContextProvider
ContextProvider is optional.
KeyStore
KeyStore is optional. Configure it if ClientAuth is set at the server to force authentication
of the client.
Place the digital certificate of the client, signed using its private key, into the keystore.
Specify the keystore path and password. The type and provider are optional. JKS is the
default type, and IBMJCE is the default provider.
Specify a different keystore provider to reference a class that adds a new keystore
provider. Pass the name of the algorithm used by the keystore provider to instantiate the
KeyManagerFactory by setting the key manager name.
TrustStore
TrustStore is optional. You can place all the certificates you trust in the JRE cacerts
store.
Configure the truststore if you want to have a different truststore for the client. You
might not configure the truststore if the server is using a certificate issued by a well
known CA that already has its root certificate stored in cacerts.
Add the publicly signed certificate of the server or the root certificate to the truststore,
and specify the truststore path and password. JKS is the default type, and IBMJCE is the
default provider.
Specify a different truststore provider to reference a class that adds a new truststore
provider. Pass the name of the algorithm used by the truststore provider to instantiate the
TrustManagerFactory by setting the trust manager name.
JRE
Other aspects of Java security that affect the behavior of SSL on both the client and server are
configured in the JRE. The configuration files on Windows are in Java Installation
Directory\jre\lib\security. If you are using the JRE shipped with WebSphere MQ the path is
as shown in the following table:
Table 4. Filepaths by platform for JRE SSL configuration files
Platform
Filepath
Windows
134
The cacerts file contains the root certificates of well-known certificate authorities. The
cacerts is used by default, unless you specify a truststore. If you use the cacerts store,
or do not provide a truststore, you must review and edit the list of signers in cacerts to
meet your security requirements.
You can open cacerts using the WebSphere MQ command strmqikm.which runs the IBM
Key Management utility. Open cacerts as a JKS file, using the password changeit.
Modify the password to secure the file.
Configuring security classes
Use the java.security file to register additional security providers and other default
security properties.
Permissions
Use the java.policy file to modify the permissions granted to resources. javaws.policy
grants permissions to javaws.jar
Encryption strength
Some JREs ship with reduced strength encryption. If you cannot import keys into
keystores, reduced strength encryption might be the cause. Either, try starting ikeyman
using the strmqikm command, or download strong, but limited jurisdiction files from IBM
developer kits, Security information.
Important: Your country of origin might have restrictions on the import, possession, use,
or re-export to another country, of encryption software. Before downloading or using the
unrestricted policy files, you must check the laws of your country. Check its regulations,
and its policies concerning the import, possession, use, and re-export of encryption
software, to determine if it is permitted.
Modify the trust provider to permit the client to connect to any server
The example illustrates how to add a trust provider and reference it from the MQTT client code. The
example performs no authentication of the client or server. The resulting SSL connection is encrypted
without being authenticated.
The code snippet in Figure 24 sets the AcceptAllProviders trust provider and trust manager for the MQTT
client.
java.security.Security.addProvider(new AcceptAllProvider());
java.util.Properties sslClientProperties = new Properties();
sslClientProperties.setProperty("com.ibm.ssl.trustManager","TrustAllCertificates");
sslClientProperties.setProperty("com.ibm.ssl.trustStoreProvider","AcceptAllProvider");
conOptions.setSSLProperties(sslClientProperties);
Figure 24. MQTT Client code snippet
package com.ibm.mq.id;
public class AcceptAllProvider extends java.security.Provider {
private static final long serialVersionUID = 1L;
public AcceptAllProvider() {
super("AcceptAllProvider", 1.0, "Trust all X509 certificates");
put("TrustManagerFactory.TrustAllCertificates",
AcceptAllTrustManagerFactory.class.getName());
}
Figure 25. AcceptAllProvider.java
Administering WebSphere MQ
135
136
UnixLoginModule
Authenticates using the UNIX security information for the current user.
The problem with using NTLoginModule or UnixLoginModule is that the telemetry (MQXR) service runs
with the mqm identity, and not the identity of the MQTT channel. mqm is the identity passed to
NTLoginModule or UnixLoginModule for authentication, and not the identity of the client.
To overcome this problem, write your own Login module, or use the other standard Login modules. A
sample JAASLoginModule.java is supplied with WebSphere MQ Telemetry. It is an implementation of the
javax.security.auth.spi.LoginModule interface. Use it to develop your own authentication method.
Any new LoginModule classes you provide must be on the class path of the telemetry (MQXR) service.
Do not place your classes in WebSphere MQ directories that are in the class path. Create your own
directories, and define the whole class path for the telemetry (MQXR) service.
You can augment the class path used by the telemetry (MQXR) service by setting class path in the
service.env file. CLASSPATH must be capitalized, and the class path statement can only contain literals.
You cannot use variables in the CLASSPATH; for example CLASSPATH=%CLASSPATH% is incorrect. The
telemetry (MQXR) service sets its own classpath. The CLASSPATH defined in service.env is added to it.
The telemetry (MQXR) service provides two callbacks that return the Username and the Password for a
client connected to the MQTT channel. The Username and Password are set in the MqttConnectOptions
object. See Figure 29 on page 138 for an example of how to access Username and Password.
Examples
An example of a JAAS configuration file with one named configuration, MQXRConfig.
MQXRConfig {
samples.JAASLoginModule required debug=true;
//com.ibm.security.auth.module.NTLoginModule required;
//com.ibm.security.auth.module.Krb5LoginModule required
//
principal=principal@your_realm
//
useDefaultCcache=TRUE
//
renewTGT=true;
//com.sun.security.auth.module.NTLoginModule required;
//com.sun.security.auth.module.UnixLoginModule required;
//com.sun.security.auth.module.Krb5LoginModule required
//
useTicketCache="true"
//
ticketCache="${user.home}${/}tickets";
};
An example of a JAAS Login module coded to receive the Username and Password provided by an MQTT
client.
Administering WebSphere MQ
137
(java.io.IOException exception) {
new javax.security.auth.login.LoginException(exception.toString());
(javax.security.auth.callback.UnsupportedCallbackException exception) {
new javax.security.auth.login.LoginException(exception.toString());
return loggedIn;
}
138
to each of its attached remote brokers, or from any of the attached brokers to the local daemon; see
WebSphere MQ Telemetry daemon for devices bridges.
A bridge connects the daemon to another broker as an MQTT v3 client. The bridge parameters mirror the
attributes of an MQTT v3 client.
Administering WebSphere MQ
139
A bridge is more than a connection. It acts as a publish and subscribe agent situated between two
publish/subscribe brokers. The local broker is the WebSphere MQ Telemetry daemon for devices, and the
remote broker is any publish/subscribe broker that supports the MQTT v3 protocol. Typically the remote
broker is another daemon or WebSphere MQ.
The job of the bridge is to propagate publications between the two brokers. The bridge is bidirectional. It
propagates publications in either direction. Figure 30 on page 139 illustrates the way the bridge connects
WebSphere MQ Telemetry daemon for devices to WebSphere MQ. Example topic settings for the bridge
uses examples to illustrate how to use the topic parameter to configure the bridge.
The In and Out arrows in Figure 30 on page 139 indicate the bidirectionality of the bridge. At one end of
the arrow, a subscription is created. The publications that match the subscription are published to the
broker at the opposite end of the arrow. The arrow is labeled according to the flow of publications.
Publications flow In to the daemon and Out from the daemon. The importance of the labels is they are
used in the command syntax. Remember that In and Out refer to where the publications flow, and not to
where the subscription is sent.
Other clients, applications, or brokers might be connected either to WebSphere MQ or to WebSphere MQ
Telemetry daemon for devices. They publish and subscribe to topics at the broker they are connected to.
If the broker is WebSphere MQ, the topics might be clustered or distributed, and not explicitly defined at
the local queue manager.
Uses of bridges
Connect daemons together using bridge connections and listeners. Connect daemons and queue
managers together using bridge connections and telemetry channels. When you connect multiple brokers
together it is possible to create loops. Be careful: Publications might circulate endlessly around a loop of
brokers, undetected.
Some of the reasons for using daemons bridged to WebSphere MQ are as follows:
Reduce the number of MQTT client connections to WebSphere MQ
Using a hierarchy of daemons you can connect many clients to WebSphere MQ; more clients than
the number a single queue manager can connect at one time.
Store and forward messages between MQTT clients and WebSphere MQ
You might use store and forward to avoid maintaining continuous connections between clients
and WebSphere MQ, if the clients do not have their own storage. You might use multiple types of
connections between the MQTT client and WebSphere MQ; see Telemetry concepts and scenarios
for monitoring and control.
Filter the publications exchanged between MQTT clients and WebSphere MQ
Commonly, publications divide into messages that are processed locally and messages that
involve other applications. Local publications might include control flows between sensors and
actuators, and remote publications include requests for readings, status, and configuration
commands.
Change the topic spaces of publications
Avoid topics strings from clients attached to different listener ports from colliding with one
another. The example uses the daemon to label meter readings coming from different buildings;
see Separating the topic spaces of different groups of clients.
140
The bridge uses the topic parameter in Figure 31 to subscribe to everything published to the local
daemon by MQTT clients, or by other brokers. The bridge publishes the topics to the remote
broker connected by the bridge.
connection Daemon1
topic #
connection Daemon1
topic # out
connection Daemon1
topic # in
Publish everything from the export topic at the local broker to the import topic at the remote broker
Use two additional topic parameters, local_prefix and remote_prefix, to modify the topic filter,
# in the previous examples. One parameter is used to modify the topic filter used in the
subscription, and the other parameter is used to modify the topic the publication is published to.
The effect is to replace the beginning of the topic string used in one broker with another topic
string on the other broker.
Depending on the direction of the topic command the meaning of local_prefix and
remote_prefix reverses. If the direction is out, the default, local_prefix is used as part of the
topic subscription, and remote_prefix replaces the local_prefix part of the topic string in the
remote publication. If the direction is in, remote_prefix becomes part of the remote subscription,
and local_prefix replaces the remote_prefix part of the topic string.
The first part of a topic string is often thought of as defining a topic space. Use the additional
parameters to change the topic space a topic is published to. You might do this to avoid the topic
being propagated colliding with another the topic on the target broker, or to remove a mount
point topic string.
As an example, in the following code fragment, all the publications to the topic string export/# at
the daemon are republished to import/# at the remote broker.
Administering WebSphere MQ
141
Figure 34. Publish everything from the export topic at the local broker to the import topic at the remote broker
Publish everything to the import topic at the local broker from the export topic at the remote broker
The following code fragment shows the configuration reversed; the bridge subscribes to
everything published with the export/# topic string at the remote broker and publishes it to
import/# at the local broker.
connection Daemon1
topic # in import/ export/
Figure 35. Publish everything to the import topic at the local broker from the export topic at the remote broker
Publish everything from the 1884/ mount point to the remote broker with the original topic strings
In the following code fragment, the bridge subscribes to everything published by clients
connected to the mount point 1884/ at the local daemon. The bridge publishes everything
published to the mount point to the remote broker. The mount point string 1884/ is removed
from the topics published to the remote broker. The local_prefix is the same as the mount point
string 1884/, and the remote_prefix is a blank string.
listener 1884
mount_point 1884/
connection Daemon1
topic # out 1884/ ""
Figure 36. Publish everything from the 1884/ mount point to the remote broker with the original topic strings.
142
connection Daemon1
topic power out "" meters/building01/
Figure 37. Separate the topic spaces of clients connected to different daemons
listener 1884
mount_point meters/building01/
listener 1885
mount_point meters/building02/
connection Daemon1
topic meters/+/power out
Figure 38. Separate the topic spaces of clients connected to the same daemon
connection Daemon1
topic "" in a b
topic "" out x y
Figure 39. Remap different topics for publications flowing in both directions
An important point about this example is that different topics are subscribed to and published to
at both brokers. The topics spaces at both brokers are disjoint.
Remap the same topics for publications flowing in both directions (looping)
Unlike the previous example, the configuration in Figure 40 on page 144, in general, results in a
loop. In the topic statement topic "" in a b, the bridge subscribes to b remotely, and publishes
to a locally. In the other topic statement, the bridge subscribes to a locally, and publishes to b
remotely. The same configuration can be written as shown in Figure 41 on page 144.
The general result is that if a client publishes to b remotely, the publication is transferred to the
local daemon as a publication on topic a. However, on being published by the bridge to the local
daemon on the topic a, the publication matches the subscription made by the bridge to local topic
a. The subscription is topic "" out a b. As a result, the publication is transferred back to the
remote broker as a publication on topic b. The bridge is now subscribed to the remote topic b,
and the cycle begins again.
Some brokers implement loop detection to prevent the loop happening. But the loop detection
mechanism must work when different types of brokers are bridged together. Loop detection does
not work if WebSphere MQ is bridged to the WebSphere MQ Telemetry daemon for devices. It
Administering WebSphere MQ
143
does work if two WebSphere MQ Telemetry daemon for devices are bridged together. By default
loop detection is turned on; see try_private.
connection Daemon1
topic "" in a b
topic "" out a b
Figure 40. !Remap the same topics for publications flowing in both directions
connection Daemon1
topic "" both a b
Figure 41. !Remap the same topics for publications flowing in both directions, using both.
144
If the active queue manager instance fails, the queue manager switches over to the standby instance. The
daemon detects that the connection to the active instance has broken and tries to reconnect to the standby
instance. It uses the other IP address in the list of addresses configured for the bridge connection.
The queue manager to which the bridge connects is still the same queue manager. The queue manager
recovers its own state. If cleansession is set to false, the bridge connection session is restored to the same
state as before the failover. The connection resumes after a delay. Messages with at least once or at
most once quality of service are not lost, and subscriptions continue to work.
The reconnection time depends on the number of channels and clients that restart when the standby
instance starts, and how many messages were inflight. The bridge connection might try to reconnect to
both IP addresses a number of times before the connection is reestablished.
Do not configure a multi-instance queue manager telemetry channel with a specific IP address. The IP
address is only valid on one server.
If you are using an alternative high-availability solution, that manages the IP address, then it might be
correct to configure a telemetry channel with a specific IP address.
cleansession
A bridge connection is an MQTT v3 client session. You can control whether a connection starts a new
session, or whether it restores an existing session. If it restores an existing session, the bridge connection
preserves the subscriptions and retained publications from the previous session.
Do not set cleansession to false if addresses lists multiple IP addresses, and the IP addresses connect to
telemetry channels hosted by different queue managers, or to different telemetry daemons. Session state
is not transferred between queue managers or daemons. Trying to restart an existing session on a
different queue manager or daemon results in a new session being started. In-doubt messages are lost,
and subscriptions might not behave as expected.
notifications
An application can keep track of whether the bridge connection is running by using notifications. A
notification is a publication that has the value 1, connected, or 0, disconnected. It is published to
topicString defined by the notification_topic parameter. The default value of topicString is
$SYS/broker/connection/clientIdentifier/state. The default topicString contains the prefix $SYS. Subscribe to
topics beginning with $SYS by defining a topic filter beginning with $SYS. The topic filter #, subscribe to
everything, does not subscribe to topics beginning with $SYS on the daemon. Think of $SYS as defining a
special system topic space distinct from the application topic space.
Notifications enable WebSphere MQ Telemetry daemon for devices to notify MQTT clients when a bridge
is connected or disconnected.
keepalive_interval
The keepalive_interval bridge connection parameter sets the interval between the bridge sending a
TCP/IP ping to the remote server. The default interval is 60 seconds. The ping prevents the TCP/IP
session being closed by the remote server, or by a firewall, that detects a period of inactivity on the
connection.
clientid
A bridge connection is an MQTT v3 client session and has a clientIdentifier that is set by the bridge
connection parameter clientid. If you intend reconnections to resume a previous session by setting the
cleansession parameter to false, the clientIdentifier used in each session must be the same. The default
Administering WebSphere MQ
145
Example
An example of a configuration file that changes the default port from 1883 to 1880, and limits connections
to port 1880 to 10000. Connections to port 1884 are limited to 1000. Clients attached to port 1884 are
isolated from clients attached to other ports.
port 1880
max_connections 10000
listener 1884
mount_point 1884/
max_connections 1000
146
Example
A configuration file contains the following listener ports:
listener 1883
mount_point 1883/
listener 1884 127.0.0.1
mount_point 1884/
listener 1885
A client, attached to port 1883, creates a subscription to MyTopic. The daemon registers the subscription as
1883/MyTopic. Another client attached to port 1883 publishes a message on the topic, MyTopic. The
daemon changes the topic string to 1883/MyTopic and searches for matching subscriptions. The subscriber
on port 1883 receives the publication with the original topic string MyTopic. The daemon has removed the
mount point prefix from the topic string.
Another client, attached to port 1884, also publishes on the topic MyTopic. This time the daemon registers
the topic as 1884/MyTopic. The subscriber on port 1883 does not receive the publication, because the
different mount point results in a subscription with a different topic string.
A client, attached to port 1885, publishes on the topic, 1883/MyTopic. The daemon does not change the
topic string. The subscriber on port 1883 receives the publication to MyTopic.
Administering WebSphere MQ
147
Set the daemon configuration option, Retained_persistence to true, to save retained publications
periodically to a file. When the daemon restarts, the retained publications that were last autosaved are
reinstated. By default, retained messages created by clients are not reinstated when the daemon restarts.
Set the daemon configuration option, Retained_persistence to true, to save subscriptions created in a
persistent session periodically to a file. If Retained_persistence is set to true, subscriptions that clients
create in a session with CleanSession set to false, a persistent session, are restored. The daemon
restores the subscriptions when it restarts, which start receiving publications. The client receives the
publications when it restarts with CleanSession to false. By default, client session state is not saved
when a daemon stops, and so subscriptions are not restored, even if the client sets CleanSession to false.
Retained_persistence is an autosave mechanism. It might not save the most recent retained publications
or subscriptions. You can change how often retained publications and subscriptions are saved. Set the
interval between saves, or the number of changes between saves, using the configuration options
autosave_on_changes and autosave_interval.
Authentication of clients
MQTT clients can set a username and password using the methods MqttConnectOptions.setUserName
and MqttConnectOptions.setPassword.
Authenticate a client that connects to the daemon by checking the username and password provided by a
client against entries in the password file. To enable authentication, create a password file and set the
password_file parameter in the daemon configuration file; see password_file.
Set the allow_anonymous parameter in the daemon configuration file to allow clients connecting without
usernames or passwords to connect to a daemon that is checking authentication; see allow_anonymous. If
a client does provide a username or password it is always checked against the password file, if the
password_file parameter is set.
Set the clientid_prefixes parameter in the daemon configuration file to limit connections to specific
clients. The clients must have clientIdentifiers that start with one of the prefixes listed in the
clientid_prefixes parameter; see clientid_prefixes.
148
configuration file; see username and password. A bridge can then authenticate itself to a broker.
Example
The security parameters are shown in the following example.
acl_file c:\WMQTDaemon\config\acl.txt
password_file c:\WMQTDaemon\config\passwords.txt
allow_anonymous true
connection Daemon1
username daemon1
password deamonpassword
Fred:Fredpassword
Barney:Barneypassword
topic home/public/#
topic read meters/#
user Fred
topic write meters/fred
topic home/fred/#
user Barney
topic write meters/barney
topic home/barney/#
Administering multicast
Use this information to learn about the WebSphere MQ Multicast administration tasks such as reducing
the size of multicast messages and enabling data conversion.
Administering WebSphere MQ
149
where MC1 is the name of your COMMINFO object, group address is your group multicast IP
address or DNS name, and the port number is the port to transmit on (The default value is 1414).
A new COMMINFO object called MC1 is created; This name is the name that you must specify
when defining a TOPIC object in the next example.
Creating a TOPIC object for multicast
A topic is the subject of the information that is published in a publish/subscribe message, and a
topic is defined by creating a TOPIC object. TOPIC objects have two parameters which define
whether they can be used with multicast or not. These parameters are: COMMINFO and MCAST.
v COMMINFO This parameter specifies the name of the multicast communication information object.
For more information about the COMMINFO object parameters, see DEFINE COMMINFO.
v MCAST This parameter specifies whether multicast is allowable at this position in the topic tree.
Use the following command-line example to define a TOPIC object for multicast:
DEFINE TOPIC(ALLSPORTS) TOPICSTR(Sports) COMMINFO(MC1) MCAST(ENABLED)
A new TOPIC object called ALLSPORTS is created. It has a topic string Sports, its related
communication information object is called MC1 (which is the name you specified when defining
a COMMINFO object in the previous example), and multicast is enabled.
Testing the multicast publish/subscribe
After the TOPIC and COMMINFO objects have been created, they can be tested using the
amqspubc sample and the amqssubc sample. For more information about these samples see The
Publish/Subscribe sample programs.
1. Open two command-line windows; The first command line is for the amqspubc publish
sample, and the second command line is for the amqssubc subscribe sample.
2. Enter the following command at command line 1:
amqspubc Sports QM1
where Sports is the topic string of the TOPIC object defined in an earlier example, and QM1 is
the name of the queue manager.
3. Enter the following command at command line 2:
amqssubc Sports QM1
150
4. Enter Hello world at command line 1. If the port and IP address that are specified in the
COMMINFO object are configured correctly; the amqssubc sample, which is listening on the
port for publications from the specified address, outputs Hello world at command line 2.
Each multicast communication information (COMMINFO) object represents a different stream of data
because their group addresses are different. In this example, the FRUIT topic is defined to use
COMMINFO object MC1, the FISH topic is defined to use COMMINFO object MC2, and the Price node has
no multicast definitions.
WebSphere MQ Multicast has a 255 character limit for topic strings. This limitation means that care must
be taken with the names of nodes and leaf-nodes within the tree; if the names of nodes and leaf-nodes
are too long, the topic string might exceed 255 characters and return the 2425 (0979) (RC2425):
MQRC_TOPIC_STRING_ERROR reason code. It is recommended to make topic strings as short as
Administering WebSphere MQ
151
possible because longer topic strings might have a detrimental effect on performance.
152
TopicString
Always Included
Not applicable
MQMQ StrucId
Not transmitted
Not applicable
MQMD Version
Not transmitted
Not applicable
Report
MsgType
MQMT_DATAGRAM
Expiry
Feedback
Encoding
MQENC_NORMAL(equiv)
CodedCharSetId
1208
Format
MQRFH2
Priority
Persistence
MQPER_NOT_PERSISTENT
MsgId
Null
CorrelId
Null
BackoutCount
ReplyToQ
Blank
ReplyToQMgr
Blank
UserIdentifier
Blank
AccountingToken
Null
PutAppIType
MQAT_JAVA
PutAppIName
Blank
PutDate
Blank
PutTime
Blank
ApplOriginData
Blank
GroupID
Excluded
Not applicable
MsgSeqNumber
Excluded
Not applicable
Offset
Excluded
Not applicable
MsgFlags
Excluded
Not applicable
OriginalLength
Excluded
Not applicable
UserProperties
Included
Not applicable
Administering WebSphere MQ
153
Related information:
ALTER COMMINFO
DEFINE COMMINFO
154
Administering WebSphere MQ
155
NONE
A value of NONE causes the transmitter to transmit only publication made from the time of the
subscription. NONE is the default value.
ALL
A value of ALL causes the transmitter to retransmit as much history of the topic as is known.
In some circumstances, this situation can give a similar behavior to retained publications.
Note: Using the value of ALL might have a detrimental effect on performance if there is a
large topic history because all the topic history is retransmitted.
Related information:
DEFINE COMMINFO
ALTER COMMINFO
156
=
=
=
=
=
=
=
IP | UDP
IPV4 | IPV6 | ANY | BOTH
DISABLED | STATIC | DYNAMIC
100000
1
NO
1
Interface
FeedbackMode
HeartbeatTimeout
HeartbeatInterval
=
=
=
=
<IPaddress>
ACK | NACK | WAIT1
20000
2000
Protocol
UDP
In this mode, packets are sent using the UDP protocol. Network elements cannot provide
assistance in the multicast distribution as they do in IP mode however. The packet format
remains compatible with PGM. This is the default value.
IP
In this mode, the transmitter sends raw IP packets. Network elements with PGM support
assist in the reliable multicast packet distribution. This mode is fully compatible with the
PGM standard.
IPVersion
IPV4
Communicate using the IPv4 protocol only. This is the default value.
IPV6
ANY
Controls whether messages are batched or sent immediately There are 2 possible values:
v NO The messages are not batched, they are sent immediately.
v YES The messages are batched.
Loop
Set the value to 1 to enable multicast loop. Multicast loop defines whether the data sent is looped
back to the host or not.
Interface
The IP address of the interface on which multicast traffic flows. For more information and
troubleshooting, see: Testing multicast applications on a non-multicast network and Setting the
appropriate network for multicast traffic
FeedbackMode
NACK
Feedback by negative acknowledgments. This is the default value.
ACK
Administering WebSphere MQ
157
WAIT1
Feedback by positive acknowledgments where the transmitter waits for only 1 ACK from
any of the receivers.
HeartbeatTimeout
The heartbeat timeout in milliseconds. A value of 0 indicates that the heartbeat timeout events are
not raised by the receiver or receivers of the topic. The default value is 20000.
HeartbeatInterval
The heartbeat interval in milliseconds. A value of 0 indicates that no heartbeats are sent. The
heartbeat interval must be considerably smaller than the HeartbeatTimeout value to avoid false
heartbeat timeout events. The default value is 2000.
WebSphere MQ LLM
property type
MQMD.Report
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1001
MQMD.MsgType
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1002
MQMD.Expiry
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1003
MQMD.Feedback
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1004
MQMD.Encoding
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1005
MQMD.CodedCharSetId
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1006
MQMD.Format
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1007
MQMD.Priority
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1008
MQMD.Persistence
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1009
MQMD.MsgId
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_ByteArray
-1010
MQMD.BackoutCount
RMM_MSG_PROP_INT32
LLM_PROP_KIND_Int32
-1012
MQMD.ReplyToQ
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1013
MQMD.ReplyToQMger
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1014
MQMD.PutDate
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1020
MQMD.PutTime
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1021
MQMD.ApplOriginData
RMM_MSG_PROP_BYTES
LLM_PROP_KIND_String
-1022
MQPubOptions
RMM_MSG_PROP_INT32
LLM_PROP_KIND_int32
-1053
For more information about LLM, see the LLM product documentation: WebSphere MQ Low Latency
Messaging.
158
Procedure
To manually start the TMF/Gateway from Pathway, enter the following PATHCOM command:
START SERVER <server_class_name>
If a client application makes an enlistment request before the TMF/Gateway completes recovery of
in-doubt transactions, the request is held for up to 1 second. If recovery does not complete within that
time, the enlistment is rejected. The client then receives an MQRC_UOW_ENLISTMENT_ERROR error
from use of a transactional MQI.
Procedure
1. To prevent any new enlistment requests being made to the TMF/Gateway, enter the following
command:
FREEZE SERVER <server_class_name>
2. To trigger the TMF/Gateway to complete any in-flight operations and to end, enter the following
command:
STOP SERVER <server_class_name>
3. To allow the TMF/Gateway to restart either automatically on first enlistment or manually, following
steps 1 and 2, enter the following command:
THAW SERVER <server_class_name>
Applications are prevented from making new enlistment requests and it is not possible to issue the
START command until you issue the THAW command.
Administering WebSphere MQ
159
160
Security
Security is an important consideration for both developers of WebSphere MQ applications, and for system
administrators configuring WebSphere MQ authorities.
Security overview
This collection of topics introduces the WebSphere MQ security concepts.
Security concepts and mechanisms, as they apply to any computer system, are presented first, followed
by a discussion of those security mechanisms as they are implemented in WebSphere MQ.
161
Non-repudiation
The non-repudiation service can be viewed as an extension to the identification and authentication service.
In general, non-repudiation applies when data is transmitted electronically; for example, an order to a
stock broker to buy or sell stock, or an order to a bank to transfer funds from one account to another.
The overall goal of the non-repudiation service is to be able to prove that a particular message is
associated with a particular individual.
The non-repudiation service can contain more than one component, where each component provides a
different function. If the sender of a message ever denies sending it, the non-repudiation service with
proof of origin can provide the receiver with undeniable evidence that the message was sent by that
particular individual. If the receiver of a message ever denies receiving it, the non-repudiation service
with proof of delivery can provide the sender with undeniable evidence that the message was received by
that particular individual.
In practice, proof with virtually 100% certainty, or undeniable evidence, is a difficult goal. In the real
world, nothing is fully secure. Managing security is more concerned with managing risk to a level that is
acceptable to the business. In such an environment, a more realistic expectation of the non-repudiation
service is to be able to provide evidence that is admissible, and supports your case, in a court of law.
Non-repudiation is a relevant security service in a WebSphere MQ environment because WebSphere MQ
is a means of transmitting data electronically. For example, you might require contemporaneous evidence
that a particular message was sent or received by an application associated with a particular individual.
WebSphere MQ with WebSphere MQ Advanced Message Security does not provide a non-repudiation
service as part of its base function. However, this product documentation does contain suggestions on
how you might provide your own non-repudiation service within a WebSphere MQ environment by
writing your own exit programs.
Related concepts:
Identification and authentication in WebSphere MQ on page 178
In WebSphere MQ, you can implement identification and authentication using message context
information and mutual authentication.
Authorization
Authorization protects critical resources in a system by limiting access only to authorized users and their
applications. It prevents the unauthorized use of a resource or the use of a resource in an unauthorized
manner.
Related concepts:
Authorization in WebSphere MQ on page 178
You can use authorization to limit what particular individuals or applications can do in your WebSphere
MQ environment.
Auditing
Auditing is the process of recording and checking events to detect whether any unexpected or
unauthorized activity has taken place, or whether any attempt has been made to perform such activity.
162
Related concepts:
Auditing in WebSphere MQ on page 178
WebSphere MQ can issue event messages to record that unusual activity has taken place.
Confidentiality
The confidentiality service protects sensitive information from unauthorized disclosure.
When sensitive data is stored locally, access control mechanisms might be sufficient to protect it on the
assumption that the data cannot be read if it cannot be accessed. If a greater level of security is required,
the data can be encrypted.
Encrypt sensitive data when it is transmitted over a communications network, especially over an insecure
network such as the Internet. In a networking environment, access control mechanisms are not effective
against attempts to intercept the data, such as wiretapping.
Data integrity
The data integrity service detects whether there has been unauthorized modification of data.
There are two ways in which data might be altered: accidentally, through hardware and transmission
errors, or because of a deliberate attack. Many hardware products and transmission protocols have
mechanisms to detect and correct hardware and transmission errors. The purpose of the data integrity
service is to detect a deliberate attack.
The data integrity service aims only to detect whether data has been modified. It does not aim to restore
data to its original state if it has been modified.
Access control mechanisms can contribute to data integrity insofar as data cannot be modified if access is
denied. But, as with confidentiality, access control mechanisms are not effective in a networking
environment.
Cryptographic concepts
This collection of topics describes the concepts of cryptography applicable to WebSphere MQ.
The term entity is used to refer to a queue manager, a WebSphere MQ MQI client, an individual user, or
any other system capable of exchanging messages.
Related concepts:
Cryptography in WebSphere MQ on page 179
WebSphere MQ provides cryptography by using the Secure sockets Layer (SSL) and Transport Security
Layer (TLS) protocols.
Cryptography:
Cryptography is the process of converting between readable text, called plaintext, and an unreadable
form, called ciphertext.
This occurs as follows:
1. The sender converts the plaintext message to ciphertext. This part of the process is called encryption
(sometimes encipherment).
2. The ciphertext is transmitted to the receiver.
3. The receiver converts the ciphertext message back to its plaintext form. This part of the process is
called decryption (sometimes decipherment).
See the Glossary for a definition of cryptography.
Security
163
The conversion involves a sequence of mathematical operations that change the appearance of the
message during transmission but do not affect the content. Cryptographic techniques can ensure
confidentiality and protect messages against unauthorized viewing (eavesdropping), because an
encrypted message is not understandable. Digital signatures, which provide an assurance of message
integrity, use encryption techniques. See Digital signatures in SSL and TLS on page 176 for more
information.
Cryptographic techniques involve a general algorithm, made specific by the use of keys. There are two
classes of algorithm:
v Those that require both parties to use the same secret key. Algorithms that use a shared key are known
as symmetric algorithms. Figure 45 illustrates symmetric key cryptography.
v Those that use one key for encryption and a different key for decryption. One of these must be kept
secret but the other can be public. Algorithms that use public and private key pairs are known as
asymmetric algorithms. Figure 46 illustrates asymmetric key cryptography, which is also known as public
key cryptography.
The encryption and decryption algorithms used can be public but the shared secret key and the private
key must be kept secret.
Symmetric key
plaintext
encrypt
decrypt
plaintext
ciphertext
Figure 45. Symmetric key cryptography
Public key
Private key
Asymmetric key pair
plaintext
encrypt
decrypt
plaintext
ciphertext
Figure 46. Asymmetric key cryptography
Figure 46 shows plaintext encrypted with the receiver's public key and decrypted with the receiver's
private key. Only the intended receiver holds the private key for decrypting the ciphertext. Note that the
sender can also encrypt messages with a private key, which allows anyone that holds the sender's public
key to decrypt the message, with the assurance that the message must have come from the sender.
With asymmetric algorithms, messages are encrypted with either the public or the private key but can be
decrypted only with the other key. Only the private key is secret, the public key can be known by
164
anyone. With symmetric algorithms, the shared key must be known only to the two parties. This is called
the key distribution problem . Asymmetric algorithms are slower but have the advantage that there is no
key distribution problem.
Other terminology associated with cryptography is:
Strength
The strength of encryption is determined by the key size. Asymmetric algorithms require large
keys, for example:
1024 bits
2048 bits
4096 bits
Symmetric keys are smaller: 256 bit keys give you strong encryption.
Block cipher algorithm
These algorithms encrypt data by blocks. For example, the RC2 algorithm from RSA Data
Security Inc. uses blocks 8 bytes long. Block algorithms are typically slower than stream
algorithms.
Stream cipher algorithm
These algorithms operate on each byte of data. Stream algorithms are typically faster than block
algorithms.
Message digests and digital signatures:
A message digest is a fixed size numeric representation of the contents of a message, computed by a hash
function. A message digest can be encrypted, forming a digital signature.
Messages are inherently variable in size. A message digest is a fixed size numeric representation of the
contents of a message. A message digest is computed by a hash function, which is a transformation that
meets two criteria:
v The hash function must be one way. It must not be possible to reverse the function to find the message
corresponding to a particular message digest, other than by testing all possible messages.
v It must be computationally infeasible to find two messages that hash to the same digest.
The message digest is sent with the message itself. The receiver can generate a digest for the message and
compare it with the digest of the sender. The integrity of the message is verified when the two message
digests are the same. Any tampering with the message during transmission almost certainly results in a
different message digest.
A message digest created using a secret symmetric key is known as a Message Authentication Code
(MAC), because it can provide assurance that the message has not been modified.
The sender can also generate a message digest and then encrypt the digest using the private key of an
asymmetric key pair, forming a digital signature. The signature must then be decrypted by the receiver,
before comparing it with a locally generated digest.
Security
165
Related concepts:
Digital signatures in SSL and TLS on page 176
A digital signature is formed by encrypting a representation of a message. The encryption uses the
private key of the signatory and, for efficiency, usually operates on a message digest rather than the
message itself.
Digital certificates:
Digital certificates protect against impersonation, certifying that a public key belongs to a specified entity.
They are issued by a Certificate Authority.
Digital certificates provide protection against impersonation, because a digital certificate binds a public
key to its owner, whether that owner is an individual, a queue manager, or some other entity. Digital
certificates are also known as public key certificates, because they give you assurances about the
ownership of a public key when you use an asymmetric key scheme. A digital certificate contains the
public key for an entity and is a statement that the public key belongs to that entity:
v When the certificate is for an individual entity, the certificate is called a personal certificate or user
certificate.
v When the certificate is for a Certificate Authority, the certificate is called a CA certificate or signer
certificate.
If public keys are sent directly by their owner to another entity, there is a risk that the message could be
intercepted and the public key substituted by another. This is known as a man in the middle attack. The
solution to this problem is to exchange public keys through a trusted third party, giving you a strong
assurance that the public key really belongs to the entity with which you are communicating. Instead of
sending your public key directly, you ask the trusted third party to incorporate it into a digital certificate.
The trusted third party that issues digital certificates is called a Certificate Authority (CA), as described in
Certificate Authorities on page 167.
What is in a digital certificate:
Digital certificates contain specific pieces of information, as determined by the X.509 standard.
Digital certificates used by WebSphere MQ comply with the X.509 standard, which specifies the
information that is required and the format for sending it. X.509 is the Authentication framework part of
the X.500 series of standards.
Digital certificates contain at least the following information about the entity being certified:
v
v
v
v
v
v
v A serial number. This is a unique identifier assigned by the CA which issued the certificate. The serial
number is unique within the CA which issued the certificate: no two certificates signed by the same
CA certificate have the same serial number.
An X.509 Version 2 certificate also contains an Issuer Identifier and a Subject Identifier, and an X.509
Version 3 certificate can contain a number of extensions. Some certificate extensions, such as the Basic
Constraint extension, are standard, but others are implementation-specific. An extension can be critical, in
which case a system must be able to recognize the field; if it does not recognize the field, it must reject
the certificate. If an extension is not critical, the system can ignore it if does not recognize it.
166
The digital signature in a personal certificate is generated using the private key of the CA which signed
that certificate. Anyone who needs to verify the personal certificate can use the CA's public key to do so.
The CA's certificate contains its public key.
Digital certificates do not contain your private key. You must keep your private key secret.
Requirements for personal certificates:
WebSphere MQ supports digital certificates that comply with the X.509 standard. It requires the client
authentication option.
Because WebSphere MQ is a peer to peer system, it is viewed as client authentication in SSL terminology.
Therefore, any personal certificate used for SSL authentication needs to allow a key usage of client
authentication. Not all server certificates have this option enabled, so the certificate provider might need
to enable client authentication on the root CA for the secure certificate.
In addition to the standards which specify the data format for a digital certificate, there are also
standards for determining whether a certificate is valid. These standards have been updated over time in
order to prevent certain types of security breach. For example, older X.509 version 1 and 2 certificates did
not indicate whether the certificate could be legitimately used to sign other certificates. It was therefore
possible for a malicious user to obtain a personal certificate from a legitimate source and create new
certificates designed to impersonate other users.
When using X.509 version 3 certificates, the BasicConstraints and KeyUsage certificate extensions are used
to specify which certificates can legitimately sign other certificates. The IETF RFC 5280 standard specifies
a series of certificate validation rules which compliant application software must implement in order to
prevent impersonation attacks. A set of certificate rules is known as a certificate validation policy.
For more information about certificate validation policies in WebSphere MQ, see Certificate validation
policies in WebSphere MQ on page 191.
Certificate Authorities:
A Certificate Authority (CA) is a trusted third party that issues digital certificates to provide you with an
assurance that the public key of an entity truly belongs to that entity.
The roles of a CA are:
v On receiving a request for a digital certificate, to verify the identity of the requestor before building,
signing and returning the personal certificate
v To provide the CA's own public key in its CA certificate
v To publish lists of certificates that are no longer trusted in a Certificate Revocation List (CRL). For more
information, see Working with revoked certificates on page 306
v To provide access to certificate revocation status by operating an OCSP responder server
Distinguished Names:
The Distinguished Name (DN) uniquely identifies an entity in an X.509 certificate.
The following attribute types are commonly found in the DN:
Security
167
SERIALNUMBER
MAIL
E
UID or USERID
CN
T
OU
DC
O
STREET
L
ST (or SP or S)
PC
C
UNSTRUCTUREDNAME
UNSTRUCTUREDADDRESS
DNQ
The X.509 standard defines other attributes that do not typically form part of the DN but can provide
optional extensions to the digital certificate.
The X.509 standard provides for a DN to be specified in a string format. For example:
CN=John Smith, OU=Test, O=IBM, C=GB
The Common Name (CN) can describe an individual user or any other entity, for example a web server.
The DN can contain multiple OU and DC attributes. Only one instance of each of the other attributes is
permitted. The order of the OU entries is significant: the order specifies a hierarchy of Organizational
Unit names, with the highest-level unit first. The order of the DC entries is also significant.
WebSphere MQ tolerates certain malformed DNs. For more information, see WebSphere MQ rules for
SSLPEER values.
Related concepts:
What is in a digital certificate on page 166
Digital certificates contain specific pieces of information, as determined by the X.509 standard.
Obtaining personal certificates from a certificate authority:
You can obtain a certificate from a trusted external certificate authority (CA).
You obtain a digital certificate by sending information to a CA, in the form of a certificate request. The
X.509 standard defines a format for this information, but some CAs have their own format. Certificate
requests are typically generated by the certificate management tool your system uses, for example the
iKeyman tool on UNIX, Linux, and Windows systems and RACF on z/OS. The information contains your
Distinguished Name and your public key. When your certificate management tool generates your
certificate request, it also generates your private key, which you must keep secure. Never distribute your
private key.
When the CA receives your request, the authority verifies your identity before building the certificate and
returning it to you as a personal certificate.
Figure 47 on page 169 illustrates the process of obtaining a digital certificate from a CA.
168
User
Certification Authority
Digital certificate
Public
key
Private
key
Public
key
User
identification
Request
to
Certification
Authority
Verify
user
identification
Build
certificate
for
user
Certification
Authority
identification
User
identification
Return to user
Figure 47. Obtaining a digital certificate
In the diagram:
v "User identification" includes your Subject Distinguished Name.
v "Certification Authority identification" includes the Distinguished Name of the CA that is issuing the
certificate.
v
Digital certificates contain additional fields other than those shown in the diagram. For more information
about the other fields in a digital certificate, see What is in a digital certificate on page 166.
Related information:
Security
169
Owners DN
Owners public key
Issuers (CA) DN
Get certificate
Verify signature
Owners public key
Issuers (Root CA) DN
Get certificate
Verify signature
Root CAs public key
Root CAs signature
Certificate extensions
Each certificate can contain one or more extensions. A certificate belonging to a CA typically contains a
BasicConstraints extension with the isCA flag set to indicate that it is allowed to sign other certificates.
When certificates are no longer valid:
Digital certificates can expire or be revoked.
Digital certificates are issued for a fixed period and are not valid after their expiry date.
See the Glossary for a definition of certificate expiration.
Certificates can be revoked for various reasons, including:
v The owner has moved to a different organization.
v The private key is no longer secret.
WebSphere MQ can check whether a certificate is revoked by sending a request to an Online Certificate
Status Protocol (OCSP) responder (on UNIX, Linux and Windows systems only). Alternatively, they can
access a CRL on an LDAP server. The OCSP revocation and CRL information is published by a Certificate
Authority. For more information, see Working with revoked certificates on page 306.
170
Security
171
172
9. For the duration of the SSL or TLS session, the server and client can now exchange messages that are
symmetrically encrypted with the shared secret key.
Figure 49 illustrates the SSL or TLS handshake.
SSL Client
SSL Server
(1) "client hello
Cryptographic information
(2) "server hello
(3)
Verify server
certificate.
Check
cryptographic
parameters
CipherSuite
Server certificate
"client certificate request" (optional)
(4) Client key exchange
Send secret key information
(encrypted with server public key)
(5) Send client certificate
(6)
Verify client
certificate
(if required)
How SSL and TLS provide identification, authentication, confidentiality, and integrity:
During both client and server authentication there is a step that requires data to be encrypted with one of
the keys in an asymmetric key pair and decrypted with the other key of the pair. A message digest is
used to provide integrity.
How SSL and TLS provide authentication
For server authentication, the client uses the server's public key to encrypt the data that is used to
compute the secret key. The server can generate the secret key only if it can decrypt that data with the
correct private key.
For client authentication, the server uses the public key in the client certificate to decrypt the data the
client sends during step 5 on page 172 of the handshake. The exchange of finished messages that are
encrypted with the secret key (steps 7 on page 172 and 8 on page 172 in the overview) confirms that
authentication is complete.
If any of the authentication steps fail, the handshake fails and the session terminates.
The exchange of digital certificates during the SSLor TLS handshake is part of the authentication process.
For more information about how certificates provide protection against impersonation, refer to the related
information. The certificates required are as follows, where CA X issues the certificate to the SSL or TLS
client, and CA Y issues the certificate to the SSL or TLS server:
Security
173
174
Security
175
Sender
Message
transmitted
Message
received
plaintext
hash
plaintext
Message
digest
plaintext
Compare
hash
Message encrypt
digest
Digital
signature
Digital
signature
decrypt Message
digest
176
177
WebSphere MQ provides mechanisms to implement all the security concepts introduced in Security
concepts and mechanisms on page 161. These are discussed in more detail in the following sections.
Authorization in WebSphere MQ
You can use authorization to limit what particular individuals or applications can do in your WebSphere
MQ environment.
Here are some examples of authorization in a WebSphere MQ environment:
v Allowing only an authorized administrator to issue commands to manage WebSphere MQ resources.
v Allowing an application to connect to a queue manager only if the user ID associated with the
application is authorized to do so.
v Allowing an application to open only those queues that are necessary for its function.
v Allowing an application to subscribe only to those topics that are necessary for its function.
v Allowing an application to perform only those operations on a queue that are necessary for its
function. For example, an application might need only to browse messages on a particular queue, and
not to put or get messages.
Related concepts:
Authorization on page 162
Authorization protects critical resources in a system by limiting access only to authorized users and their
applications. It prevents the unauthorized use of a resource or the use of a resource in an unauthorized
manner.
Auditing in WebSphere MQ
WebSphere MQ can issue event messages to record that unusual activity has taken place.
Here are some examples of auditing in a WebSphere MQ environment:
v An application attempts to open a queue that it is not authorized to open. An instrumentation event
message is issued. By inspecting the event message, you discover that this attempt occurred and can
decide what action is necessary.
178
v An application attempts to open a channel, but the attempt fails because SSL does not allow the
connection. An instrumentation event message is issued. By inspecting the event message, you discover
that this attempt occurred and can decide what action is necessary.
Related concepts:
Auditing on page 162
Auditing is the process of recording and checking events to detect whether any unexpected or
unauthorized activity has taken place, or whether any attempt has been made to perform such activity.
Confidentiality in WebSphere MQ
You can implement confidentiality in WebSphere MQ by encrypting messages.
Here are some examples of how confidentiality can be ensured in a WebSphere MQ environment:
v After a sending MCA gets a message from a transmission queue, WebSphere MQ uses SSL or TLS to
encrypt the message before it is sent over the network to the receiving MCA. At the other end of the
channel, the message is decrypted before the receiving MCA puts it on its destination queue.
v While messages are stored on a local queue, the access control mechanisms provided by WebSphere
MQ might be considered sufficient to protect their contents against unauthorized disclosure. However,
for a greater level of security, you can use WebSphere MQ Advanced Message Security to encrypt the
messages stored in the queues.
Related concepts:
Confidentiality on page 163
The confidentiality service protects sensitive information from unauthorized disclosure.
Cryptography in WebSphere MQ
WebSphere MQ provides cryptography by using the Secure sockets Layer (SSL) and Transport Security
Layer (TLS) protocols.
For more information see Security protocols in WebSphere MQ on page 180.
Security
179
Related concepts:
Cryptographic concepts on page 163
This collection of topics describes the concepts of cryptography applicable to WebSphere MQ.
UNIX
Linux
Windows, UNIX and Linux, and HP Integrity NonStop Server systems
For UNIX, Linux, HP Integrity NonStop Server, and Windows systems, the SSL and TLS support
is installed with WebSphere MQ.
For information about any prerequisites for WebSphere MQ SSL and TLS support, see WebSphere MQ
requirements.
180
UNIX
Linux
For more information, refer to Digital certificates on page 166 and Secure Sockets Layer (SSL) and
Transport Layer Security (TLS) concepts on page 171.
A mutually authenticated SSL or TLS connection requires a key repository at each end of the connection.
The key repository may contain:
v A number of CA certificates from various Certification Authorities that allow the queue manager or
client to verify certificates that it receives from its partner at the remote end of the connection.
Individual certificates might be in a certificate chain.
v One or more personal certificates received from a Certification Authority. You associate a separate
personal certificate with each queue manager or WebSphere MQ MQI client. Personal certificates are
essential on an SSL or TLS client if mutual authentication is required. If mutual authentication is not
required, personal certificates are not needed on the client. The key repository might also contain the
private key corresponding to each personal certificate.
v Certificate requests which are waiting to be signed by a trusted CA certificate.
For more information about protecting your key repository, see Protecting WebSphere MQ key
repositories on page 182.
The location of the key repository depends on the platform you are using:
Windows
UNIX
Linux
Windows, UNIX and Linux systems
On Windows, UNIX and Linux systems the key repository is a key database file. The name of the
key database file must have a file extension of .kdb. For example, on UNIX and Linux, the
default key database file for queue manager QM1 is /var/mqm/qmgrs/QM1/ssl/key.kdb . If
WebSphere MQ is installed in the default location, the equivalent path on Windows is C:\Program
Files\IBM\WebSphere MQ\Qmgrs\QM1\ssl\key.kdb.
On Windows , UNIX and Linux systems, each key database file has an associated password stash
file. This file holds encoded passwords that allow programs to access the key database. The
password stash file must be in the same directory and have the same file stem as the key
database, and must end with the suffix .sth , for example /var/mqm/qmgrs/QM1/ssl/key.sth
Note: On Windows, UNIX and Linux systems, PKCS #11 cryptographic hardware cards can
contain the certificates and keys that are otherwise held in a key database file. When certificates
and keys are held on PKCS #11 cards, WebSphere MQ still requires access to both a key database
file and a password stash file.
On Windows and UNIX systems, the key database also contains the private key for the personal
certificate associated with the queue manager or WebSphere MQ MQI client.
Security
181
182
Related concepts:
Refreshing the queue manager's key repository on page 182
When you change the contents of a key repository, the queue manager does not immediately pick up the
new contents. For a queue manager to use the new key repository contents, you must issue the REFRESH
SECURITY TYPE(SSL) command.
Federal Information Processing Standards (FIPS):
This topic introduces the Federal Information Processing Standards (FIPS) Cryptomodule Validation
Program of the US National Institute of Standards and Technology and the cryptographic functions which
can be used on SSL or TLS channels, for Windows, UNIX and Linux, and z/OS systems.
The FIPS 140-2 compliance of a WebSphere MQ SSL or TLS connection on UNIX, Linux, and Windows
systems is found here Federal Information Processing Standards (FIPS) for UNIX, Linux, and Windows.
If cryptographic hardware is present, the cryptographic modules used by WebSphere MQ can be
configured to be those provided by the hardware manufacturer. If this is done, the configuration is only
FIPS-compliant if those cryptographic modules are FIPS-certified.
Over time, the Federal Information Processing Standards are updated to reflect new attacks against
encryption algorithms and protocols. For example, some CipherSpecs may cease to be FIPS certified.
When such changes occur, WebSphere MQ is also updated to implement the latest standard. As a result,
you might see changes in behavior after applying maintenance. The WebSphere MQ 7.1 readme lists the
version of FIPS enforced by each product maintenance level. If you configure WebSphere MQ to enforce
FIPS compliance, always consult the readme when planning to apply maintenance. The readme is located
at WebSphere MQ product READMEs
Related concepts:
Specifying that only FIPS-certified CipherSpecs are used at run time on the MQI client on page 267
Create your key repositories using FIPS-compliant software, then specify that the channel must use
FIPS-certified CipherSpecs.
Using iKeyman, iKeycmd, runmqakm, and runmqckm on page 272
On UNIX, Linux and Windows systems, manage keys and digital certificates with the iKeyman GUI or
from the command line using iKeycmd or runmqakm.
Related information:
Enabling SSL in WebSphere MQ classes for Java
SSL properties of JMS objects
Using Secure Sockets Layer (SSL) with WebSphere MQ classes for JMS
Federal Information Processing Standards on page 177
The US government produces technical advice on IT systems and security, including data encryption. The
National Institute for Standards and Technology (NIST) is an important body concerned with IT systems
and security. NIST produces recommendations and standards, including the Federal Information
Processing Standards (FIPS).
Federal Information Processing Standards (FIPS) for UNIX, Linux, and Windows:
When cryptography is required on an SSL or TLS channel on Windows, UNIX and Linux systems,
WebSphere MQ uses a cryptography package called IBM Crypto for C (ICC). On the Windows, UNIX and
Linux platforms, the ICC software has passed the Federal Information Processing Standards (FIPS)
Cryptomodule Validation Program of the US National Institute of Standards and Technology, at level
140-2.
The FIPS 140-2 compliance of a WebSphere MQ SSL or TLS connection on Windows, UNIX and Linux
systems is as follows:
Security
183
v For all WebSphere MQ message channels (except CLNTCONN channel types), the connection is
FIPS-compliant if the following conditions are met:
The installed GSKit ICC version has been certified FIPS 140-2 compliant on the installed operating
system version and hardware architecture.
The queue manager's SSLFIPS attribute has been set to YES.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
v For all WebSphere MQ MQI client applications , the connection uses GSKit and is FIPS-compliant if the
following conditions are met:
The installed GSKit ICC version has been certified FIPS 140-2 compliant on the installed operating
system version and hardware architecture.
You have specified that only FIPS-certified cryptography is to be used, as described in the related
topic for the MQI client.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
v For WebSphere MQ classes for Java applications using client mode, the connection uses the JRE's SSL
and TLS implementations and is FIPS-compliant if the following conditions are met:
The Java Runtime Environment used to run the application is FIPS-compliant on the installed
operating system version and hardware architecture.
You have specified that only FIPS-certified cryptography is to be used, as described in the related
topic for the Java client.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
v For WebSphere MQ classes for JMS applications using client mode, the connection uses the JRE's SSL
and TLS implementations and is FIPS-compliant if the following conditions are met:
The Java Runtime Environment used to run the application is FIPS-compliant on the installed
operating system version and hardware architecture.
You have specified that only FIPS-certified cryptography is to be used, as described in the related
topic for the JMS client.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
v For unmanaged .NET client applications, the connection uses GSKit and is FIPS-compliant if the
following conditions are met:
The installed GSKit ICC version has been certified FIPS 140-2 compliant on the installed operating
system version and hardware architecture.
You have specified that only FIPS-certified cryptography is to be used, as described in the related
topic for the .NET client.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
v For unmanaged XMS .NET client applications, the connection uses GSKit and is FIPS-compliant if the
following conditions are met:
The installed GSKit ICC version has been certified FIPS 140-2 compliant on the installed operating
system version and hardware architecture.
You have specified that only FIPS-certified cryptography is to be used, as described in the XMS
.NET documentation.
All key repositories have been created and manipulated using only FIPS-compliant software, such as
runmqakm with the -fips option.
All supported AIX, Linux, HP-UX, Solaris, Windows, and z/OS platforms are FIPS 140-2 certified except
as noted in the readme file included with each fix pack or refresh pack.
184
For SSL and TLS connections using GSKit, the component which is FIPS 140-2 certified is named ICC. It
is the version of this component which determines GSKit FIPS compliance on any given platform. To
determine the ICC version currently installed, run the dspmqver -p 64 -v command.
Here is an example extract of the dspmqver -p 64 -v output relating to ICC:
ICC
============
@(#)CompanyName:
@(#)LegalTrademarks:
@(#)FileDescription:
@(#)FileVersion:
@(#)LegalCopyright:
@(#)
@(#)
@(#)
@(#)
@(#)
@(#)ProductName:
@(#)ProductVersion:
@(#)ProductInfo:
@(#)CMVCInfo:
IBM Corporation
IBM
IBM Crypto for C-language
8.0.0.0
Licensed Materials - Property of IBM
ICC
(C) Copyright IBM Corp. 2002,2010
All Rights Reserved. US Government Users
Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
icc_8.0 (GoldCoast Build) 100415
8.0.0.0
10/04/15.03:32:19.10/04/15.18:41:51
The NIST certification statement for GSKit ICC 8 (included in GSKit 8) can be found at the following
address: http://csrc.nist.gov/groups/stm/cmvp/documents/140-1/1401val2010.htm#1433.
If cryptographic hardware is present, the cryptographic modules used by WebSphere MQ can be
configured to be those provided by the hardware manufacturer. If this is done, the configuration is only
FIPS-compliant if those cryptographic modules are FIPS-certified.
Note: 32 bit Solaris x86 SSL and TLS clients configured for FIPS 140-2 compliant operation fail when
running on Intel systems. This failure occurs because the FIPS 140-2 compliant GSKit-Crypto Solaris x86
32 bit library file does not load on the Intel chipset. On affected systems, error AMQ9655 is reported in
the client error log. To resolve this issue, disable FIPS 140-2 compliance or recompile the client application
64 bit, because 64 bit code is not affected.
Triple DES restrictions enforced when operating in compliance with FIPS 140-2
When WebSphere MQ is configured to operate in compliance with FIPS 140-2, additional restrictions are
enforced in relation to Triple DES (3DES) CipherSpecs. These restrictions enable compliance with the US
NIST SP800-67 recommendation.
1. All parts of the Triple DES key must be unique.
2. No part of the Triple DES key can be a Weak, Semi-Weak, or Possibly-Weak key according to the
definitions in NIST SP800-67.
3. No more than 32 GB of data can be transmitted over the connection before a secret key reset must
occur. By default, WebSphere MQ does not reset the secret session key so this reset must be
configured. Failure to enable secret key reset when using a Triple DES CipherSpec and FIPS 140-2
compliance results in the connection closing with error AMQ9288 after the maximum byte count is
exceeded. For information about how to configure secret key reset, see Resetting SSL and TLS secret
keys on page 377.
WebSphere MQ generates Triple DES session keys which already comply with rules 1 and 2. However, to
satisfy the third restriction you must enable secret key reset when using Triple DES CipherSpecs in a FIPS
140-2 configuration. Alternatively, you can avoid using Triple DES.
Security
185
Related concepts:
Specifying that only FIPS-certified CipherSpecs are used at run time on the MQI client on page 267
Create your key repositories using FIPS-compliant software, then specify that the channel must use
FIPS-certified CipherSpecs.
Using iKeyman, iKeycmd, runmqakm, and runmqckm on page 272
On UNIX, Linux and Windows systems, manage keys and digital certificates with the iKeyman GUI or
from the command line using iKeycmd or runmqakm.
Related information:
Enabling SSL in WebSphere MQ classes for Java
SSL properties of JMS objects
Using Secure Sockets Layer (SSL) with WebSphere MQ classes for JMS
Federal Information Processing Standards on page 177
The US government produces technical advice on IT systems and security, including data encryption. The
National Institute for Standards and Technology (NIST) is an important body concerned with IT systems
and security. NIST produces recommendations and standards, including the Federal Information
Processing Standards (FIPS).
SSL and TLS on the WebSphere MQ MQI client:
WebSphere MQ supports SSL and TLS on clients. You can tailor the use of SSL or TLS in various ways.
WebSphere MQ provides SSL and TLS support for WebSphere MQ MQI clients on Windows, UNIX and
Linux systems. If you are using WebSphere MQ classes for Java, see Using WebSphere MQ classes for
Java and if you are using WebSphere MQ classes for JMS, see Using WebSphere MQ classes for JMS. The
rest of this section does not apply to the Java or JMS environments.
You can specify the key repository for a WebSphere MQ MQI client either with the MQSSLKEYR value in
your WebSphere MQ client configuration file, or when your application makes an MQCONNX call. You
have three options for specifying that a channel uses SSL:
v Using a channel definition table
v Using the SSL configuration options structure, MQSCO, on an MQCONNX call
v Using the Active Directory (on Windows systems)
You cannot use the MQSERVER environment variable to specify that a channel uses SSL.
You can continue to run your existing WebSphere MQ MQI client applications without SSL, as long as
SSL is not specified at the other end of the channel.
If changes are made on a client machine to the contents of the SSL Key Repository, the location of the SSL
Key Repository, the Authentication Information, or the Cryptographic hardware parameters, you need to
end all the SSL connections in order to reflect these changes in the client-connection channels that the
application is using to connect to the queue manager. Once all the connections have ended, restart the
SSL channels. All the new SSL settings are used. These settings are analogous to those refreshed by the
REFRESH SECURITY TYPE(SSL) command on queue manager systems.
When your WebSphere MQ MQI client runs on a Windows, UNIX and Linux system with cryptographic
hardware, you configure that hardware with the MQSSLCRYP environment variable. This variable is
equivalent to the SSLCRYP parameter on the ALTER QMGR MQSC command. Refer to ALTER QMGR
for a description of the SSLCRYP parameter on the ALTER QMGR MQSC command. If you use the
GSK_PCS11 version of the SSLCRYP parameter, the PKCS #11 token label must be specified entirely in
lower-case.
186
SSL secret key reset and FIPS are supported on WebSphere MQ MQI clients. For more information, see
Resetting SSL and TLS secret keys on page 377 and Federal Information Processing Standards (FIPS)
for UNIX, Linux, and Windows on page 183.
See Setting up WebSphere MQ MQI client security on page 266 for more information about the SSL
support for WebSphere MQ MQI clients.
Related information:
Configuring a client using a configuration file
Specifying that an MQI channel uses SSL:
For an MQI channel to use SSL, the value of the SSLCipherSpec attribute of the client-connection channel
must be the name of a CipherSpec that is supported by WebSphere MQ on the client platform.
You can define a client-connection channel with a value for this attribute in the following ways. They are
listed in order of decreasing precedence.
1. When a PreConnect exit provides a channel definition structure to use.
A PreConnect exit can provide the name of a CipherSpec in the SSLCipherSpec field of a channel
definition structure, MQCD. This structure is returned in the ppMQCDArrayPtr field of the MQNXP exit
parameter structure used by the PreConnect exit.
2. When a WebSphere MQ MQI client application issues an MQCONNX call.
The application can specify the name of a CipherSpec in the SSLCipherSpec field of a channel
definition structure, MQCD. This structure is referenced by the connect options structure, MQCNO,
which is a parameter on the MQCONNX call.
3. Using a client channel definition table (CCDT).
One or more entries in a client channel definition table can specify the name of a CipherSpec. For
example, if you create an entry by using the DEFINE CHANNEL MQSC command, you can use the
SSLCIPH parameter on the command to specify the name of a CipherSpec.
4. Using Active Directory on Windows.
On Windows systems, you can use the setmqscp control command to publish the client-connection
channel definitions in Active Directory. One or more of these definitions can specify the name of a
CipherSpec.
For example, if a client application provides a client-connection channel definition in an MQCD structure
on an MQCONNX call, this definition is used in preference to any entries in a client channel definition
table that can be accessed by the WebSphere MQ client.
You cannot use the MQSERVER environment variable to provide the channel definition at the client end
of an MQI channel that uses SSL.
To check whether a client certificate has flowed, display the channel status at the server end of a channel
for the presence of a peer name parameter value.
Related concepts:
Specifying a CipherSpec for a WebSphere MQ MQI client on page 376
You have three options for specifying a CipherSpec for a WebSphere MQ MQI client.
CipherSpecs and CipherSuites in WebSphere MQ:
WebSphere MQ supports both SSL and TLS CipherSpecs, and RSA and Diffie-Hellman algorithms.
WebSphere MQ supports SSL V3 and TLS V1.0 and V1.2 CipherSpecs.
Security
187
WebSphere MQ supports the RSA and Diffie-Hellman key exchange and authentication algorithms. The
size of the key used during the SSL handshake can depend on the digital certificate you use, but some
CipherSpecs include a specification of the handshake key size. Larger handshake key sizes provide
stronger authentication. With smaller key sizes, the handshake is faster.
Related concepts:
CipherSpecs and CipherSuites on page 175
Cryptographic security protocols must agree the algorithms used by a secure connection. CipherSpecs
and CipherSuites define specific combinations of algorithms.
NSA Suite B Cryptography in WebSphere MQ:
This topic provides information about how to configure WebSphere MQ on Windows, Linux, and UNIX
systems to conform to the Suite B compliant TLS 1.2 profile.
Over time, the NSA Cryptography Suite B Standard is updated to reflect new attacks against encryption
algorithms and protocols. For example, some CipherSpecs might cease to be Suite B certified. When such
changes occur, WebSphere MQ is also updated to implement the latest standard. As a result, you might
see changes in behavior after applying maintenance. The WebSphere MQ 7.5 readme file lists the version
of Suite B enforced by each product maintenance level. If you configure WebSphere MQ to enforce Suite
B compliance, always consult the readme file when planning to apply maintenance. The readme file is at
http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg27006097.
On Windows, UNIX, and Linux systems, WebSphere MQ can be configured to conform to the Suite B
compliant TLS 1.2 profile at the security levels shown in Table 1.
Table 7. Suite B security levels with allowed CipherSpecs and digital signature algorithms
Security level
Allowed CipherSpecs
128-bit
ECDHE_ECDSA_AES_128_GCM_SHA256
ECDHE_ECDSA_AES_256_GCM_SHA384
192-bit
ECDHE_ECDSA_AES_256_GCM_SHA384
ECDHE_ECDSA_AES_128_GCM_SHA256
ECDHE_ECDSA_AES_256_GCM_SHA384
Both
1. It is possible to configure both the 128-bit and 192-bit security levels concurrently. Since the Suite B
configuration determines the minimum acceptable cryptographic algorithms, configuring both security
levels is equivalent to configuring only the 128-bit security level. The cryptographic algorithms of the
192-bit security level are stronger than the minimum required for the 128-bit security level, so they are
permitted for the 128-bit security level even if the 192-bit security level is not enabled.
Note: The naming conventions used for the Security level do not necessarily represent the elliptic curve
size or the key size of the AES encryption algorithm.
CipherSpec conformation to Suite B
Although the default behavior of WebSphere MQ is not to comply with the Suite B standard, WebSphere
MQ can be configured to conform to either, or both security levels on Windows, UNIX and Linux
systems. Following the successful configuration of WebSphere MQ to use Suite B, any attempt to start an
outbound channel using a CipherSpec not conforming to Suite B results in the error AMQ9282. This activity
also results in the MQI client returning the reason code MQRC_CIPHER_SPEC_NOT_SUITE_B. Similarly,
attempting to start an inbound channel using a CipherSpec not conforming to the Suite B configuration
results in the error AMQ9616.
For more information about WebSphere MQ CipherSpecs, see Specifying CipherSpecs on page 373
188
Security
189
190
You can specify multiple values using a comma separated list. Using NONE with any other value is
invalid.
Note: The MQI client settings are listed in order of priority. The MSCO structure on the MQCONNX call
overrides the setting on the MQSUITEB environment variable, which overrides the attribute in the SSL
stanza.
For full details of the MQSCO structure, see MQSCO - SSL configuration options.
For more information about the use of Suite B in the client configuration file, see SSL stanza of the client
configuration file.
For further information on the use of the MQSUITEB environment variable, see Environment Variables.
.NET
For .NET unmanaged clients, the property MQC.ENCRYPTION_POLICY_SUITE_B indicates the type of Suite B
security required.
For information about the using Suite B in WebSphere MQ classes for .NET, see MQEnvironment .NET
class.
Certificate validation policies in WebSphere MQ:
The certificate validation policy determines how strictly the certificate chain validation conforms to
industry security standards.
The certificate validation policy depends upon the platform and environment as follows:
v For Java and JMS applications on all platforms, the certificate validation policy depends on the JSSE
component of the Java runtime environment. For more information about the certificate validation
policy, see the documentation for your JRE.
v For IBM i systems, the certificate validation policy depends on the secure sockets library provided by
the operating system. For more information about the certificate validation policy, see the
documentation for the operating system.
v For z/OS systems, the certificate validation policy depends on the System SSL component provided by
the operating system. For more information about the certificate validation policy, see the
documentation for the operating system.
v For UNIX, Linux, and Windows systems, the certificate validation policy is supplied by GSKit and can
be configured. Two different certificate validation policies are supported:
A legacy certificate validation policy, used for maximum backwards compatibility and
interoperability with old digital certificates that do not comply with the current IETF certificate
validation standards. This policy is known as the Basic policy.
A strict, standards-compliant certificate validation policy which enforces the RFC 5280 standard. This
policy is known as the Standard policy.
For information about how to configure the certificate validation policy on UNIX, Linux, and Windows
systems, see Configuring certificate validation policies in WebSphere MQ on page 192. For more
information about the differences between the Basic and Standard certificate validation policies, see
Certificate validation and trust policy design on UNIX, Linux and Windows systems.
Security
191
where cert_label is the certificate label of the digital signature algorithm you need to display.
Note: Although the iKeycmd (runmqckm) tool and the iKeyman (strmqikm) GUI can be used to view a
selection of digital signature algorithms, the runmqakm tool provides a wider range.
192
The execution of the runmqakm command will produce output displaying the use of the signature
algorithm specified:
Label : ibmwebspheremqexample
Key Size : 1024
Version : X509 V3
Serial : 4e4e93f1
Issuer : CN=Old Certificate Authority,OU=Test,O=Example,C=US
Subject : CN=Example Queue Manager,OU=Test,O=Example,C=US
Not Before : August 19, 2011 5:48:49 PM GMT+01:00
Not After : August 18, 2012 5:48:49 PM GMT+01:00
Public Key
30 81 9F 30 0D 06 09 2A 86 48 86 F7 0D 01 01 01
05 00 03 81 8D 00 30 81 89 02 81 81 00 98 5A 7A
F0 18 21 EE E4 8A 6E DE C8 01 4B 3A 1E 41 90 3D
CE 01 3F E6 32 30 6C 23 59 F0 FE 78 6D C2 80 EF
BC 83 54 7A EB 60 80 62 6B F1 52 FE 51 9D C1 61
80 A5 1C D4 F0 76 C7 15 6D 1F 0D 4D 31 3E DC C6
A9 20 84 6E 14 A1 46 7D 4C F5 79 4D 37 54 0A 3B
A9 74 ED E7 8B 0F 80 31 63 1A 0B 20 A5 99 EE 0A
30 A6 B6 8F 03 97 F6 99 DB 6A 58 89 7F 27 34 DE
55 08 29 D8 A9 6B 46 E6 02 17 C3 13 D3 02 03 01
00 01
Public Key Type : RSA (1.2.840.113549.1.1.1)
Fingerprint : SHA1 :
09 4E 4F F2 1B CB C1 F4 4F 15 C9 2A F7 32 0A 82
DA 45 92 9F
Fingerprint : MD5 :
44 54 81 7C 58 68 08 3A 5D 75 96 40 D5 8C 7A CB
Fingerprint : SHA256 :
3B 47 C6 E7 7B B0 FF 85 34 E7 48 BE 11 F2 D4 35
B7 9A 79 53 2B 07 F5 E7 65 E8 F7 84 E0 2E 82 55
Signature Algorithm : MD5WithRSASignature (1.2.840.113549.1.1.4)
Value
3B B9 56 E6 F2 77 94 69 5B 3F 17 EA 7B 19 D0 A2
D7 10 38 F1 88 A4 44 1B 92 35 6F 3B ED 99 9B 3A
A5 A4 FC 72 25 5A A9 E3 B1 96 88 FC 1E 9F 9B F1
C5 E8 8E CF C4 8F 48 7B 0E A6 BB 13 AE 2B BD D8
63 2C 03 38 EF DC 01 E1 1F 7A 6F FB 2F 65 74 D0
FD 99 94 BA B2 3A D5 B4 89 6C C1 2B 43 6D E2 39
66 6A 65 CB C3 C4 E2 CC F5 49 39 A3 8B 93 5A DD
B0 21 0B A8 B2 59 5B 24 59 50 44 89 DC 78 19 51
Trust Status : Enabled
The Signature Algorithm line shows that the MD5WithRSASignature algorithm is used. This algorithm is
based upon MD5 and so this digital certificate cannot be used with the TLS 1.2 CipherSpecs.
Interoperability of Elliptic Curve and RSA CipherSpecs
Not all CipherSpecs can be used with all digital certificates. There are three types of CipherSpec, denoted
by the CipherSpec name prefix. Each type of CipherSpec imposes different restrictions upon the type of
digital certificate which may be used. These restrictions apply to all WebSphere MQ SSL and TLS
connections, but are particularly relevant to users of Elliptic Curve cryptography.
The relationships between CipherSpecs and digital certificates are summarized in the following table:
Security
193
Type
CipherSpec
Name Prefix
Description
Required public
key type
Digital signature
encryption
algorithm
Secret key
establishment
method
ECDHE_ECDSA_
CipherSpecs
which use Elliptic
Curve public
keys, Elliptic
Curve secret keys,
and Elliptic
Curve digital
signature
algorithms.
Elliptic Curve
ECDSA
ECDHE
ECDHE_RSA_
CipherSpecs
which use RSA
public keys,
Elliptic Curve
secret keys, and
Elliptic Curve
digital signature
algorithms.
RSA
RSA
ECDHE
(All others)
CipherSpecs
which use RSA
public keys and
RSA digital
signature
algorithms.
RSA
RSA
RSA
Note: Type 1 and 2 CipherSpecs are only supported by WebSphere MQ queue managers and MQI clients
on the UNIX, Linux, and Windows platforms.
The required public key type column shows the type of public key which the personal certificate must
have when using each type of CipherSpec. The personal certificate is the end-entity certificate which
identifies the queue manager or client to its remote partner.
The digital signature encryption algorithm refers to the encryption algorithm used to validate the peer.
The encryption algorithm is used along with a hash algorithm such as MD5, SHA-1 or SHA-256 to
compute the digital signature. There are various digital signature algorithms which can be used, for
example "RSA with MD5" or "ECDSA with SHA-256". In the table, ECDSA refers to the set of digital
signature algorithms which use ECDSA; RSA refers to the set of digital signature algorithms which use
RSA. Any supported digital signature algorithm in the set may be used, provided it is based upon the
stated encryption algorithm.
Type 1 CipherSpecs require that the personal certificate must have an Elliptic Curve public key. When
these CipherSpecs are used, Elliptic Curve Diffie Hellman Ephemeral key agreement is used to establish
the secret key for the connection.
Type 2 CipherSpecs require that the personal certificate has an RSA public key. When these CipherSpecs
are used, Elliptic Curve Diffie Hellman Ephemeral key agreement is used to establish the secret key for
the connection.
Type 3 CipherSpecs require that the the personal certificate must have an RSA public key. When these
CipherSpecs are used, RSA key exchange is used to establish the secret key for the connection.
194
This list of restrictions is not exhaustive: depending on the configuration, there might be additional
restrictions which can further affect the ability to interoperate. For example, if WebSphere MQ is
configured to comply with the FIPS 140-2 or NSA Suite B standards then this will also limit the range of
allowable configurations. Refer to the following section for more information.
A WebSphere MQ queue manager can only use a single personal certificate to identify itself. This means
all channels on the queue manager will use the same digital certificate and therefore each queue manager
may only use one type of CipherSpec at a time. Similarly, a WebSphere MQ client application can only
use a single personal certificate to identify itself. This means that all SSL and TLS connections within a
single application process will use the same digital certificate and therefore each client application process
may only use one type of CipherSpec at a time.
The three types of CipherSpec do not interoperate directly: this is a limitation of the current SSL and TLS
standards. For example, suppose you have chosen to use the ECDHE_ECDSA_AES_128_CBC_SHA256
CipherSpec for a receiver channel named TO.QM1 on a queue manager named QM1.
ECDHE_ECDSA_AES_128_CBC_SHA256 is a Type 1 CipherSpec, so QM1 must have a personal certificate
with an Elliptic Curve key and an ECDSA-based digital signature. All clients and other queue managers
which communicate directly with QM1 must therefore have digital certificates which satisfy the Type 1
CipherSpec requirements. Other channels connecting to queue manager QM1 may use other CipherSpecs
(for example ECDHE_ECDSA_3DES_EDE_CBC_SHA256), but they may only use Type 1 CipherSpecs to
communicate with QM1.
When planning your WebSphere MQ networks, consider carefully which channels require SSL or TLS and
ensure that all of the clients and queue managers which need to interoperate use the same type of
CipherSpecs and appropriate digital certificates. The IETF standards RFC 4492, RFC 5246 and RFC 6460
describe the detailed usage of Elliptic Curve CipherSpecs in TLS 1.2.
To view the digital signature algorithm and public key type for a digital certificate you can use the
runmqakm command:
runmqakm -cert -details -db key.kdb -pw password -label cert_label
where cert_label is the label of the certificate whose digital signature algorithm you need to display.
The execution of the runmqakm command will produce output displaying the Public Key Type:
Label : ibmwebspheremqexample
Key Size : 384
Version : X509 V3
Serial : 9ad5eeef5d756f41
Issuer : CN=Example Certificate Authority,OU=Test,O=Example,C=US
Subject : CN=Example Queue Manager,OU=Test,O=Example,C=US
Not Before : 21 August 2011 13:10:24 GMT+01:00
Not After : 21 August 2012 13:10:24 GMT+01:00
Public Key
30 76 30 10 06 07 2A 86 48 CE 3D 02 01 06 05 2B
81 04 00 22 03 62 00 04 3E 6F A9 06 B6 C3 A0 11
F8 D6 22 78 FE EF 0A FE 34 52 C0 8E AB 5E 81 73
D0 97 3B AB D6 80 08 E7 31 E9 18 3F 6B DE 06 A7
15 D6 9D 5B 6F 56 3B 7F 72 BB 6F 1E C9 45 1C 46
60 BE F2 DC 1B AD AC EC 64 4C 0E 06 65 6E ED 93
B8 F5 95 E0 F9 2A 05 D6 21 02 BD FB 06 63 A1 CC
66 C6 8A 0A 5C 3F F7 D3
Public Key Type : EC_ecPublicKey (1.2.840.10045.2.1)
Fingerprint : SHA1 :
3C 34 58 04 5B 63 5F 5C C9 7A E7 67 08 2B 84 43
3D 43 7A 79
Fingerprint : MD5 :
49 13 13 E1 B2 AC 18 9A 31 41 DC 8C B4 D6 06 68
Fingerprint : SHA256 :
6F 76 78 68 F3 70 F1 53 CE 39 31 D9 05 C5 C5 9F
Security
195
F2 B8 EE 21 49 16 1D 90 64 6D AC EB 0C
Signature Algorithm : EC_ecdsa_with_SHA384
Value
30 65 02 30 0A B0 2F 72 39 9E 24 5A 22
0D 0C 6D 6C 2F B3 E7 81 F6 C1 36 1B 9A
59 2A A1 4C 02 13 7E DD 06 D6 FE 4B E4
AC 49 54 1E 02 31 00 90 0E 46 2B 04 37
1B 9C 69 E5 99 60 84 84 10 71 1A DA 63
22 CC E6 1A 4E F4 61 CC 51 F9 EE A0 8E
0B B9 72 58 C3 C7 A4
Trust Status : Enabled
A7 74 17
(1.2.840.10045.4.3.3)
FE
B0
03
EE
88
F4
AC
6F
BC
2C
33
DC
95
07
B1
5F
E2
B5
The Public Key Type line in this case shows that the certificate has an Elliptic Curve public key. The
Signature Algorithm line in this case shows that the EC_ecdsa_with_SHA384 algorithm is in use: this is
based upon the ECDSA algorithm. This certificate is therefore only suitable for use with Type 1
CipherSpecs.
You can also use the iKeycmd (runmqckm) tool with the same parameters. Also the iKeyman (strmqikm)
GUI can be used to view digital signature algorithms if you open the key repository and double-click the
label of the certificate. However, you are advised to use the runmqakm tool to view digital certificates
because it supports a wider range of algorithms.
Elliptic Curve CipherSpecs and NSA Suite B
When WebSphere MQ is configured to conform to the Suite B compliant TLS 1.2 profile, the permitted
CipherSpecs and digital signature algorithms are restricted as described in NSA Suite B Cryptography in
WebSphere MQ on page 188. Additionally, the range of acceptable Elliptic Curve keys is reduced
according to the configured security levels.
At the 128-bit Suite B security level, the certificate subject's public key is required to use either the NIST
P-256 or NIST P-384 elliptic curve and to be signed with either the NIST P-256 elliptic curve or the NIST
P-384 elliptic curve. The runmqakm command can be used to request digital certificates for this security
level using a -sig_alg parameter of EC_ecdsa_with_SHA256, or EC_ecdsa_with_SHA384.
At the 192-bit Suite B security level, the certificate subject's public key is required to use the NIST P-384
elliptic curve and to be signed with the NIST P-384 elliptic curve. The runmqakm command can be used to
request digital certificates for this security level using a -sig_alg parameter of EC_ecdsa_with_SHA384.
The supported NIST elliptic curves are as follows:
Table 9. Supported NIST elliptic curves
NIST FIPS 186-3 curve name
P-256
secp256r1
256
P-384
secp384r1
384
P-521
secp521r1
521
Note: The NIST P-521 elliptic curve cannot be used for Suite B compliant operation.
196
Related concepts:
Specifying CipherSpecs on page 373
Specify a CipherSpec by using the SSLCIPH parameter in either the DEFINE CHANNEL MQSC command or
the ALTER CHANNEL MQSC command.
Specifying that only FIPS-certified CipherSpecs are used at run time on the MQI client on page 267
Create your key repositories using FIPS-compliant software, then specify that the channel must use
FIPS-certified CipherSpecs.
NSA Suite B Cryptography in WebSphere MQ on page 188
This topic provides information about how to configure WebSphere MQ on Windows, Linux, and UNIX
systems to conform to the Suite B compliant TLS 1.2 profile.
National Security Agency (NSA) Suite B Cryptography on page 177
The government of the Unites States of America produces technical advice on IT systems and security,
including data encryption. The US National Security Agency (NSA) recommends a set of interoperable
cryptographic algorithms in its Suite B standard.
v To block connections claiming to be from a certain queue manager unless the connection is from a
specific IP address.
Security
197
v To block connections presenting a certain SSL or TLS certificate unless the connection is from a specific
IP address.
These uses are explained further in the following sections.
You create, modify, or remove channel authentication records using the MQSC command SET CHLAUTH or
the PCF command Set Channel Authentication Record.
Blocking IP addresses
It is normally the role of a firewall to prevent access from certain IP addresses. However, there might be
occasions where you experience connection attempts from an IP address that should not have access to
your WebSphere MQ system and must temporarily block the address before the firewall can be updated.
These connection attempts might not even be coming from WebSphere MQ channels, but from other
socket applications that are misconfigured to target your WebSphere MQ listener. Block IP addresses by
setting a channel authentication record of type BLOCKADDR. You can specify one or more single
addresses, ranges of addresses, or patterns including wildcards.
Whenever an inbound connection is refused because the IP address is blocked in this manner, an event
message MQRC_CHANNEL_BLOCKED with reason qualifier MQRQ_CHANNEL_BLOCKED_ADDRESS
is issued, provided that channel events are enabled and the queue manager is running. Additionally, the
connection is held open for 30 seconds prior to returning the error to ensure the listener is not flooded
with repeated attempts to connect that are blocked.
To block IP addresses only on specific channels, or to avoid the delay before the error is reported, set a
channel authentication record of type ADDRESSMAP with the USERSRC(NOACCESS) parameter.
Whenever an inbound connection is refused for this reason, an event message
MQRC_CHANNEL_BLOCKED with reason qualifier MQRQ_CHANNEL_BLOCKED_NOACCESS is
issued, provided that channel events are enabled and the queue manager is running.
See Blocking specific IP addresses on page 338 for an example.
198
Security
199
200
Where a number of channel authentication records match a channel name, IP address, queue manager
name, or SSL or TLS DN, the most specific match is used. The match considered to be most specific is
determined as follows.
v For a channel name:
The most specific match is a name without wildcards, for example A.B.C.
The most generic match is a single asterisk (*), which matches all channel names.
A pattern with an asterisk in the left-most position is more generic than a pattern with a defined
value in the left-most position. Thus *.B.C is more generic than A.*.
A pattern with an asterisk in the second position is more generic than a pattern with a defined value
in the second position, and similarly for each subsequent position. Thus A.*.C is more generic than
A.B.*
Where two or more patterns have an asterisk in the same position, the one with fewer nodes
following the asterisk is more generic. Thus A.* is more generic than A.*.C
v For an IP address:
The most specific match is a name without wildcards, for example 192.0.2.6.
The most generic match is a single asterisk (*), which matches all channel names.
A pattern with an asterisk in the left-most position is more generic than a pattern with a defined
value in the left-most position. Thus *.0.2.6 is more generic than 192.*.
A pattern with an asterisk in the second position is more generic than a pattern with a defined value
in the second position, and similarly for each subsequent position. Thus 192.*.2.6 is more generic
than 192.0.*.
Where two or more patterns have an asterisk in the same position, the one with fewer nodes
following the asterisk is more generic. Thus 192.* is more generic than 192.*.2.*.
A range indicated with a hyphen (-), is more specific than an asterisk. Thus 192.0.2.0-24 is more
specific than 192.0.2.*.
A range that is a subset of another is more specific than the larger range. Thus 192.0.2.5-15 is more
specific than 192.0.2.0-24.
Overlapping ranges are not permitted. For example, you cannot have channel authentication records
for both 192.0.2.0-15 and 192.0.2.10-20.
A pattern cannot have fewer than the required number of parts, unless the pattern ends with a
single trailing asterisk. For example 192.0.2 is invalid, but 192.0.2.* is valid.
A trailing asterisk must be separated from the rest of the address by the appropriate part separator
(a dot (.) for IPv4, a colon (:) for IPv6). For example, 192.0* is not valid because the asterisk is not in
a part of its own.
A pattern may contain additional asterisks provided that no asterisk is adjacent to the trailing
asterisk. For example, 192.*.2.* is valid, but 192.0.*.* is not valid.
A IPv6 address pattern cannot contain a double colon and a trailing asterisk, because the resulting
address would be ambiguous. For example, 2001::* could expand to 2001:0000:*, 2001:0000:0000:* and
so on
v For a queue manager name:
The most specific match is a name without wildcards, for example 192.0.2.6.
The most generic match is a single asterisk (*), which matches all channel names.
A pattern with an asterisk in the left-most position is more generic than a pattern with a defined
value in the left-most position. Thus *QUEUEMANAGER is more generic than QUEUEMANAGER*.
A pattern with an asterisk in the second position is more generic than a pattern with a defined value
in the second position, and similarly for each subsequent position. Thus Q*MANAGER is more
generic than QUEUE*.
Where two or more patterns have an asterisk in the same position, the one with fewer characters
following the asterisk is more generic. Thus Q* is more generic than Q*MGR.
Security
201
v For an SSL or TLS Distinguished Name (DN), the precedence order of substrings is as follows:
Table 10. Precedence order of substrings
Order
DN substring
Name
SERIALNUMBER=
MAIL=
Email address
E=
UID=, USERID=
User identifier
CN=
Common name
T=
Title
OU=
Organizational unit
DC=
Domain component
O=
Organization
10
STREET=
11
L=
Locality
12
ST=, SP=, S=
13
PC=
14
C=
Country
15
UNSTRUCTUREDNAME=
Host name
16
UNSTRUCTUREDADDRESS=
IP address
17
DNQ=
Thus, if an SSL or TLS certificate is presented with a DN containing the substrings O=IBM and C=UK,
WebSphere MQ uses a channel authentication record for O=IBM in preference to one for C=UK, if both
are present.
A DN can contain multiple OUs, which must be specified in hierarchical order with the large
organizational units specified first. If two DNs are equal in all respects except for their OU values, the
more specific DN is determined as follows:
1. If they have different numbers of OU attributes then the DN with the most OU values is more
specific. This is because the DN with more Organizational Units fully qualifies the DN in more
detail and provides more matching criteria. Even if its top-level OU is a wildcard (OU=*), the DN
with more OUs is still regarded as more specific overall.
2. If they have the same number of OU attributes then the corresponding pairs of OU values are
compared in sequence left-to-right, where the left-most OU is the highest-level (least specific),
according to the following rules.
a. An OU with no wildcard values is the most specific because it can only match exactly one
string.
b. An OU with a single wildcard at either the beginning or end (for example, OU=ABC* or
OU=*ABC) is next most specific.
c. An OU with two wildcards for example, OU=*ABC*) is next most specific.
d. An OU consisting only of an asterisk (OU=*) is the least specific.
3. If the string comparison is tied between two attribute values of the same specificity then whichever
attribute string is longer is more specific.
4. If the string comparison is tied between two attribute values of the same specificity and length then
the result is determined by a case-insensitive string comparison of the portion of the DN excluding
any wildcards.
202
If two DNs are equal in all respects except for their DC values, the same matching rules apply as for
OUs except that in DC values the left-most DC is the lowest-level (most specific) and the comparison
ordering differs accordingly.
Security
203
Channel security
The user IDs associated with message channel agents (MCAs) need authority to access various
WebSphere MQ resources. For example, an MCA must be able to connect to a queue manager. If it is a
sending MCA, it must be able to open the transmission queue for the channel. If it is a receiving MCA, it
must be able to open destination queues. The user IDs associated with applications which need to
administer channels, channel initiators, and listeners need authority to use the relevant PCF commands.
However, most applications do not need such access.
For more information, see Channel security on page 228.
Additional considerations
You need to consider the following aspects of security only if you are using certain WebSphere MQ
function or base product extensions:
v Security for queue manager clusters on page 236
v Security for WebSphere MQ Publish/Subscribe on page 237
v Security for WebSphere MQ internet pass-thru on page 239
204
WebSphere MQ
MQI client
MCA
Security
WebSphere MQ
server
Comms
level
Comms
level
MCA
Security
Security
Security
1
2
Identification:
USER_ID
Server machine
Client machine
1. Communications level
See arrow 1. To implement security at the communications level, use SSL or TLS. For more
information, see Cryptographic security protocols: SSL and TLS on page 171
2. Channel authentication records
See arrows 2 & 3. Authentication can be controlled by using the IP address or SSL/TLS distinguished
names at the security level. A user ID can also be blocked or an asserted user ID can be mapped to a
valid user ID. A full description is given in Channel authentication records on page 197.
3. Channel security exits
See arrow 2. The channel security exits for client to server communication can work in the same way
as for server to server communication. A protocol independent pair of exits can be written to provide
mutual authentication of both the client and the server. A full description is given in Channel security
exit programs.
4. Identification that is passed to a channel security exit
See arrow 3. In client to server communication, the channel security exits do not have to operate as a
pair. The exit on the WebSphere MQ client side can be omitted. In this case, the user ID is placed in
the channel descriptor (MQCD) and the server-side security exit can alter it, if required.
Windows clients also send extra information to assist identification.
v The user ID that is passed to the server is the currently logged-on user ID on the client.
v The security ID of the currently logged-on user.
To assist identification on WebSphere MQ client for HP Integrity NonStop Server, the client passes the
OSS Safeguard alias under which the client application is running. This ID is typically of the form
<PRIMARYGROUP>.<ALIAS>. If required, you can map this user ID to an alternative user ID on the queue
manager by using either channel authentication records or a security exit. For more information about
Security
205
message exits, see Identity mapping in message exits on page 304. For more information about
defining channel authentication records, see Mapping a client asserted user ID to an MCAUSER user
ID on page 340.
The values of the user ID and, if available, the security ID, can be used by the server security exit to
establish the identity of the WebSphere MQ MQI client.
User IDs:
If the WebSphere MQ MQI client is on Windows and the WebSphere MQ server is also on Windows and
has access to the domain on which the client user ID is defined, WebSphere MQ supports user IDs of up
to 20 characters. On UNIX and Linux platforms and configurations, the maximum length is 12 characters.
A WebSphere MQ for Windows server does not support the connection of a Windows client if the client
is running under a user ID that contains the @ character, for example, abc@d. The return code to the
MQCONN call at the client is MQRC_NOT_AUTHORIZED.
However, you can specify the user ID using two @ characters, for example, abc@@d. Using the id@domain
format is the preferred practice, to ensure that the user ID is resolved in the correct domain consistently;
thus abc@@d@domain.
Note that UNKNOWN is a reserved user ID and the NOBODY user ID also have special meanings to WebSphere
MQ. Creating user IDs in the operating system called UNKNOWN or NOBODY could have unintended results.
Although user IDs are used to authenticate, groups are used for authorization, except for Windows.
If you create service accounts, without paying attention to groups, and authorize all the user IDs
differently, every user can access the information of every other user.
Planning authorization
Plan the users who will have administrative authority and plan how to authorize users of applications to
appropriately use WebSphere MQ objects, including those connecting from a WebSphere MQ MQI client.
Individuals or applications must be granted access in order to use WebSphere MQ. What access they
require depend on the roles they undertake and the tasks which they need to perform. Authorization in
WebSphere MQ can be subdivided into two main categories:
v Authorization to perform administrative operations
v Authorization for applications to use WebSphere MQ
Both classes of operation are controlled by the same component and an individual can be granted
authority to perform both categories of operation.
The following topics give further information about specific areas of authorization that you must
consider:
206
Queue managers
Queues
Processes
Namelists
Topics
Applications can also use PCF commands to administer WebSphere MQ objects. When the PCF command
is processed, it uses the authority context of the user ID that put the PCF message.
Security
207
Applications, in this context, include those written by users and vendors, and those supplied with
WebSphere MQ for z/OS. The applications supplied with WebSphere MQ for z/OS include:
v The operations and control panels
v The WebSphere MQ utility program, CSQUTIL
v The dead letter queue handler utility, CSQUDLQH
Applications that use WebSphere MQ classes for Java, WebSphere MQ classes for JMS, WebSphere MQ
classes for .NET, or the Message Service Clients for C/C++ and .NET use the MQI indirectly.
MCAs also issue MQI calls and the user IDs associated with the MCAs need authority to access these
WebSphere MQ objects. For more information about these user IDs and the authorities they require, see
Channel security on page 228.
On z/OS, applications can also use MQSC commands to access these WebSphere MQ objects but
command security and command resource security provide the authority checks in these circumstances.
On IBM i, a user that issues a CL command in Group 2 might require authority to access a WebSphere
MQ object associated with the command. For more information, see When authority checks are
performed.
When authority checks are performed:
Authority checks are performed when an application attempts to access a queue manager, queue, process,
or namelist.
On IBM i, authority checks might also be performed when a user issues a CL command in Group 2 that
accesses any of these WebSphere MQ objects. The checks are performed in the following circumstances:
When an application connects to a queue manager using an MQCONN or MQCONNX call
The queue manager asks the operating system for the user ID associated with the application.
The queue manager then checks that the user ID is authorized to connect to it and retains the
user ID for future checks.
Users do not have to sign on to WebSphere MQ. WebSphere MQ assumes that users are signed
on to the underlying operating system and are been authenticated by it.
When an application opens a WebSphere MQ object using an MQOPEN or MQPUT1 call
All authority checks are performed when an object is opened, not when it is accessed later. For
example, authority checks are performed when an application opens a queue. They are not
performed when the application puts messages on the queue or gets messages from the queue.
When an application opens an object, it specifies the types of operation it needs to perform on
the object. For example, an application might open a queue to browse the messages on it, get
messages from it, but not to put messages on it. For each type of operation, the queue manager
checks that the user ID associated with the application has the authority to perform that
operation.
When an application opens a queue, the authority checks are performed against the object named
in the ObjectName field of the object descriptor. The ObjectName field is used on the MQOPEN or
MQPUT1 calls. If the object is an alias queue or a remote queue definition, the authority checks
are performed against the object itself. They are not performed on the queue to which the alias
queue or the remote queue definition resolves. This means that the user does not need permission
to access it. Limit the authority to create queues to privileged users. If you do not, users might
bypass the normal access control simply by creating an alias.
An application can reference a remote queue explicitly. It sets the ObjectName and ObjectQMgrName
fields in the object descriptor to the names of the remote queue and the remote queue manager.
The authority checks are performed against the transmission queue with the same name as the
208
remote queue manager. Onz/OS, a check is made on the RACF queue profile that matches the
remote queue manager name. On platforms other than z/OS, a check is made against the
RQMNAME profile that matches the remote queue manager name, if clustering is being used. An
application can reference a cluster queue explicitly by setting the ObjectName field in the object
descriptor to the name of the cluster queue. The authority checks are performed against the
cluster transmission queue, SYSTEM.CLUSTER.TRANSMIT.QUEUE.
The authority to a dynamic queue is based on the model queue from which it is derived, but is
not necessarily the same; see note 1.
The user ID that the queue manager uses for the authority checks is obtained from the operating
system. The user ID is obtained when the application connects to the queue manager. A suitably
authorized application can issue an MQOPEN call specifying an alternative user ID; access
control checks are then made on the alternative user ID. Using an alternate user ID does not
change the user ID associated with the application, only the one used for access control checks.
When an application subscribes to a topic using an MQSUB call
When an application subscribes to a topic, it specifies the type of operation that it needs to
perform. It is either creating a subscription, altering an existing subscription, or resuming an
existing subscription without changing it. For each type of operation, the queue manager checks
that the user ID that is associated with the application has the authority to perform the operation.
When an application subscribes to a topic, the authority checks are performed against topic
objects that are found in the topic tree. The topic objects are at, or above, the point in the topic
tree at which the application subscribed. The authority checks might involve checks on more than
one topic object. The user ID that the queue manager uses for the authority checks is obtained
from the operating system. The user ID is obtained when the application connects to the queue
manager.
The queue manager performs authority checks on subscriber queues but not on managed queues.
When an application deletes a permanent dynamic queue using an MQCLOSE call
The object handle specified on the MQCLOSE call is not necessarily the same one returned by the
MQOPEN call that created the permanent dynamic queue. If it is different, the queue manager
checks the user ID associated with the application that issued the MQCLOSE call. It checks that
the user ID is authorized to delete the queue.
When an application that closes a subscription to remove it did not create it, the appropriate
authority is required to remove it.
When a PCF command that operates on a WebSphere MQ object is processed by the command server
This rule includes the case where a PCF command operates on an authentication information
object.
The user ID that is used for the authority checks is the one found in the UserIdentifier field in
the message descriptor of the PCF command. This user ID must have the required authorities on
the queue manager where the command is processed. The equivalent MQSC command
encapsulated within an Escape PCF command is treated in the same way. For more information
about the UserIdentifier field, and how it is set, see Message context on page 210.
Security
209
210
fields, or to set all the context fields, the application can set this field to any value related
to identity. If the queue manager sets this field, it is set to blank.
Origin context
PutApplType
The type of the application that put the message; a CICS transaction, for example.
PutApplName
The name of the application that put the message.
PutDate
The date when the message was put.
PutTime
The time when the message was put.
ApplOriginData
If the user ID associated with an application has authority to set all the context fields, the
application can set this field to any value related to origin. If the queue manager sets this
field, it is set to blank.
User context
The following values are supported for MQINQMP or MQSETMP:
MQPD_USER _CONTEXT
The property is associated with the user context.
No special authorization is required to be able to set a property associated with the user
context using the MQSETMP call.
On a V7.0 or subsequent queue manager, a property associated with the user context is
saved as described for MQOO_SAVE_ALL_CONTEXT. An MQPUT with
MQOO_PASS_ALL_CONTEXT specified causes the property to be copied from the saved
context into the new message.
MQPD_NO_CONTEXT
The property is not associated with a message context.
An unrecognized value is rejected with MQRC_PD_ERROR. The initial value of this field is
MQPD_NO_CONTEXT.
For a detailed description of each of the context fields, see MQMD - Message descriptor. For more
information about how to use message context, see Message context.
Authority to work with WebSphere MQ objects on UNIX, Linux and Windows systems:
The authorization service component provided with WebSphere MQ is called the object authority manager
(OAM). It provides access control via authentication and authorization checks.
1. Authentication.
The authentication check performed by the OAM provided with WebSphere MQ is basic, and is only
performed in specific circumstances. It is not intended to meet the strict requirements expected in a
highly secure environment.
The OAM performs its authentication check when an application connects to a queue manager, and
the following conditions are true.
If an MQCSP structure has been supplied by the connecting application, and the AuthenticationType
attribute in the MQCSP structure is given the value MQCSP_AUTH_USER_ID_AND_PWD, then the
check is performed by the OAM in its MQZID_AUTHENTICATE_USER function. This is the check:
Security
211
the user ID in the MQCSP structure is compared against the user ID in the IdentityContext (MQZIC),
to determine whether they match. If they do not match, the check fails.
This basic check is not intended to be a full authentication of the user. For example, there is no check
of the authenticity of the user by checking the password supplied in the MQCSP structure. Also, if the
application omits an MQCSP structure, then no check is performed.
If fuller authentication services are required in the queue manager via the authorization service
component, then the OAM provided with WebSphere MQ does not offer this. You must write a new
authorization service component, or obtain one from a vendor.
2. Authorization.
The authorization checks are comprehensive, and are intended to meet most normal requirements.
Authorization checks are performed when an application issues an MQI call to access a queue
manager, queue, process, topic, or namelist. They are also performed at other times, for example,
when a command is being performed by the Command Server.
On UNIX, Linux and Windows systems, the authorization service provides the access control when an
application issues an MQI call to access a WebSphere MQ object that is a queue manager, queue, process,
topic, or namelist. This includes checks for alternative user authority and the authority to set or pass
context information.
On Windows, the OAM gives members of the Administrators group the authority to access all WebSphere
MQ objects, even when UAC is enabled.
Additionally, on Windows systems, the SYSTEM account has full access to WebSphere MQ resources.
The authorization service also provides authority checks when a PCF command operates on one of these
WebSphere MQ objects or an authentication information object. The equivalent MQSC command
encapsulated within an Escape PCF command is treated in the same way.
The authorization service is an installable service, which means that it is implemented by one or more
installable service components. Each component is invoked using a documented interface. This enables users
and vendors to provide components to augment or replace those provided by the WebSphere MQ
products.
The authorization service component provided with WebSphere MQ is called the object authority manager
(OAM). The OAM is automatically enabled for each queue manager you create.
The OAM maintains an access control list (ACL) for each WebSphere MQ object it is controlling access to.
On UNIX and Linux systems, only group IDs can appear in an ACL. This means that all members of a
group have the same authorities. On Windows systems, both user IDs and group IDs can appear in an
ACL. This means that authorities can be granted to individual users and groups.
A 12 character limitation applies to both the group and the user ID. UNIX platforms generally restrict the
length of a user ID to 12 characters. AIX and Linux have raised this limit but WebSphere MQ continues
to observe a 12 character restriction on all UNIX platforms. If you use a user ID of greater than 12
characters, WebSphere MQ replaces it with the value UNKNOWN. Do not define a user ID with a
value of UNKNOWN.
The OAM can authenticate a user and change appropriate identity context fields. You enable this by
specifying a connection security parameters structure (MQCSP) on an MQCONNX call. The structure is
passed to the OAM Authenticate User function (MQZ_AUTHENTICATE_USER), which sets appropriate
identity context fields. If an MQCONNX connection from a WebSphere MQ client, the information in the
MQCSP is flowed to the queue manager to which the client is connecting over the client-connection and
server-connection channel. If security exits are defined on that channel, the MQCSP is passed into each
security exit and can be altered by the exit. Security exits can also create the MQCSP. For more details of
the use of security exits in this context, see Channel security exit programs.
212
On UNIX, Linux and Windows systems, the control command setmqaut grants and revokes authorities
and is used to maintain the ACLs. For example, the command:
setmqaut -m JUPITER -t queue -n MOON.EUROPA -g VOYAGER +browse +get
allows the members of the group VOYAGER to browse messages on the queue MOON.EUROPA that is
owned by the queue manager JUPITER. It allows the members to get messages from the queue as well.
To revoke these authorities later, enter the following command:
setmqaut -m JUPITER -t queue -n MOON.EUROPA -g VOYAGER -browse -get
The command:
setmqaut -m JUPITER -t queue -n MOON.* -g VOYAGER +put
allows the members of the group VOYAGER to put messages on any queue with a name that commences
with the characters MOON. . MOON.* is the name of a generic profile. A generic profile allows you to grant
authorities for a set of objects using a single setmqaut command.
The control command dspmqaut is available to display the current authorities that a user or group has for
a specified object. The control command dmpmqaut is also available to display the current authorities
associated with generic profiles.
If you do not want any authority checks, for example, in a test environment, you can disable the OAM.
Using PCF to access OAM commands:
On UNIX, Linux and Windows systems, you can use PCF commands to access OAM administration
commands.
The PCF commands and their equivalent OAM commands are as follows:
Table 11. PCF commands and their equivalent OAM commands
PCF command
OAM command
dmpmqaut
dspmqaut
setmqaut
The setmqaut and dmpmqaut commands are restricted to members of the mqm group. The equivalent PCF
commands can be executed by users in any group who have been granted dsp and chg authorities on the
queue manager.
For more information about using these commands, see Introduction to Programmable Command
Formats.
213
The message channel agent at a remote site must check that the message being delivered originated from
a user with authority to do so at this remote site. In addition, as MCAs can be started remotely, it might
be necessary to verify that the remote processes trying to start your MCAs are authorized to do so. There
are four possible ways for you to deal with this:
1. Make appropriate use of the PutAuthority attribute of your RCVR, RQSTR, or CLUSRCVR channel
definition to control which user is used for authorization checks at the time incoming messages are
put to your queues. See the DEFINE CHANNEL command description in the MQSC Command
Reference.
2. Implement channel authentication records to reject unwanted connection attempts, or to set an
MCAUSER value based on the following: the remote IP address, the remote user ID, the SSL or TLS
Subject Distinguished Name (DN) provided, or the remote queue manager name.
3. Implement user exit security checking to ensure that the corresponding message channel is authorized.
The security of the installation hosting the corresponding channel ensures that all users are properly
authorized, so that you do not need to check individual messages.
4. Implement user exit message processing to ensure that individual messages are vetted for
authorization.
Security of objects on UNIX and Linux systems:
Administration users must be part of the mqm group on your system (including root) if this ID is going
to use WebSphere MQ administration commands.
You should always run amqcrsta as the "mqm" user ID.
User IDs on UNIX and Linux systems
The queue manager converts all uppercase or mixed case user identifiers into lowercase. The queue
manager then inserts the user identifiers into the context part of a message, or checks their authorization.
Authorizations are therefore based only on lowercase identifiers.
Security of objects on Windows systems:
Administration users must be part of both the mqm group and the administrators group on Windows
systems if this ID is going to use WebSphere MQ administration commands.
User IDs on Windows systems
On Windows systems, if there is no message exit installed, the queue manager converts any uppercase or
mixed case user identifiers into lowercase. The queue manager then inserts the user identifiers into the
context part of a message, or checks their authorization. Authorizations are therefore based only on
lowercase identifiers.
User IDs across systems:
Platforms other than Windows, UNIX and Linux systems use uppercase characters for user IDs in
messages.
To allow Windows, UNIX and Linux systems to use lowercase user IDs in messages, the following
conversions are carried out by the message channel agent (MCA) on these platforms:
At the sending end
The alphabetic characters in all user IDs are converted to uppercase characters, if there is no
message exit installed.
214
When used
The user ID that is defined in the MCAUSER attribute in the Used unless over-ridden by a security exit or a
SVRCONN channel definition
CHLAUTH rule.
The user ID that is flowed from the client machine
Because the server-connection MCA makes MQI calls on behalf of remote users, it is important to
consider the security implications of the server-connection MCA issuing MQI calls on behalf of remote
clients and how to administer the access of a potentially large number of users.
v One approach is for the server-connection MCA to issue MQI calls on its own authority. But beware, it
is normally undesirable for the server-connection MCA, with its powerful access capabilities, to issue
MQI calls on behalf of client users.
v Another approach is to use the user ID that flows from the client. The server-connection MCA can
issue MQI calls using the access capabilities of the client user ID. This approach presents a number of
questions to consider:
Security
215
1. There are different formats for the user ID on different platforms. This sometimes causes problems
if the format of the user ID on the client differs from the acceptable formats on the server.
2. There are potentially many clients, with different, and changing user IDs. The IDs need to be
defined and managed on the server.
3. Is the user ID to be trusted? Any user ID can be flowed from a client, not necessarily the ID of the
logged on user. For example, the client might flow an ID with full mqm authority that was
intentionally only defined on the server for security reasons.
v The preferred approach is to define client identification tokens at the server, and so limit the
capabilities of client connected applications. This is typically done by setting the server-connection
channel property MCAUSER to a special user ID value to be used by clients, and defining few IDs for
use by clients with different level of authorization on the server.
server-connection channel MCAUSER attribute is set to nonblank, the MCAUSER value is used.
server-connection channel MCAUSER attribute is blank, the user ID received from the client is
server-connection channel MCAUSER attribute is blank, and no user ID is received from the
then the user ID that started the server-connection channel is used.
Ensure that the MCAUSER field is restricted to 12 characters on Windows platforms because any extra
characters will be truncated which might lead to authorization failures.
216
Planning confidentiality
Plan how to keep your data confidential.
You can implement confidentiality at the application level or at link level. You might choose to use SSL or
TLS, in which case you must plan your usage of digital certificates. You can also use channel exit
programs if standard facilities do not satisfy your requirements.
Related concepts:
Comparing link level security and application level security
This topic contains information about various aspects of link level security and application level security,
and compares the two levels of security.
Channel exit programs on page 223
Channel exit programs are programs that are called at defined places in the processing sequence of an
MCA. Users and vendors can write their own channel exit programs. Some are supplied by IBM.
Protecting channels with SSL on page 229
SSL support in WebSphere MQ uses the queue manager authentication information object, and various
MQSC commands. You must also consider your use of digital certificates.
Security
217
Node
Security
services
Node
Security
services
Security
services
Queue manager
Security
services
Queue manager
Message
channel
Application
MCA
Comms
stack
Comms
stack
Application
MCA
Link
level
Destination
queues
Transmission
queue
Application
level
Figure 52. Link level security and application level security
Differences in cost
Application level security might cost more than link level security in terms of administration and
performance.
The cost of administration is likely to be greater because there are potentially more constraints to
configure and maintain. For example, you might need to ensure that a particular user sends only certain
types of message and sends messages only to certain destinations. Conversely, you might need to ensure
218
that a particular user receives only certain types of message and receives messages only from certain
sources. Instead of managing the link level security services on a single message channel, you might need
to be configuring and maintaining rules for every pair of users who exchange messages across that
channel.
There might be an effect on performance if security services are invoked every time an application puts
or gets a message.
Organizations tend to consider link level security first because it might be easier to implement. They
consider application level security if they discover that link level security does not satisfy all their
requirements.
Availability of components
Generally, in a distributed environment, a security service requires a component on at least two systems.
For example, a message might be encrypted on one system and decrypted on another. This applies to
both link level security and application level security.
In a heterogeneous environment, with different platforms in use, each with different levels of security
function, the required components of a security service might not be available for every platform on
which they are needed and in a form that is easy to use. This is probably more of an issue for application
level security than for link level security, particularly if you intend to provide your own application level
security by buying in components from various sources.
Security
219
220
221
222
Security
223
Queue manager
Queue manager
Message channel
MCA
Security
MCA
Security messages
Security
Message
Message
Send
Receive
Transmission
queue
Destination
queues
Figure 53. Security, message, send, and receive exits on a message channel
Related information:
Channel-exit programs for messaging channels
Security exit overview:
Security exits normally work in pairs. They are called before messages flow and their purpose is to allow
an MCA to authenticate its partner.
Security exits normally work in pairs; one at each end of a channel. They are called immediately after the
initial data negotiation has completed on channel startup, but before any messages start to flow. The
primary purpose of the security exit is to enable the MCA at each end of a channel to authenticate its
partner. However, there is nothing to prevent a security exit from performing other function, even
function that has nothing to do with security.
Security exits can communicate with each other by sending security messages. The format of a security
message is not defined and is determined by the user. One possible outcome of the exchange of security
messages is that one of the security exits might decide not to proceed any further. In that case, the
channel is closed and messages do not flow. If there is a security exit at only one end of a channel, the
exit is still called and can elect whether to continue or to close the channel.
Security exits can be called on both message and MQI channels. The name of a security exit is specified
as a parameter in the channel definition at each end of a channel.
For more information about security exits, see Link level security using a security exit on page 220.
Message exit:
Message exits operate only on message channels and normally work in pairs. A message exit can operate
on the whole message and make various changes to it.
Message exits at the sending and receiving ends of a channel normally work in pairs. A message exit at
the sending end of a channel is called after the MCA has got a message from the transmission queue. At
the receiving end of a channel, a message exit is called before the MCA puts a message on its destination
queue.
224
A message exit has access to both the transmission queue header, MQXQH, which includes the embedded
message descriptor, and the application data in a message. A message exit can modify the contents of the
message and change its length. A change of length might be the result of compressing, decompressing,
encrypting, or decrypting the message. It might also be the result of adding data to the message, or
removing data from it.
Message exits can be used for any purpose that requires access to the whole message, rather than a
portion of it, and not necessarily for security.
A message exit can determine that the message it is currently processing should not proceed any further
towards its destination. The MCA then puts the message on the dead letter queue. A message exit can
also close the channel.
Message exits can be called only on message channels, not on MQI channels. This is because the purpose
of an MQI channel is to enable the input and output parameters of MQI calls to flow between the
WebSphere MQ MQI client application and the queue manager.
The name of a message exit is specified as a parameter in the channel definition at each end of a channel.
You can also specify a list of message exits to be run in succession.
For more information about message exits, see Link level security using a message exit on page 221.
Send and receive exits:
Send and receive exits typically work in pairs. They operate on transmission segments and are best used
where the structure of the data they are processing is not relevant.
A send exit at one end of a channel and a receive exit at the other end normally work in pairs. A send exit
is called just before an MCA issues a communications send to send data over a communications
connection. A receive exit is called just after an MCA has regained control following a communications
receive and has received data from a communications connection. If sharing conversations is in use, over
an MQI channel, a different instance of a send and receive exit is called for each conversation.
The WebSphere MQ channel protocol flows between two MCAs on a message channel contain control
information as well as message data. Similarly, on an MQI channel, the flows contain control information
as well as the parameters of MQI calls. Send and receive exits are called for all types of data.
Message data flows in only one direction on a message channel but, on an MQI channel, the input
parameters of an MQI call flow in one direction and the output parameters flow in the other. On both
message and MQI channels, control information flows in both directions. As a result, send and receive
exits can be called at both ends of a channel.
The unit of data that is transmitted in a single flow between two MCAs is called a transmission segment.
Send and receive exits have access to each transmission segment. They can modify its contents and
change its length. A send exit, however, must not change the first 8 bytes of a transmission segment.
These 8 bytes form part of the WebSphere MQ channel protocol header. There are also restrictions on
how much a send exit can increase the length of a transmission segment. In particular, a send exit cannot
increase its length beyond the maximum that was negotiated between the two MCAs at channel startup.
On a message channel, if a message is too large to be sent in a single transmission segment, the sending
MCA splits the message and sends it in more than one transmission segment. As a consequence, a send
exit is called for each transmission segment containing a portion of the message and, at the receiving end,
a receive exit is called for each transmission segment. The receiving MCA reconstitutes the message from
the transmission segments after they have been processed by the receive exit.
Security
225
Similarly, on an MQI channel, the input or output parameters of an MQI call are sent in more than one
transmission segment if they are too large. This might occur, for example, on an MQPUT, MQPUT1, or
MQGET call if the application data is sufficiently large.
Taking these considerations into account, it is more appropriate to use send and receive exits for purposes
in which they do not need to understand the structure of the data they are handling and can therefore
treat each transmission segment as a binary object.
A send or a receive exit can close a channel.
The names of a send exit and a receive exit are specified as parameters in the channel definition at each
end of a channel. You can also specify a list of send exits to be run in succession. Similarly, you can
specify a list of receive exits.
For more information about send and receive exits, see Link level security using send and receive exits
on page 221.
Planning auditing
Decide what data you need to audit, and how you will capture and process audit information. Consider
how to check that your system is correctly configured.
There are several aspects to activity monitoring. The aspects you must consider are often defined by
auditor requirements, and these requirements are often driven by regulatory standards such as HIPAA
(Health Insurance Portability and Accountability Act) or SOX (Sarbanes-Oxley). WebSphere MQ provides
features intended to help with compliance to such standards.
Consider whether you are interested only in exceptions or whether you are interested in all system
behavior.
226
Some aspects of auditing can also be considered as operational monitoring; one distinction for auditing is
that you are often looking at historic data, not just looking at real-time alerts. Monitoring is covered in
the section Monitoring and performance.
Security
227
Channel security
When you send or receive a message through a channel, you need a user ID that has access to various
WebSphere MQ resources.
To receive messages, you can use either the user ID associated with the message channel agent (MCA), or
the user ID associated with the message. Map the asserted user ID to a valid user ID by using channel
authentication records. In WebSphere MQ, channels are also protected by SSL and TLS support
MCAs are WebSphere MQ applications that require access to various WebSphere MQ resources. The user
IDs associated with sending and receiving channels require access to the following resources:
v The user ID associated with a sending channel requires access to the queue manager, the transmission
queue, the dead-letter queue, and access to any resources that are required by channel exits.
v With the user ID associated with the receiving channel you can open the target queues to put messages
onto the queues. This involves the Message Queuing Interface (MQI), so access control checks might
need to be made. You can specify whether these checks are made against the user ID associated with
the MCA (as described in this topic), or against the user ID associated with the message (from the
MQMD context field).
For the channel types to which it applies, the PUTAUT parameter of a channel definition specifies which
user ID is used for these checks.
If you use the default user ID, this user ID will already be defined on the local system.
If you use a user ID that is not a part of the mqm group in the MCAUSER field of a receiver channel,
then you must specify the +dsp +ctrlx authority to the user ID for the channel to work, by using
the setmqaut command. The MCAUSER attribute is unused for the SDR channel type.
If you use the user ID associated with the message, it is likely that the user ID is from a remote
system.
This remote system user ID must be recognized by the target system and have the following
attributes:
- the authority to connect to the queue manager
- the authority to set context options (+connect and +setall )
- the ability to make inquiries
- the ability to set attributes on the transmission queue (+inq and +set)
The user ID associated with the MCA depends on the type of MCA. There are two types of MCA:
Caller MCA
MCAs that initiate a channel. Caller MCAs can be started as individual processes, as threads of
the channel initiator, or as threads of a process pool. The user ID used is the user ID associated
with the parent process (the channel initiator), or the user ID associated with the process that
starts the MCA.
Responder MCA
Responder MCAs are MCAs that are started as a result of a request by a caller MCA. Responder
MCAs can be started as individual processes, as threads of the listener, or as threads of a process
pool. The user ID can be any one of the following types (in this order of preference):
1. On APPC, the caller MCA can indicate the user ID to be used for the responder MCA. This is
called the network user ID and applies only to channels started as individual processes. Set
the network user ID by using the USERID parameter of the channel definition.
228
2. If the USERID parameter is not used, the channel definition of the responder MCA can specify
the user ID that the MCA must use. Set the user ID by using the MCAUSER parameter of the
channel definition.
3. If the user ID has not been set by either of the previous (two) methods, the user ID of the
process that starts the MCA or the user ID of the parent process (the listener) is used.
Related information:
Channel authentication records
Protecting channel initiator definitions:
Only members of the mqm group can manipulate channel initiators.
WebSphere MQ channel initiators are not WebSphere MQ objects; access to them is not controlled by the
OAM. WebSphere MQ does not allow users or applications to manipulate these objects, unless their user
ID is a member of the mqm group. If you have an application that issues the PCF command
StartChannelInitiator, the user ID specified in the message descriptor of the PCF message must be a
member of the mqm group on the target queue manager.
A user ID must also be a member of the mqm group on the target machine to issue the equivalent MQSC
commands through the Escape PCF command or using runmqsc in indirect mode.
Transmission queues:
Queue managers automatically put remote messages on a transmission queue; no special authority is
required for this.
However, if you need to put a message directly on a transmission queue, this requires special
authorization; see Table 15 on page 249.
Channel exits:
If channel authentication records are not suitable, you can use channel exits for added security. A security
exit forms a secure connection between two security exit programs. One program is for the sending
message channel agent (MCA), and one is for the receiving MCA.
See Channel exit programs on page 223 for more information about channel exits.
Protecting channels with SSL:
SSL support in WebSphere MQ uses the queue manager authentication information object, and various
MQSC commands. You must also consider your use of digital certificates.
Commands and attributes for SSL support
The Secure Sockets Layer (SSL) protocol provides channel security, with protection against
eavesdropping, tampering, and impersonation. WebSphere MQ support for SSL enables you to specify, on
the channel definition, that a particular channel uses SSL security. You can also specify details of the type
of security you want, such as the encryption algorithm you want to use.
The following MQSC commands support SSL:
ALTER AUTHINFO
Modifies the attributes of an authentication information object.
DEFINE AUTHINFO
Creates an authentication information object.
Security
229
DELETE AUTHINFO
Deletes an authentication information object.
DISPLAY AUTHINFO
Displays the attributes for a specific authentication information object.
The following queue manager parameters support SSL:
SSLCRLNL
The SSLCRLNL attribute specifies a namelist of authentication information objects which are used
to provide certificate revocation locations to allow enhanced TLS/SSL certificate checking.
SSLCRYP
On Windows, UNIX and Linux systems, sets the SSLCryptoHardware queue manager attribute.
This attribute is the name of the parameter string that you can use to configure the cryptographic
hardware you have on your system.
SSLEV
Determines whether an SSL event message is reported if a channel using SSL fails to establish an
SSL connection.
SSLFIPS
Specifies whether only FIPS-certified algorithms are to be used if cryptography is carried out in
WebSphere MQ, rather than in cryptographic hardware. If cryptographic hardware is configured,
the cryptographic modules provided by the hardware product are used, and these might be
FIPS-certified to a particular level. This depends on the hardware product in use.
SSLKEYR
On Windows,UNIX and Linux systems, associates a key repository with a queue manager. The
key database is held in a GSKit key database. (The IBM Global Security Kit (GSKit) enables you
to use SSL security on Windows,UNIX and Linux systems.)
SSLRKEYC
The number of bytes to be sent and received within an SSL conversation before the secret key is
renegotiated. The number of bytes includes control information sent by the MCA.
The following channel parameters support SSL:
SSLCAUTH
Defines whether WebSphere MQ requires and validates a certificate from the SSL client.
SSLCIPH
Specifies the encryption strength and function (CipherSpec), for example NULL_MD5 or
RC4_MD5_US. The CipherSpec must match at both ends of channel.
SSLPEER
Specifies the distinguished name (unique identifier) of allowed partners.
This section describes the setmqaut, dspmqaut, dmpmqaut, rcrmqobj, rcdmqimg, and dspmqfls
commands to support the authentication information object. It also describes the iKeycmd command for
managing certificates on UNIX and Linux systems, and the runmqakm tool for managing certificates on
UNIX, Linux and Windows systems. See the following sections:
v setmqaut
v
v
v
v
dspmqaut
dmpmqaut
rcrmqobj
rcdmqimg
v dspmqfls
v Managing keys and certificates
230
Self-signed certificates are not suitable for production use, for the following reasons:
v Self-signed certificates cannot be revoked, which might allow an attacker to spoof an identity after a
private key has been compromised. CAs can revoke a compromised certificate, which prevents its
further use. CA-signed certificates are therefore safer to use in a production environment, though
self-signed certificates are more convenient for a test system.
v Self-signed certificates never expire. This is both convenient and safe in a test environment, but in a
production environment it leaves them open to eventual security breaches. The risk is compounded by
the fact that self-signed certificates cannot be revoked.
v A self-signed certificate is used both as a personal certificate and as a root (or trust anchor) CA
certificate. A user with a self-signed personal certificate might be able to use it to sign other personal
certificates. In general, this is not true of personal certificates issued by a CA, and represents a
significant exposure.
CipherSpecs and digital certificates
Only a subset of the supported CipherSpecs can be used with all of the supported types of digital
certificate. It is therefore necessary to choose an appropriate CipherSpec for your digital certificate.
Similarly, if your organization's security policy requires that a particular CipherSpec be used, then you
must obtain a suitable digital certificate.
For more information on the relationship between CipherSpecs and digital certificates, refer to Digital
certificates and CipherSpec compatibility in WebSphere MQ on page 192
Security
231
232
Primary LU
Secondary LU
1
BIND(RD1)
2
BIND-RSP(ERD1, RD2)
3
FMH-12(ERD2)
Legend:
BIND
BIND-RSP
ERD
FMH-12
RD
=
=
=
=
=
The protocol for session level authentication is as follows. The numbers in the procedure correspond to
the numbers in Figure 54.
1. The primary LU generates a random data value (RD1) and sends it to the secondary LU in the BIND
request.
2. When the secondary LU receives the BIND request with the random data, it encrypts the data using
the DES algorithm with its copy of the LU-LU password as the key. The secondary LU then generates
a second random data value (RD2) and sends it, with the encrypted data (ERD1), to the primary LU
in the BIND response.
3. When the primary LU receives the BIND response, it computes its own version of the encrypted data
from the random data it generated originally. It does this by using the DES algorithm with its copy of
the LU-LU password as the key. It then compares its version with the encrypted data that it received
Security
233
in the BIND response. If the two values are the same, the primary LU knows that the secondary LU
has the same password as it does and the secondary LU is authenticated. If the two values do not
match, the primary LU terminates the session.
The primary LU then encrypts the random data that it received in the BIND response and sends the
encrypted data (ERD2) to the secondary LU in a Function Management Header 12 (FMH-12).
4. When the secondary LU receives the FMH-12, it computes its own version of the encrypted data from
the random data it generated. It then compares its version with the encrypted data that it received in
the FMH-12. If the two values are the same, the primary LU is authenticated. If the two values do not
match, the secondary LU terminates the session.
In an enhanced version of the protocol, which provides better protection against man in the middle
attacks, the secondary LU computes a DES Message Authentication Code (MAC) from RD1, RD2, and the
fully qualified name of the secondary LU, using its copy of the LU-LU password as the key. The
secondary LU sends the MAC to the primary LU in the BIND response instead of ERD1.
The primary LU authenticates the secondary LU by computing its own version of the MAC, which it
compares with the MAC received in the BIND response. The primary LU then computes a second MAC
from RD1 and RD2, and sends the MAC to the secondary LU in the FMH-12 instead of ERD2.
The secondary LU authenticates the primary LU by computing its own version of the second MAC,
which it compares with the MAC received in the FMH-12.
For information about how to configure session level authentication, see the documentation for your SNA
subsystem. For more general information about session level authentication, see Systems Network
Architecture LU 6.2 Reference: Peer Protocols, SC31-6808.
Conversation level authentication:
When a local TP attempts to allocate a conversation with a partner TP, the local LU sends an attach
request to the partner LU, asking it to attach the partner TP. Under certain circumstances, the attach
request can contain security information, which the partner LU can use to authenticate the local TP. This
is known as conversation level authentication, or end user verification.
The following topics describe how WebSphere MQ provides support for conversation level authentication.
For more information about conversation level authentication, see Systems Network Architecture LU 6.2
Reference: Peer Protocols, SC31-6808. For information specific to z/OS, see z/OS MVS Planning:
APPC/MVS Management, SA22-7599.
For more information about CPI-C, see Common Programming Interface Communications CPI-C Specification,
SC31-6180. For more information about APPC/MVS TP Conversation Callable Services, see z/OS MVS
Programming: Writing Transaction Programs for APPC/MVS, SA22-7621.
Support for conversation level authentication in WebSphere MQ on UNIX systems, and Windows systems:
Use this topic to gain an overview of how conversation level authentication works, on platforms other
than z/OS.
The support for conversation level authentication in WebSphere MQ for WebSphere MQ on UNIX
systems, and WebSphere MQ for Windows is illustrated in Figure 55 on page 235. The numbers in the
diagram correspond to the numbers in the description that follows.
234
DEFINE CHANNEL(...) +
CHLTYPE(...) +
TRPTYPE(LU62) +
CONNAME('MARS') +
USERID('ANDREAS') +
3 PASSWORD('THASOS')
Logical unit
Characteristics of
the conversation
6
Attach request (FMH-5)
to partner LU
ANDREAS, THASOS
Initialize the
characteristics of
the conversation
Set:
Security type
User ID
Password
Caller MCA
...
CALL
CALL
CALL
CALL
5 CALL
...
CMINIT(...,
CMSCST(...,
CMSCSU(...,
CMSCSP(...,
CMALLC(...)
"MARS", ...)
CM_SECURITY_PROGRAM, ...)
"ANDREAS", ...)
"THASOS", ...)
Symbolic
destination
name
Partner LU
name
Partner TP
name
Mode
name
Security type
VENUS
MARS
SATURN
PLUTO
GALAXY.SOLARLU
GALAXY.SOLARLU
GALAXY.SOLARLU
GALAXY.SOLARLU
VENUSTP
MARSTP
SATURNTP
PLUTOTP
#INTER
#INTER
#INTER
#INTER
CM_SECURITY_NONE
CM_SECURITY_NONE
CM_SECURITY_NONE
CM_SECURITY_NONE
User ID Password
On IBM i, UNIX systems, and Windows systems, an MCA uses Common Programming Interface
Communications (CPI-C) calls to communicate with a partner MCA across an SNA network. In the
channel definition at the caller end of a channel, the value of the CONNAME parameter is a symbolic
destination name, which identifies a CPI-C side information entry (1). This entry specifies:
v The name of the partner LU
v The name of the partner TP, which is a responder MCA
v The name of the mode to be used for the conversation
A side information entry can also specify the following security information:
v A security type.
The commonly implemented security types are CM_SECURITY_NONE, CM_SECURITY_PROGRAM,
and CM_SECURITY_SAME, but others are defined in the CPI-C specification.
v A user ID.
v A password.
A caller MCA prepares to allocate a conversation with a responder MCA by issuing the CPI-C call
CMINIT, using the value of CONNAME as one of the parameters on the call. The CMINIT call identifies,
for the benefit of the local LU, the side information entry that the MCA intends to use for the
conversation. The local LU uses the values in this entry to initialize the characteristics of the conversation
(2).
Security
235
The caller MCA then checks the values of the USERID and PASSWORD parameters in the channel
definition (3). If USERID is set, the caller MCA issues the following CPI-C calls (4):
v CMSCST, to set the security type for the conversation to CM_SECURITY_PROGRAM.
v CMSCSU, to set the user ID for the conversation to the value of USERID.
v CMSCSP, to set the password for the conversation to the value of PASSWORD. CMSCSP is not called
unless PASSWORD is set.
The security type, user ID, and password set by these calls override any values acquired previously from
the side information entry.
The caller MCA then issues the CPI-C call CMALLC to allocate the conversation (5). In response to this
call, the local LU sends an attach request (Function Management Header 5, or FMH-5) to the partner LU
(6).
If the partner LU will accept a user ID and a password, the values of USERID and PASSWORD are
included in the attach request. If the partner LU will not accept a user ID and a password, the values are
not included in the attach request. The local LU discovers whether the partner LU will accept a user ID
and a password as part of an exchange of information when the LUs bind to form a session.
In a later version of the attach request, a password substitute can flow between the LUs instead of a clear
password. A password substitute is a DES Message Authentication Code (MAC), or an SHA-1 message
digest, formed from the password. Password substitutes can be used only if both LUs support them.
When the partner LU receives an incoming attach request containing a user ID and a password, it might
use the user ID and password for the purposes of identification and authentication. By referring to access
control lists, the partner LU might also determine whether the user ID has the authority to allocate a
conversation and attach the responder MCA.
In addition, the responder MCA might run under the user ID included in the attach request. In this case,
the user ID becomes the default user ID for the responder MCA and is used for authority checks when
the MCA attempts to connect to the queue manager. It might also be used for authority checks
subsequently when the MCA attempts to access the queue manager's resources.
The way in which a user ID and a password in an attach request can be used for identification,
authentication, and access control is implementation dependent. For information specific to your SNA
subsystem, refer to the appropriate documentation.
If USERID is not set, the caller MCA does not call CMSCST, CMSCSU, and CMSCSP. In this case, the
security information that flows in an attach request is determined solely by what is specified in the side
information entry and what the partner LU will accept.
236
You can create a cluster in which two or more queue managers are clones. This means that they have
instances of the same local queues, including any local queues declared as cluster queues, and can
support instances of the same server applications.
When an application connected to a cluster queue manager sends a message to a cluster queue that has
an instance on each of the cloned queue managers, WebSphere MQ decides which queue manager to
send it to. When many applications send messages to the cluster queue, WebSphere MQ balances the
workload across each of the queue managers that have an instance of the queue. If one of the systems
hosting a cloned queue manager fails, WebSphere MQ continues to balance the workload across the
remaining queue managers until the system that failed is restarted.
If you are using queue manager clusters, you need to consider the following security issues:
v Allowing only selected queue managers to send messages to your queue manager
v Allowing only selected users of a remote queue manager to send messages to a queue on your queue
manager
v Allowing applications connected to your queue manager to send messages only to selected remote
queues
These considerations are relevant even if you are not using clusters, but they become more important if
you are using clusters.
If an application can send messages to one cluster queue, it can send messages to any other cluster queue
without needing additional remote queue definitions, transmission queues, or channels. It therefore
becomes more important to consider whether you need to restrict access to the cluster queues on your
queue manager, and to restrict the cluster queues to which your applications can send messages.
There are some additional security considerations, which are relevant only if you are using queue
manager clusters:
v Allowing only selected queue managers to join a cluster
v Forcing unwanted queue managers to leave a cluster
For more information about all these considerations, see Keeping clusters secure.
Related tasks:
Preventing queue managers receiving messages on page 402
You can prevent a cluster queue manager from receiving messages it is unauthorized to receive by using
exit programs.
Security
237
Multicast security
Use this information to understand why security processes might be needed with WebSphere MQ
Multicast.
WebSphere MQ Multicast does not have in-built security. Security checks are handled in the queue
manager at MQOPEN time and the MQMD field setting is handled by the client. Some applications in
the network might not be WebSphere MQ applications (For example, LLM applications, see Multicast
interoperability with WebSphere MQ Low Latency Messaging for more information), therefore you might
need to implement your own security procedures because receiving applications cannot be certain of the
validity of context fields.
There are three security processes to consider:
Access control
Access control in WebSphere MQ is based on user IDs. For more information on this subject, see
Access control for clients on page 215.
Network security
An isolated network might be a viable security option to prevent fake messages. It is possible for
an application on the multicast group address to publish malicious messages using native
communication functions, which are indistinguishable from MQ messages because they come
from an application on the same multicast group address.
It is also possible for a client on the multicast group address to receive messages that were
intended for other clients on the same multicast group address.
Isolating the multicast network ensures that only valid clients and applications have access. This
security precaution can prevent malicious messages from coming in, and confidential information
from going out.
For information about multicast group network addresses, see: Setting the appropriate network
for multicast traffic
Digital signatures
A digital signature is formed by encrypting a representation of a message. The encryption uses
the private key of the signatory and, for efficiency, usually operates on a message digest rather
than the message itself. Digitally signing a message before an MQPUT is a good security
precaution, but this process might have a detrimental effect on performance if there is a large
volume of messages.
Digital signatures vary with the data being signed. If two different messages are signed digitally
by the same entity, the two signatures differ, but both signatures can be verified with the same
public key, that is, the public key of the entity that signed the messages.
As mentioned previously in this section, it might be possible for an application on the multicast
group address to publish malicious messages using native communication functions, which are
indistinguishable from MQ messages. Digital signatures provide proof of origin, and only the
sender knows the private key, which provides strong evidence that the sender is the originator of
the message.
For more information on this subject, see Cryptographic concepts on page 163.
238
Setting up security
This collection of topics contains information specific to different operating systems, and to the use of
clients.
239
v Who can access objects (queues, process definitions, namelists, channels, client connection
channels, listeners, services, and authentication information objects), and what type of access
they have to those objects.
v Who can access WebSphere MQ messages.
v Who can access the context information associated with a message.
Channel security
You need to ensure that channels used to send messages to remote systems can access the
required resources.
You can use standard operating facilities to grant access to program libraries, MQI link libraries, and
commands. However, the directory containing queues and other queue manager data is private to
WebSphere MQ; do not use standard operating system commands to grant or revoke authorizations to
MQI resources.
240
Select Users
Double-click the user that you want to add to a group. The user properties panel is displayed.
Select the Member Of tab.
Select the group that you want to add the user to. If the group you want is not visible:
a. Click Add.... The Select Groups panel is displayed.
b. Click Locations.... The Locations panel is displayed.
c. Select the location of the group you want to add the user to from the list and click OK.
d. Type the group name in the field provided.
Security
241
Alternatively, click Advanced... and then Find Now to list the groups available in the currently
selected location. From here, select the group you want to add the user to and click OK.
e. Click OK. The user properties panel is displayed, showing the group you added.
f. Select the group.
9. Click OK. The Computer Management panel is displayed.
Displaying who is in a group on Windows:
Display the members of a group by using the control panel.
Procedure
1. Open the control panel
2. Double-click Administrative Tools. The Administrative Tools panel opens.
3.
4.
5.
6.
Results
The group members are displayed.
Removing a user from a group on Windows:
Remove a user from a group by using the control panel.
Procedure
1. Open the control panel
2.
3.
4.
5.
6. Double-click the user that you want to add to a group. The user properties panel is displayed.
7. Select the Member Of tab.
8. Select the group that you want to remove the user from, then click Remove.
9. Click OK. The Computer Management panel is displayed.
Results
You have now removed the user from the group.
242
Security
243
244
Security
245
246
Security
247
Process object
Not applicable
MQZAO_CONNECT
Process object
MQOO_INQUIRE
MQZAO_INQUIRE
MQZAO_INQUIRE
MQZAO_INQUIRE
MQOO_BROWSE
MQZAO_BROWSE
Not applicable
No check
MQOO_INPUT_*
MQZAO_INPUT
Not applicable
No check
MQOO_SAVE_
MQZAO_INPUT
ALL_CONTEXT (2 on page
250)
Not applicable
Not applicable
MQOO_OUTPUT (Normal
queue) (3 on page 250)
Not applicable
Not applicable
MQCONN
Not applicable
248
MQZAO_OUTPUT
Process object
MQOO_PASS_
IDENTITY_CONTEXT (4
on page 250)
MQZAO_PASS_
IDENTITY_CONTEXT
Not applicable
No check
MQOO_PASS_ALL_
CONTEXT (4 on page 250,
5 on page 250)
MQZAO_PASS
_ALL_CONTEXT
Not applicable
No check
MQOO_SET_
IDENTITY_CONTEXT (4
on page 250, 5 on page
250)
MQZAO_SET_
IDENTITY_CONTEXT
Not applicable
MQZAO_SET_
IDENTITY_CONTEXT (6
on page 250)
MQOO_SET_
MQZAO_SET_
ALL_CONTEXT (4 on page ALL_CONTEXT
250, 7 on page 250)
Not applicable
MQZAO_SET_
ALL_CONTEXT (6 on page
250)
MQOO_OUTPUT
(Transmission queue) (8 on
page 250)
MQZAO_SET_
ALL_CONTEXT
Not applicable
MQZAO_SET_
ALL_CONTEXT (6 on page
250)
MQOO_SET
MQZAO_SET
Not applicable
No check
MQOO_ALTERNATE_
USER_AUTHORITY
(9 on page 250)
(9 on page 250)
MQZAO_ALTERNATE_
USER_AUTHORITY (9 on
page 250, 10 on page 250)
Process object
MQZAO_PASS_
IDENTITY_CONTEXT (11
on page 250)
Not applicable
No check
MQPMO_PASS_ALL
_CONTEXT
MQZAO_PASS_
ALL_CONTEXT (11 on
page 250)
Not applicable
No check
MQPMO_SET_
IDENTITY_CONTEXT
MQZAO_SET_
IDENTITY_CONTEXT (11
on page 250)
Not applicable
MQZAO_SET_
IDENTITY_CONTEXT (6
on page 250)
MQPMO_SET_
ALL_CONTEXT
MQZAO_SET_
ALL_CONTEXT (11 on
page 250)
Not applicable
MQZAO_SET_
ALL_CONTEXT (6 on page
250)
(Transmission queue) (8 on
page 250)
MQZAO_SET_
ALL_CONTEXT
Not applicable
MQZAO_SET_
ALL_CONTEXT (6 on page
250)
MQPMO_ALTERNATE_
USER_AUTHORITY
Not applicable
MQZAO_ALTERNATE_
USER_AUTHORITY (10 on
page 250)
Security
249
Process object
MQCO_DELETE
MQZAO_DELETE (13)
Not applicable
Not applicable
MQCO_DELETE _PURGE
MQZAO_DELETE (13)
Not applicable
Not applicable
250
Authorization required
Queue
MQZAO_CHANGE
Topic
MQZAO_CHANGE
Process
MQZAO_CHANGE
Queue manager
MQZAO_CHANGE
Namelist
MQZAO_CHANGE
Authentication information
MQZAO_CHANGE
Channel
MQZAO_CHANGE
MQZAO_CHANGE
Listener
MQZAO_CHANGE
Service
MQZAO_CHANGE
Communication information
MQZAO_CHANGE
CLEAR object
Object
Authorization required
Queue
MQZAO_CLEAR
Topic
MQZAO_CLEAR
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
Not applicable
Not applicable
Listener
Not applicable
Service
Not applicable
Communication information
Not applicable
Security
251
Object
Authorization required
Queue
Topic
Process
Queue manager
Not applicable
Namelist
Authentication information
Channel
Listener
Service
Communication information
Authorization required
Queue
MQZAO_CHANGE
Topic
MQZAO_CHANGE
Process
MQZAO_CHANGE
Queue manager
Not applicable
Namelist
MQZAO_CHANGE
Authentication information
MQZAO_CHANGE
Channel
MQZAO_CHANGE
MQZAO_CHANGE
Listener
MQZAO_CHANGE
Service
MQZAO_CHANGE
Communication information
MQZAO_CHANGE
DELETE object
Object
Authorization required
Queue
MQZAO_DELETE
Topic
MQZAO_DELETE
Process
MQZAO_DELETE
Queue manager
Not applicable
Namelist
MQZAO_DELETE
Authentication information
MQZAO_DELETE
Channel
MQZAO_DELETE
MQZAO_DELETE
Listener
MQZAO_DELETE
Service
MQZAO_DELETE
Communication information
MQZAO_DELETE
252
DISPLAY object
Object
Authorization required
Queue
MQZAO_DISPLAY
Topic
MQZAO_DISPLAY
Process
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Namelist
MQZAO_DISPLAY
Authentication information
MQZAO_DISPLAY
Channel
MQZAO_DISPLAY
MQZAO_DISPLAY
Listener
MQZAO_DISPLAY
Service
MQZAO_DISPLAY
Communication information
MQZAO_DISPLAY
START object
Object
Authorization required
Queue
Not applicable
Topic
Not applicable
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
MQZAO_CONTROL
Not applicable
Listener
MQZAO_CONTROL
Service
MQZAO_CONTROL
Communication information
Not applicable
STOP object
Object
Authorization required
Queue
Not applicable
Topic
Not applicable
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
MQZAO_CONTROL
Not applicable
Listener
MQZAO_CONTROL
Service
MQZAO_CONTROL
Communication information
Not applicable
Security
253
Channel Commands
Command
Object
Authorization required
PING CHANNEL
Channel
MQZAO_CONTROL
RESET CHANNEL
Channel
MQZAO_CONTROL_EXTENDED
RESOLVE CHANNEL
Channel
MQZAO_CONTROL_EXTENDED
Command
Object
Authorization required
ALTER SUB
Topic
MQZAO_CONTROL
DEFINE SUB
Topic
MQZAO_CONTROL
DELETE SUB
Topic
MQZAO_CONTROL
DISPLAY SUB
Topic
MQZAO_DISPLAY
Command
Object
Authorization required
SET AUTHREC
Queue manager
MQZAO_CHANGE
DELETE AUTHREC
Queue manager
MQZAO_CHANGE
DISPLAY AUTHREC
Queue manager
MQZAO_DISPLAY
DISPLAY AUTHSERV
Queue manager
MQZAO_DISPLAY
DISPLAY ENTAUTH
Queue manager
MQZAO_DISPLAY
SET CHLAUTH
Queue manager
MQZAO_CHANGE
DISPLAY CHLAUTH
Queue manager
MQZAO_DISPLAY
REFRESH SECURITY
Queue manager
MQZAO_CHANGE
Command
Object
Authorization required
DISPLAY CHSTATUS
Queue manager
MQZAO_DISPLAY
DISPLAY LSSTATUS
Queue manager
MQZAO_DISPLAY
DISPLAY PUBSUB
Queue manager
MQZAO_DISPLAY
DISPLAY SBSTATUS
Queue manager
MQZAO_DISPLAY
DISPLAY SVSTATUS
Queue manager
MQZAO_DISPLAY
DISPLAY TPSTATUS
Queue manager
MQZAO_DISPLAY
Subscription Commands
Security Commands
Status Displays
Cluster Commands
254
Command
Object
Authorization required
DISPLAY CLUSQMGR
Queue manager
MQZAO_DISPLAY
REFRESH CLUSTER
RESET CLUSTER
SUSPEND QMGR
RESUME QMGR
Object
Authorization required
PING QMGR
Queue manager
MQZAO_DISPLAY
REFRESH QMGR
Queue manager
MQZAO_CHANGE
RESET QMGR
Queue manager
MQZAO_CHANGE
DISPLAY CONN
Queue manager
MQZAO_DISPLAY
STOP CONN
Queue manager
MQZAO_CHANGE
Note:
1. For DEFINE commands, MQZAO_DISPLAY authority is also needed for the LIKE object if one is
specified, or on the appropriate SYSTEM.DEFAULT.xxx object if LIKE is omitted.
2. The MQZAO_CREATE authority is not specific to a particular object or object type. Create authority is
granted for all objects for a specified queue manager, by specifying an object type of QMGR on the
setmqaut command.
3. This applies if the object to be replaced already exists. If it does not, the check is as for DEFINE object
NOREPLACE.
Related information:
Clustering: Using REFRESH CLUSTER best practices
Authorizations for PCF commands:
This section summarizes the authorizations needed for each PCF command.
No check means that no authorization checking is carried out; Not applicable means that this operation is
not relevant to this object type.
The user ID under which the program that submits the command is running must also have the
following authorities:
v MQZAO_CONNECT authority to the queue manager
v MQZAO_DISPLAY authority on the queue manager in order to perform PCF commands
The special authorization MQZAO_ALL_ADMIN includes all the authorizations in the following list that
are relevant to the object type, except MQZAO_CREATE, which is not specific to a particular object or
object type.
Change object
Security
255
Object
Authorization required
Queue
MQZAO_CHANGE
Topic
MQZAO_CHANGE
Process
MQZAO_CHANGE
Queue manager
MQZAO_CHANGE
Namelist
MQZAO_CHANGE
Authentication information
MQZAO_CHANGE
Channel
MQZAO_CHANGE
MQZAO_CHANGE
Listener
MQZAO_CHANGE
Service
MQZAO_CHANGE
Communication information
MQZAO_CHANGE
Clear object
Object
Authorization required
Queue
MQZAO_CLEAR
Topic
MQZAO_CLEAR
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
Not applicable
Not applicable
Listener
Not applicable
Service
Not applicable
Communication information
Not applicable
Authorization required
Queue
MQZAO_CREATE (2)
Topic
MQZAO_CREATE (2)
Process
MQZAO_CREATE (2)
Queue manager
Not applicable
Namelist
MQZAO_CREATE (2)
Authentication information
MQZAO_CREATE (2)
Channel
MQZAO_CREATE (2)
MQZAO_CREATE (2)
Listener
MQZAO_CREATE (2)
Service
MQZAO_CREATE (2)
Communication information
256
Authorization required
Queue
MQZAO_CHANGE
Topic
MQZAO_CHANGE
Process
MQZAO_CHANGE
Queue manager
Not applicable
Namelist
MQZAO_CHANGE
Authentication information
MQZAO_CHANGE
Channel
MQZAO_CHANGE
MQZAO_CHANGE
Listener
MQZAO_CHANGE
Service
MQZAO_CHANGE
Communication information
MQZAO_CHANGE
Authorization required
Queue
MQZAO_CREATE (2)
Topic
MQZAO_CREATE (2)
Process
MQZAO_CREATE (2)
Queue manager
Not applicable
Namelist
MQZAO_CREATE (2)
Authentication information
MQZAO_CREATE (2)
Channel
MQZAO_CREATE (2)
MQZAO_CREATE (2)
Listener
MQZAO_CREATE (2)
Service
MQZAO_CREATE (2)
Communication information
MQZAO_CREATE (2)
Authorization required
Queue
MQZAO_CHANGE
Topic
MQZAO_CHANGE
Process
MQZAO_CHANGE
Queue manager
Not applicable
Namelist
MQZAO_CHANGE
Authentication information
MQZAO_CHANGE
Channel
MQZAO_CHANGE
MQZAO_CHANGE
Listener
MQZAO_CHANGE
Service
MQZAO_CHANGE
Communication information
MQZAO_CHANGE
Security
257
Delete object
Object
Authorization required
Queue
MQZAO_DELETE
Topic
MQZAO_DELETE
Process
MQZAO_DELETE
Queue manager
Not applicable
Namelist
MQZAO_DELETE
Authentication information
MQZAO_DELETE
Channel
MQZAO_DELETE
MQZAO_DELETE
Listener
MQZAO_DELETE
Service
MQZAO_DELETE
Communication information
MQZAO_DELETE
Inquire object
Object
Authorization required
Queue
MQZAO_DISPLAY
Topic
MQZAO_DISPLAY
Process
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Namelist
MQZAO_DISPLAY
Authentication information
MQZAO_DISPLAY
Channel
MQZAO_DISPLAY
MQZAO_DISPLAY
Listener
MQZAO_DISPLAY
Service
MQZAO_DISPLAY
Communication information
MQZAO_DISPLAY
Authorization required
Queue
No check
Topic
No check
Process
No check
Queue manager
No check
Namelist
No check
Authentication information
No check
Channel
No check
No check
Listener
No check
Service
No check
Communication information
No check
258
Start object
Object
Authorization required
Queue
Not applicable
Topic
Not applicable
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
MQZAO_CONTROL
Not applicable
Listener
MQZAO_CONTROL
Service
MQZAO_CONTROL
Communication information
Not applicable
Stop object
Object
Authorization required
Queue
Not applicable
Topic
Not applicable
Process
Not applicable
Queue manager
Not applicable
Namelist
Not applicable
Authentication information
Not applicable
Channel
MQZAO_CONTROL
Not applicable
Listener
MQZAO_CONTROL
Service
MQZAO_CONTROL
Communication information
Not applicable
Channel Commands
Command
Object
Authorization required
Ping Channel
Channel
MQZAO_CONTROL
Reset Channel
Channel
MQZAO_CONTROL_EXTENDED
Resolve Channel
Channel
MQZAO_CONTROL_EXTENDED
Subscription Commands
Security
259
Command
Object
Authorization required
Change Subscription
Topic
MQZAO_CONTROL
Create Subscription
Topic
MQZAO_CONTROL
Delete Subscription
Topic
MQZAO_CONTROL
Inquire Subscription
Topic
MQZAO_DISPLAY
Command
Object
Authorization required
Queue manager
MQZAO_CHANGE
Queue manager
MQZAO_CHANGE
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_CHANGE
Queue manager
MQZAO_DISPLAY
Refresh Security
Queue manager
MQZAO_CHANGE
Command
Object
Authorization required
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_DISPLAY
Command
Object
Authorization required
Queue manager
MQZAO_DISPLAY
Refresh Cluster
Reset Cluster
Security Commands
Status Displays
Cluster Commands
260
Command
Object
Authorization required
Queue manager
MQZAO_DISPLAY
Queue manager
MQZAO_CHANGE
Queue manager
MQZAO_CHANGE
Queue
MQZAO_DISPLAY and
MQZAO_CHANGE
Inquire Connection
Queue manager
MQZAO_DISPLAY
Stop Connection
Queue manager
MQZAO_CHANGE
Note:
1. For Copy commands, MQZAO_DISPLAY authority is also needed for the From object.
2. The MQZAO_CREATE authority is not specific to a particular object or object type. Create authority is
granted for all objects for a specified queue manager, by specifying an object type of QMGR on the
setmqaut command.
3. For Create commands, MQZAO_DISPLAY authority is also needed for the appropriate
SYSTEM.DEFAULT.* object.
4. This applies if the object to be replaced already exists. If it does not, the check is as for Copy or
Create without replace.
261
Altering the state of a machine between server and domain controller can affect the operation of
WebSphere MQ, because WebSphere MQ uses a locally-defined mqm group. When a server is promoted
to be a domain controller, the scope changes from local to domain local. When the machine is demoted to
server, all domain local groups are removed. This means that changing a machine from server to domain
controller and back to server loses access to a local mqm group.
To remedy this problem, re-create the local mqm group using the standard Windows management tools.
Because all group membership information is lost, you must reinstate privileged WebSphere MQ users in
the newly-created local mqm group. If the machine is a domain member, you must also add the domain
mqm group to the local mqm group to grant privileged domain WebSphere MQ user IDs the required
level of authority.
262
When you have problems with WebSphere MQ and domain controllers on Windows:
Certain problems can arise with security settings when Windows servers are promoted to domain
controllers.
While promoting Windows 2000, Windows 2003, or Windows Server 2008 servers to domain controllers,
you are presented with the option of selecting a default or non-default security setting relating to user
and group permissions. This option controls whether arbitrary users are able to retrieve group
memberships from the active directory. Because WebSphere MQ relies on group membership information
to implement its security policy, it is important that the user ID that is performing WebSphere MQ
operations can determine the group memberships of other users.
On Windows 2000, when a domain is created using the default security option, the default user ID
created by WebSphere MQ during the installation process can obtain group memberships for other users
as required. The product then installs normally, creating default objects, and the queue manager can
determine the access authority of local and domain users if required.
On Windows 2000, when a domain is created using the non-default security option, or on Windows 2003
and Windows Server 2008 when a domain is created using the default security option, the user ID created
by WebSphere MQ during the installation cannot always determine the required group memberships. In
this case, you need to know:
v How Windows 2000 with non-default, or Windows 2003 and Windows Server 2008 with default,
security permissions behaves
v How to allow domain mqm group members to read group membership
v How to configure a WebSphere MQ Windows service to run under a domain user
Windows 2000 domain with non-default, or Windows 2003 and Windows Server 2008 domain with default,
security permissions:
Installation of WebSphere MQ behaves differently on these operating systems depending on whether a
local user or domain user performs the installation.
If a local user installs WebSphere MQ, the Prepare WebSphere MQ Wizard detects that the local user
created for the WebSphere MQ Windows service can retrieve the group membership information of the
installing user. The Prepare WebSphere MQ Wizard asks the user questions about the network
configuration to determine whether there are other user accounts defined on domain controllers running
on Windows 2000 or later. If so, the WebSphere MQ Windows service needs to run under a domain user
account with particular settings and authorities. The Prepare WebSphere MQ Wizard prompts the user for
the account details of this user. Its online help provides details of the domain user account required that
can be sent to the domain administrator.
If a domain user installs WebSphere MQ, the Prepare WebSphere MQ Wizard detects that the local user
created for the WebSphere MQ Windows service cannot retrieve the group membership information of
the installing user. In this case, the Prepare WebSphere MQ Wizard always prompts the user for the
account details of the domain user account for the WebSphere MQ Windows service to use.
When the WebSphere MQ Windows service needs to use a domain user account, WebSphere MQ cannot
operate correctly until this has been configured using the Prepare WebSphere MQ Wizard. The Prepare
WebSphere MQ Wizard does not allow the user to continue with other tasks, until the Windows service
has been configured with a suitable account.
If a Windows 2000 domain has been configured with non-default security permissions, the usual solution
to enable WebSphere MQ to work correctly is to configure it with a suitable domain user account, as
described above.
Security
263
See Creating and setting up domain accounts for WebSphere MQ for more information.
Configuring WebSphere MQ Services to run under a domain user on Windows:
Use the Prepare WebSphere MQ wizard to enter the account details of the domain user account.
Alternatively, you can use the Computer Management panel to alter the Log On details for the
installation specific WebSphere MQ Service.
For more information see Changing the password of the WebSphere MQ Windows service user account
Applying security template files to Windows:
Applying a template might affect the security settings applied to WebSphere MQ files and directories. If
you use the highly secure template, apply it before installing WebSphere MQ.
Windows supports text-based security template files that you can use to apply uniform security settings
to one or more computers with the Security Configuration and Analysis MMC snap-in. In particular,
Windows supplies several templates that include a range of security settings with the aim of providing
specific levels of security. These templates include Compatible, Secure, and Highly Secure.
Applying one of these templates might affect the security settings applied to WebSphere MQ files and
directories. If you want to use the Highly Secure template, configure your machine before you install
WebSphere MQ.
If you apply the highly secure template to a machine on which WebSphere MQ is already installed, all
the permissions you have set on the WebSphere MQ files and directories are removed. Because these
permissions are removed, you lose Administrator, mqm, and, when applicable, Everyone group access from
the error directories.
Nested groups:
There are restrictions on the use of nested groups. These result partly from the domain functional level
and partly from WebSphere MQ restrictions.
Active Directory can support different group types within a Domain context depending on the Domain
functional level. By default, Windows 2003 domains are in the Windows 2000 mixed functional level.
(Windows server 2003 , Windows XP, Windows Vista, and Windows Server 2008 all follow the Windows
2003 domain model.) The domain functional level determines the supported group types and level of
nesting allowed when configuring user IDs in a domain environment. Refer to Active Directory
documentation for details on the Group Scope and inclusion criteria.
In addition to Active Directory requirements, further restrictions are imposed on IDs used by WebSphere
MQ. The network APIs used by WebSphere MQ do not support all the configurations that are supported
by the domain functional level. As a result, WebSphere MQ is not able to query the group memberships
of any Domain IDs present in a Domain Local group which is then nested in a local group. Furthermore,
multiple nesting of global and universal groups is not supported. However, immediately nested global or
universal groups are supported.
264
OpenSSL
OpenSSL security overview for WebSphere MQ client for HP Integrity NonStop Server.
The OpenSSL toolkit is an open source implementation of the Secure Sockets Layer (SSL) and Transport
Layer Security (TLS) protocols for secure communications over a network.
The toolkit is developed by the OpenSSL Project. For more information about the OpenSSL Project, see
http://www.openssl.org. WebSphere MQ client for HP Integrity NonStop Server contains modified
versions of the OpenSSL libraries and the openssl command. The libraries and openssl command are
ported from the OpenSSL toolkit 1.0.1c, and are supplied as object code only. No source code is provided.
The OpenSSL libraries are loaded by WebSphere MQ client application programs dynamically as
required. Only the OpenSSL libraries that are provided by WebSphere MQ are supported for use with
WebSphere MQ client applications.
The openssl command, which can be used for certificate management purposes, is installed in the OSS
directory opt_installation_path/opt/mqm/bin.
Using the openssl command, you can create and manage keys and digital certificates with various
common data formats, and carry out simple certificate authority (CA) tasks.
The default format for key and certificate data that is processed by OpenSSL is the Privacy Enhanced
Mail (PEM) format. Data in PEM format is base64 encoded ASCII data. The data can therefore be
Security
265
transferred by using text-based systems such as email, and can be cut and pasted by using text editors
and web browsers. PEM is an Internet standard for text-based cryptographic exchanges and is specified
in Internet RFCs 1421, 1422, 1423, and 1424. WebSphere MQ assumes that a file with extension .pem
contains data in PEM format. A file in PEM format can contain multiple certificates and other encoded
objects, and can include comments.
The WebSphere MQ SSL support on other operating systems might require key and certificate data in
files to be encoded by using Distinguished Encoding Rules (DER). DER is a set of encoding rules for
using the ASN.1 notation in secure communications. Data that is encoded by using DER is binary data,
and the format of key and certificate data that is encoded by using DER is also known as PKCS#12 or
PFX. A file that contains this data commonly has an extension of .p12 or .pfx. The openssl command can
convert between PEM and PKCS#12 format.
Entropy Daemon
OpenSSL requires a source of random data for providing strong cryptographic operations. Random
number generation is a capability that is usually provided by the operating system or by a system-wide
daemon process. The HP Integrity NonStop Server operating system does not provide this capability
within the operating system.
When you are using the SSL and TLS support supplied with WebSphere MQ client for HP Integrity
NonStop Server, a process that is called an entropy daemon is needed to provide the source of random
data. When you start a client channel that requires SSL or TLS, OpenSSL expects an entropy daemon to
be running and providing its services on a socket in the OSS file system at /etc/egd-pool.
An entropy daemon is not provided by WebSphere MQ client for HP Integrity NonStop Server. The
WebSphere MQ client for HP Integrity NonStop Server is tested with the following entropy daemons:
v amqjkdm0 (as provided by the WebSphere MQ 5.3 server)
v /usr/local/bin/prngd (Version 0.9.27, as provided by HP Integrity NonStop Server Open Source
Technical Library)
266
Specifying that only FIPS-certified CipherSpecs are used at run time on the MQI
client
Create your key repositories using FIPS-compliant software, then specify that the channel must use
FIPS-certified CipherSpecs.
In order to be FIPS-compliant at run time, the key repositories must have been created and managed
using only FIPS-compliant software such as runmqakm with the -fips option.
You can specify that an SSL or TLS channel must use only FIPS-certified CipherSpecs in three ways, listed
in order of precedence:
1. Set the FipsRequired field in the MQSCO structure to MQSSL_FIPS_YES.
2. Set the environment variable MQSSLFIPS to YES.
3. Set the SSLFipsRequired attribute in the client configuration file to YES.
By default, FIPS-certified CipherSpecs is not required.
These values have the same meanings as the equivalent parameter values on ALTER QMGR SSLFIPS (see
ALTER QMGR). If the client process currently has no active SSL or TLS connections, and a FipsRequired
value is validly specified on an SSL MQCONNX, all subsequent SSL connections associated with this
process must use only the CipherSpecs associated with this value. This applies until this and all other
SSL or TLS connections have stopped, at which stage a subsequent MQCONNX can provide a new value
for FipsRequired.
If cryptographic hardware is present, the cryptographic modules used by WebSphere MQ can be
configured to be those modules provided by the hardware product, and these might be FIPS-certified to a
particular level. The configurable modules and whether they are FIPS-certified depends on the hardware
product in use.
Where possible, if FIPS-only CipherSpecs is configured then the MQI client rejects connections which
specify a non-FIPS CipherSpec with MQRC_SSL_INITIALIZATION_ERROR. WebSphere MQ does not
guarantee to reject all such connections and it is your responsibility to determine whether your
WebSphere MQ configuration is FIPS-compliant.
Related concepts:
Federal Information Processing Standards (FIPS) for UNIX, Linux, and Windows on page 183
When cryptography is required on an SSL or TLS channel on Windows, UNIX and Linux systems,
WebSphere MQ uses a cryptography package called IBM Crypto for C (ICC). On the Windows, UNIX and
Linux platforms, the ICC software has passed the Federal Information Processing Standards (FIPS)
Cryptomodule Validation Program of the US National Institute of Standards and Technology, at level
140-2.
Related information:
FipsRequired (MQLONG)
MQSSLFIPS
SSL stanza of the client configuration file
Running SSL or TLS client applications with multiple installations of GSKit V8.0 on
AIX
SSL or TLS client applications on AIX might experience MQRC_CHANNEL_CONFIG_ERROR and error AMQ6175
when running on AIX systems with multiple GSKit V8.0 installations.
When running client applications on an AIX system with multiple GSKit V8.0 installations, the client
connect calls can return MQRC_CHANNEL_CONFIG_ERROR when using SSL or TLS. The /var/mqm/errors logs
record error AMQ6175 and AMQ9220 for the failing client application, for example:
Security
267
A common cause of this error is that the setting of the LIBPATH or LD_LIBRARY_PATH environment
variable has caused the WebSphere MQ client to load a mixed set of libraries from two different GSKit
V8.0 installations. Executing aWebSphere MQ client application in a DB2 environment can cause this
error.
To avoid this error, include the WebSphere MQ library directories at the front of the library path so that
the WebSphere MQ libraries take precedence. This can be achieved using the setmqenv command with
the -k parameter, for example:
. /usr/mqm/bin/setmqenv -s -k
For more information about the use of the setmqenv command, refer to setmqenv (set WebSphere MQ
environment)
268
Related information:
GSKit: Changes from GSKit V7.0 to GSKit V8.0
GSKit: Commands renamed
Supported CipherSpecs
The WebSphere MQ client for HP Integrity NonStop Server supports the following CipherSpecs versions:
v TLS_RSA_WITH_AES_128_CBC_SHA
v TLS_RSA_WITH_AES_256_CBC_SHA
v RC4_SHA_US
v RC4_MD5_US
v TRIPLE_DES_SHA_US
v TLS_RSA_WITH_3DES_EDE_CBC_SHA
Security
269
v
v
v
v
v
DES_SHA_EXPORT1024
RC4_56_SHA_EXPORT1024
RC4_MD5_EXPORT
RC2_MD5_EXPORT
DES_SHA_EXPORT
v
v
v
v
v
v
v
TLS_RSA_WITH_DES_CBC_SHA
NULL_SHA
NULL_MD5
FIPS_WITH_DES_CBC_SHA
FIPS_WITH_3DES_EDE_CBC_SHA
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS_RSA_WITH_AES_256_CBC_SHA256
v
v
v
v
v
v
TLS_RSA_WITH_NULL_SHA256
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS_RSA_WITH_AES_256_GCM_SHA384
ECDHE_ECDSA_AES_128_CBC_SHA256
ECDHE_ECDSA_AES_256_CBC_SHA384
ECDHE_RSA_AES_128_CBC_SHA256
v ECDHE_RSA_AES_256_CBC_SHA384
v ECDHE_ECDSA_AES_128_GCM_SHA256
v ECDHE_ECDSA_AES_256_GCM_SHA384
v ECDHE_RSA_AES_128_GCM_SHA256
v ECDHE_RSA_AES_256_GCM_SHA384
270
v
v
v
v
The pass phrase for the encrypted private key is stored in the pass phrase stash file, Stash.sth.
Certificate trust store:
The certificate truststore file, trust.pem.
This file contains the certificates that are needed to validate the personal certificates that are used by
queue managers that the client connects to, in PEM format. The certificate truststore is mandatory for all
SSL or TLS client channels.
File permissions must be set to limit write access to this file.
A correctly formatted trust.pem file must contain one or more sections with the following headers and
footers:
-----BEGIN CERTIFICATE----Base 64 ASCII encoded certificate data here
-----END CERTIFICATE-----
Security
271
amqrsslc -s /home/alice/cert
Enter password for Keystore /home/alice/cert.pem :
password
Stashed the password in file /home/alice/Stash.sth
File permissions must be set on this file to allow read access to the owner of the associated personal
certificate store.
Certificate revocation list file:
The certificate revocation list file, crl.pem.
This file contains the certificate revocation lists (CRLs) that the client uses to validate digital certificates,
in PEM format. The existence of this file is optional. If this file is not present, no certificate revocation
checks are done when you are validating certificates.
File permissions must be set to limit write access to this file.
A correctly formatted crl.pem file must contain one or more sections with the following headers and
footers:
-----BEGIN X509 CRL----Base 64 ASCII encoded CRL data here
-----END X509 CRL-----
272
export DISPLAY=mypc:0
Ensure that your PATH environment variable contains /usr/bin and /bin. This is also required for
the runmqckm and runmqakm commands. For example:
export PATH=$PATH:/usr/bin:/bin
Security
273
The user ID from which you run the iKeyman or iKeycmd commands must have write permission for the
directory in which the key database file is created or updated. For a queue manager using the default ssl
directory, the user ID from which you run iKeyman or iKeycmd must be a member of the mqm group. For
a WebSphere MQ MQI client, if you run iKeyman or iKeycmd from a user ID different from that under
which the client runs, you must alter the file permissions to enable the WebSphere MQ MQI client to
access the key database file at run time. For more information, see Accessing and securing your key
database files on Windows on page 275 or Accessing and securing your key database files on UNIX
and Linux systems on page 276.
In iKeyman or iKeycmd version 7.0, new key databases are automatically populated with a set of
pre-defined certificate authority (CA) certificates. In iKeyman or iKeycmd version 8.0, key databases are not
automatically populated, making the initial setup more secure because you include only the CA
certificates that you want, in your key database file.
Note: Because of this change in behavior for GSKit version 8.0 that results in CA certificates no longer
being automatically added to the repository, you must manually add your preferred CA certificates. This
change of behavior provides you with more granular control over the CA certificates used. See Adding
default CA certificates into an empty key repository, on UNIX, Linux or Windows systems with GSKit
version 8.0 on page 276.
Procedure
Note: If you must manage SSL or TLS certificates in a way that is FIPS-compliant, use the runmqakm
command. The iKeyman user interface does not provide a FIPS-compliant option.
v To create a key database by using the iKeyman user interface, complete the following steps:
1. On UNIX and Linux systems, log in as the root user. On Windows systems, log in as
Administrator or as a member of the MQM group.
2. Start the iKeyman user interface by running the strmqikm command.
3. From the Key Database File menu, click New. The New window opens.
4. Click Key database type and select CMS (Certificate Management System).
5. In the File Name field, type a file name. This field already contains the text key.kdb. If your stem
name is key, leave this field unchanged. If you specified a different stem name, replace key with
your stem name. However, you must not change the .kdb extension.
6. In the Location field, type the path. For example:
For a queue manager: /var/mqm/qmgrs/QM1/ssl (on UNIX and Linux systems) or C:\Program
Files\IBM\WebSphere MQ\qmgrs\QM1\ssl (on Windows systems).
The path must match the value of the SSLKeyRepository attribute of the queue manager.
For a WebSphere MQ client: /var/mqm/ssl (on UNIX and Linux systems) or C:\mqm\ssl (on
Windows systems).
7. Click Open. The Password Prompt window opens.
8. Type a password in the Password field, and type it again in the Confirm Password field.
9. Select the Stash the password to a file check box.
Note: If you do not stash the password, attempts to start SSL or TLS channels fail because they
cannot obtain the password required to access the key database file.
10. Click OK.
11. Click OK. The Personal Certificates window opens.
12. Set the access permissions as described in Accessing and securing your key database files on
Windows on page 275 or Accessing and securing your key database files on UNIX and Linux
systems on page 276.
v To create a key database by using the command line, use either of the following commands:
274
Using runmqakm:
runmqakm -keydb -create -db filename -pw password -type cms
-stash -fips -strong
where:
-db filename
Specifies the fully qualified file name of a CMS key database, and must have a file extension of
.kdb.
-pw password
Specifies the password for the CMS key database.
-type cms
Specifies the type of database. (For WebSphere MQ, it must be cms.)
-stash
Saves the key database password to a file.
-fips
Disables the use of the BSafe cryptographic library. Only the ICC component is used and this
component must be successfully initialized in FIPS mode. When in FIPS mode, the ICC component
uses algorithms that are FIPS 140-2 validated. If the ICC component does not initialize in FIPS
mode, the runmqakm command fails.
-strong
Checks that the password entered satisfies the minimum requirements for password strength. The
minimum requirements for a password are as follows:
The password must be a minimum length of 14 characters.
The password must contain a minimum of one lowercase character, one uppercase character,
and one digit or special character. Special characters include the asterisk (*), the dollar sign ($),
the number sign (#), and the percent sign (%). A space is classified as a special character.
Each character can occur a maximum of three times in a password.
A maximum of two consecutive characters in the password can be identical.
All characters are in the standard ASCII printable character set within the range 0x20 - 0x7E.
Accessing and securing your key database files on Windows:
The key database files might not have appropriate access permissions. You must set appropriate access to
these files.
Set access control to the files key.kdb, key.sth, key.crl, and key.rdb, where key is the stem name of your
key database, to grant authority to a restricted set of users.
Consider granting access as follows:
full authority
BUILTIN\Administrators, NT AUTHORITY\SYSTEM, and the user who created the database
files.
read authority
For a queue manager, the local mqm group only. This assumes that the MCA is running under a
user ID in the mqm group.
For a client, the user ID under which the client process is running.
Security
275
Accessing and securing your key database files on UNIX and Linux systems:
The key database files might not have appropriate access permissions. You must set appropriate access to
these files.
For a queue manager, set permissions on the key database files so that queue manager and channel
processes can read them when necessary, but other users cannot read or modify them. Normally, the
mqm user needs read permissions. If you have created the key database file by logging in as the mqm
user, then the permissions are probably sufficient; if you were not the mqm user, but another user in the
mqm group, you probably need to grant read permissions to other users in the mqm group.
Similarly for a client, set permissions on the key database files so that client application processes can
read them when necessary, but other users cannot read or modify them. Normally, the user under which
the client process runs needs read permissions. If you have created the key database file by logging in as
that user, then the permissions are probably sufficient; if you were not the client process user, but another
user in that group, you probably need to grant read permissions to other users in the group.
Set the permissions on the files key.kdb, key.sth, key.crl, and key.rdb, where key is the stem name of
your key database, to read and write for the file owner, and to read for the mqm or client user group
(-rw-r-----).
Adding default CA certificates into an empty key repository, on UNIX, Linux or Windows systems with GSKit
version 8.0:
Follow this procedure to add one or more of the default CA certificates to an empty key repository with
GSKit version 8.
In GSKit version 7.0, the behaviour when creating a new key repository was to automatically add in a set
of default CA certificates for commonly-used Certificate Authorities. For GSKit version 8, this behaviour
has changed so that CA certificates are no longer automatically added to the repository. The user is now
required to manually add CA certificates into the key repository.
Using iKeyman
Perform the following steps on the machine on which you want to add the CA certificate:
1.
2.
3.
4.
5.
Start the iKeyman GUI using the strmqikm command (on UNIX, Linux and Windows systems).
From the Key Database File menu, click Open. The Open window opens.
Click Key database type and select CMS (Certificate Management System).
Click Browse to navigate to the directory that contains the key database files.
Select the key database file to which you want to add the certificate, for example key.kdb.
276
Issue the following command to add all of the CA certificates for the organization specified in the label
field:
runmqckm -cert -populate -db filename -pw password -label label
where:
-db filename
-pw password
-label label
Note: Adding a CA certificate to a key repository results in WebSphere MQ trusting all personal
certificates signed by that CA certificate. Consider carefully which Certificate Authorities you wish to
trust and only add the set of CA certificates needed to authenticate your clients and managers. It is not
recommended to add the full set of default CA certificates unless this is a definitive requirement for your
security policy.
Locating the key repository for a queue manager on UNIX, Linux or Windows systems:
Use this procedure to obtain the location of your queue manager's key database file
Procedure
1. Display your queue manager's attributes, using either of the following MQSC commands:
DISPLAY QMGR ALL
DISPLAY QMGR SSLKEYR
You can also display your queue manager's attributes using the WebSphere MQ Explorer or PCF
commands.
2. Examine the command output for the path and stem name of the key database file. For example,
a. on UNIX and Linux systems: /var/mqm/qmgrs/QM1/ssl/key, where /var/mqm/qmgrs/QM1/ssl is the
path and key is the stem name
b. on Windows: MQ_INSTALLATION_PATH\qmgrs\QM1\ssl\key, where MQ_INSTALLATION_PATH\qmgrs\QM1\
ssl is the path and key is the stem name. MQ_INSTALLATION_PATH represents the high-level directory
in which WebSphere MQ is installed.
Changing the key repository location for a queue manager on UNIX, Linux or Windows systems:
You can change the location of your queue manager's key database file by various means including the
MQSC command ALTER QMGR.
You can change the location of your queue manager's key database file by using the MQSC command
ALTER QMGR to set your queue manager's key repository attribute. For example, on UNIX and Linux
systems:
ALTER QMGR SSLKEYR(/var/mqm/qmgrs/QM1/ssl/MyKey)
The key database file has the fully qualified file name: /var/mqm/qmgrs/QM1/ssl/MyKey.kdb
On Windows:
ALTER QMGR SSLKEYR(C:\Program Files\IBM\WebSphere MQ\Qmgrs\QM1\ssl\Mykey)
Security
277
The key database file has the fully qualified file name: C:\Program Files\IBM\WebSphere
MQ\Qmgrs\QM1\ssl\Mykey.kdb
You can also alter your queue manager's attributes using the WebSphere MQ Explorer or PCF commands.
When you change the location of a queue manager's key database file, certificates are not transferred
from the old location. If the key database file you are now accessing is a new key database file, you must
populate it with the CA and personal certificates you need, as described in Importing a personal
certificate into a key repository on UNIX, Linux or Windows systems on page 290.
Locating the key repository for a WebSphere MQ MQI client on UNIX, Linux and Windows systems.:
The location of the key repository is given by the MQSSLKEYR variable, or specified in the MQCONNX
call.
Examine the MQSSLKEYR environment variable to obtain the location of your WebSphere MQ MQI
client's key database file. For example:
echo $MQSSLKEYR
Also check your application, because the key database file name can also be set in an MQCONNX call, as
described in Specifying the key repository location for a WebSphere MQ MQI client on UNIX, Linux or
Windows systems. The value set in an MQCONNX call overrides the value of MQSSLKEYR.
Specifying the key repository location for a WebSphere MQ MQI client on UNIX, Linux or Windows
systems:
There is no default key repository for a WebSphere MQ MQI client. You can specify its location in either
of two ways. Ensure that the key database file can be accessed only by intended users or administrators
to prevent unauthorized copying to other systems.
You can specify the location of your WebSphere MQ MQI client's key database file in either of two ways:
v Setting the MQSSLKEYR environment variable. For example, on UNIX and Linux systems:
export MQSSLKEYR=/var/mqm/ssl/key
On Windows:
set MQSSLKEYR=C:\Program Files\IBM\WebSphere MQ\ssl\key
Note: The .kdb extension is a mandatory part of the file name, but is not included as part of the value
of the environment variable.
v Providing the path and stem name of the key database file in the KeyRepository field of the MQSCO
structure when an application makes an MQCONNX call. For more information about using the
MQSCO structure in MQCONNX, see Overview for MQSCO.
278
When changes to certificates or the certificate store become effective on UNIX, Linux or Windows
systems.:
When you change the certificates in a certificate store, or the location of the certificate store, the changes
take effect depending on the type of channel and how the channel is running.
Changes to the certificates in the key database file and to the key repository attribute become effective in
the following situations:
v When a new outbound single channel process first runs an SSL channel.
v When a new inbound TCP/IP single channel process first receives a request to start an SSL channel.
v When the MQSC command REFRESH SECURITY TYPE(SSL) is issued to refresh the Websphere MQ
SSL environment.
v For client application processes, when the last SSL connection in the process is closed. The next SSL
connection will pick up the certificate changes.
v For channels that run as threads of a process pooling process (amqrmppa), when the process pooling
process is started or restarted and first runs an SSL channel. If the process pooling process has already
run an SSL channel, and you want the change to become effective immediately, run the MQSC
command REFRESH SECURITY TYPE(SSL).
v For channels that run as threads of the channel initiator, when the channel initiator is started or
restarted and first runs an SSL channel. If the channel initiator process has already run an SSL channel,
and you want the change to become effective immediately, run the MQSC command REFRESH
SECURITY TYPE(SSL).
v For channels that run as threads of a TCP/IP listener, when the listener is started or restarted and first
receives a request to start an SSL channel. If the listener has already run an SSL channel, and you want
the change to become effective immediately, run the MQSC command REFRESH SECURITY
TYPE(SSL).
You can also refresh the WebSphere MQ SSL environment using the WebSphere MQ Explorer or PCF
commands.
Creating a self-signed personal certificate on UNIX, Linux, and Windows systems:
You can create a self-signed certificate by using iKeyman, iKeycmd, or runmqakm.
Note: WebSphere MQ does not support SHA-3 or SHA-5 algorithms. You can use the digital signature
algorithm names SHA384WithRSA and SHA512WithRSA because both algorithms are members of the
SHA-2 family.
The digital signature algorithm names SHA3WithRSA and SHA5WithRSA are deprecated because they
are an abbreviated form of SHA384WithRSA and SHA512WithRSA respectively.
For more information about why you might want to use self-signed certificates, see Using self-signed
certificates for mutual authentication of two queue managers on page 362.
Not all digital certificates can be used with all CipherSpecs. Ensure that you create a certificate that is
compatible with the CipherSpecs you need to use. WebSphere MQ supports three different types of
CipherSpec. For details, see Interoperability of Elliptic Curve and RSA CipherSpecs on page 193 in the
Digital certificates and CipherSpec compatibility in WebSphere MQ on page 192 topic. To use the Type
1 CipherSpecs (those with names beginning ECDHE_ECDSA_) you must use the runmqakm command to create
the certificate and you must specify an Elliptic Curve ECDSA signature algorithm parameter; for
example, -sig_alg EC_ecdsa_with_SHA384 .
Security
279
Using iKeyman
iKeyman does not provide a FIPS-compliant option. If you need to manage SSL or TLS certificates in a
way that is FIPS-compliant, use the runmqakm command.
Use the following procedure to obtain a self-signed certificate for your queue manager or WebSphere MQ
MQI client:
1. Start the iKeyman GUI by using the strmqikm command .
2. From the Key Database File menu, click Open. The Open window displays.
Click Key database type and select CMS (Certificate Management System).
Click Browse to navigate to the directory that contains the key database files.
Select the key database file in which you want to save the certificate, for example key.kdb.
Click Open. The Password Prompt window displays.
Type the password you set when you created the key database and click OK. The name of your key
database file is displayed in the File Name field.
8. From the Create menu, click New Self-Signed Certificate. The Create New Self-Signed Certificate
window is displayed.
3.
4.
5.
6.
7.
280
-db filename
-pw password
-label label
-dn distinguished_name
-size key_size
-x509version version
-expire days
-fips
-sig_alg
-sig_alg
-san_dnsname DNS_names
-san_emailaddr email_addresses
-san_ipaddr IP_addresses
Security
281
1 CipherSpecs (with names beginning ECDHE_ECDSA_) you must use the runmqakm command to request the
certificate and you must specify an Elliptic Curve ECDSA signature algorithm parameter; for example,
-sig_alg EC_ecdsa_with_SHA384 .
If you are using cryptographic hardware, see Requesting a personal certificate for your PKCS #11
hardware on page 297.
Using the iKeyman user interface:
About this task
iKeyman does not provide a FIPS-compliant option. If you need to manage SSL or TLS certificates in a
way that is FIPS-compliant, use the runmqakm command.
Procedure
Complete the following steps to apply for a personal certificate, by using the iKeyman user interface:
1. Start the iKeyman user interface by using the strmqikm command on UNIX, Linux, and Windows
systems.
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
4. Click Browse to navigate to the directory that contains the key database files.
5. Select the key database file from which you want to generate the request; for example, key.kdb.
6. Click Open. The Password Prompt window opens.
7. Type the password you set when you created the key database and click OK. The name of your key
database file is shown in the File Name field.
8. From the Create menu, click New Certificate Request. The Create New Key and Certificate Request
window opens.
9. In the Key Label field, enter the following labels:
v For a queue manager, enter ibmwebspheremq followed by the name of your queue manager
changed to lowercase. For example, for a queue manager called QM1, enter ibmwebspheremqqm1.
v For a WebSphere MQ MQI client, enter ibmwebspheremq followed by your logon user ID, all in
lowercase; for example, ibmwebspheremqmyuserid .
10. Type or select a value for any field in the Distinguished name field, or any of the Subject
alternative name fields. For the remaining fields, either accept the default values, or type or select
new values. For more information about Distinguished Names, see Distinguished Names on page
167.
11. In the Enter the name of a file in which to store the certificate request field, either accept the
default certreq.arm, or type a new value with a full path.
12. Click OK. A confirmation window is displayed.
13. Click OK. The Personal Certificate Requests list shows the label of the new personal certificate
request you created. The certificate request is stored in the file you chose in step 11.
14. Request the new personal certificate either by sending the file to a certificate authority (CA), or by
copying the file into the request form on the website for the CA.
Using the command line:
Procedure
Use the following commands to request a personal certificate by using either the iKeycmd or runmqakm
command:
v Using iKeycmd on UNIX, Linux, and Windows systems:
282
where:
-db filename
Specifies the fully qualified file name of a CMS key database.
-pw password
Specifies the password for the CMS key database.
-label label
Specifies the key label attached to the certificate.
-dn distinguished_name
Specifies the X.500 distinguished name enclosed in double quotation marks. At least one attribute is
required. You can supply multiple OU and DC attributes.
-size key_size
Specifies the key size. If you are using iKeycmd, the value can be 512 or 1024. If you are using
runmqakm, the value can be 512, 1024, or 2048.
-file filename
Specifies the file name for the certificate request.
-fips
Specifies that the command is run in FIPS mode. This mode disables the use of the BSafe
cryptographic library. Only the ICC component is used and this component must be successfully
initialized in FIPS mode. When in FIPS mode, the ICC component uses algorithms that are FIPS 140-2
validated. If the ICC component does not initialize in FIPS mode, the runmqakm command fails.
-sig_alg
For iKeycmd, specifies the asymmetric signature algorithm used for the creation of the entry's key pair.
The value can be MD2_WITH_RSA, MD2WithRSA, MD5_WITH_RSA, MD5WithRSA, SHA1WithDSA, SHA1WithRSA,
SHA256_WITH_RSA, SHA256WithRSA, SHA2WithRSA, SHA384_WITH_RSA, SHA384WithRSA, SHA512_WITH_RSA,
SHA512WithRSA, SHA_WITH_DSA, SHA_WITH_RSA, SHAWithDSA, or SHAWithRSA . The default value is
SHA1WithRSA
-sig_alg
For runmqakm, specifies the hashing algorithm used during the creation of a certificate request. This
hashing algorithm is used to create the signature associated with the newly created certificate request.
The value can be md5, MD5_WITH_RSA, MD5WithRSA, SHA_WITH_DSA, SHA_WITH_RSA, sha1, SHA1WithDSA,
SHA1WithECDSA, SHA1WithRSA, sha224, SHA224_WITH_RSA, SHA224WithDSA, SHA224WithECDSA,
SHA224WithRSA, sha256, SHA256_WITH_RSA, SHA256WithDSA, SHA256WithECDSA, SHA256WithRSA,
SHA2WithRSA, sha384, SHA384_WITH_RSA, SHA384WithECDSA, SHA384WithRSA, sha512, SHA512_WITH_RSA,
SHA512WithECDSA, SHA512WithRSA, SHAWithDSA, SHAWithRSA, EC_ecdsa_with_SHA1, EC_ecdsa_with_SHA224,
EC_ecdsa_with_SHA256, EC_ecdsa_with_SHA384, or EC_ecdsa_with_SHA512. The default value is
SHA1WithRSA.
-san_dnsname DNS_names
Specifies a comma-delimited or space-delimited list of DNS names for the entry being created.
-san_emailaddr email_addresses
Specifies a comma-delimited or space-delimited list of email addresses for the entry being created.
Security
283
-san_ipaddr IP_addresses
Specifies a comma-delimited or space-delimited list of IP addresses for the entry being created.
Renewing an existing personal certificate on UNIX, Linux, and Windows systems:
You can renew a personal certificate by using the iKeyman user interface, or by using the iKeycmd or
runmqakm commands.
Before you begin
If you have a requirement to use larger key sizes for your personal certificates, the renewal steps
described below do not work, because the recreated certificate request is generated from an existing key.
Follow the steps described in Requesting a personal certificate on UNIX, Linux, and Windows systems
on page 281 to create a new certificate request, using the key sizes you require. This process replaces your
existing key.
About this task
A personal certificate has an expiry date, after which the certificate can no longer be used. This task
explains how to renew an existing personal certificate before it expires.
Using the iKeyman user interface:
About this task
iKeyman does not provide a FIPS-compliant option. If you need to manage SSL or TLS certificates in a
way that is FIPS-compliant, use the runmqakm command.
Procedure
Complete the following steps to apply for a personal certificate, by using the iKeyman user interface:
1. Start the iKeyman user interface by using the strmqikm command on UNIX, Linux, and Windows
systems.
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
4. Click Browse to navigate to the directory that contains the key database files.
5. Select the key database file from which you want to generate the request; for example, key.kdb.
6. Click Open. The Password Prompt window opens.
7. Type the password you set when you created the key database and click OK. The name of your key
database file is shown in the File Name field.
8. Select Personal Certificates from the drop down selection menu, and select the certificate from the
list that you want to renew.
9. Click the Recreate Request... button. A window opens for you to enter the file name and file location
information.
10. In the file namefield, either accept the default certreq.arm, or type a new value, including the full
file path.
11. Click OK. The certificate request is stored in the file you selected in step 9.
12. Request the new personal certificate either by sending the file to a certificate authority (CA), or by
copying the file into the request form on the website for the CA.
Using the command line:
284
Procedure
Use the following commands to request a personal certificate by using either the iKeycmd or runmqakm
command:
v Using iKeycmd on UNIX, Linux, and Windows systems:
runmqckm -certreq -recreate -db filename -pw password -label label
-target filename
v Using runmqakm:
runmqakm -certreq -recreate -db filename -pw password -label label
-target filename
where:
-db filename
Specifies the fully qualified file name of a CMS key database.
-pw password
Specifies the password for the CMS key database.
-target filename
Specifies the file name for the certificate request.
What to do next
Once you have received the signed personal certificate from the certificate authority, you can add it to
your key database using the steps described in Receiving personal certificates into a key repository on
UNIX, Linux and Windows systems.
Receiving personal certificates into a key repository on UNIX, Linux and Windows systems:
Use this procedure to receive a personal certificate into the key database file. The key repository must be
the same repository where you created the certificate request.
After the CA sends you a new personal certificate, you add it to the key database file from which you
generated the new certificate request . If the CA sends the certificate as part of an email message, copy
the certificate into a separate file.
Using iKeyman
If you need to manage SSL certificates in a way that is FIPS compliant, use the runmqakm command.
iKeyman does not provide a FIPS-compliant option.
Ensure that the certificate file to be imported has write permission for the current user, and then use the
following procedure for either a queue manager or a WebSphere MQ MQI client to receive a personal
certificate into the key database file:
1. Start the iKeyman GUI using the strmqikm command (on Windows UNIX and Linux ).
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
Click Browse to navigate to the directory that contains the key database files.
Select the key database file to which you want to add the certificate, for example key.kdb.
Click Open, and then click OK. The Password Prompt window opens.
Type the password you set when you created the key database and click OK. The name of your key
database file is displayed in the File Name field. Select the Personal Certificates view.
8. Click Receive. The Receive Certificate from a File window opens.
4.
5.
6.
7.
Security
285
9. Type the certificate file name and location for the new personal certificate, or click Browse to select
the name and location.
10. Click OK. If you already have a personal certificate in your key database, a window opens, asking if
you want to set the key you are adding as the default key in the database.
11. Click Yes or No. The Enter a Label window opens.
12. Click OK. The Personal Certificates field shows the label of the new personal certificate you added.
Using the command line
Use the following commands to add a personal certificate to a key database file using iKeycmd :
v On UNIX, Linux and Windows, issue the following command:
runmqckm -cert -receive -file filename -db filename -pw password
-format ascii
where:
-file filename
-db filename
-pw password
-format ascii
is the fully qualified file name of the file containing the personal certificate.
is the fully qualified file name of a CMS key database.
is the password for the CMS key database.
is the format of the certificate. The value can be ascii for Base64-encoded ASCII
or binary for Binary DER data. The default is ascii .
If you are using cryptographic hardware, refer to Importing a personal certificate to your PKCS #11
hardware on page 299.
Extracting a CA certificate from a key repository:
Follow this procedure to extract a CA certificate.
Using iKeyman
If you need to manage SSL certificates in a way that is FIPS compliant, use the runmqakm command.
iKeyman does not provide a FIPS-compliant option.
Perform the following steps on the machine from which you want to extract the CA certificate:
1. Start the iKeyman GUI using the strmqikm command..
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
4. Click Browse to navigate to the directory that contains the key database files.
5. Select the key database file from which you want to extract, for example key.kdb.
6. Click Open. The Password Prompt window opens.
7. Type the password you set when you created the key database and click OK. The name of your key
database file is displayed in the File Name field.
8. In the Key database content field, select Signer Certificates and select the certificate you want to
extract.
9. Click Extract. The Extract a Certificate to a File window opens.
10. Select the Data type of the certificate, for example Base64-encoded ASCII data for a file with the
.arm extension.
11. Type the certificate file name and location where you want to store the certificate, or click Browse to
select the name and location.
12. Click OK. The certificate is written to the file you specified.
286
where:
-db filename
-pw password
-label label
-target filename
-format ascii
Extracting the public part of a self-signed certificate from a key repository on UNIX, Linux and
Windows systems:
Follow this procedure to extract the public part of a self-signed certificate.
Using iKeyman
If you need to manage SSL certificates in a way that is FIPS compliant, use the runmqakm command.
iKeyman does not provide a FIPS-compliant option.
Perform the following steps on the machine from which you want to extract the public part of a
self-signed certificate:
1. Start the iKeyman GUI using the strmqikm command (on UNIX, Linux and Windows).
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
4. Click Browse to navigate to the directory that contains the key database files.
5. Select the key database file from which you want to extract the certificate, for example key.kdb.
6. Click Open. The Password Prompt window opens.
7. Type the password you set when you created the key database and click OK. The name of your key
database file is displayed in the File Name field.
8. In the Key database content field, select Personal Certificates and select the certificate.
9. Click Extract certificate. The Extract a Certificate to a File window opens.
10. Select the Data type of the certificate, for example Base64-encoded ASCII data for a file with the
.arm extension.
11. Type the certificate file name and location where you want to store the certificate, or click Browse to
select the name and location.
12. Click OK. The certificate is written to the file you specified. Note that when you extract (rather than
export) a certificate, only the public part of the certificate is included, so a password is not required.
Using the command line
Use the following commands to extract the public part of a self-signed certificate using iKeycmd or
runmqakm:
v On UNIX, Linux and Windows:
runmqckm -cert -extract -db filename -pw password -label label -target filename
-format ascii
Security
287
v Using runmqakm:
runmqakm -cert -extract -db filename -pw password -label label
-target filename -format ascii -fips
where:
-db filename
-pw password
-label label
-target filename
-format ascii
Adding a CA certificate (or the public part of a self-signed certificate) into a key repository, on UNIX,
Linux or Windows systems:
Follow this procedure to add a CA certificate or the public part of a self-signed certificate to the key
repository.
If the certificate that you want to add is in a certificate chain, you must also add all the certificates that
are above it in the chain. You must add the certificates in strictly descending order starting from the root,
followed by the CA certificate immediately below it in the chain, and so on.
Where the following instructions refer to a CA certificate, they also apply to the public part of a
self-signed certificate.
Note: If the certificate you want to add is in a certificate chain, you must also add all the certificates that
are above it in the chain. You must ensure that the certificate is in ASCII (UTF-8) or binary (DER)
encoding, because IBM Global Secure Toolkit (GSKit) does not support certificates with other types of
encoding. You must add the certificates in strictly descending order starting from the root, followed by
the CA certificate immediately below it in the chain.
Using iKeyman
If you need to manage SSL certificates in a way that is FIPS compliant, use the runmqakm command.
iKeyman does not provide a FIPS-compliant option.
Perform the following steps on the machine on which you want to add the CA certificate:
1. Start the iKeyman GUI using the strmqikm command (on UNIX, Linux and Windows systems).
2. From the Key Database File menu, click Open. The Open window opens.
3. Click Key database type and select CMS (Certificate Management System).
4. Click Browse to navigate to the directory that contains the key database files.
5. Select the key database file to which you want to add the certificate, for example key.kdb.
6. Click Open. The Password Prompt window opens.
7. Type the password you set when you created the key database and click OK. The name of your key
database file displays in the File Name field.
8. In the Key database content field, select Signer Certificates.
9. Click Add. The Add CA's Certificate from a File window opens.
10. Type the certificate file name and location where the certificate is stored, or click Browse to select the
name and location.
11. Click OK. The Enter a Label window opens.
12. In the Enter a Label window, type the name of the certificate.
13. Click OK. The certificate is added to the key database.
288
where:
-db filename
-pw password
-label label
-file filename
-format ascii
289
runmqckm -cert -export -db filename -pw password -label label -type cms
-target filename -target_pw password -target_type pkcs12
where:
-db filename
-pw password
-label label
-type cms
-target filename
-target_pw password
-target_type pkcs12
is
is
is
is
is
is
is
the
the
the
the
the
the
the
Importing a personal certificate into a key repository on UNIX, Linux or Windows systems:
Follow this procedure to import a personal certificate
Before importing a personal certificate in PKCS #12 format into the key database file, you must first add
the full valid chain of issuing CA certificates to the key database file (see Adding a CA certificate (or the
public part of a self-signed certificate) into a key repository, on UNIX, Linux or Windows systems on
page 288).
PKCS #12 files should be considered temporary and deleted after use.
Using iKeyman
If you need to manage SSL certificates in a way that is FIPS-compliant, use the runmqakm command.
iKeyman does not provide a FIPS-compliant option.
Perform the following steps on the machine to which you want to import the personal certificate:
1. Start the iKeyman GUI using the strmqikm command .
From the Key Database File menu, click Open. The Open window displays.
Click Key database type and select CMS (Certificate Management System).
Click Browse to navigate to the directory that contains the key database files.
Select the key database file to which you want to add the certificate, for example key.kdb.
Click Open. The Password Prompt window displays.
Type the password you set when you created the key database and click OK. The name of your key
database file displays in the File Name field.
8. In the Key database content field, select Personal Certificates.
9. If there are certificates in the Personal Certificates view, follow these steps:
a. Click Export/Import. The Export/Import key window is displayed.
b. Select Import Key.
2.
3.
4.
5.
6.
7.
10. If there are no certificates in the Personal Certificates view, click Import.
11. Select the Key file type of the certificate you want to import, for example PKCS12.
12. Type the certificate file name and location where the certificate is stored, or click Browse to select the
name and location.
13. Click OK. The Password Prompt window displays.
14. In the Password field, type the password used when the certificate was exported.
15. Click OK. The Change Labels window is displayed. This window allows the labels of certificates
being imported to be changed if, for example, a certificate with the same label already exists in the
target key database. Changing certificate labels has no effect on certificate chain validation. This can
290
16.
17.
18.
19.
be used to change the personal certificate label to that required by WebSphere MQ in order to
associate the certificate with the particular queue manager or client (ibmwebspheremqqm1 for example).
To change a label, select the required label from the Select a label to change list. The label is copied
into the Enter a new label entry field. Replace the label text with that of the new label and click
Apply.
The text in the Enter a new label entry field is copied back into the Select a label to change field,
replacing the originally selected label and so relabelling the corresponding certificate.
When you have changed all the labels that needed to be changed, click OK. The Change Labels
window closes, and the original IBM Key Management window reappears with the Personal
Certificates and Signer Certificates fields updated with the correctly labeled certificates.
The certificate is imported to the target key database.
where:
-file filename
-pw password
-type pkcs12
-target filename
-target_pw password
-target_type cms
-label label
-new_label label
is the fully qualified file name of the file containing the PKCS #12 certificate.
is the password for the PKCS #12 certificate.
is the type of the file.
is the name of the destination CMS key database.
is the password for the CMS key database.
is the type of the database specified by -target
is the label of the certificate to import from the source key database.
is the label that the certificate will be assigned in the target database. If you omit
-new_label option, the default is to use the same as the -label option.
iKeycmd does not provide a command to change certificate labels directly. Use the following steps to
change a certificate label:
1. Export the certificate to a PKCS #12 file using the -cert -export command. Specify the existing
certificate label for the -label option.
2. Remove the existing copy of the certificate from the original key database using the -cert -delete
command.
3. Import the certificate from the PKCS #12 file using the -cert -import command. Specify the old label
for the -label option and the required new label for the -new_label option. The certificate will be
imported back into the key database with the required label.
Importing from a Microsoft .pfx file:
Folow this procedure to mport from a Microsoft .pfx file using iKeyman. You cannot use runmqakm to
import a .pfx file.
A .pfx file can contain two certificates relating to the same key. One is a personal or site certificate
(containing both a public and private key). The other is a CA (signer) certificate (containing only a public
key). These certificates cannot coexist in the same CMS key database file, so only one of them can be
imported. Also, the "friendly name" or label is attached to only the signer certificate.
The personal certificate is identified by a system generated Unique User Identifier (UUID). This section
shows the import of a personal certificate from a pfx file while labeling it with the friendly name
Security
291
previously assigned to the CA (signer) certificate. The issuing CA (signer) certificates should already be
added to the target key database. Note that PKCS#12 files should be considered temporary and deleted
after use.
Follow these steps to import a personal certificate from a source pfx key database:
1. Start the iKeyman GUI using the strmqikm command (on Linux, UNIX or Windows). The IBM Key
Management window is displayed.
2. From the Key Database File menu, click Open. The Open window is displayed.
3. Select a key database type of PKCS12.
4. You are recommended to take a backup of the pfx database before performing this step. Select the
pfx key database that you want to import. Click Open. The Password Prompt window is displayed.
5. Enter the key database password and click OK. The IBM Key Management window is displayed.
The title bar shows the name of the selected pfx key database file, indicating that the file is open and
ready.
6. Select Signer Certificates from the list. The "friendly name" of the required certificate is displayed as
a label in the Signer Certificates panel.
7. Select the label entry and click Delete to remove the signer certificate. The Confirm window is
displayed.
8. Click Yes. The selected label is no longer displayed in the Signer Certificates panel.
9. Repeat steps 6, 7, and 8 for all the signer certificates.
10. From the Key Database File menu, click Open. The Open window is displayed.
11. Select the target key CMS database which the pfx file is being imported into. Click Open. The
Password Prompt window is displayed.
12. Enter the key database password and click OK. The IBM Key Management window is displayed.
The title bar shows the name of the selected key database file, indicating that the file is open and
ready.
13. Select Personal Certificates from the list.
14. If there are certificates in the Personal Certificates view, follow these steps:
a. Click Export/Import key. The Export/Import key window is displayed.
b. Select Import from Choose Action Type.
15. If there are no certificates in the Personal Certificates view, click Import.
16. Select the PKCS12 file.
17. Enter the name of the pfx file as used in Step 4. Click OK. The Password Prompt window is
displayed.
18. Specify the same password that you specified when you deleted the signer certificate. Click OK.
19. The Change Labels window is displayed (as there should be only a single certificate available for
import). The label of the certificate should be a UUID which has a format xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx.
20. To change the label select the UUID from the Select a label to change: panel. The label will be
replicated into the Enter a new label: field. Replace the label text with that of the friendly name that
was deleted in Step 7 and click Apply. The friendly name must be in the form ibmwebspheremq,
followed by the queue manager name or the WebSphere MQ MQI client user logon ID in lower case.
21. Click OK. The Change Labels window is now removed and the original IBM Key Management
window reappears with the Personal Certificates and Signer Certificates panels updated with the
correctly labeled personal certificate.
22. The pfx personal certificate is now imported to the (target) database.
It is not possible to change a certificate label using iKeycmd
292
Use the following command to import a personal certificate from a PKCS #7 file:
runmqckm -cert -import -db filename -pw password -type pkcs7 -target filename
-target_pw password -target_type cms -label label -new_label label
-db filename
-pw password
-type pkcs7
-target filename
-target_pw password
-target_type cms
-label label
-new_label label
is the fully qualified file name of the file containing the PKCS #7 certificate.
is the password for the PKCS #7 certificate.
is the type of the file.
is the name of the destination key database.
is the password for the destination key database.
is the type of the database specified by -target
is the label of the certificate that is to be imported.
is the label that the certificate will be assigned in the target database. If you omit
the -new_label option, the default is to use the same as the -label option.
Security
293
11. With the certificate selected, click Delete. The Confirm window opens.
12. Click Yes. The Personal Certificates field no longer shows the label of the certificate you deleted.
Using the command line
Use the following commands to delete a certificate using iKeycmd or runmqakm:
v On UNIX, Linux and Windows:
runmqckm -cert -delete -db filename -pw password -label label
where:
is the fully qualified file name of a CMS key database.
is the password for the CMS key database.
is the label attached to the personal certificate.
specifies that the command is run in FIPS mode. This mode disables the use of
the BSafe cryptographic library. Only the ICC component is used and this
component must be successfully initialized in FIPS mode. When in FIPS mode,
the ICC component uses algorithms that have been FIPS 140-2 validated. If the
ICC component does not initialize in FIPS mode, the runmqakm command fails.
-db filename
-pw password
-label label
-fips
When using the generated password on the -pw parameter of subsequent certificate administration
commands, always place double quotation marks around the password. On UNIX and Linux systems,
you must also use a backslash character to escape the following characters if they appear in the password
string:
!
"
When entering the password in response to a prompt from runmqckm, runmqakm or the iKeyman GUI then
it is not necessary to quote or escape the password. It is not necessary because the operating system shell
does not affect data entry in these cases.
Configuring for cryptographic hardware on UNIX, Linux or Windows systems:
You can configure cryptographic hardware for a queue manager or client in a number of ways.
You can configure cryptographic hardware for a queue manager on UNIX, Linux or Windows systems
using either of the following methods:
v Use the ALTER QMGR MQSC command with the SSLCRYP parameter, as described in ALTER QMGR.
v Use WebSphere MQ Explorer to configure the cryptographic hardware on your UNIX, Linux or
Windows system. For more information, refer to the online help.
You can configure cryptographic hardware for a WebSphere MQ client on UNIX, Linux or Windows
systems using either of the following methods:
v Set the MQSSLCRYP environment variable. The permitted values for MQSSLCRYP are the same as for
the SSLCRYP parameter, as described in ALTER QMGR. If you use the GSK_PCS11 version of the
SSLCRYP parameter, the PKCS #11 token label must be specified entirely in lower-case.
v Set the CryptoHardware field of the SSL configuration options structure, MQSCO, on an MQCONNX
call. For more information, see Overview for MQSCO.
294
If you have configured cryptographic hardware which uses the PKCS #11 interface using any of these
methods, you must store the personal certificate for use on your channels in the key database file for the
cryptographic token you have configured. This is described in Managing certificates on PKCS #11
hardware.
Managing certificates on PKCS #11 hardware:
You can manage digital certificates on cryptographic hardware that supports the PKCS #11 interface.
About this task
You must create a key database to prepare the WebSphere MQ environment, even if you do not intend to
store certificate authority (CA) certificates in it, but will store all your certificates on your cryptographic
hardware. A key database is necessary for the queue manager to reference in its SSLKEYR field, or for the
client application to reference in the MQSSLKEYR environment variable. This key database is also
required if you are creating a certificate request.
Procedure
v To create a key database by using the iKeyman user interface, complete the following steps:
1. On UNIX and Linux systems, log in as the root user. On Windows systems, log in as
Administrator or as a member of the MQM group.
2. Start the iKeyman user interface by running the strmqikm command.
3. Click Key Database File > Open.
4. Click Key database type and select PKCS11Direct.
5. In the File Name field, type the name of the module for managing your cryptographic hardware;
for example, PKCS11_API.so.
If you are using certificates or keys stored on PKCS #11 cryptographic hardware, note that
iKeycmd and iKeyman are 64-bit programs. External modules required for PKCS #11 support will
be loaded into a 64-bit process, therefore you must have a 64-bit PKCS #11 library installed for the
administration of cryptographic hardware. The Windows and Linux x86 32-bit platforms are the
only exceptions, as the iKeyman and iKeycmd programs are 32-bit on those platforms.
6. In the Location field, enter the path:
On UNIX and Linux systems, this might be /usr/lib/pksc11, for example.
On Windows systems, you can type the library name; for example, cryptoki.
Click OK. The Open Cryptographic Token window opens.
7. In the Cryptographic Token Password field, type the password that you set when you configured
the cryptographic hardware.
8. If your cryptographic hardware has the capacity to hold the signer certificates required to receive
or import a personal certificate, clear both secondary key database check boxes and continue from
step 12 on page 296. If you require a secondary CMS key database to hold the signer certificates,
select either Open existing secondary key database file or Create new secondary key database
file.
9. In the File Name field, type a file name. This field already contains the text key.kdb. If your stem
name is key, leave this field unchanged. If you specified a different stem name, replace key with
your stem name. You must not change the .kdb suffix.
10. In the Location field, type the path, for example:
For a queue manager: /var/mqm/qmgrs/QM1/ssl
For a WebSphere MQ MQI client: /var/mqm/ssl
Click OK. The Password Prompt window opens.
11. Enter a password.
If you selected Open existing secondary key database file in step 8, type a password in the
Password field.
Security
295
If you selected Create new secondary key database file in step 8 on page 295:
a. Type a password in the Password field, and type it again in the Confirm Password field.
b. Select Stash the password to a file. Note that if you do not stash the password, attempts to
start SSL channels fail because they cannot obtain the password required to access the key
database file.
c. Click OK. A window opens, confirming that the password is in file key.sth (unless you
specified a different stem name).
12. Click OK. The Key database content frame displays.
v To create a key database by using the command line, use either of the following commands:
On UNIX, Linux, and Windows systems:
runmqckm -keydb -create -db filename -pw password -type cms -stash
Using runmqakm:
runmqakm -keydb -create -db filename -pw password -type cms
-stash -fips -strong
where:
-db filename
Specifies the fully qualified file name of a CMS key database, and must have a file extension of
.kdb.
-pw password
Specifies the password for the CMS key database.
-type cms
Specifies the type of database. (For WebSphere MQ, it must be cms.)
-stash
Saves the key database password to a file.
-fips
Disables the use of the BSafe cryptographic library. Only the ICC component is used and this
component must be successfully initialized in FIPS mode. When in FIPS mode, the ICC component
uses algorithms that are FIPS 140-2 validated. If the ICC component does not initialize in FIPS
mode, the runmqakm command fails.
-strong
Checks that the password entered satisfies the minimum requirements for password strength. The
minimum requirements for a password are as follows:
The password must be a minimum length of 14 characters.
The password must contain a minimum of one lowercase character, one uppercase character,
and one digit or special character. Special characters include the asterisk (*), the dollar sign ($),
the number sign (#), and the percent sign (%). A space is classified as a special character.
Each character can occur a maximum of three times in a password.
A maximum of two consecutive characters in the password can be identical.
All characters are in the standard ASCII printable character set within the range 0x20 - 0x7E.
296
Security
297
where:
-db filename
Specifies the fully qualified file name of a CMS key database.
-pw password
Specifies the password for the CMS key database.
-label label
Specifies the key label attached to the certificate.
-dn distinguished_name
Specifies the X.500 distinguished name enclosed in double quotation marks. At least one attribute is
required. You can supply multiple OU and DC attributes.
-size key_size
Specifies the key size. If you are using iKeycmd, the value can be 512 or 1024. If you are using
runmqakm, the value can be 512, 1024, or 2048.
-file filename
Specifies the file name for the certificate request.
-fips
Specifies that the command is run in FIPS mode. This mode disables the use of the BSafe
cryptographic library. Only the ICC component is used and this component must be successfully
initialized in FIPS mode. When in FIPS mode, the ICC component uses algorithms that are FIPS 140-2
validated. If the ICC component does not initialize in FIPS mode, the runmqakm command fails.
-sig_alg
For iKeycmd, specifies the asymmetric signature algorithm used for the creation of the entry's key pair.
The value can be MD2_WITH_RSA, MD2WithRSA, MD5_WITH_RSA, MD5WithRSA, SHA1WithDSA, SHA1WithRSA,
SHA256_WITH_RSA, SHA256WithRSA, SHA2WithRSA, SHA384_WITH_RSA, SHA384WithRSA, SHA512_WITH_RSA,
SHA512WithRSA, SHA_WITH_DSA, SHA_WITH_RSA, SHAWithDSA, or SHAWithRSA . The default value is
SHA1WithRSA
-sig_alg
For runmqakm, specifies the hashing algorithm used during the creation of a certificate request. This
hashing algorithm is used to create the signature associated with the newly created certificate request.
The value can be md5, MD5_WITH_RSA, MD5WithRSA, SHA_WITH_DSA, SHA_WITH_RSA, sha1, SHA1WithDSA,
SHA1WithECDSA, SHA1WithRSA, sha224, SHA224_WITH_RSA, SHA224WithDSA, SHA224WithECDSA,
SHA224WithRSA, sha256, SHA256_WITH_RSA, SHA256WithDSA, SHA256WithECDSA, SHA256WithRSA,
SHA2WithRSA, sha384, SHA384_WITH_RSA, SHA384WithECDSA, SHA384WithRSA, sha512, SHA512_WITH_RSA,
SHA512WithECDSA, SHA512WithRSA, SHAWithDSA, SHAWithRSA, EC_ecdsa_with_SHA1, EC_ecdsa_with_SHA224,
EC_ecdsa_with_SHA256, EC_ecdsa_with_SHA384, or EC_ecdsa_with_SHA512. The default value is
SHA1WithRSA.
-san_dnsname DNS_names
Specifies a comma-delimited or space-delimited list of DNS names for the entry being created.
-san_emailaddr email_addresses
Specifies a comma-delimited or space-delimited list of email addresses for the entry being created.
-san_ipaddr IP_addresses
Specifies a comma-delimited or space-delimited list of IP addresses for the entry being created.
298
where:
-file filename
Specifies the fully qualified file name of the file containing the personal certificate.
-crypto path
Specifies the fully qualified path to the PKCS #11 library supplied with the hardware.
-tokenlabel hardware_token
Specifies the label given to the storage part of the cryptographic hardware during installation.
-pw hardware_password
Specifies the password for access to the hardware.
Security
299
-format cert_format
Specifies the format of the certificate. The value can be ascii for Base64-encoded ASCII or binary
for binary DER data. The default is ASCII.
-fips
Specifies that the command is run in FIPS mode This mode disables the use of the BSafe
cryptographic library. Only the ICC component is used and this component must be successfully
initialized in FIPS mode. When in FIPS mode, the ICC component uses algorithms that are FIPS
140-2 validated. If the ICC component does not initialize in FIPS mode, the runmqakm command
fails.
300
The Secure Sockets Layer (SSL) and Transport Layer Security (TLS) use PKI techniques like the ones just
described. For more information about how SSL and TLS perform authentication, see Secure Sockets
Layer (SSL) and Transport Layer Security (TLS) concepts on page 171.
If a trusted authentication server or PKI support is not available, other techniques can be used. A
common technique, which can be implemented in security exits, uses a symmetric key algorithm.
One of the security exits, exit A, generates a random number and sends it in a security message to its
partner security exit, exit B. Exit B encrypts the number using its copy of a key which is known only to
the two security exits. Exit B sends the encrypted number to exit A in a security message with a second
random number that exit B has generated. Exit A verifies that the first random number has been
encrypted correctly, encrypts the second random number using its copy of the key, and sends the
encrypted number to exit B in a security message. Exit B then verifies that the second random number
has been encrypted correctly. During this exchange, if either security exit is not satisfied with the
authenticity of other, it can instruct the MCA to close the channel.
An advantage of this technique is that no key or password is sent over the communications connection
during the exchange. A disadvantage is that it does not provide a solution to the problem of how to
distribute the shared key in a secure way. One solution to this problem is described in Implementing
confidentiality in user exit programs on page 378. A similar technique is used in SNA for the mutual
authentication of two LUs when they bind to form a session. The technique is described in Session level
authentication on page 233.
All the preceding techniques for mutual authentication can be adapted to provide one-way
authentication.
301
v How do you enable users and their applications to interface, or interact, with the service, if this is a
requirement?
v In a multi-hop situation, where a message is sent over more than one message channel on the way to
its destination, where do you invoke the components of the service?
Here are some examples of how the identification and authentication service can be implemented at the
application level. The term API exit means either an API exit or an API-crossing exit.
v When an application puts a message on a queue, an API exit can acquire an authentication token from
a trusted authentication server such as Kerberos. The API exit can add this token to the application
data in the message. When the message is retrieved by the receiving application, a second API exit can
ask the authentication server to authenticate the sender by checking the token.
v When an application puts a message on a queue, an API exit can append the following items to the
application data in the message:
The digital certificate of the sender
The digital signature of the sender
If different algorithms for generating a message digest are available for use, the API exit can include
the name of the algorithm it has used.
When the message is retrieved by the receiving application, a second API exit can perform the
following checks:
The API exit can validate the digital certificate by working through the certificate chain to the root
CA certificate. To do this, the API exit must have access to a key repository that contains the
remaining certificates in the certificate chain. This check provide assurance that the sender, identified
by the Distinguished Name, is the genuine owner of the public key contained in the certificate.
The API exit can check the digital signature using the public key contained in the certificate. This
check authenticates the sender.
The Distinguished Name of the sender can be sent instead of the whole digital certificate. In this case,
the key repository must contain the sender's certificate so that the second API exit can find the public
key of the sender. Another possibility is to send all the certificates in the certificate chain.
v When an application puts a message on a queue, the UserIdentifier field in the message descriptor
contains a user ID associated with the application. The user ID can be used to identify the sender. To
enable authentication, an API exit can append some data, such as an encrypted password, to the
application data in the message. When the message is retrieved by the receiving application, a second
API exit can authenticate the user ID by using the data that has travelled with the message.
This technique might be considered sufficient for messages that originate in a controlled and trusted
environment, and in circumstances where a trusted authentication server or PKI support is not
available.
Privileged users
A privileged user is one that has full administrative authorities for WebSphere MQ.
In addition to the users listed in the following table, members of any group with +crt authority for
queues are indirectly administrators. Similarly, any user that has +set authority on the queue manager,
and +put authority on the command queue is an administrator.
You should not grant these privileges to ordinary users and applications.
302
Privileged users
Windows systems
v SYSTEM
v Members of the mqm group
v Members of the Administrators group
303
The partner security exit can validate a digital certificate only if it has access to a key repository that
contains the remaining certificates in the certificate chain. If a digital certificate for the queue manager or
user is not sent, one must be available in the key repository to which the partner security exit has access.
The partner security exit cannot check the digital signature unless it can find the signer's public key.
The Secure Sockets Layer (SSL) and Transport Layer Security (TLS) use PKI techniques like the ones just
described. For more information about how the Secure Sockets Layer performs authentication, see
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) concepts on page 171.
If a trusted authentication server or PKI support is not available, other techniques can be used. A
common technique, which can be implemented in security exits, uses a symmetric key algorithm.
One of the security exits, exit A, generates a random number and sends it in a security message to its
partner security exit, exit B. Exit B encrypts the number using its copy of a key which is known only to
the two security exits. Exit B sends the encrypted number to exit A in a security message with a second
random number that exit B has generated. Exit A verifies that the first random number has been
encrypted correctly, encrypts the second random number using its copy of the key, and sends the
encrypted number to exit B in a security message. Exit B then verifies that the second random number
has been encrypted correctly. During this exchange, if either security exit is not satisfied with the
authenticity of other, it can instruct the MCA to close the channel.
An advantage of this technique is that no key or password is sent over the communications connection
during the exchange. A disadvantage is that it does not provide a solution to the problem of how to
distribute the shared key in a secure way. One solution to this problem is described in Implementing
confidentiality in user exit programs on page 378. A similar technique is used in SNA for the mutual
authentication of two LUs when they bind to form a session. The technique is described in Session level
authentication on page 233.
All the preceding techniques for mutual authentication can be adapted to provide one-way
authentication.
304
Security
305
This technique might be considered sufficient for messages that originate in a controlled and trusted
environment, and in circumstances where a trusted authentication server or PKI support is not
available.
306
The call to access the OCSP responder can result in one of the following three outcomes:
Good
Revoked
The certificate is revoked.
Unknown
This outcome can arise for one of three reasons:
v WebSphere MQ cannot access the OCSP responder.
v The OCSP responder has sent a response, but WebSphere MQ cannot verify the digital
signature of the response.
v The OCSP responder has sent a response that indicates that it has no revocation data for the
certificate.
If WebSphere MQ receives an OCSP outcome of Unknown, its behavior depends on the setting of
the OCSPAuthentication attribute. For queue managers, this attribute is held in the SSL stanza of
the qm.ini file for UNIX and Linux systems, or the Windows registry. It can be set using the
WebSphere MQ Explorer. For clients, it is held in the SSL stanza of the client configuration file.
If an outcome of Unknown is received and OCSPAuthentication is set to REQUIRED (the default
value), WebSphere MQ rejects the connection and issues an error message of type AMQ9716. If
queue manager SSL event messages are enabled, an SSL event message of type
MQRC_CHANNEL_SSL_ERROR with ReasonQualifier set to MQRQ_SSL_HANDSHAKE_ERROR
is generated.
If an outcome of Unknown is received and OCSPAuthentication is set to OPTIONAL, WebSphere
MQ allows the SSL channel to start and no warnings or SSL event messages are generated.
If an outcome of Unknown is received and OCSPAuthentication is set to WARN, the SSL channel
starts but WebSphere MQ issues a warning message of type AMQ9717 in the error log. If queue
manager SSL event messages are enabled, an SSL event message of type
MQRC_CHANNEL_SSL_WARNING with ReasonQualifier set to
MQRQ_SSL_UNKNOWN_REVOCATION is generated.
Security
307
Online Certificate Status Protocol (OCSP) in Java and JMS client applications
Due to a limitation of the Java API, WebSphere MQ can use Online Certificate Status Protocol (OCSP)
certificate revocation checking for SSL and TLS secure sockets only when OCSP is enabled for the entire
Java virtual machine (JVM) process. There are two ways to enable OCSP for all secure sockets in the JVM:
v Edit the JRE java.security file to include the OCSP configuration settings that are shown in Table 1 and
restart the application.
v Use the java.security.Security.setProperty() API, subject to any Java Security Manager policy in effect.
As a minimum, you must specify one of the ocsp.enable and ocsp.responderURL values.
Property Name
Description
ocsp.enable
ocsp.responderURL
ocsp.responderCertSubjectName
ocsp.responderCertIssuerName
308
Property Name
Description
ocsp.responderCertSerialNumber
Before you enable OCSP in this way, there are a number of considerations:
v Setting the OCSP configuration affects all secure sockets in the JVM process. In some cases this
configuration might have undesirable side-effects when the JVM is shared with other application code
that uses SSL or TLS secure sockets. Ensure that the chosen OCSP configuration is suitable for all of the
applications that are running in the same JVM.
v Applying maintenance to your JRE might overwrite the java.security file. Take care when you apply
Java interim fixes and product maintenance to avoid overwriting the java.security file. It might be
necessary to reapply your java.security changes after you apply maintenance. For this reason, you
might consider setting the OCSP configuration by using the java.security.Security.setProperty() API
instead.
v Enabling OCSP checking has an effect only if revocation checking is also enabled. Revocation checking
is enabled by the PKIXParameters.setRevocationEnabled() method.
v If you are using the AMS Java Interceptor described in Enabling OCSP checking in native interceptors,
take care to avoid using a java.security OCSP configuration that conflicts with the AMS OCSP
configuration in the keystore configuration file.
Security
309
Figure 57 on page 311 shows the DIT structure that your LDAP server creates when you load the sample
LDIF file shown in Figure 56 together with a similar file for CA2, an imaginary Certificate Authority set
up by the PKI organization, also within IBM.
310
c = GB
o = IBM
ou = Test
cn = CA1
ou = PKI
cn = CA2
Figure 57. Example of an LDAP Directory Information Tree structure
311
of an LDAP server. When you have more than one authentication information object, the LDAP
servers to which they point must contain identical information. This provides continuity of service if
one or more LDAP servers fail.
On all platforms, the user ID and password are sent to the LDAP server unencrypted.
2. Using the DEFINE NAMELIST MQSC command, define a namelist for the names of your
authentication information objects.
3. Using the ALTER QMGR MQSC command, supply the namelist to the queue manager. For example:
ALTER QMGR SSLCRLNL(sslcrlnlname)
312
Security
313
To enable a WebSphere MQ MQI client to access an OCSP responder or LDAP servers that hold CRLs,
the attributes of one or more authentication information objects can be included in a client channel
definition table. You can include such attributes in one of the following ways:
On the server platforms AIX, HP-UX, Linux, Solaris, and Windows
You can define a namelist that contains the names of one or more authentication information
objects. You can then set the queue manager attribute, SSLCRLNameList, to the name of this
namelist.
If you are using CRLs, more than one LDAP server can be configured to provide higher
availability. The intention is that each LDAP server holds the same CRLs. If one LDAP server is
unavailable when it is required, a WebSphere MQ MQI client can attempt to access another.
The attributes of the authentication information objects identified by the namelist are referred to
collectively here as the certificate revocation location. When you set the queue manager attribute,
SSLCRLNameList, to the name of the namelist, the certificate revocation location is copied into the
client channel definition table associated with the queue manager. If the CCDT can be accessed
from a client system as a shared file, or if the CCDT is then copied to a client system, the
WebSphere MQ MQI client on that system can use the certificate revocation location in the CCDT
to access an OCSP responder or LDAP servers that hold CRLs.
If the certificate revocation location of the queue manager is changed later, the change is reflected
in the CCDT associated with the queue manager. If the queue manager attribute, SSLCRLNameList,
is set to blank, the certificate revocation location is removed from the CCDT. These changes are
not reflected in any copy of the table on a client system.
If you require the certificate revocation location at the client and server ends of an MQI channel
to be different, and the server queue manager is the one that is used to create the certificate
revocation location, you can do it as follows:
1. On the server queue manager, create the certificate revocation location for use on the client
system.
2. Copy the CCDT containing the certificate revocation location to the client system.
3. On the server queue manager, change the certificate revocation location to what is required at
the server end of the MQI channel.
Using Active Directory on Windows
On Windows systems, you can use the setmqcrl control command to publish the current CRL
information in Active Directory.
Command setmqcrl does not publish OCSP information.
For information about this command and its syntax, see setmqcrl.
Accessing CRLs and ARLs with WebSphere MQ classes for Java and WebSphere MQ classes for JMS:
WebSphere MQ classes for Java and WebSphere MQ classes for JMS access CRLs differently from other
platforms.
For information about working with CRLs and ARLs with WebSphere MQ classes for Java, see Using
certificate revocation lists
For information about working with CRLs and ARLs with WebSphere MQ classes for JMS, see
SSLCERTSTORES object property
314
For a complete description of these commands, see Definitions of the Programmable Command Formats.
On platforms where it is available, you can also use the WebSphere MQ Explorer.
Security
315
In this example:
v saturn.queue.manager is the queue manager name
v queue is the object type
v RED.LOCAL.QUEUE is the object name
v groupa is the identifier of the group with authorizations that are to change
v +browse -get +put is the authorization list for the specified queue
+browse adds authorization to browse messages on the queue (to issue MQGET with the browse
option)
-get removes authorization to get (MQGET) messages from the queue
+put adds authorization to put (MQPUT) messages on the queue
The following command revokes put authority on the queue MyQueue from principal fvuser and from
groups groupa and groupb. On UNIX and Linux systems, this command also revokes put authority for
all principals in the same primary group as fvuser.
316
Use the question mark (?) instead of any single character. For example, AB.?D applies to the
objects AB.CD, AB.ED, and AB.FD.
**
Note: When using wildcard characters on UNIX and Linux systems, you must enclose the profile name
in single quotation marks.
Profile priorities
An important point to understand when using generic profiles is the priority that profiles are given when
deciding what authorities to apply to an object being created. For example, suppose that you have issued
the commands:
Security
317
The first gives put authority to all queues for the principal fred with names that match the profile AB.*;
the second gives get authority to the same types of queue that match the profile AB.C*.
Suppose that you now create a queue called AB.CD. According to the rules for wildcard matching, either
setmqaut could apply to that queue. So, does it have put or get authority?
To find the answer, you apply the rule that, whenever multiple profiles can apply to an object, only the
most specific applies. The way that you apply this rule is by comparing the profile names from left to
right. Wherever they differ, a non-generic character is more specific then a generic character. So, in the
example above, the queue AB.CD has get authority (AB.C* is more specific than AB.*).
When you are comparing generic characters, the order of specificity is:
1. ?
2. *
3. **
a.b.*
queue
user1
principal
get, browse, put, inq
Note: Although UNIX and Linux users can use the -p option for the dmpmqaut command, they must
use -g groupname instead when defining authorizations.
2. This example dumps all authority records with a profile that matches queue a.b.c.
dmpmqaut -m qmgr1 -n a.b.c -t q
318
object type:
entity:
type:
authority:
queue
group1
group
get
3. This example dumps all authority records for profile a.b.*, of type queue.
dmpmqaut -m qmgr1 -n a.b.* -t q
a.b.*
queue
user1
principal
get, browse, put, inq
4. This example dumps all authority records for queue manager qmX.
dmpmqaut -m qmX
5. This example dumps all profile names and object types for queue manager qmX.
dmpmqaut -m qmX -l
Note: For WebSphere MQ for Windows only, all principals displayed include domain information, for
example:
profile:
object type:
entity:
type:
authority:
a.b.*
queue
user1@domain1
principal
get, browse, put, inq
Security
319
Use the question mark (?) instead of any single character. For example, AB.?D applies to the
objects AB.CD, AB.ED, and AB.FD.
**
Note: When using wildcard characters on UNIX and Linux systems, you must enclose the profile name
in single quotation marks.
Profile priorities:
More than one generic profile can apply to a single object. Where this is the case, the most specific rule
applies.
An important point to understand when using generic profiles is the priority that profiles are given when
deciding what authorities to apply to an object being created. For example, suppose that you have issued
the commands:
setmqaut -n AB.* -t q +put -p fred
setmqaut -n AB.C* -t q +get -p fred
The first gives put authority to all queues for the principal fred with names that match the profile AB.*;
the second gives get authority to the same types of queue that match the profile AB.C*.
Suppose that you now create a queue called AB.CD. According to the rules for wildcard matching, either
setmqaut could apply to that queue. So, does it have put or get authority?
To find the answer, you apply the rule that, whenever multiple profiles can apply to an object, only the
most specific applies. The way that you apply this rule is by comparing the profile names from left to
right. Wherever they differ, a non-generic character is more specific then a generic character. So, in the
example above, the queue AB.CD has get authority (AB.C* is more specific than AB.*).
320
When you are comparing generic characters, the order of specificity is:
1. ?
2. *
3. **
Dumping profile settings:
Use the dmpmqaut control command or the MQCMD_INQUIRE_AUTH_RECS PCF command to dump the current
authorizations associated with a specified profile.
For a full definition of the dmpmqaut control command and its syntax, see dmpmqaut, and for a full
definition of the MQCMD_INQUIRE_AUTH_RECS PCF command and its syntax, see Inquire Authority Records.
The following examples show the use of the dmpmqaut control command to dump authority records for
generic profiles:
1. This example dumps all authority records with a profile that matches queue a.b.c for principal user1.
dmpmqaut -m qm1 -n a.b.c -t q -p user1
a.b.*
queue
user1
principal
get, browse, put, inq
Note: UNIX and Linux users cannot use the -p option; they must use -g groupname instead.
2. This example dumps all authority records with a profile that matches queue a.b.c.
dmpmqaut -m qmgr1 -n a.b.c -t q
3. This example dumps all authority records for profile a.b.*, of type queue.
dmpmqaut -m qmgr1 -n a.b.* -t q
a.b.*
queue
user1
principal
get, browse, put, inq
4. This example dumps all authority records for queue manager qmX.
dmpmqaut -m qmX
Security
321
5. This example dumps all profile names and object types for queue manager qmX.
dmpmqaut -m qmX -l
Note: For WebSphere MQ for Windows only, all principals displayed include domain information, for
example:
profile:
object type:
entity:
type:
authority:
a.b.*
queue
user1@domain1
principal
get, browse, put, inq
322
See MQSNOAUT for more information about the implications of setting the MQSNOAUT variable.
v Use the WebSphere MQ Explorer or edit the queue manager configuration file to remove the service (if
you do this, you cannot add an OAM later).
If you use setmqaut, or dspmqaut while the OAM is disabled, note the following points:
v The OAM does not validate the specified principal, or group, meaning that the command can accept
invalid values.
v The OAM does not perform security checks and indicates that all principals and groups are authorized
to perform all applicable object operations.
When an OAM is removed, it cannot be put back on an existing queue manager. This is because the
OAM needs to be in place at object creation time. To use the WebSphere MQ OAM again after it has been
removed, the queue manager needs to be rebuilt.
Security
323
Procedure
1. Do you need to limit access to your queue manager to certain users?
a. No: Take no further action.
b. Yes: Go to the next question.
2. Do these users need partial administrative access on a subset of queue manager resources?
a. No: Go to the next question.
b. Yes: See Granting partial administrative access on a subset of queue manager resources.
3. Do these users need full administrative access on a subset of queue manager resources?
a. No: Go to the next question.
b. Yes: See Granting full administrative access on a subset of queue manager resources on page
329.
4. Do these users need read only access to all queue manager resources?
a. No: Go to the next question.
b. Yes: See Granting read-only access to all resources on a queue manager on page 334.
5. Do these users need full administrative access on all queue manager resources?
a. No: Go to the next question.
b. Yes: See Granting full administrative access to all resources on a queue manager on page 335.
6. Do you need user applications to connect to your queue manager?
a. No: Disable connectivity, as described in Removing connectivity to the queue manager on page
336
b. Yes: See Allowing user applications to connect to your queue manager on page 336.
Queues
Topics
Channels
324
Table 18. Granting partial administrative access to a subset of queue manager resources (continued)
The users need to administer objects of this type
Processes
Namelists
Services
Security
325
326
Results
To determine which MQSC commands the user can perform on the queue manager, issue the following
commands for each MQSC command:
RDEFINE MQCMDS QMgrName.ReqdAction.QMGR UACC(NONE)
PERMIT QMgrName.ReqdAction.QMGR CLASS(MQCMDS) ID(GroupName) ACCESS(ALTER)
To permit the user to use the DISPLAY QMGR command, issue the following commands:
RDEFINE MQCMDS QMgrName.DISPLAY.QMGR UACC(NONE)
PERMIT QMgrName.DISPLAY.QMGR CLASS(MQCMDS) ID(GroupName) ACCESS(READ)
Security
327
Procedure
v For UNIX, Linux and Windows systems, issue the following command:
setmqaut -m QMgrName -n ObjectProfile -t process -g GroupName ReqdAction
328
Results
These commands grant access to the specified service. To determine which MQSC commands the user
can perform on the service, issue the following commands for each MQSC command:
RDEFINE MQCMDS QMgrName.ReqdAction.SERVICE UACC(NONE)
PERMIT QMgrName.ReqdAction.SERVICE CLASS(MQCMDS) ID(GroupName) ACCESS(ALTER)
To permit the user to use the DISPLAY SERVICE command, issue the following commands:
RDEFINE MQCMDS QMgrName.DISPLAY.SERVICE UACC(NONE)
PERMIT QMgrName.DISPLAY.SERVICE CLASS(MQCMDS) ID(GroupName) ACCESS(READ)
Queues
Topics
Channels
Security
329
Table 19. Granting full administrative access to a subset of queue manager resources (continued)
The users need to administer objects of this type
Processes
Namelists
Services
330
Procedure
v For UNIX, Linux and Windows systems, issue the following command:
setmqaut -m QMgrName -n ObjectProfile -t topic -g GroupName +alladm
Security
331
332
Security
333
ObjectProfile
The name of the object or generic profile for which to change authorizations.
GroupName
The name of the group to be granted access.
Procedure
v Using the wizard:
1. In the WebSphere MQ Explorer Navigator pane, right-click the queue manager and click Object
Authorities > Add Role Based Authorities The Add Role Based Authorities wizard opens.
v For UNIX and Windows systems, issue the following commands:
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-t
334
Procedure
v Using the wizard:
1. In the WebSphere MQ Explorer Navigator pane, right-click the queue manager and click Object
Authorities > Add Role Based Authorities The Add Role Based Authorities wizard opens.
v For UNIX and Linux systems, issue the following commands:
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
setmqaut
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
-m
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
QMgrName
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-n
-t
v For Windows systems, issue the same commands as for UNIX and Linux systems, but using the profile
name @CLASS instead of @class.
v For IBM i, issue the following command:
GRTMQMAUT OBJ(*ALL) OBJTYPE(*ALL) USER(GroupName) AUT(*ALLADM) MQMNAME(QMgrName)
Security
335
GroupName
The name of the group to be granted access.
Procedure
v For UNIX, Linux and Windows systems, issue the following command:
setmqaut -m QMgrName -t qmgr -g GroupName -connect
MQCONN
MQCONN
MQCONN
MQCONN
QMgrName.BATCH UACC(NONE)
QMgrName.CHIN UACC(NONE)
QMgrName.CICS UACC(NONE)
QMgrName.IMS UACC(NONE)
Do not issue any PERMIT commands. The variable names have the following meanings:
QMgrName
The name of the queue manager. On z/OS, this value can also be the name of a queue-sharing
group.
GroupName
The name of the group to be denied access.
336
Statement
You have applications that inquire on the queue manager See Granting authority to inquire on a queue manager
object
on page 350.
You have applications that use process objects
Security
337
To block IP addresses from using a specific channel, set a channel authentication record by using the
MQSC command SET CHLAUTH, or the PCF command Set Channel Authentication Record.
SET CHLAUTH(generic-channel-name) TYPE(ADDRESSMAP) ADDRLIST(generic-ip-address) USERSRC(NOACCESS)
generic-channel-name is either the name of a channel to which you want to control access, or a
pattern including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-ip-address is either the address from which you are refusing connections, or a pattern
including the asterisk (*) as a wildcard or the hyphen (-) to indicate a range, that matches the
address. For more information about filtering IP addresses with patterns, see Generic IP addresses
v To block IP addresses from using the whole queue manager, as a temporary measure until the firewall
can be updated, set a channel authentication record by using the MQSC command SET CHLAUTH, or the
PCF command Set Channel Authentication Record. It must be noted that this type of rule will hold
the inbound connection open for 30 seconds before it is failed. To avoid this delay, and then only if the
inbound connections to be blocked are channels, use the type of rule described above. This rule
operates at the listener, before the channel name requested is known. You must therefore specify the
channel name as an asterisk (*), matching all channels. You can specify the IP address in the channel
authentication record singly, as a generic IP address pattern, or as a list of IP addresses.
SET CHLAUTH(*) TYPE(BLOCKADDR) ADDRLIST(generic-ip-address)
generic-ip-address is either the address from which you are refusing connections, or a pattern
including the asterisk (*) as a wildcard or the hyphen (-) to indicate a range, that matches the
address. For more information about filtering IP addresses with patterns, see Generic IP addresses
Related information:
SET CHLAUTH
Temporarily blocking specific IP addresses if the queue manager is not running:
You might want to block particular IP addresses, or ranges of addresses, when the queue manager is not
running and you cannot therefore issue MQSC commands. You can temporarily block IP addresses on an
exceptional basis by modifying the blockaddr.ini file.
About this task
The blockaddr.ini file contains a copy of the BLOCKADDR definitions that are used by the queue
manager. This file is read by the listener if the listener is started before the queue manager. In these
circumstances, the listener uses any values that you have manually added to the blockaddr.ini file.
338
However, be aware that when the queue manager is started, it writes the set of BLOCKADDR definitions
to the blockaddr.ini file, over-writing any manual editing you might have done. Similarly, every time
you add or delete a BLOCKADDR definition by using the SET CHLAUTH command, the blockaddr.ini file
is updated. You can therefore make permanent changes to the BLOCKADDR definitions only by using
the SET CHLAUTH command when the queue manager is running.
Procedure
1. Open the blockaddr.ini file in a text editor. The file is located in the data directory of the queue
manager.
2. Add IP addresses as simple keyword-value pairs, where the keyword is Addr. For information about
filtering IP addresses with patterns, see Generic IP addresses. For example:
Addr = 192.0.2.0
Addr = 192.0.*
Addr = 192.0.2.1-8
Related tasks:
Blocking specific IP addresses on page 338
You can prevent a specific channel accepting an inbound connection from an IP address, or prevent the
whole queue manager from allowing access from an IP address, by using a channel authentication record.
Related information:
SET CHLAUTH
Blocking specific user IDs:
You can prevent specific users from using a channel by specifying user IDs that, if asserted, cause the
channel to end. Do this by setting a channel authentication record.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
Procedure
Set a channel authentication record using the MQSC command SET CHLAUTH, or the PCF command Set
Channel Authentication Record. For example, you can issue the MQSC command:
SET CHLAUTH(generic-channel-name) TYPE(BLOCKUSER) USERLIST(userID1, userID2)
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
The user list provided on a TYPE(BLOCKUSER) only applies to SVRCONN channels and not queue
manager to queue manager channels.
userID1 and userID2 are each the ID of a user that is to be prevented from using the channel. You can
also specify the special value *MQADMIN to refer to privileged administrative users. For more
information about privileged users, see Privileged users on page 302. For more information about
*MQADMIN, see SET CHLAUTH.
Security
339
Related information:
SET CHLAUTH
Mapping a remote queue manager to an MCAUSER user ID:
You can use a channel authentication record to set the MCAUSER attribute of a channel, according to the
queue manager from which the channel is connecting.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
generic-channel-name is either the name of a channel to which you want to control access, or a
pattern including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-partner-qmgr-name is either the name of the queue manager, or a pattern including the
asterisk (*) symbol as a wildcard that matches the queue manager name.
user is the user ID to be used for all connections from the specified queue manager.
v To restrict this command to certain IP addresses, include the ADDRESS parameter, as follows:
SET CHLAUTH(generic-channel-name) TYPE (QMGRMAP) QMNAME(generic-partner-qmgr-name
) USERSRC(MAP) MCAUSER(user) ADDRESS(generic-ip-address)
generic-channel-name is either the name of a channel to which you want to control access, or a
pattern including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-ip-address is either a single address, or a pattern including the asterisk (*) symbol as a
wildcard or the hyphen (-) to indicate a range, that matches the address. For more information
about generic IP addresses, see Generic IP addresses.
Related information:
SET CHLAUTH
Mapping a client asserted user ID to an MCAUSER user ID:
You can use a channel authentication record to change the MCAUSER attribute of a server-connection
channel, according to the original user ID received from a client.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
340
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
client-user-name is the user ID asserted by the client.
user is the user ID to be used instead of the client user name.
Related information:
SET CHLAUTH
Mapping an SSL or TLS Distinguished Name to an MCAUSER user ID:
You can use a channel authentication record to set the MCAUSER attribute of a channel, according to the
Distinguished Name (DN) received.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
Procedure
Set a channel authentication record using the MQSC command SET CHLAUTH, or the PCF command Set
Channel Authentication Record. For example, you can issue the MQSC command:
SET CHLAUTH(generic-channel-name) TYPE (SSLPEERMAP) SSLPEER(generic-ssl-peer-name
) USERSRC(MAP) MCAUSER(user)
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-ssl-peer-name is a string following the standard WebSphere MQ rules for SSLPEER values. See
WebSphere MQ rules for SSLPEER values.
user is the user ID to be used for all connections using the specified DN.
Related information:
SET CHLAUTH
Blocking access from a remote queue manager:
You can use a channel authentication record to prevent a remote queue manager from starting channels.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
Security
341
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-partner-qmgr-name is either the name of the queue manager, or a pattern including the asterisk
(*) symbol as a wildcard that matches the queue manager name.
Related information:
SET CHLAUTH
Blocking access for a client asserted user ID:
You can use a channel authentication record to prevent a client asserted user ID from starting channels.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
client-user-name is the user ID asserted by the client.
Related information:
SET CHLAUTH
Blocking access for an SSL Distinguished Name:
You can use a channel authentication record to prevent an SSL Distinguished Name from starting
channels.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
342
Procedure
Set a channel authentication record using the MQSC command SET CHLAUTH, or the PCF command Set
Channel Authentication Record. For example, you can issue the MQSC command:
SET CHLAUTH(generic-channel-name) TYPE(SSLPEERMAP) SSLPEER(generic-ssl-peer-name) USERSRC(NOACCESS)
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
generic-ssl-peer-name is a string following the standard WebSphere MQ rules for SSLPEER values. See
WebSphere MQ rules for SSLPEER values.
Related information:
SET CHLAUTH
Mapping an IP address to an MCAUSER user ID:
You can use a channel authentication record to set the MCAUSER attribute of a channel, according to the
IP address from which the connection is received.
Before you begin
Ensure that channel authentication records are enabled as follows:
ALTER QMGR CHLAUTH(ENABLED)
Procedure
Set a channel authentication record using the MQSC command SET CHLAUTH, or the PCF command Set
Channel Authentication Record. For example, you can issue the MQSC command:
SET CHLAUTH(generic-channel-name) TYPE(ADDRESSMAP) ADDRESS(generic-ip-address) USERSRC(MAP) MCAUSER(user)
generic-channel-name is either the name of a channel to which you want to control access, or a pattern
including the asterisk (*) symbol as a wildcard that matches the channel name.
user is the user ID to be used for all connections using the specified DN.
generic-ip-address is either the address from which the connection is being made, or a pattern including
the asterisk (*) as a wildcard or the hyphen (-) to indicate a range, that matches the address.
Related information:
SET CHLAUTH
Disabling remote access to the queue manager:
If you do not want client applications to connect to your queue manager, disable remote access to it.
About this task
Prevent client applications connecting to the queue manager in one of the following ways:
Procedure
v Delete all server-connection channels using the MQSC command DELETE CHANNEL.
v Set the message channel agent user identifier (MCAUSER) of the channel to a user ID with no access
rights, using the MQSC command ALTER CHANNEL.
Setting up connection security:
Grant the authority to connect to the queue manager to each user or group of users with a business need
to do so.
Security
343
USER(GroupName) AUT(*CONNECT)
These commands give authority to connect for batch, CICS, IMS and the channel initiator (CHIN). If
you do not use a particular type of connection, omit the relevant commands. The variable names have
the following meanings:
QMgrName
The name of the queue manager. On z/OS, this value can also be the name of a queue-sharing
group.
ObjectProfile
The name of the object or generic profile for which to change authorizations.
GroupName
The name of the group to be granted access.
Controlling user access to queues:
You want to control application access to queues. Use this topic to determine what actions to take.
For each true statement in the first column, take the action indicated in the second column.
Statement
Action
344
345
v For z/OS, issue the following commands to pass identity context or all context:
RDEFINE MQQUEUE QMgrName.ObjectProfile UACC(NONE)
PERMIT QMgrName.ObjectProfile CLASS(MQQUEUE) ID(GroupName) ACCESS(UPDATE)
346
347
QMgrName
The name of the queue manager. On z/OS, this value can also be the name of a queue-sharing
group.
ModelQueueName
The name of the model queue on which dynamic queues are based.
ObjectProfile
The name of the dynamic queue or generic profile for which to change authorizations.
GroupName
The name of the group to be granted access.
Granting authority to put messages to a remote cluster queue:
Grant the authority to put messages to a remote cluster queue or set of queues, to each group of users
with a business need for it.
About this task
To put a message on a remote cluster queue, you can either put it on a local definition of a remote queue,
or a fully qualified remote queue. If you are using a local definition of a remote queue, you need
authority to put to the local object: see Granting authority to put messages to a local queue on page
347. If you are using a fully qualified remote queue, you need authority to put to the remote queue.
Grant this authority using the appropriate commands for your operating system.
The default behavior is to perform access control against the SYSTEM.CLUSTER.TRANSMIT.QUEUE. Note that
this behavior applies, even if you are using multiple transmission queues.
The specific behavior described in this topic applies only when you have configured the
ClusterQueueAccessControl attribute in the qm.ini file to be RQMName, as described in the Security
stanza topic, and restarted the queue manager.
On UNIX, Linux, and Windows systems, you can also use the SET AUTHREC command.
Procedure
v For UNIX, Linux and Windows systems, issue the following command:
setmqaut -m QMgrName -t rqmname -n ObjectProfile -g GroupName +put
Note that you can use the rqmname object for remote cluster queues only.
v For IBM i, issue the following command:
GRTMQMAUT OBJTYPE(*RMTMQMNAME) OBJ(ObjectProfile) USER(GroupName) AUT(*PUT) MQMNAME(QMgrName)
Note that you can use the RMTMQMNAME object for remote cluster queues only.
v For z/OS, issue the following commands:
RDEFINE MQQUEUE QMgrNameObjectProfile UACC(NONE)
PERMIT QMgrNameObjectProfile CLASS(MQADMIN)
ID(GroupName) ACCESS(UPDATE)
Note that you can use the name of the remote queue manager (or queue-sharing group) for remote
cluster queues only. The variable names have the following meanings:
QMgrName
The name of the queue manager. On z/OS, this value can also be the name of a queue-sharing
group.
ObjectProfile
The name of the remote queue manager or generic profile for which to change authorizations.
348
GroupName
The name of the group to be granted access.
Controlling user access to topics:
You need to control the access of applications to topics. Use this topic to determine what actions to take.
For each true statement in the first column, take the action indicated in the second column.
Table 20. Controlling user access to topics
Statement
Action
Security
349
These commands grant access to the specified queue manager. To permit the user to use the MQINQ
command, issue the following commands:
RDEFINE MQCMDS QMgrName.MQINQ.QMGR UACC(NONE)
PERMIT QMgrName.MQINQ.QMGR CLASS(MQCMDS) ID(GroupName) ACCESS(READ)
350
ObjectProfile
The name of the object or generic profile for which to change authorizations.
GroupName
The name of the group to be granted access.
Granting authority to access processes:
Grant the authority to access a process or set of processes, to each group of users with a business need
for it.
About this task
To grant the authority to access some processes, use the appropriate commands for your operating
system.
Procedure
v For UNIX, Linux and Windows systems, issue the following command:
setmqaut -m QMgrName -n ObjectProfile -t process -g GroupName +all
Security
351
352
On UNIX and Linux platforms, a special user ID of mqm is also created, for use by the product only. It
must never be available to non-privileged users. All WebSphere MQ objects are owned by user ID mqm.
On Windows systems, members of the Administrators group can also administer any queue manager, as
can the SYSTEM account. You can also create a domain mqm group on the domain controller that
contains all privileged user IDs active within the domain, and add it to the local mqm group. Some
commands, for example crtmqm, manipulate authorities on WebSphere MQ objects and so need authority
to work with these objects (as described in the following sections). Members of the mqm group have
authority to work with all objects, but there might be circumstances on Windows systems when authority
is denied if you have a local user and a domain-authenticated user with the same name. This is described
in Principals and groups on page 356.
Windows versions with a User Account Control (UAC) feature restricts the actions users can perform on
certain operating system facilities, even if they are members of the Administrators group. If your userid is
in the Administrators group but not the mqm group you must use an elevated command prompt to issue
WebSphere MQ admin commands such as crtmqm, otherwise the error "AMQ7077: You are not authorized
to perform the requested operation" is generated. To open an elevated command prompt, right-click the
start menu item, or icon, for the command prompt, and select "Run as administrator".
You do not need to be a member of the mqm group to do the following:
v Issue commands from an application program that issues PCF commands, or MQSC commands within
an Escape PCF command, unless the commands manipulate channel initiators. (These commands are
described in Protecting channel initiator definitions on page 229).
v Issue MQI calls from an application program (unless you want to use the fast path bindings on the
MQCONNX call).
v Use the crtmqcvx command to create a fragment of code that performs data conversion on data type
structures.
v Use the dspmq command to display queue managers.
v Use the dspmqtrc command to display WebSphere MQ formatted trace output.
A 12 character limitation applies to both group and user IDs.
UNIX and Linux platforms generally restrict the length of a user ID to 12 characters. AIX Version 5.3 has
raised this limit but WebSphere MQ continues to observe a 12 character restriction on all UNIX and
Linux platforms. If you use a user ID of greater than 12 characters, WebSphere MQ replaces it with the
value UNKNOWN. Do not define a user ID with a value of UNKNOWN.
Security
353
When security checks are made on UNIX, Linux and Windows systems
Security checks are typically made on connecting to a queue manager, opening or closing objects, and
putting or getting messages.
The security checks made for a typical application are as follows:
Connecting to the queue manager (MQCONN or MQCONNX calls)
This is the first time that the application is associated with a particular queue manager. The
queue manager interrogates the operating environment to discover the user ID associated with
the application. WebSphere MQ then verifies that the user ID is authorized to connect to the
queue manager and retains the user ID for future checks.
Users do not have to sign on to WebSphere MQ; WebSphere MQ assumes that users have signed
on to the underlying operating system and have been authenticated by that.
Opening the object (MQOPEN or MQPUT1 calls)
WebSphere MQ objects are accessed by opening the object and issuing commands against it. All
resource checks are performed when the object is opened, rather than when it is actually
accessed. This means that the MQOPEN request must specify the type of access required (for
example, whether the user wants only to browse the object or perform an update like putting
messages onto a queue).
354
WebSphere MQ checks the resource that is named in the MQOPEN request. For an alias or remote
queue object, the authorization used is that of the object itself, not the queue to which the alias or
remote queue resolves. This means that the user does not need permission to access it. Limit the
authority to create queues to privileged users. If you do not, users might bypass the normal
access control simply by creating an alias. If a remote queue is referred to explicitly with both the
queue and queue manager names, the transmission queue associated with the remote queue
manager is checked.
The authority to a dynamic queue is based on that of the model queue from which it is derived,
but is not necessarily the same. This is described in Note 1 on page 250.
The user ID used by the queue manager for access checks is the user ID obtained from the
operating environment of the application connected to the queue manager. A suitably authorized
application can issue an MQOPEN call specifying an alternative user ID; access control checks are
then made on the alternative user ID. This does not change the user ID associated with the
application, only that used for access control checks.
Putting and getting messages (MQPUT or MQGET calls)
No access control checks are performed.
Closing the object (MQCLOSE)
No access control checks are performed, unless the MQCLOSE results in a dynamic queue being
deleted. In this case, there is a check that the user ID is authorized to delete the queue.
Subscribing to a topic (MQSUB)
When an application subscribes to a topic, it specifies the type of operation that it needs to
perform. It is either creating a new subscription, altering an existing subscription, or resuming an
existing subscription without changing it. For each type of operation, the queue manager checks
that the user ID that is associated with the application has the authority to perform the operation.
When an application subscribes to a topic, the authority checks are performed against the topic
objects that are found in the topic tree at, or above, the point in the topic tree at which the
application subscribed. The authority checks might involve checks on more than one topic object.
The user ID that the queue manager uses for the authority checks is the user ID obtained from
the operating system when the application connects to the queue manager.
The queue manager performs authority checks on subscriber queues but not on managed queues.
Security
355
in the mqm group, and additionally on Windows, to users in the Administrators group, and users logged
in with the SYSTEM ID. User access to the queue cannot be changed.
WebSphere MQ supplies commands to create and maintain access control lists. For more information on
these commands, see Controlling access to objects by using the OAM on UNIX, Linux and Windows
systems on page 315.
WebSphere MQ passes the OAM a request containing a principal, a resource name, and an access type.
The OAM grants or rejects access based on the ACL that it maintains. WebSphere MQ follows the
decision of the OAM; if the OAM cannot make a decision, WebSphere MQ does not allow access.
356
primary group of the user ID is included in the ACL. The individual user ID is not included and
authority is granted to all members of that group. Because of this, be aware that you can
inadvertently change the authority of a principal by changing the authority of another principal
in the same group.
All users are nominally assigned to the default user group nobody and by default, no
authorizations are given to this group. You can change the authorization in the nobody group to
grant access to WebSphere MQ resources to users without specific authorizations.
Do not define a user ID with the value UNKNOWN. The value UNKNOWN is used when a
user ID is too long, so arbitrary user IDs would use the access authorities of UNKNOWN.
User IDs can contain up to 12 characters and group names up to 12 characters.
Windows systems
ACLs are based on both user IDs and groups. Checks are the same as for UNIX systems except
that individual user IDs can be displayed in the ACL as well. You can have different users on
different domains with the same user ID. WebSphere MQ permits user IDs to be qualified by a
domain name so that these users can be given different levels of access.
The group name can optionally include a domain name, specified in the following formats:
GroupName@domain
domain\GroupName
Security
357
By default, if a Windows SID is not supplied with an authorization request, WebSphere MQ identifies the
user based on the user name alone. It does this by searching the security databases in the following
order:
1. The local security database
2. The security database of the primary domain
3. The security database of trusted domains
If the user name is not unique, incorrect WebSphere MQ authority might be granted. To prevent this
problem, include an SID in each authorization request; the SID is used by WebSphere MQ to establish
user credentials.
To specify that all authorization requests must include an SID, use regedit. Set the SecurityPolicy to
NTSIDsRequired.
358
See Controlling context information for information about the context options, and Overview for MQMD
for descriptions of the message descriptor fields relating to context.
MCAUserIdentifier
Every instance of a channel that is current has an associated channel definition structure, MQCD. The
initial values of the fields in MQCD are determined by the channel definition that is created by a
WebSphere MQ administrator. In particular, the initial value of one of the fields, MCAUserIdentifier, is
determined by the value of the MCAUSER parameter on the DEFINE CHANNEL command, or by the
equivalent to MCAUSER if the channel definition is created in another way. MCAUserIdentifier contains
the first 12 bytes of the MCA user identifier. If the MCA user identifier is not blank, it specifies the user
identifier to be used by the message channel agent for authorization to access MQ resources. Ensure that
the MCAUSER is less than 12 characters on Windows platform.
The MQCD structure is passed to a channel exit program when it is called by an MCA. When a security
exit is called by an MCA, the security exit can change the value of MCAUserIdentifier, replacing any value
that was specified in the channel definition.
On IBM i, UNIX, Linux and Windows systems, unless the value of MCAUserIdentifier is blank, the queue
manager uses the value of MCAUserIdentifier as the user ID for authority checks when an MCA attempts
to access the queue manager's resources after it has connected to the queue manager. If the value of
MCAUserIdentifier is blank, the queue manager uses the default user ID of the MCA instead. This applies
to RCVR, RQSTR, CLUSRCVR and SVRCONN channels. For sending MCAs, the default user ID is
always used for authority checks, even if the value of MCAUserIdentifier is not blank.
On z/OS, the queue manager might use the value of MCAUserIdentifier for authority checks, provided it
is not blank. For receiving MCAs and server connection MCAs, whether the queue manager uses the
value of MCAUserIdentifier for authority checks depends on:
v The value of the PUTAUT parameter in the channel definition
v The RACF profile used for the checks
v The access level of the channel initiator address space user ID to the RESLEVEL profile
For sending MCAs, it depends on:
v Whether the sending MCA is a caller or a responder
v The access level of the channel initiator address space user ID to the RESLEVEL profile
The user ID that a security exit stores in MCAUserIdentifier can be acquired in various ways. Here are
some examples:
v Provided there is no security exit at the client end of an MQI channel, a user ID associated with the
WebSphere MQ client application flows from the client connection MCA to the server connection MCA
when the client application issues an MQCONN call. The server connection MCA stores this user ID in
the RemoteUserIdentifier field in the channel definition structure, MQCD. If the value of
MCAUserIdentifier is blank at this time, the MCA stores the same user ID in MCAUserIdentifier. If the
MCA does not store the user ID in MCAUserIdentifier, a security exit can do it later by setting
MCAUserIdentifier to the value of RemoteUserIdentifier.
If the user ID that flows from the client system is entering a new security domain and is not valid on
the server system, the security exit can substitute the user ID for one that is valid and store the
substituted user ID in MCAUserIdentifier.
v The user ID can be sent by the partner security exit in a security message.
Security
359
On a message channel, a security exit called by the sending MCA can send the user ID under which
the sending MCA is running. A security exit called by the receiving MCA can then store the user ID in
MCAUserIdentifier. Similarly, on an MQI channel, a security exit at the client end of the channel can
send the user ID associated with the WebSphere MQ MQI client application. A security exit at the
server end of the channel can then store the user ID in MCAUserIdentifier. As in the previous example,
if the user ID is not valid on the target system, the security exit can substitute the user ID for one that
is valid and store the substituted user ID in MCAUserIdentifier.
If a digital certificate is received as part of the identification and authentication service, a security exit
can map the Distinguished Name in the certificate to a user ID that is valid on the target system. It can
then store the user ID in MCAUserIdentifier.
v If SSL is used on the channel, the partner's Distinguished Name (DN) is passed to the exit in the
SSLPeerNamePtr field of the MQCD, and the DN of the issuer of that certificate is passed to the exit in
the SSLRemCertIssNamePtr field of the MQCXP.
For more information about the MCAUserIdentifier field, the channel definition structure, MQCD, and the
channel exit parameter structure, MQCXP, see Channel-exit calls and data structures. For more
information about the user ID that flows from a client system on an MQI channel, see Access control.
Note: Security exit applications constructed prior to the release of WebSphere MQ v7.1 may require
updating. For more information see Channel security exit programs.
360
For more details, see Identity mapping in message exits on page 304.
Confidentiality of messages
To maintain confidentiality, encrypt your messages. There are various methods of encrypting messages in
WebSphere MQ depending on your needs.
Your choice of CipherSpec determines what level of confidentiality you have.
If you need application-level, end-to-end data protection for your point to point messaging infrastructure,
you can use WebSphere MQ Advanced Message Security to encrypt the messages, or write your own API
exit or API-crossing exit.
If you need to encrypt messages only while they are being transported through a channel, because you
have adequate security on your queue managers, you can use SSL or TLS, or you can write your own
security exit, message exit, or send and receive exit programs.
For more information about WebSphere MQ Advanced Message Security, see WebSphere MQ Advanced
Message Security on page 222.The use of SSL and TLS with WebSphere MQ is described at WebSphere
MQ support for SSL and TLS on page 180. The use of exit programs in message encryption is described
at Implementing confidentiality in user exit programs on page 378.
361
Notes:
1. In this context, an SSL client refers to the connection initiating the handshake.
2. See the Glossary for further details.
On UNIX, Linux and Windows systems, the SSL or TLS client sends a certificate only if it has one labeled
in the correct WebSphere MQ format, which is ibmwebspheremq followed by the name of your queue
manager changed to lowercase. For example, for QM1, ibmwebspheremqqm1.
WebSphere MQ uses the ibmwebspheremq prefix on a label to avoid confusion with certificates for other
products. Ensure that you specify the entire certificate label in lowercase.
The SSL or TLS server always validates the client certificate if one is sent. If the client does not send a
certificate, authentication fails only if the end of the channel that is acting as the SSL or TLS server is
defined with either the SSLCAUTH parameter set to REQUIRED or an SSLPEER parameter value set. For
more information about connecting a queue manager anonymously, that is, when the SSL or TLS client
does not send a certificate, see Connecting two queue managers using one-way authentication on page
366.
QM1
QM2
QM1.TO.QM2
QM2
key repository
transmission
queue
key repository
QM1's certificate
QM2's certificate
QM2's certificate
QM1's certificate
In Figure 58, the key repository for QM1 contains the certificate for QM1 and the public certificate from
QM2. The key repository for QM2 contains the certificate for QM2 and the public certificate from QM1.
Procedure
1. Prepare the key repository on each queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Create a self-signed certificate for each queue manager:
362
3.
4.
5.
6.
This example uses CipherSpec RC4_MD5. The CipherSpecs at each end of the channel must be the
same.
7. On QM2, define a receiver channel, by issuing a command like the following example:
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(RCVR) TRPTYPE(TCP) SSLCIPH(RC4_MD5_US)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from QM1 to QM2)
The channel must have the same name as the sender channel you defined in step 6, and use the same
CipherSpec.
8. Start the channel.
Results
Key repositories and channels are created as illustrated in Figure 58 on page 362
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is similar to that shown in the following examples.
From queue manager QM1, enter the following command:
DISPLAY CHS(QM1.TO.QM2) SSLPEER SSLCERTI
363
CONNAME(9.20.35.92)
CURRENT
RQMNAME(QM1)
SSLCERTI("CN=QM1,OU=WebSphere MQ Development,O=IBM,ST=Hampshire,C=UK")
SSLPEER("SERIALNUMBER=4C:D0:49:D5:02:5F:38,CN=QM1,OU=WebSphere MQ Development,O=IBM,ST=Hampshire,C=UK")
STATUS(RUNNING)
SUBSTATE(RECEIVE)
XMITQ( )
In each case, the value of SSLPEER must match that of the DN in the partner certificate that was created
in Step 2. The issuers name matches the peer name because the certificate is self-signed .
SSLPEER is optional. If it is specified, its value must be set so that the DN in the partner certificate
(created in step 2) is allowed. For more information about the use of SSLPEER, see WebSphere MQ rules
for SSLPEER values.
QMA
QMB
TO.QMB
QMB
key repository
transmission
queue
key repository
QMA's certificate
QMB's certificate
CA certificate
CA certificate
In Figure 59, the key repository for QMA contains QMA's certificate and the CA certificate. The key
repository for QMB contains QMB's certificate and the CA certificate. In this example both QMA's
certificate and QMB's certificate were issued by the same CA. If QMA's certificate and QMB's certificate
were issued by different CAs then the key repositories for QMA and QMB must contain both CA
certificates.
Procedure
1. Prepare the key repository on each queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Request a CA-signed certificate for each queue manager. You might use different CAs for the two
queue managers.
364
This example uses CipherSpec RC4_MD5. The CipherSpecs at each end of the channel must be the
same.
6. On QMB, define a receiver channel by issuing a command like the following example:
DEFINE CHANNEL(TO.QMB) CHLTYPE(RCVR) TRPTYPE(TCP) SSLCIPH(RC2_MD5_EXPORT)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL to QMB)
The channel must have the same name as the sender channel you defined in step 6, and use the same
CipherSpec.
7. Start the channel:
Results
Key repositories and channels are created as illustrated in Figure 59 on page 364.
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is like that shown in the following examples.
From queue manager QMA, enter the following command:
DISPLAY CHS(TO.QMB) SSLPEER SSLCERTI
365
CONNAME(9.20.35.92)
CURRENT
RQMNAME(QMA)
SSLCERTI("CN=WebSphere MQ CA,OU=WebSphere MQ Devt,O=IBM,ST=Hampshire,C=UK")
SSLPEER("SERIALNUMBER=4C:D0:49:D5:02:5F:38,CN=QMA,OU=WebSphere MQ Development,O=IBM,ST=Hampshire,C=UK")
STATUS(RUNNING)
SUBSTATE(RECEIVE)
XMITQ( )
In each case, the value of SSLPEER must match that of the Distinguished Name (DN) in the partner
certificate that was created in Step 2. The issuer name matches the subject DN of the CA certificate that
signed the personal certificate added in Step 4.
QMA
QMB
TO.QMB
QMB
key repository
SSLCAUTH (optional)
transmission
queue
CA certificate
key repository
QMB's certificate
CA certificate
Procedure
1. Remove QM1's personal certificate from its key repository, according to operating system:
v On UNIX, Linux, and Windows systems. The certificate is labeled as follows:
ibmwebspheremq followed by the name of your queue manager folded to lower case. For example,
for QM1, ibmwebspheremqqm1.
2. Optional: On QM1, if any SSL or TLS channels have run previously, refresh the SSL or TLS
environment.
3. Allow anonymous connections on the receiver.
Results
Key repositories and channels are changed as illustrated in Figure 60
366
What to do next
If the sender channel was running and you issued the REFRESH SECURITY TYPE(SSL) command (in
step 2), the channel restarts automatically. If the sender channel was not running, start it.
At the server end of the channel, the presence of the peer name parameter value on the channel status
display indicates that a client certificate has flowed.
Verify that the task has been completed successfully by issuing some DISPLAY commands. If the task
was successful, the resulting output is similar to that shown in the following examples:
From the QM1 queue manager, enter the following command:
DISPLAY CHS(TO.QM2) SSLPEER SSLCERTI
SSLCERTI
CHLTYPE(RCVR)
CURRENT
SSLCERTI( )
STATUS(RUNNING)
XMITQ( )
On QM2, the SSLPEER field is empty, showing that QM1 did not send a certificate. On QM1, the value of
SSLPEER matches that of the DN in QM2's personal certificate.
Security
367
You might also want to test SSL or TLS client authentication, which are an optional part of the protocols.
During the SSL or TLS handshake, the SSL or TLS client always obtains and validates a digital certificate
from the server. With the WebSphere MQ implementation, the SSL or TLS server always requests a
certificate from the client.
On UNIX, Linux, and Windows systems, the SSL or TLS client sends a certificate only if it has one
labeled in the correct WebSphere MQ format, which is ibmwebspheremq followed by your logon user ID
changed to lowercase, for example ibmwebspheremqmyuserid.
WebSphere MQ uses the ibmwebspheremq prefix on a label to avoid confusion with certificates for other
products. Ensure that you specify the entire certificate label in lowercase.
The SSL or TLS server always validates the client certificate if one is sent. If the client does not send a
certificate, authentication fails only if the end of the channel that is acting as the SSL or TLS server is
defined with either the SSLCAUTH parameter set to REQUIRED or an SSLPEER parameter value set. For
more information about connecting a queue manager anonymously, see Connecting a client to a queue
manager anonymously on page 371.
368
In Figure 61 on page 368, the key repository for QM1 contains the certificate for QM1 and the public
certificate from C1. The key repository for C1 contains the certificate for C1 and the public certificate
from QM1.
Procedure
1. Prepare the key repository on the client and queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Create self-signed certificates for the client and queue manager:
v On UNIX, Linux, and Windows systems.
3. Extract a copy of each certificate:
v On UNIX, Linux, and Windows systems.
4. Transfer the public part of the C1 certificate to the QM1 system and vice versa, using a utility such as
FTP.
5. Add the partner certificate to the key repository for the client and queue manager:
v On UNIX, Linux, and Windows systems.
6. Define a client-connection channel in either of the following ways:
v Using the MQCONNX call with the MQSCO structure on C1, as described in Creating a
client-connection channel on the WebSphere MQ MQI client.
v Using a client channel definition table, as described in Creating server-connection and
client-connection definitions on the server.
7. On QM1, define a server-connection channel, by issuing a command like the following example:
DEFINE CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(RC4_MD5_US)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from C1 to QM1)
The channel must have the same name as the client-connection channel you defined in step 6, and use
the same CipherSpec.
Results
Key repositories and channels are created as illustrated in Figure 61 on page 368
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is similar to that shown in the following example.
From queue manager QM1, enter the following command:
DISPLAY CHSTATUS(C1.TO.QM1) SSLPEER SSLCERTI
It is optional to set the SSLPEER filter attribute of the channel definitions. If the channel definition
SSLPEER is set, its value must match the subject DN in the partner certificate that was created in Step 2.
After a successful connection, the SSLPEER field in the DISPLAY CHSTATUS output shows the subject
DN of the remote client certificate.
Security
369
In Figure 62, the key repository for C1 contains certificate for C1 and the CA certificate. The key
repository for QM1 contains the certificate for QM1 and the CA certificate. In this example both C1's
certificate and QM1's certificate were issued by the same CA. If C1's certificate and QM1's certificate were
issued by different CAs then the key repositories for C1 and QM1 must contain both CA certificates.
Procedure
1. Prepare the key repository on the client and queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Request a CA-signed certificate for the client and queue manager. You might use different CAs for the
client and queue manager.
v On UNIX, Linux, and Windows systems.
3. Add the certificate authority certificate to the key repository for the client and queue manager. If the
client and queue manager are using different Certificate Authorities then the CA certificate for each
Certificate Authority must be added to both key repositories.
v On UNIX, Linux, and Windows systems.
4. Add the CA-signed certificate to the key repository for the client and queue manager:
v On UNIX, Linux, and Windows systems.
5. Define a client-connection channel in either of the following ways:
370
v Using the MQCONNX call with the MQSCO structure on C1, as described in Creating a
client-connection channel on the WebSphere MQ MQI client.
v Using a client channel definition table, as described in Creating server-connection and
client-connection definitions on the server.
6. On QM1, define a server-connection channel by issuing a command like the following example:
DEFINE CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(RC2_MD5_EXPORT)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from C1 to QM1)
The channel must have the same name as the client-connection channel you defined in step 6, and use
the same CipherSpec.
Results
Key repositories and channels are created as illustrated in Figure 62 on page 370.
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is like that shown in the following example.
From the queue manager QM1, enter the following command:
DISPLAY CHSTATUS(TO.QMB) SSLPEER SSLCERTI
The SSLPEER field in the DISPLAY CHSTATUS output shows the subject DN of the remote client
certificate that was created in Step 2. The issuer name matches the subject DN of the CA certificate that
signed the personal certificate added in Step 4.
Security
371
Procedure
1. Remove the personal certificate from key repository for C1, according to operating system:
v On UNIX, Linux, and Windows systems. The certificate is labeled as follows:
ibmwebspheremq followed by your logon user ID folded to lower case, for example
ibmwebspheremqmyuserid.
2. Restart the client application, or cause the client application to close and reopen all SSL or TLS
connections.
3. Allow anonymous connections on the queue manager, by issuing the following command:
ALTER CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) SSLCAUTH(OPTIONAL)
Results
Key repositories and channels are changed as illustrated in Figure 63
What to do next
At the server end of the channel, the presence of the peer name parameter value on the channel status
display indicates that a client certificate has flowed.
Verify that the task has been completed successfully by issuing some DISPLAY commands. If the task
was successful, the resulting output is similar to that shown in the following example:
From queue manager QM1, enter the following command:
DISPLAY CHSTATUS(C1.TO.QM1) SSLPEER SSLCERTI
The SSLCERTI and SSLPEER fields are empty, showing that C1 did not send a certificate.
372
Specifying CipherSpecs
Specify a CipherSpec by using the SSLCIPH parameter in either the DEFINE CHANNEL MQSC command or
the ALTER CHANNEL MQSC command.
Some of the CipherSpecs that you can use with WebSphere MQ are FIPS compliant. Others, such as
NULL_MD5, are not. Similarly, some of the FIPS compliant CipherSpecs are also Suite B compliant although
others, such as TLS_RSA_WITH_3DES_EDE_CBC_SHA, are not. All Suite B compliant CipherSpecs are also FIPS
compliant. All Suite B compliant CipherSpecs fall into two groups: 128 bit (for example,
ECDHE_ECDSA_AES_128_GCM_SHA256) and 192 bit (for example, ECDHE_ECDSA_AES_256_GCM_SHA384),
The following diagram illustrates the relationship between these subsets:
All WebSphere MQ CipherSpecs
FIPS compliant CipherSpecs
Suite B 128-bit compliant CipherSpecs
Suite B 192-bit
Cipher specifications that you can use with WebSphere MQ SSL and TLS support are listed in the
following table. When you request a personal certificate, you specify a key size for the public and private
key pair. The key size that is used during the SSL handshake is the size stored in the certificate unless it
is determined by the CipherSpec, as noted in the table.
A table describing the CipherSpecs you can use with WebSphere MQ SSL and TLS support.
CipherSpec name
Protocol Data
used
integrity
Suite B
192 bit
NULL_MD5
SSL 3.0
MD5
None
No
No
No
NULL_SHA
SSL 3.0
SHA-1
None
No
No
No
SSL 3.0
MD5
RC4
40
No
No
No
RC4_MD5_EXPORT
2 a
RC4_MD5_US
SSL 3.0
MD5
RC4
128
No
No
No
RC4_SHA_US
SSL 3.0
SHA-1
RC4
128
No
No
No
RC2_MD5_EXPORT
2 a
SSL 3.0
MD5
RC2
40
No
No
No
DES_SHA_EXPORT
2 a
SSL 3.0
SHA-1
DES
56
No
No
No
SSL 3.0
SHA-1
RC4
56
No
No
No
SSL 3.0
SHA-1
DES
56
No
No
No
RC4_56_SHA_EXPORT1024
DES_SHA_EXPORT1024
3 b
3 b
SSL 3.0
SHA-1
3DES
168
No
No
No
TLS_RSA_WITH_AES_128_CBC_SHA
TLS 1.0
SHA-1
AES
128
Yes
No
No
TLS_RSA_WITH_AES_256_CBC_SHA
4 a
TLS 1.0
SHA-1
AES
256
Yes
No
No
No
No
TRIPLE_DES_SHA_US
TLS_RSA_WITH_DES_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA
FIPS_WITH_DES_CBC_SHA
a 8
FIPS_WITH_3DES_EDE_CBC_SHA
TLS 1.0
SHA-1
DES
56
No
TLS 1.0
SHA-1
3DES
168
Yes
SSL 3.0
b
TLS_RSA_WITH_AES_128_GCM_SHA256
SHA-1
DES
56
No
No
No
No
No
No
No
No
No
SSL 3.0
SHA-1
3DES
168
No
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
Security
373
A table describing the CipherSpecs you can use with WebSphere MQ SSL and TLS support.
CipherSpec name
Protocol Data
used
integrity
Suite B
192 bit
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
No
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS 1.2
SHA-256
AES
128
Yes
No
No
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS 1.2
SHA-256
AES
256
Yes
No
No
TLS 1.2
SHA-1
RC4
128
No
No
No
TLS 1.2
SHA-1
3DES
168
Yes
No
No
ECDHE_ECDSA_RC4_128_SHA256
ECDHE_ECDSA_3DES_EDE_CBC_SHA256
b 8
TLS 1.2
SHA_1
RC4
128
No
No
No
b 8
TLS 1.2
SHA-1
3DES
168
Yes
No
No
ECDHE_ECDSA_AES_128_CBC_SHA256
TLS 1.2
SHA-256
AES
128
Yes
No
No
ECDHE_ECDSA_AES_256_CBC_SHA384
TLS 1.2
SHA-384
AES
256
Yes
No
No
TLS 1.2
SHA-256
AES
128
Yes
No
No
ECDHE_RSA_RC4_128_SHA256
ECDHE_RSA_3DES_EDE_CBC_SHA256
ECDHE_RSA_AES_128_CBC_SHA256
ECDHE_RSA_AES_256_CBC_SHA384
TLS 1.2
SHA-384
AES
256
Yes
No
No
ECDHE_ECDSA_AES_128_GCM_SHA256
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
Yes
No
ECDHE_ECDSA_AES_256_GCM_SHA384
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
Yes
ECDHE_RSA_AES_128_GCM_SHA256
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
No
No
ECDHE_RSA_AES_256_GCM_SHA384
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
No
TLS 1.2
SHA-256
None
No
No
No
TLS 1.2
SHA-1
None
No
No
No
TLS 1.2
SHA-1
None
No
No
No
TLS 1.2
None
None
No
No
No
TLS 1.2
SHA-1
RC4
128
No
No
No
TLS_RSA_WITH_NULL_SHA256
ECDHE_RSA_NULL_SHA256
ECDHE_ECDSA_NULL_SHA256
TLS_RSA_WITH_NULL_NULL
TLS_RSA_WITH_RC4_128_SHA256
374
A table describing the CipherSpecs you can use with WebSphere MQ SSL and TLS support.
CipherSpec name
Protocol Data
used
integrity
Suite B
192 bit
Notes:
1. Specifies whether the CipherSpec is FIPS-certified on a FIPS-certified platform. See Federal Information
Processing Standards (FIPS) for an explanation of FIPS.
2.
3.
The maximum handshake key size is 512 bits. If either of the certificates exchanged during the SSL handshake
has a key size greater than 512 bits, a temporary 512-bit key is generated for use during the handshake.
The handshake key size is 1024 bits.
4. This CipherSpec cannot be used to secure a connection from the WebSphere MQ Explorer to a queue manager
unless the appropriate unrestricted policy files are applied to the JRE used by the Explorer.
5. This CipherSpec was FIPS 140-2 certified before 19 May 2007.
6. This CipherSpec was FIPS 140-2 certified before 19 May 2007. The name FIPS_WITH_DES_CBC_SHA is historical and
reflects the fact that this CipherSpec was previously (but is no longer) FIPS-compliant. This CipherSpec is
deprecated and its use is not recommended.
7. The name FIPS_WITH_3DES_EDE_CBC_SHA is historical and reflects the fact that this CipherSpec was previously (but
is no longer) FIPS-compliant. The use of this CipherSpec is deprecated.
8. When WebSphere MQ is configured for FIPS 140-2 compliant operation, this CipherSpec can be used to transfer
up to 32 GB of data before the connection is terminated with error AMQ9288. To avoid this error, either avoid
using triple DES, or enable secret key reset when using this CipherSpec in a FIPS 140-2 configuration.
Platform support:
v a Available on all supported platforms.
v b Available only on UNIX, Linux, and Windows platforms.
Related concepts:
Digital certificates and CipherSpec compatibility in WebSphere MQ on page 192
This topic provides information on how to choose appropriate CipherSpecs and digital certificates for
your security policy, by outlining the relationship between CipherSpecs and digital certificates in
WebSphere MQ.
Related information:
DEFINE CHANNEL
ALTER CHANNEL
6. Select from the list the CipherSpec you want to work with. A description is displayed in the window
below the list.
Security
375
You can also use the ALTER QMGR MQSC command to set the SSLCIPH parameter.
z/OS
376
Queue manager
For a queue manager, use the command ALTER QMGR with the parameter SSLRKEYC to set the values used
during key renegotiation. On IBM i, use CHGMQM with the SSLRSTCNT parameter.
MQI client
By default, MQI clients do not renegotiate the secret key. You can make an MQI client renegotiate the key
in any of three ways. In the following list, the methods are shown in order of priority. If you specify
multiple values, the highest priority value is used.
1. By using the KeyResetCount field in the MQSCO structure on an MQCONNX call
2. By using the environment variable MQSSLRESET
3. By setting the SSLKeyResetCount attribute in the MQI client configuration file
These variables can be set to an integer in the range 0 through 999 999 999, representing the number of
unencrypted bytes sent and received within an SSL or TLS conversation before the SSL or TLS secret key
is renegotiated. Specifying a value of 0 indicates that SSL or TLS secret keys are never renegotiated. If
you specify an SSL or TLS secret key reset count in the range 1 byte through 32 KB, SSL or TLS channels
will use a secret key reset count of 32 KB. This is to avoid excessive key resets which would occur for
small SSL or TLS secret key reset values.
If a value greater than zero is specified and channel heartbeats are enabled for the channel, the secret key
is also renegotiated before message data is sent or received following a channel heartbeat.
The count of bytes until the next secret key renegotiation is reset after each successful renegotiation.
For full details of the MQSCO sctructure, see KeyResetCount (MQLONG). For full details of
MQSSLRESET, see MQSSLRESET. For more information about the use of SSL or TLS in the client
configuration file, see SSL stanza of the client configuration file.
Java
For WebSphere MQ classes for Java, an application can reset the secret key in either of the following
ways:
v By setting the sslResetCount field in the MQEnvironment class.
v By setting the environment property MQC.SSL_RESET_COUNT_PROPERTY in a Hashtable object. The
application then assigns the hashtable to the properties field in the MQEnvironment class, or passes
the hashtable to an MQQueueManager object on its constructor.
Security
377
If the application uses more than one of these ways, the usual precedence rules apply. See Class
com.ibm.mq.MQEnvironment for the precedence rules.
The value of the sslResetCount field or environment property MQC.SSL_RESET_COUNT_PROPERTY
represents the total number of bytes sent and received by the WebSphere MQ classes for Java client code
before the secret key is renegotiated. The number of bytes sent is the number before encryption, and the
number of bytes received is the number after decryption. The number of bytes also includes control
information sent and received by the WebSphere MQ classes for Java client.
If the reset count is zero, which is the default value, the secret key is never renegotiated. The reset count
is ignored if no CipherSuite is specified.
JMS
For WebSphere MQ classes for JMS, the SSLRESETCOUNT property represents the total number of bytes
sent and received by a connection before the secret key that is used for encryption is renegotiated. The
number of bytes sent is the number before encryption, and the number of bytes received is the number
after decryption. The number of bytes also includes control information sent and received by WebSphere
MQ classes for JMS. For example, to configure a ConnectionFactory object that can be used to create a
connection over an SSL or TLS enabled MQI channel with a secret key that is renegotiated after 4 MB of
data have flowed, issue the following command to JMSAdmin:
ALTER CF(my.cf) SSLRESETCOUNT(4194304)
If the value of SSLRESETCOUNT is zero, which is the default value, the secret key is never renegotiated.
The SSLRESETCOUNT property is ignored if SSLCIPHERSUITE is not set.
.NET
For .NET unmanaged clients, the integer property SSLKeyResetCount indicates the number of
unencrypted bytes sent and received within an SSL or TLS conversation before the secret key is
renegotiated.
For information about the use of object properties in WebSphere MQ classes for .NET, see Getting and
setting attribute values.
XMS .NET
For XMS .NET unmanaged clients, see the documentation for Message Service Client for .NET
Related information:
ALTER QMGR
DISPLAY QMGR
Change Message Queue Manager (CHGMQM)
Display Message Queue Manager (DSPMQM)
378
security message. The partner security exit decrypts the random data value with the private key of the
queue manager or user it is representing. Each security exit can now use the random data value to derive
the symmetric key independently of the other by using an algorithm known to both of them.
Alternatively, they can use the random data value as the key.
If the first security exit has not authenticated its partner by this time, the next security message sent by
the partner can contain an expected value encrypted with the symmetric key. The first security exit can
now authenticate its partner by checking that the partner security exit was able to encrypt the expected
value correctly.
The security exits can also use this opportunity to agree the algorithm for encrypting and decrypting the
data that flows on the channel, if more than one algorithm is available for use.
Security
379
intended receiver can decrypt the symmetric key and therefore the application data. If an encrypted
message has more than one possible intended receiver, the exit can encrypt a copy of the symmetric key
for each intended receiver.
If different algorithms for encrypting and decrypting the application data are available for use, the exit
can include the name of the algorithm it has used.
Data integrity
Implementing data integrity in messages
When you use SSL or TLS, your choice of CipherSpec determines the level of data integrity in the
enterprise. If you use the WebSphere MQ Advanced Message Service (AMS) you can specify the
integrity for a unique message.
Implementing data integrity in message exits
A message can be digitally signed by a message exit at the sending end of a channel. The digital
signature can then be checked by a message exit at the receiving end of a channel to detect
whether the message has been deliberately modified.
Some protection can be provided by using a message digest instead of a digital signature. A
message digest might be effective against casual or indiscriminate tampering, but it does not
prevent the more informed individual from changing or replacing the message, and generating a
completely new digest for it. This is particularly true if the algorithm that is used to generate the
message digest is a well known one.
Implementing data integrity in send and receive exits
On a message channel, message exits are more appropriate for providing this service because a
message exit has access to a whole message. On an MQI channel, parameters on MQI calls might
contain application data that needs to be protected and only send and receive exits can provide
this protection.
Implementing data integrity in the API exit or API-crossing exit
A message can be digitally signed by an API or API-crossing exit when the message is put by the
sending application. The digital signature can then be checked by a second exit when the
message is retrieved by the receiving application to detect whether the message has been
deliberately modified.
Some protection can be provided by using a message digest instead of a digital signature. A
message digest might be effective against casual or indiscriminate tampering, but it does not
prevent the more informed individual from changing or replacing the message, and generating a
completely new digest for it. This is particularly true if the algorithm that is used to generate the
message digest is a well known one,
380
381
If no certificate is found in the queue manager's key repository, matching the required label in the correct
case and format, an error occurs and the SSL or TLS handshake fails.
WebSphere MQ client:
About this task
When connecting from a WebSphere MQ client application, the SSL or TLS client sends a certificate only
if it has one a certificate with a label in the format ibmwebspheremq, followed by the username of the user
running the client application process.
For example, for the username wasadmin, the certificate label requirement is as shown, folded to lower
case:
ibmwebspheremqwasadmin
The above label requirement applies to Message Service Clients for C, or C++, and .NET.
WebSphere MQ Java or WebSphere MQ JMS client:
382
QM1
QM2
QM1.TO.QM2
QM2
key repository
transmission
queue
key repository
QM1's certificate
QM2's certificate
QM2's certificate
QM1's certificate
Security
383
In Figure 64 on page 383, the key repository for QM1 contains the certificate for QM1 and the public
certificate from QM2. The key repository for QM2 contains the certificate for QM2 and the public
certificate from QM1.
Procedure
1. Prepare the key repository on each queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Create a self-signed certificate for each queue manager:
v On UNIX, Linux, and Windows systems.
3. Extract a copy of each certificate:
v On UNIX, Linux, and Windows systems.
4. Transfer the public part of the QM1 certificate to the QM2 system and vice versa, using a utility such
as FTP.
5. Add the partner certificate to the key repository for each queue manager:
v On UNIX, Linux, and Windows systems.
6. On QM1, define a sender channel and associated transmission queue, by issuing commands like the
following example:
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME(QM1.MACH.COM) XMITQ(QM2)
SSLCIPH(RC4_MD5_US) DESCR(Sender channel using SSL from QM1 to QM2)
DEFINE QLOCAL(QM2) USAGE(XMITQ)
This example uses CipherSpec RC4_MD5. The CipherSpecs at each end of the channel must be the
same.
7. On QM2, define a receiver channel, by issuing a command like the following example:
DEFINE CHANNEL(QM1.TO.QM2) CHLTYPE(RCVR) TRPTYPE(TCP) SSLCIPH(RC4_MD5_US)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from QM1 to QM2)
The channel must have the same name as the sender channel you defined in step 6, and use the same
CipherSpec.
8. Start the channel.
Results
Key repositories and channels are created as illustrated in Figure 64 on page 383
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is similar to that shown in the following examples.
From queue manager QM1, enter the following command:
DISPLAY CHS(QM1.TO.QM2) SSLPEER SSLCERTI
384
SSLCERTI("CN=QM2,OU=WebSphere MQ Development,O=IBM,ST=Hampshire,C=UK")
SSLPEER("SERIALNUMBER=4C:D0:49:D5:02:5E:02,CN=QM2,OU=WebSphere MQ Development,O=IBM,ST=Hampshire,C=UK")
STATUS(RUNNING)
SUBSTATE(MQGET)
XMITQ(QM2)
In each case, the value of SSLPEER must match that of the DN in the partner certificate that was created
in Step 2. The issuers name matches the peer name because the certificate is self-signed .
SSLPEER is optional. If it is specified, its value must be set so that the DN in the partner certificate
(created in step 2) is allowed. For more information about the use of SSLPEER, see WebSphere MQ rules
for SSLPEER values.
QMA
QMB
TO.QMB
QMB
key repository
transmission
queue
key repository
QMA's certificate
QMB's certificate
CA certificate
CA certificate
Security
385
In Figure 65 on page 385, the key repository for QMA contains QMA's certificate and the CA certificate.
The key repository for QMB contains QMB's certificate and the CA certificate. In this example both
QMA's certificate and QMB's certificate were issued by the same CA. If QMA's certificate and QMB's
certificate were issued by different CAs then the key repositories for QMA and QMB must contain both
CA certificates.
Procedure
1. Prepare the key repository on each queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Request a CA-signed certificate for each queue manager. You might use different CAs for the two
queue managers.
v On UNIX, Linux, and Windows systems.
3. Add the Certificate Authority certificate to the key repository for each queue manager: If the Queue
managers are using different Certificate Authorities then the CA certificate for each Certificate
Authority must be added to both key repositories.
v On UNIX, Linux, and Windows systems.
4. Add the CA-signed certificate to the key repository for each queue manager:
v On UNIX, Linux, and Windows systems.
5. On QMA, define a sender channel and associated transmission queue by issuing commands like the
following example:
DEFINE CHANNEL(TO.QMB) CHLTYPE(SDR) TRPTYPE(TCP) CONNAME(QMB.MACH.COM) XMITQ(QMB)
SSLCIPH(RC2_MD5_EXPORT) DESCR(Sender channel using SSL from QMA to QMB)
DEFINE QLOCAL(QMB) USAGE(XMITQ)
This example uses CipherSpec RC4_MD5. The CipherSpecs at each end of the channel must be the
same.
6. On QMB, define a receiver channel by issuing a command like the following example:
DEFINE CHANNEL(TO.QMB) CHLTYPE(RCVR) TRPTYPE(TCP) SSLCIPH(RC2_MD5_EXPORT)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL to QMB)
The channel must have the same name as the sender channel you defined in step 6, and use the same
CipherSpec.
7. Start the channel:
Results
Key repositories and channels are created as illustrated in Figure 65 on page 385.
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is like that shown in the following examples.
From queue manager QMA, enter the following command:
DISPLAY CHS(TO.QMB) SSLPEER SSLCERTI
386
In each case, the value of SSLPEER must match that of the Distinguished Name (DN) in the partner
certificate that was created in Step 2. The issuer name matches the subject DN of the CA certificate that
signed the personal certificate added in Step 4.
QMA
QMB
TO.QMB
QMB
key repository
SSLCAUTH (optional)
transmission
queue
CA certificate
key repository
QMB's certificate
CA certificate
Security
387
Procedure
1. Remove QM1's personal certificate from its key repository, according to operating system:
v On UNIX, Linux, and Windows systems. The certificate is labeled as follows:
ibmwebspheremq followed by the name of your queue manager folded to lower case. For example,
for QM1, ibmwebspheremqqm1.
2. Optional: On QM1, if any SSL or TLS channels have run previously, refresh the SSL or TLS
environment.
3. Allow anonymous connections on the receiver.
Results
Key repositories and channels are changed as illustrated in Figure 66 on page 387
What to do next
If the sender channel was running and you issued the REFRESH SECURITY TYPE(SSL) command (in
step 2), the channel restarts automatically. If the sender channel was not running, start it.
At the server end of the channel, the presence of the peer name parameter value on the channel status
display indicates that a client certificate has flowed.
Verify that the task has been completed successfully by issuing some DISPLAY commands. If the task
was successful, the resulting output is similar to that shown in the following examples:
From the QM1 queue manager, enter the following command:
DISPLAY CHS(TO.QM2) SSLPEER SSLCERTI
SSLCERTI
CHLTYPE(RCVR)
CURRENT
SSLCERTI( )
STATUS(RUNNING)
XMITQ( )
On QM2, the SSLPEER field is empty, showing that QM1 did not send a certificate. On QM1, the value of
SSLPEER matches that of the DN in QM2's personal certificate.
388
Security
389
In Figure 67, the key repository for QM1 contains the certificate for QM1 and the public certificate from
C1. The key repository for C1 contains the certificate for C1 and the public certificate from QM1.
Procedure
1. Prepare the key repository on the client and queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Create self-signed certificates for the client and queue manager:
v On UNIX, Linux, and Windows systems.
3. Extract a copy of each certificate:
v On UNIX, Linux, and Windows systems.
4. Transfer the public part of the C1 certificate to the QM1 system and vice versa, using a utility such as
FTP.
5. Add the partner certificate to the key repository for the client and queue manager:
v On UNIX, Linux, and Windows systems.
6. Define a client-connection channel in either of the following ways:
v Using the MQCONNX call with the MQSCO structure on C1, as described in Creating a
client-connection channel on the WebSphere MQ MQI client.
v Using a client channel definition table, as described in Creating server-connection and
client-connection definitions on the server.
7. On QM1, define a server-connection channel, by issuing a command like the following example:
DEFINE CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(RC4_MD5_US)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from C1 to QM1)
The channel must have the same name as the client-connection channel you defined in step 6, and use
the same CipherSpec.
Results
Key repositories and channels are created as illustrated in Figure 67
390
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is similar to that shown in the following example.
From queue manager QM1, enter the following command:
DISPLAY CHSTATUS(C1.TO.QM1) SSLPEER SSLCERTI
It is optional to set the SSLPEER filter attribute of the channel definitions. If the channel definition
SSLPEER is set, its value must match the subject DN in the partner certificate that was created in Step 2.
After a successful connection, the SSLPEER field in the DISPLAY CHSTATUS output shows the subject
DN of the remote client certificate.
Security
391
In Figure 68, the key repository for C1 contains certificate for C1 and the CA certificate. The key
repository for QM1 contains the certificate for QM1 and the CA certificate. In this example both C1's
certificate and QM1's certificate were issued by the same CA. If C1's certificate and QM1's certificate were
issued by different CAs then the key repositories for C1 and QM1 must contain both CA certificates.
Procedure
1. Prepare the key repository on the client and queue manager, according to operating system:
v On UNIX, Linux, and Windows systems.
2. Request a CA-signed certificate for the client and queue manager. You might use different CAs for the
client and queue manager.
v On UNIX, Linux, and Windows systems.
3. Add the certificate authority certificate to the key repository for the client and queue manager. If the
client and queue manager are using different Certificate Authorities then the CA certificate for each
Certificate Authority must be added to both key repositories.
v On UNIX, Linux, and Windows systems.
4. Add the CA-signed certificate to the key repository for the client and queue manager:
v On UNIX, Linux, and Windows systems.
5. Define a client-connection channel in either of the following ways:
v Using the MQCONNX call with the MQSCO structure on C1, as described in Creating a
client-connection channel on the WebSphere MQ MQI client.
v Using a client channel definition table, as described in Creating server-connection and
client-connection definitions on the server.
6. On QM1, define a server-connection channel by issuing a command like the following example:
DEFINE CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) TRPTYPE(TCP) SSLCIPH(RC2_MD5_EXPORT)
SSLCAUTH(REQUIRED) DESCR(Receiver channel using SSL from C1 to QM1)
The channel must have the same name as the client-connection channel you defined in step 6, and use
the same CipherSpec.
Results
Key repositories and channels are created as illustrated in Figure 68.
392
What to do next
Check that the task has been completed successfully by using DISPLAY commands. If the task was
successful, the resulting output is like that shown in the following example.
From the queue manager QM1, enter the following command:
DISPLAY CHSTATUS(TO.QMB) SSLPEER SSLCERTI
The SSLPEER field in the DISPLAY CHSTATUS output shows the subject DN of the remote client
certificate that was created in Step 2. The issuer name matches the subject DN of the CA certificate that
signed the personal certificate added in Step 4.
Procedure
1. Remove the personal certificate from key repository for C1, according to operating system:
v On UNIX, Linux, and Windows systems. The certificate is labeled as follows:
ibmwebspheremq followed by your logon user ID folded to lower case, for example
ibmwebspheremqmyuserid.
2. Restart the client application, or cause the client application to close and reopen all SSL or TLS
connections.
Security
393
3. Allow anonymous connections on the queue manager, by issuing the following command:
ALTER CHANNEL(C1.TO.QM1) CHLTYPE(SVRCONN) SSLCAUTH(OPTIONAL)
Results
Key repositories and channels are changed as illustrated in Figure 69 on page 393
What to do next
At the server end of the channel, the presence of the peer name parameter value on the channel status
display indicates that a client certificate has flowed.
Verify that the task has been completed successfully by issuing some DISPLAY commands. If the task
was successful, the resulting output is similar to that shown in the following example:
From queue manager QM1, enter the following command:
DISPLAY CHSTATUS(C1.TO.QM1) SSLPEER SSLCERTI
The SSLCERTI and SSLPEER fields are empty, showing that C1 did not send a certificate.
Specifying CipherSpecs
Specify a CipherSpec by using the SSLCIPH parameter in either the DEFINE CHANNEL MQSC command or
the ALTER CHANNEL MQSC command.
Some of the CipherSpecs that you can use with WebSphere MQ are FIPS compliant. Others, such as
NULL_MD5, are not. Similarly, some of the FIPS compliant CipherSpecs are also Suite B compliant although
others, such as TLS_RSA_WITH_3DES_EDE_CBC_SHA, are not. All Suite B compliant CipherSpecs are also FIPS
compliant. All Suite B compliant CipherSpecs fall into two groups: 128 bit (for example,
ECDHE_ECDSA_AES_128_GCM_SHA256) and 192 bit (for example, ECDHE_ECDSA_AES_256_GCM_SHA384),
The following diagram illustrates the relationship between these subsets:
All WebSphere MQ CipherSpecs
FIPS compliant CipherSpecs
Suite B 128-bit compliant CipherSpecs
Suite B 192-bit
Cipher specifications that you can use with WebSphere MQ SSL and TLS support are listed in the
following table. When you request a personal certificate, you specify a key size for the public and private
key pair. The key size that is used during the SSL handshake is the size stored in the certificate unless it
is determined by the CipherSpec, as noted in the table.
394
A table describing the CipherSpecs you can use with WebSphere MQ SSL and TLS support.
CipherSpec name
NULL_MD5
NULL_SHA
RC4_MD5_EXPORT
RC4_MD5_US
RC4_SHA_US
2 a
RC2_MD5_EXPORT
2 a
DES_SHA_EXPORT
2 a
RC4_56_SHA_EXPORT1024
DES_SHA_EXPORT1024
3 b
3 b
Protocol Data
used
integrity
Suite B
192 bit
SSL 3.0
MD5
None
No
No
No
SSL 3.0
SHA-1
None
No
No
No
SSL 3.0
MD5
RC4
40
No
No
No
SSL 3.0
MD5
RC4
128
No
No
No
SSL 3.0
SHA-1
RC4
128
No
No
No
SSL 3.0
MD5
RC2
40
No
No
No
SSL 3.0
SHA-1
DES
56
No
No
No
SSL 3.0
SHA-1
RC4
56
No
No
No
SSL 3.0
SHA-1
DES
56
No
No
No
SSL 3.0
SHA-1
3DES
168
No
No
No
TLS_RSA_WITH_AES_128_CBC_SHA
TLS 1.0
SHA-1
AES
128
Yes
No
No
TLS_RSA_WITH_AES_256_CBC_SHA
4 a
TLS 1.0
SHA-1
AES
256
Yes
No
No
No
No
TRIPLE_DES_SHA_US
TLS_RSA_WITH_DES_CBC_SHA
TLS_RSA_WITH_3DES_EDE_CBC_SHA
FIPS_WITH_DES_CBC_SHA
a 8
TLS 1.0
SHA-1
DES
56
No
TLS 1.0
SHA-1
3DES
168
Yes
SSL 3.0
b
SHA-1
DES
56
No
No
No
No
No
No
No
SSL 3.0
SHA-1
3DES
168
No
TLS_RSA_WITH_AES_128_GCM_SHA256
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
No
No
TLS_RSA_WITH_AES_256_GCM_SHA384
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
No
TLS_RSA_WITH_AES_128_CBC_SHA256
TLS 1.2
SHA-256
AES
128
Yes
No
No
TLS_RSA_WITH_AES_256_CBC_SHA256
TLS 1.2
SHA-256
AES
256
Yes
No
No
TLS 1.2
SHA-1
RC4
128
No
No
No
TLS 1.2
SHA-1
3DES
168
Yes
No
No
TLS 1.2
SHA_1
RC4
128
No
No
No
b 8
TLS 1.2
SHA-1
3DES
168
Yes
No
No
ECDHE_ECDSA_AES_128_CBC_SHA256
TLS 1.2
SHA-256
AES
128
Yes
No
No
ECDHE_ECDSA_AES_256_CBC_SHA384
TLS 1.2
SHA-384
AES
256
Yes
No
No
TLS 1.2
SHA-256
AES
128
Yes
No
No
FIPS_WITH_3DES_EDE_CBC_SHA
ECDHE_ECDSA_RC4_128_SHA256
ECDHE_ECDSA_3DES_EDE_CBC_SHA256
ECDHE_RSA_RC4_128_SHA256
ECDHE_RSA_3DES_EDE_CBC_SHA256
ECDHE_RSA_AES_128_CBC_SHA256
ECDHE_RSA_AES_256_CBC_SHA384
b 8
TLS 1.2
SHA-384
AES
256
Yes
No
No
ECDHE_ECDSA_AES_128_GCM_SHA256
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
Yes
No
ECDHE_ECDSA_AES_256_GCM_SHA384
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
Yes
TLS 1.2
AEAD
AES-128
GCM
AES
128
Yes
No
No
ECDHE_RSA_AES_128_GCM_SHA256
Security
395
A table describing the CipherSpecs you can use with WebSphere MQ SSL and TLS support.
CipherSpec name
ECDHE_RSA_AES_256_GCM_SHA384
TLS_RSA_WITH_NULL_SHA256
ECDHE_RSA_NULL_SHA256
ECDHE_ECDSA_NULL_SHA256
TLS_RSA_WITH_NULL_NULL
TLS_RSA_WITH_RC4_128_SHA256
Protocol Data
used
integrity
Suite B
192 bit
TLS 1.2
AEAD
AES-256
GCM
AES
256
Yes
No
No
TLS 1.2
SHA-256
None
No
No
No
TLS 1.2
SHA-1
None
No
No
No
TLS 1.2
SHA-1
None
No
No
No
TLS 1.2
None
None
No
No
No
TLS 1.2
SHA-1
RC4
128
No
No
No
Notes:
1. Specifies whether the CipherSpec is FIPS-certified on a FIPS-certified platform. See Federal Information
Processing Standards (FIPS) for an explanation of FIPS.
2.
3.
The maximum handshake key size is 512 bits. If either of the certificates exchanged during the SSL handshake
has a key size greater than 512 bits, a temporary 512-bit key is generated for use during the handshake.
The handshake key size is 1024 bits.
4. This CipherSpec cannot be used to secure a connection from the WebSphere MQ Explorer to a queue manager
unless the appropriate unrestricted policy files are applied to the JRE used by the Explorer.
5. This CipherSpec was FIPS 140-2 certified before 19 May 2007.
6. This CipherSpec was FIPS 140-2 certified before 19 May 2007. The name FIPS_WITH_DES_CBC_SHA is historical and
reflects the fact that this CipherSpec was previously (but is no longer) FIPS-compliant. This CipherSpec is
deprecated and its use is not recommended.
7. The name FIPS_WITH_3DES_EDE_CBC_SHA is historical and reflects the fact that this CipherSpec was previously (but
is no longer) FIPS-compliant. The use of this CipherSpec is deprecated.
8. When WebSphere MQ is configured for FIPS 140-2 compliant operation, this CipherSpec can be used to transfer
up to 32 GB of data before the connection is terminated with error AMQ9288. To avoid this error, either avoid
using triple DES, or enable secret key reset when using this CipherSpec in a FIPS 140-2 configuration.
Platform support:
v a Available on all supported platforms.
v b Available only on UNIX, Linux, and Windows platforms.
Related concepts:
Digital certificates and CipherSpec compatibility in WebSphere MQ on page 192
This topic provides information on how to choose appropriate CipherSpecs and digital certificates for
your security policy, by outlining the relationship between CipherSpecs and digital certificates in
WebSphere MQ.
Related information:
DEFINE CHANNEL
ALTER CHANNEL
396
4. Right-click the channel you want to work with and select Properties.
5. Select the SSL property page.
6. Select from the list the CipherSpec you want to work with. A description is displayed in the window
below the list.
You can also use the ALTER QMGR MQSC command to set the SSLCIPH parameter.
z/OS
Security
397
Auditing
You can check for security intrusions, or attempted intrusions, by using event messages. You can also
check the security of your system by using the WebSphere MQ Explorer.
To detect attempts to perform unauthorized actions such as connecting to a queue manager or put a
message on a queue, inspect the event messages produced by your queue managers, particularly
authority event messages. For more information about queue manager event messages, see Queue
manager events, and for more information about event monitoring in general, see Event monitoring .
Procedure
1. Define a channel security exit program on the CLUSRCVR channel definition.
2. Write a program that authenticates queue managers trying to send messages on your cluster-receiver
channel and denies them access if they are not authorized.
398
What to do next
Channel security exit programs are called at MCA initiation and termination.
Procedure
1. To prevent certain queue managers from putting messages on a queue, use the security facilities
available on your platform.
For example:
v RACF or other external security managers on WebSphere MQ for z/OS
v The object authority manager (OAM) on other platforms.
2. Use the put authority, PUTAUT, attribute on the CLUSRCVR channel definition.
The PUTAUT attribute allows you to specify what user identifiers are to be used to establish authority
to put a message to a queue.
The options on the PUTAUT attribute are:
DEF
Use the default user ID. On z/OS, the check might involve using both the user ID received
from the network and that derived from MCAUSER.
CTX
Use the user ID in the context information associated with the message. On z/OS the check
might involve using either the user ID received from the network, or that derived from
MCAUSER, or both. Use this option if the link is trusted and authenticated.
Security
399
Procedure
For UNIX, Linux and Windows systems, issue the following commands:
setmqaut -m QMgrName -t qmgr -g GroupName +connect
setmqaut -m QMgrName -t queue -n QueueName -g GroupName -all +put
The user can put messages only to the specified cluster queue, and no other cluster queues.
The variable names have the following meanings:
QMgrName
The name of the queue manager.
GroupName
The name of the group to be granted access.
QueueName
Name of the queue or generic profile for which to change authorizations.
What to do next
If you specify a reply-to queue when you put a message on a cluster queue, the consuming application
must have authority to send the reply. Set this authority by following the instructions in Granting
authority to put messages to a remote cluster queue on page 348.
Related information:
Security stanza in qm.ini
Procedure
If you want to ensure that only certain authorized queue managers join a cluster you have a choice of
three techniques:
v Using channel authentication records you can block the cluster channel connection based on: the
remote IP address, the remote queue manager name, or the SSL/TLS Distinguished Name provided by
the remote system.
v Write an exit program to prevent unauthorized queue managers from writing to
SYSTEM.CLUSTER.COMMAND.QUEUE. Do not restrict access to SYSTEM.CLUSTER.COMMAND.QUEUE such that no
queue manager can write to it, or you would prevent any queue manager from joining the cluster.
v A security exit program on the CLUSRCVR channel definition.
Procedure
1. You must define a security exit on both the cluster-sender end and the cluster-receiver end of a
channel.
400
2.
3.
4.
5.
The initial connection must be made with a security-exit handshake, even though the security exit
name is sent over from the cluster-receiver definition.
Validate the PartnerName in the MQCXP structure in the security exit.
The exit must allow the channel to start only if the partner queue manager is authorized
Design the security exit on the cluster-receiver definition to be receiver initiated.
If you design it as sender initiated, an unauthorized queue manager without a security exit can join
the cluster because no security checks are performed.
Not until the channel is stopped and restarted can the SCYEXIT name be sent over from the
cluster-receiver definition and full security checks made.
To view the cluster-sender channel definition that is currently in use, use the command:
DISPLAY CLUSQMGR(queue manager) ALL
The command displays the attributes that have been sent across from the cluster-receiver definition.
6. To view the original definition, use the command:
DISPLAY CHANNEL(channel name) ALL
7. You might need to define a channel auto-definition exit, CHADEXIT, on the cluster-sender queue
manager, if the queue managers are on different platforms.
Use the channel auto-definition exit to set the SecurityExit attribute to an appropriate format for the
target platform.
8. Deploy and configure the security-exit.
Windows
Linux
Procedure
1. On a full repository queue manager, issue the command:
RESET CLUSTER(NORWAY) QMNAME(OSLO) ACTION(FORCEREMOVE)
Results
The queue manager that is force removed does not change: its local cluster definitions show it to be in
the cluster. The definitions at all other queue managers do not show it in the cluster.
Security
401
Procedure
v A channel exit program on each cluster-sender channel. The exit program uses the connection name to
determine the suitability of the destination queue manager to be sent the messages.
v A cluster workload exit program, which uses the destination records to determine the suitability of the
destination queue and queue manager to be sent the messages.
402
An SSLCRLNL parameter applies to an individual queue manager and is not propagated to other queue
managers within a cluster.
Procedure
1. Switch the CLUSRCVR channels to SSL in any order you like. The changes flow in the opposite direction
over channels which are not changed to SSL.
2. Switch all manual CLUSSDR channels to SSL. This does not have any effect on the operation of the
cluster, unless you use the REFRESH CLUSTER command with the REPOS(YES) option.
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while
it is in progress, and again at 27 day intervals thereafter when the cluster objects automatically send
status updates to all interested queue managers. See Refreshing in a large cluster can affect
performance and availability of the cluster.
Related concepts:
Specifying CipherSpecs on page 373
Specify a CipherSpec by using the SSLCIPH parameter in either the DEFINE CHANNEL MQSC command or
the ALTER CHANNEL MQSC command.
Digital certificates and CipherSpec compatibility in WebSphere MQ on page 192
This topic provides information on how to choose appropriate CipherSpecs and digital certificates for
your security policy, by outlining the relationship between CipherSpecs and digital certificates in
WebSphere MQ.
Related information:
Clustering: Using REFRESH CLUSTER best practices
Security
403
Procedure
1. Set the value of the SSLCIPH parameter to , an empty string in a single quotation mark.
2. Run the RESET CLUSTER command against each queue manager pointing to the other queue managers
in the cluster. That is, if you have two queue managers in your cluster, run the RSTMQMCL command
four times in total, twice for each queue manager.
The RESET CLUSTER command replaces the auto-defined cluster-sender channels with the newer
version.
Example
On QM1:
RESET CLUSTER(clustername) QMNAME(QM1) ACTION(FORCEREMOVE)QUEUES(NO)
RESET CLUSTER(clustername) QMNAME(QM2) ACTION(FORCEREMOVE)QUEUES(NO)
On QM2:
RESET CLUSTER(clustername) QMNAME(QM2) ACTION(FORCEREMOVE)QUEUES(NO)
RESET CLUSTER(clustername) QMNAME(QM1) ACTION(FORCEREMOVE)QUEUES(NO)
Publish/subscribe security
The components and interactions that are involved in publish/subscribe are described as an introduction
to the more detailed explanations and examples that follow.
There are a number of components involved in publishing and subscribing to a topic. Some of the
security relationships between them are illustrated in Figure 70 on page 405 and described in the
following example.
404
Publisher access
authorities
MQOPEN
Publisher
Authority to
publish topic
Associate topic
with topic object
Topic Object
Topic
Subscription
Admin
Channel
security
Adopt subscribers
identity
Authority to
create topic
Distributed
queuing
Authority to
put to queue
Authority to
subscribe to topic
MQSUB/
MQOPEN
Queue
Subscriber
Subscribers
access authorities
Topics Topics are identified by topic strings, and are typically organized into trees, see Topic trees. You
need to associate a topic with a topic object to control access to the topic. Topic security model
on page 407 explains how you secure topics using topic objects.
Administrative topic objects
You can control who has access to a topic, and for what purpose, by using the command
setmqaut with a list of administrative topic objects. See the examples, Grant access to a user to
subscribe to a topic on page 412 and Grant access to a user to publish to a topic on page 417.
Subscriptions
Subscribe to one or more topics by creating a subscription supplying a topic string, which can
include wildcards, to match against the topic strings of publications. For further details, see:
Subscribe using a topic object
Subscribing using the topic object name on page 408
Subscribe using a topic
Subscribing using a topic string where the topic node does not exist on page 409
Subscribe using a topic with wildcards
Subscribing using a topic string that contains wildcard characters on page 409
Security
405
A subscription contains information about the identity of the subscriber and the identity of the
destination queue on to which the publications are to be placed. It also contains information
about how the publication is to be placed on the destination queue.
As well as defining which subscribers have the authority to subscribe to certain topics, you can
restrict subscriptions to being used by an individual subscriber. You can also control what
information about the subscriber is used by the queue manager when publications are placed on
to the destination queue. See Subscription security on page 421.
Queues
The destination queue is an important queue to secure. It is local to the subscriber, and
publications that matched the subscription are placed onto it. You need to consider access to the
destination queue from two perspectives:
1. Putting a publication on to the destination queue.
2. Getting the publication off the destination queue.
The queue manager puts a publication onto the destination queue using an identity provided by
the subscriber. The subscriber, or a program that has been delegated the task of getting
publications, takes messages off the queue. See Authority to destination queues on page 410.
There are no topic object aliases, but you can use an alias queue as the alias for a topic object. If
you do so, as well as checking authority to use the topic for publish or subscribe, the queue
manager checks authority to use the queue.
Publish/subscribe security between queue managers
Your permission to publish or subscribe to a topic is checked on the local queue manager using
local identities and authorizations. Authorization does not depend on whether the topic is
defined or not, nor where it is defined. Consequently, you need to perform topic authorization on
every queue manager in a cluster when clustered topics are used.
Note: The security model for topics differs from the security model for queues. You can achieve
the same result for queues by defining a queue alias locally for every clustered queue.
Queue managers exchange subscriptions in a cluster. In most WebSphere MQ cluster
configurations, channels are configured with PUTAUT=DEF to place messages onto target queues
using the authority of the channel process. You can modify the channel configuration to use
PUTAUT=CTX to require the subscribing user to have authority to propagate a subscription onto
another queue manager in a cluster.
Publish/subscribe security between queue managers describes how to change your channel
definitions to control who is allowed to propagate subscriptions onto other servers in the cluster.
Authorization
You can apply authorization to topic objects, just like queues and other objects. There are three
authorization operations, pub, sub, and resume that you can apply only to topics. The details are
described in Specifying authorities for different object types.
Function calls
In publish and subscribe programs, like in queued programs, authorization checks are made
when objects are opened, created, changed, or deleted. Checks are not made when MQPUT or
MQGET MQI calls are made to put and get publications.
To publish a topic, perform an MQOPEN on the topic, which performs the authorization checks.
Publish messages to the topic handle using the MQPUT command, which performs no
authorization checks.
406
To subscribe to a topic, typically you perform an MQSUB command to create or resume the
subscription, and also to open the destination queue to receive publications. Alternatively,
perform a separate MQOPEN to open the destination queue, and then perform the MQSUB to
create or resume the subscription.
Whichever calls you use, the queue manager checks that you can subscribe to the topic and get
the resulting publications from the destination queue. If the destination queue is unmanaged,
authorization checks are also made that the queue manager is able to place publications on the
destination queue. It uses the identity it adopted from a matching subscription. It is assumed that
the queue manager is always able to place publications onto managed destination queues.
Roles
Users are involved in four roles in running publish/subscribe applications:
1. Publisher
2. Subscriber
3. Topic administrator
4. WebSphere MQ Administrator - member of group mqm
Define groups with appropriate authorizations corresponding to the publish, subscribe, and topic
administration roles. You can then assign principals to these groups authorizing them to perform
specific publish and subscribe tasks.
In addition, you need to extend the administrative operations authorizations to the administrator
of the queues and channels responsible for moving publications and subscriptions.
Topic string
Authorities - not
z/OS
z/OS authorities
SECROOT
SEC
None
None
SECGOOD
SEC/GOOD
usr1+subscribe
ALTER
Hlq.SUBSCRIBE.SECGOOD
SECBAD
SEC/BAD
None
None
Hlq.SUBSCRIBE.SECBAD
SECCOMB
SEC/COMB
None
None
Hlq.SUBSCRIBE.SECCOMB
Security
407
Topic string
Authorities - not
z/OS
z/OS authorities
SECCOMBB
SEC/COMB/GOOD/BAD
None
None
Hlq.SUBSCRIBE.SECCOMBB
SECCOMBG
SEC/COMB/GOOD
usr2+subscribe
ALTER
Hlq.SUBSCRIBE.SECCOMBG
SECCOMBN
None
SEC/COMB/BAD
None
Hlq.SUBSCRIBE.SECCOMBN
The topic tree with the associated security attributes at each node can be represented as follows:
SEC
None
SEC/GOOD
Usr1 = subscribe / ALTER
SEC/COMB
None
SEC/BAD
None
SEC/COMB/GOOD
Usr2 = subscribe / ALTER
SEC/COMB/BAD
None
SEC/COMB/GOOD/BAD
None
408
The user is granted subscribe authority if the access control list indicates that the user ID itself has
authority, or that an operating system security group of which the user ID is a member has authority.
So, for example:
v If usr1 tries to subscribe, using a topic string of SEC/GOOD, the subscription would be allowed as the
user ID has access to the node associated with that topic. However, if usr1 tried to subscribe using
topic string SEC/COMB/GOOD the subscription would not be allowed as the user ID does not have access
to the node associated with it.
v If usr2 tries to subscribe, using a topic string of SEC/COMB/GOOD the subscription would be allowed to as
the user ID has access to the node associated with the topic. However, if usr2 tried to subscribe to
SEC/GOOD the subscription would not be allowed as the user ID does not have access to the node
associated with it.
v If usr2 tries to subscribe using a topic string of SEC/COMB/GOOD/BAD the subscription would be allowed
to because the user ID has access to the parent node SEC/COMB/GOOD.
v If usr1 or usr2 tries to subscribe using a topic string of /SEC/COMB/BAD, neither would be allowed as
they do not have access to the topic node associated with it, or the parent nodes of that topic.
A subscribe operation specifying the name of a topic object that does not exist results in an
MQRC_UNKNOWN_OBJECT_NAME error.
Subscribing using a topic string where the topic node does not exist
Consider the case of an application subscribing, specifying a topic string representing a topic node that
does not currently exist in the topic tree. The authority check is performed as outlined in the previous
section. The check starts with the parent node of that which is represented by the topic string. If the
authority is granted, a new node representing the topic string is created in the topic tree.
For example, usr1 tries to subscribe to a topic SEC/GOOD/NEW. Authority is granted as usr1 has access to
the parent node SEC/GOOD. A new topic node is created in the tree as the following diagram shows. The
new topic node is not a topic object it does not have any security attributes associated with it directly; the
attributes are inherited from its parent.
SEC
None
SEC/GOOD
Usr1 = subscribe / ALTER
SEC/COMB
None
SEC/BAD
None
SEC/GOOD/NEW
None
SEC/COMB/GOOD
Usr2 = subscribe / ALTER
SEC/COMB/BAD
None
SEC/COMB/GOOD/BAD
None
409
So, if an application subscribes to SEC/COMB/GOOD/*, an authority check is carried out as outlined in the
previous two sections on the node SEC/COMB/GOOD in the topic tree.
Similarly, if an application needs to subscribe to SEC/COMB/*/GOOD, an authority check is carried out on the
node SEC/COMB.
Publishing using the topic name or topic string where the topic node exists
The security model for publishing is the same as that for subscribing, with the exception of wildcards.
Publications do not contain wildcards; so there is no case of a topic string containing wildcards to
consider.
The authorities to publish and subscribe are distinct. A user or group can have the authority to do one
without necessarily being able to do the other.
When publishing to a topic object by specifying either the MQCHAR48 name or the topic string, the
corresponding node in the topic tree is located. If the security attributes associated with the topic node
indicates that the user has authority to publish, then access is granted.
If access is not granted, the parent node in the tree determines if the user has authority to publish at that
level. If so, then access is granted. If not, the recursion continues until a node is located which grants
publish authority to the user. The recursion stops when the root node is considered without authority
having been granted. In the latter case, access is denied.
In short, if any node in the path grants authority to publish to that user or application, the publisher is
allowed to publish at that node or anywhere below that node in the topic tree.
410
Publishing using the topic name or topic string where the topic node does not
exist
As with the subscribe operation, when an application publishes, specifying a topic string representing a
topic node that does not currently exist in the topic tree, the authority check is performed starting with
the parent of the node represented by the topic string. If the authority is granted, a new node
representing the topic string is created in the topic tree.
Closing a subscription
There is additional security checking if you close a subscription using the MQCO_REMOVE_SUB option if you
did not create the subscription under this handle.
A security check is performed to ensure that you have the correct authority to do this as the action results
in the removal of the subscription. If the security attributes associated with the topic node indicate that
the user has authority, then access is granted. If not, then the parent node in the tree is considered to
determine if the user has authority to close the subscription. The recursion continues until either
authority is granted or the root node is reached.
DEFINE
ALTER
The only security check performed when deleting subscriptions using the DELETE SUB command is the
command security check.
Security
411
Price
FRUIT
Fruit
Topic object
Price
No user
None
Price/Fruit
USER1
FRUIT
Procedure
1. Issue the MQSC command DEF TOPIC(FRUIT) TOPICSTR(Price/Fruit).
2. Grant access as follows:
v Other platforms:
Grant access to USER1 to subscribe to topic "Price/Fruit" by granting the user access to the FRUIT
object. Do this, using the authorization command for the platform:
Windows
UNIX
Linux
Results
When USER1 attempts to subscribe to topic "Price/Fruit" the result is success.
When USER2 attempts to subscribe to topic "Price/Fruit" the result is failure with an
MQRC_NOT_AUTHORIZED message, together with:
412
Windows
UNIX
Linux
MQRC_NOT_AUTHORIZED
ReasonQualifier
MQRQ_SUB_NOT_AUTHORIZED
UserIdentifier
USER2
AdminTopicNames
FRUIT, SYSTEM.BASE.TOPIC
TopicString
"Price/Fruit"
Note that this is an illustration of what you see; not all the fields.
Price
FRUIT
Fruit
Apples
Oranges
Topic object
Price
No user
None
Price/Fruit
USER1
FRUIT
Price/Fruit/Apples
USER1
Price/Fruit/Oranges
USER1
In the previous task USER1 was granted access to subscribe to topic "Price/Fruit" by granting it access to
the hlq.SUBSCRIBE.FRUIT profile on z/OS and subscribe access to the FRUIT profile on other platforms.
This single profile also grants USER1 access to subscribe to "Price/Fruit/Apples", "Price/Fruit/Oranges"
and "Price/Fruit/#".
Security
413
Grant another user access to subscribe to only the topic deeper within the tree
This topic is the third in a list of tasks that tells you how to grant access to subscribe to topics by more
than one user.
Price
FRUIT
Fruit
APPLE
Apples
Oranges
414
Table 25. Access requirements for example topics and topic objects
Topic
Topic object
Price
No user
None
Price/Fruit
USER1
FRUIT
Price/Fruit/Apples
APPLE
Price/Fruit/Oranges
USER1
Procedure
1. Issue the MQSC command DEF TOPIC(APPLE) TOPICSTR(Price/Fruit/Apples).
2. Grant access as follows:
v Other platforms:
In the previous task USER1 was granted access to subscribe to topic "Price/Fruit/Apples" by
granting the user subscribe access to the FRUIT profile.
This single profile also granted USER1 access to subscribe to "Price/Fruit/Oranges" and
"Price/Fruit/#", and this access remains even with the addition of the new topic object and the
profiles associated with it.
Grant access to USER2 to subscribe to topic "Price/Fruit/Apples" by granting the user subscribe
access to the APPLE profile. Do this, using the authorization command for the platform:
Windows
UNIX
Linux
Results
On z/OS, when USER1 attempts to subscribe to topic "Price/Fruit/Apples" the first security check on the
hlq.SUBSCRIBE.APPLE profile fails, but on moving up the tree the hlq.SUBSCRIBE.FRUIT profile allows
USER1 to subscribe, so the subscription succeeds and no return code is sent to the MQSUB call. However,
a RACF ICH message is generated for the first check:
ICH408I USER(USER1
) ...
hlq.SUBSCRIBE.APPLE ...
When USER2 attempts to subscribe to topic "Price/Fruit/Apples" the result is success because the
security check passes on the first profile.
When USER2 attempts to subscribe to topic "Price/Fruit/Oranges" the result is failure with an
MQRC_NOT_AUTHORIZED message, together with:
v
Windows
UNIX
Linux
event:
MQRC_NOT_AUTHORIZED
ReasonQualifier
MQRQ_SUB_NOT_AUTHORIZED
UserIdentifier
USER2
AdminTopicNames
FRUIT, SYSTEM.BASE.TOPIC
TopicString
"Price/Fruit/Oranges"
The disadvantage of this setup is that, on z/OS, you receive additional ICH messages on the console. You
can avoid this if you secure the topic tree in a different manner.
Security
415
Price
FRUIT
Fruit
APPLE
ORANGE
Oranges
Apples
Procedure
1. Issue the MQSC command DEF TOPIC(ORANGE) TOPICSTR(Price/Fruit/Oranges).
2. Grant access as follows:
v Other platforms:
Setup the equivalent access by using the authorization commands for the platform:
Windows
UNIX
Linux
Results
On z/OS, when USER1 attempts to subscribe to topic "Price/Fruit/Apples" the first security check on the
hlq.SUBSCRIBE.APPLE profile succeeds.
Similarly, when USER2 attempts to subscribe to topic "Price/Fruit/Apples" the result is success because
the security check passes on the first profile.
When USER2 attempts to subscribe to topic "Price/Fruit/Oranges" the result is failure with an
MQRC_NOT_AUTHORIZED message, together with:
v
416
Windows
UNIX
Linux
MQRC_NOT_AUTHORIZED
ReasonQualifier
MQRQ_SUB_NOT_AUTHORIZED
UserIdentifier
USER2
AdminTopicNames
ORANGE, FRUIT, SYSTEM.BASE.TOPIC
TopicString
"Price/Fruit/Oranges"
Price
VEG
Vegetables
Fruit
Topic object
Price
No user
None
Price/Vegetables
USER1
VEG
Procedure
1. Issue the MQSC command DEF TOPIC(VEG) TOPICSTR(Price/Vegetables).
2. Grant access as follows:
v Other platforms:
Grant access to USER1 to publish to topic "Price/Vegetables" by granting the user access to the VEG
profile. Do this, using the authorization command for the platform:
Windows
UNIX
Linux
Results
When USER1 attempts to publish to topic "Price/Vegetables" the result is success; that is, the MQOPEN
call succeeds.
Security
417
When USER2 attempts to publish to topic "Price/Vegetables" the MQOPEN call fails with an
MQRC_NOT_AUTHORIZED message, together with:
v
Windows
UNIX
Linux
MQRC_NOT_AUTHORIZED
ReasonQualifier
MQRQ_OPEN_NOT_AUTHORIZED
UserIdentifier
USER2
AdminTopicNames
VEG, SYSTEM.BASE.TOPIC
TopicString
"Price/Vegetables"
Note that this is an illustration of what you see; not all the fields.
Price
VEG
Vegetables
Fruit
Potatoes
Onions
Topic object
Price
No user
None
Price/Vegetables
USER1
VEG
Price/Vegetables/Potatoes
USER1
Price/Vegetables/Onions
USER1
In the previous task USER1 was granted access to publish topic "Price/Vegetables/Potatoes" by granting
it access to the hlq.PUBLISH.VEG profile on z/OS or publish access to the VEG profile on other platforms.
This single profile also grants USER1 access to publish at "Price/Vegetables/Onions".
418
When USER1 attempts to publish at topic "Price/Vegetables/Potatoes" the result is success; that is the
MQOPEN call succeeds.
When USER2 attempts to subscribe to topic "Price/Vegetables/Potatoes" the result is failure; that is, the
MQOPEN call fails with an MQRC_NOT_AUTHORIZED message, together with:
v On z/OS, the following messages seen on the console that show the full security path through the
topic tree that has been attempted:
ICH408I USER(USER2
) ...
hlq.PUBLISH.VEG ...
ICH408I USER(USER2
) ...
hlq.PUBLISH.SYSTEM.BASE.TOPIC ...
Security
419
Price
FRUIT
VEG
Vegetables
Fruit
APPLE
ORANGE
Oranges
Apples
Potatoes
Onions
Topic object
Price
No user
No user
None
Price/Fruit
USER1
USER1
FRUIT
Price/Fruit/Apples
APPLE
Price/Fruit/Oranges
USER1
ORANGE
Procedure
Grant access as follows:
v Other platforms:
Grant access to USER1 to publish to topic "Price/Fruit" by granting the user publish access to the
FRUIT profile. Do this, using the authorization command for the platform:
Windows
UNIX
Linux
Results
On z/OS, when USER1 attempts to publish to topic "Price/Fruit" the security check on the MQOPEN
call passes.
When USER2 attempts to publish at topic "Price/Fruit" the result is failure with an MQRC_NOT_AUTHORIZED
message, together with:
v
Windows
UNIX
Linux
event:
MQRC_NOT_AUTHORIZED
ReasonQualifier
MQRQ_OPEN_NOT_AUTHORIZED
UserIdentifier
USER2
AdminTopicNames
FRUIT, SYSTEM.BASE.TOPIC
TopicString
"Price/Fruit"
Following the complete set of these tasks, gives USER1 and USER2 the following access authorities for
publish and subscribe to the topics listed:
420
Table 29. Complete list of access authorities resulting from security examples
Topic
Topic object
Price
No user
No user
None
Price/Fruit
USER1
USER1
FRUIT
Price/Fruit/Apples
APPLE
Price/Fruit/Oranges
USER1
ORANGE
Price/Vegetables
USER1
VEG
Price/Vegetables/Potatoes
Price/Vegetables/Onions
Where you have different requirements for security access at different levels within the topic tree, careful
planning ensures that you do not receive extraneous security warnings on the z/OS console log. Setting
up security at the correct level within the tree avoids misleading security messages.
Subscription security
MQSO_ALTERNATE_USER_AUTHORITY
The AlternateUserId field contains a user identifier to use to validate this MQSUB call. The call can
succeed only if this AlternateUserId is authorized to subscribe to the topic with the specified access
options, regardless of whether the user identifier under which the application is running is authorized to
do so.
MQSO_SET_IDENTITY_CONTEXT
The subscription is to use the accounting token and application identity data supplied in the
PubAccountingToken and PubApplIdentityData fields.
If this option is specified, the same authorization check is carried out as if the destination queue was
accessed using an MQOPEN call with MQOO_SET_IDENTITY_CONTEXT, except in the case where the
MQSO_MANAGED option is also used in which case there is no authorization check on the destination
queue.
If this option is not specified, the publications sent to this subscriber have default context information
associated with them as follows:
Table 30. Default publication context information
Field in MQMD
Value used
UserIdentifier
AccountingToken
ApplIdentityData
Set to blanks.
This option is only valid with MQSO_CREATE and MQSO_ALTER. If used with MQSO_RESUME, the
PubAccountingToken and PubApplIdentityData fields are ignored, so this option has no effect.
If a subscription is altered without using this option where previously the subscription had supplied
identity context information, default context information is generated for the altered subscription.
Security
421
If a subscription allowing different user IDs to use it with option MQSO_ANY_USERID, is resumed by a
different user ID, default identity context is generated for the new user ID now owning the subscription
and any subsequent publications are delivered containing the new identity context.
AlternateSecurityId
This is a security identifier that is passed with the AlternateUserId to the authorization service to allow
appropriate authorization checks to be performed. AlternateSecurityId is used only if
MQSO_ALTERNATE_USER_AUTHORITY is specified, and the AlternateUserId field is not entirely blank
up to the first null character or the end of the field.
MQSO_FIXED_USERID
When MQSO_FIXED_USERID is specified, the subscription can only be altered or resumed by a single
owning user ID. This user ID is the last user ID to alter the subscription that set this option, thereby
removing the MQSO_ANY_USERID option, or if no alters have taken place, it is the user ID that created
the subscription.
If an MQSUB verb refers to an existing subscription with MQSO_ANY_USERID set and alters the
subscription (using MQSO_ALTER) to use option MQSO_FIXED_USERID, the user ID of the subscription
is now fixed at this new user ID. The call succeeds only if the new user ID has authority to subscribe to
the topic.
If a user ID other than the one recorded as owning a subscription trys to resume or alter an
MQSO_FIXED_USERID subscription, the call will fail with MQRC_IDENTITY_MISMATCH. The owning
user ID of a subscription can be viewed using the DISPLAY SBSTATUS command.
If neither MQSO_ANY_USERID or MQSO_FIXED_USERID is specified, the default is
MQSO_FIXED_USERID.
422
Behavior that has changed between version 7.0.1 and version 7.5
As IBMWebSphere MQ Advanced Message Security became a component in WebSphere MQ 7.5, some
aspects of WebSphere MQ AMS functionality have changed, what might affect existing applications,
administrative scripts, or management procedures.
Review the following list of changes carefully before upgrading queue managers to version 7.5. Decide
whether you must plan to make changes to existing applications, scripts, and procedures before starting
to migrate systems to WebSphere MQ version 7.5:
v WebSphere MQ AMS installation is a part of WebSphere MQ installation process.
v WebSphere MQ AMS security capabilities are enabled with its installation and controlled with security
policies. You do not need to enable interceptors to allow WebSphere MQ AMS start intercepting data.
v WebSphere MQ AMS in WebSphere MQ version 7.5 does not require the use of the cfgmqs command as
in the stand-alone version of WebSphere MQ AMS.
Key concepts
Learn about the key concepts in WebSphere MQ Advanced Message Security to understand how the tool
works and how to manage it effectively.
Public key infrastructure:
Public key infrastructure (PKI) is a system of facilities, policies, and services that support the use of
public key cryptography to obtain secure communication.
There is no single standard that defines the components of a public key infrastructure, but a PKI typically
involves usage of public key certificates and comprises certificate authorities (CA) and other registration
authorities (RA) that provide the following services:
v Issuing digital certificates
v Validating digital certificates
v Revoking digital certificates
v Distributing certificates
Identity of users and applications are represented by distinguished name (DN) field in a certificate
associated with signed or encrypted messages. WebSphere MQ Advanced Message Security uses this
Security
423
identity to represent a user or an application. To authenticate this identity, the user or application must
have access to the keystore where the certificate and associated private key are stored. Each certificate is
represented by a label in the keystore.
Related concepts:
Using keystores and certificates on page 445
To provide transparent cryptographic protection to WebSphere MQ applications, WebSphere MQ
Advanced Message Security uses the keystore file, where public key certificates and a private key are
stored.
Digital certificates:
WebSphere MQ Advanced Message Security associates users and applications with X.509 standard digital
certificates. X.509 certificates are typically signed by a trusted certificate authority (CA) and involve
private and public keys which are used for encryption and decryption.
Digital certificates provide protection against impersonation by binding a public key to its owner,
whether that owner is an individual, a queue manager, or some other entity. Digital certificates are also
known as public key certificates, because they give you assurance about the ownership of a public key
when you use an asymmetric key scheme. This scheme requires that a public key and a private key be
generated for an application. Data encrypted with the public key can only be decrypted using the
corresponding private key while data encrypted with the private key can only be decrypted using the
corresponding public key. The private key is stored in a key database file that is password-protected.
Only its owner has the access to the private key used to decrypt messages that are encrypted using the
corresponding public key.
If public keys are sent directly by their owner to another entity, there is a risk that the message could be
intercepted and the public key substituted by another. This is known as a "man-in-the-middle" attack. The
solution is to exchange public keys through a trusted third party, giving the user a strong assurance that
the public key belongs to the entity with which you are communicating. Instead of sending your public
key directly, you ask a trusted third party to incorporate it into a digital certificate. The trusted
third-party who issues digital certificates is called a certificate authority (CA).
For more information about digital certificates, see What is in a digital certificate.
A digital certificate contains the public key for an entity and states that the public key belongs to that
entity:
v when a certificate is for an individual entity, it is called a personal certificate or user certificate.
v when a certificate is for a certificate authority, the certificate is called a CA certificate or signer certificate.
Note: WebSphere MQ Advanced Message Security supports self-signed certificates in both Java and
native applications
Related information:
Cryptography
Cryptography is the process of converting between readable text, called plaintext, and an unreadable
form, called ciphertext.
Object authority manager:
The Object Authority Manager (OAM) is the authorization service component supplied with the
WebSphere MQ products.
The access to WebSphere MQ Advanced Message Security entities is controlled through WebSphere MQ
user groups and the OAM. Administrators can use the command-line interface to grant or revoke
authorizations as required. Different groups of users can have different kinds of access authority to the
same objects. For example, one group could perform both PUT and GET operations for a specific queue
424
while another group might be allowed only to browse the queue. Similarly, some groups might have GET
and PUT authority to a queue, but are not allowed to alter or delete the queue.
Through the OAM, you can control:
v Access to WebSphere MQ Advanced Message Security objects through MQI. When an application
program attempts to access objects, the OAM checks if the user profile making the request has the
authorization for the operation requested. This means that queues, and the messages on queues, can be
protected from unauthorized access.
v Permission to use PCF and MQSC commands.
Related information:
Object authority manager
Supported technology
WebSphere MQ Advanced Message Security depends on several technology components to provide a
security infrastructure.
WebSphere MQ Advanced Message Security supports the following WebSphere MQ application
programming interfaces (APIs):
v Message queue interface (MQI)
v WebSphere MQ Java Message Service (JMS) 1.0.2 and 1.1.
v WebSphere MQ Base Classes for Java
v WebSphere MQ classes for .Net in an unmanaged mode
Note: WebSphere MQ Advanced Message Security supports X.509 compliant certificate authorities.
Known limitations:
Learn about limitations of WebSphere MQ Advanced Message Security.
v The following WebSphere MQ options are not supported:
Publish/subscribe.
Channel data conversion.
Distribution lists.
Application message segmentation
The use of non-threaded applications using API exit on HP-UX platforms.
WebSphere MQ classes for .NET in a managed mode (client or bindings connections).
Message Service client for .NET (XMS) applications.
Message Service client for C/C++ (XMS supportPac IA94) applications.
v All Java applications are dependant on IBM Java Runtime.
WebSphere MQ AMS does not support JRE provided by other vendors.
v JMS and Java client applications using AMS in client mode.
Any JMS, or Java, client application (including WebSphere MQ Explorer and Managed File Transfer
Agents) cannot use Advanced Message Security in client mode with a WebSphere MQ queue manager
earlier than version 7.5.
In order to use message protection policies, these applications either need to interact with a WebSphere
MQ version 7.5 queue manager, or connect in local bindings mode to a queue manager on the same
machine as the application.
v You should avoid putting two or more certificates with the same Distinguished Names, in a single
keystore file, because the WebSphere MQ Advanced Message Security intereceptor's functioning with
such certificates is undefined.
Security
425
User scenarios
Familiarize yourself with possible scenarios to understand what business goals you can achieve with
WebSphere MQ Advanced Message Security.
Quick Start Guide for Windows platforms:
Use this guide to quickly configure IBM WebSphere MQ Advanced Message Security to provide message
security on Windows platforms. By the time you complete it, you will have created a key database to
verify user identities, and defined signing/encryption policies for your queue manager.
Before you begin
You should have at least the following features installed on your system:
v Server
v Development Toolkit (for the Sample programs)
v Advanced Message Security
Refer to WebSphere MQ features for Windows systems for details.
1. Creating a queue manager and a queue:
About this task
All the following examples use a queue named TEST.Q for passing messages between applications.
WebSphere MQ Advanced Message Security uses interceptors to sign and encrypt messages at the point
they enter the WebSphere MQ infrastructure through the standard WebSphere MQ interface. The basic
setup is done in WebSphere MQ and is configured in the following steps.
You can use WebSphere MQ Explorer to create the queue manager QM_VERIFY_AMS and its local queue
called TEST.Q by using all the default wizard settings, or you can use the commands found in \WebSphere
MQ\bin. Remember that you must be a member of the mqm user group to run the following administrative
commands.
Procedure
1. Create a queue manager
crtmqm QM_VERIFY_AMS
3. Create a queue called TEST.Q by entering the following command into runmqsc for queue manager
QM_VERIFY_AMS
DEFINE QLOCAL(TEST.Q)
Results
If the procedure is completed, command entered into runmqsc will display details about TEST.Q:
DISPLAY Q(TEST.Q)
426
Procedure
1. Create the two users and ensure that HOMEPATH and HOMEDRIVE are set for both these users.
2. Authorize the users to connect to the queue manager and to work with the queue
setmqaut -m QM_VERIFY_AMS -t qmgr -p alice -p bob +connect +inq
setmqaut -m QM_VERIFY_AMS -n TEST.Q -t queue -p alice +put
setmqaut -m QM_VERIFY_AMS -n TEST.Q -t queue -p bob +get
3. You must also allow the two users to browse the system policy queue and put messages on the error
queue.
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.POLICY.QUEUE -p alice -p bob +browse
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.ERROR.QUEUE -p alice -p bob +put
Results
Users are now created and the required authorities granted to them.
What to do next
To verify if the steps were carried out correctly, use the amqsput and amqsget samples as described in
section 7. Testing the setup on page 429.
3. Creating key database and certificates:
About this task
Interceptor requires the public key of the sending users to encrypt the message. Thus, the key database of
user identities mapped to public and private keys must be created. In the real system, where users and
applications are dispersed over several computers, each user would have its own private keystore.
Similarly, in this guide, we create key databases for alice and bob and share the user certificates between
them.
Note: In this guide, we use sample applications written in C connecting using local bindings. If you
plan to use Java applications using client bindings, you must create a JKS keystore and certificates using
the keytool command, which is part of the JRE (see Quick Start Guide for Java clients on page 435 for
more details). For all other languages, and for Java applications using local bindings, the steps in this
guide are correct.
Procedure
1. Use the IBM Key Management GUI (strmqikm.exe) to create a new key database for the user alice.
Type:
Filename:
Location:
CMS
alicekey.kdb
C:/Documents and Settings/alice/AMS
Note:
v It is advisable to use a strong password to secure the database.
v Make sure that Stash password to a file check box is selected.
2. Change the key database content view to Personal Certificates.
3. Select New Self Signed; self signed certificates are used in this scenario.
4. Create a certificate identifying the user alice for use in encryption, using these fields:
Key label: Alice_Cert
Common Name: alice
Organisation: IBM
Country: GB
Note:
Security
427
v For the purpose of this guide, we are using self-signed certificate which can be created without
using a Certificate Authority. For production systems, it is advisable not to use self-signed
certificates but instead rely on certificates signed by a Certificate Authority.
v The Key label parameter specifies the name for the certificate, which interceptors will look up to
receive necessary information.
v The Common Name and optional parameters specifies the details of the Distinguished Name (DN),
which must be unique for each user.
5. Repeat step 1-4 for the user bob
Results
The two users alice and bob each now have a self-signed certificate.
4. Creating keystore.conf:
About this task
You must point WebSphere MQ Advanced Message Security interceptors to the directory where the key
databases and certificates are located.This is done via the keystore.conf file, which hold that information
in the plain text form. Each user must have a separate keystore.conf file. This step must be done for
both, alice and bob.
The content of keystore.conf should be of the form:
cms.keystore = <dir>/keystore_file
cms.certificate = certificate_label
Example
For this scenario, the contents of the keystore.conf will be as follows:
cms.keystore = C:/Documents and Settings/alice/AMS/alicekey
cms.certificate = Alice_Cert
Note:
v The path to the keystore file must be provided with no file extension.
v The certificate label can include spaces, thus "Alice_Cert" and "Alice_Cert " for example, are recognized
as labels of two different certificates. However, to avoid confusion, it is better not to use spaces in
label's name.
v There are the following keystore formats: CMS (Cryptographic Message Syntax), JKS (Java Keystore) and
JCEKS (Java Cryptographic Extension Keystore). For more information, refer to Structure of the
configuration file on page 445.
v %HOMEDRIVE%\%HOMEPATH%\.mqs\keystore.conf (eg. C:\Documents and Settings\alice\.mqs\
keystore.conf) is the default location where WebSphere MQ Advanced Message Security searches for
the keystore.conf file. For information about how to use a non-default location for the keystore.conf,
see Using keystores and certificates on page 445.
v To create .mqs directory, you must use the command prompt.
5. Sharing Certificates:
About this task
Share the certificates between the two key databases so that each user can successfully identify the other.
This is done by directly exporting each user's certificate to the other user's key database.
Procedure
1. Export the certificate identifying alice to an external file:
runmqakm -cert -extract -db "C:/Documents and Settings/alice/AMS/alicekey.kdb" -pw passw0rd -label Alice_Cert -target alice_public.arm
428
Results
The two users alice and bob are now able to successfully identify each other having created and shared
self-signed certificates.
What to do next
Verify that a certificate is in the keystore either by browsing it using the GUI or running the following
commands which print out its details:
runmqakm -cert -details -db "C:/Documents and Settings/bob/AMS/bobkey.kdb"
-pw passw0rd -label Alice_Cert
runmqakm -cert -details -db "C:/Documents and Settings/alice/AMS/alicekey.kdb"
-pw passw0rd -label Bob_Cert
Note: The DNs match exactly those specified in the receptive user's certificate from the key database.
What to do next
To verify the policy you have defined, issue the following command:
dspmqspl -m QM_VERIFY_AMS
To print the policy details as a set of setmqspl commands, the -export flag. This allows storing already
defined policies:
dspmqspl -m QM_VERIFY_AMS -export >restore_my_policies.bat
Security
429
Procedure
1. Switch user to run as user alice
Right-click cmd.exe and select Run as.... When prompted, log in as the user alice.
2. As the user alice put a message using a sample application:
amqsput TEST.Q QM_VERIFY_AMS
Results
If the application has been configured properly for both users, the user alice's message is displayed
when bob runs the getting application.
8. Testing encryption:
About this task
To verify that the encryption is occurring as expected, create an alias queue which references the original
queue TEST.Q. This alias queue will have no security policy and so no user will have the information to
decrypt the message and therefore the encrypted data will be shown.
Procedure
1. Using the runmqsc command against queue manager QM_VERIFY_AMS, create an alias queue.
DEFINE QALIAS(TEST.ALIAS) TARGET(TEST.Q)
3. As the user alice, put another message using a sample application just as before:
amqsput TEST.Q QM_VERIFY_AMS
4. As the user bob, browse the message using a sample application via the alias queue this time:
amqsbcg TEST.ALIAS QM_VERIFY_AMS
5. As the user bob, get the message using a sample application from the local queue:
amqsget TEST.Q QM_VERIFY_AMS
Results
The output from the amqsbcg application shows the encrypted data that is on the queue proving that the
message has been encrypted.
Quick Start Guide for UNIX platforms:
Use this guide to quickly configure IBM WebSphere MQ Advanced Message Security to provide message
security on UNIX platforms. By the time you complete it, you will have created a key database to verify
user identities, and defined signing/encryption policies for your queue manager.
Before you begin
You should have at least the following components installed on your system:
v Runtime
430
v
v
v
v
Server
Sample programs
IBM Global Security Kit
MQ Advanced Message Security
Refer to the following topics for the component names on each specific platform:
v WebSphere MQ components for Linux systems
v WebSphere MQ components for HP-UX systems
v WebSphere MQ components for AIX systems
v WebSphere MQ components for Solaris systems
1. Creating a queue manager and a queue:
About this task
All the following examples use a queue named TEST.Q for passing messages between applications.
WebSphere MQ Advanced Message Security uses interceptors to sign and encrypt messages at the point
they enter the WebSphere MQ infrastructure through the standard WebSphere MQ interface. The basic
setup is done in WebSphere MQ and is configured in the following steps.
You can use WebSphere MQ Explorer to create the queue manager QM_VERIFY_AMS and its local queue
called TEST.Q by using all the default wizard settings, or you can use the commands found in
<MQ_INSTALL_PATH>/bin. Remember that you must be a member of the mqm user group to run the
following administrative commands.
Procedure
1. Create a queue manager
crtmqm QM_VERIFY_AMS
3. Create a queue called TEST.Q by entering the following command into runmqsc for queue manager
QM_VERIFY_AMS
DEFINE QLOCAL(TEST.Q)
Results
If the procedure completed successfully, the following command entered into runmqsc will display details
about TEST.Q:
DISPLAY Q(TEST.Q)
2. Authorize the users to connect to the queue manager and to work with the queue
Security
431
3. You must also allow the two users to browse the system policy queue and put messages on the error
queue.
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.POLICY.QUEUE -p alice -p bob +browse
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.ERROR.QUEUE -p alice -p bob +put
Results
User groups are now created and the required authorities granted to them. This way users who are
assigned to those groups will also have permission to connect to the queue manager and to put and get
from the queue.
What to do next
To verify if the steps were carried out correctly, use the amqsput and amqsget samples as described in
section 8. Testing encryption on page 435.
3. Creating key database and certificates:
About this task
To encrypt the message to interceptor requires the public key of the sending users. Thus, the key
database of user identities mapped to public and private keys must be created. In the real system, where
users and applications are dispersed over several computers, each user would have its own private
keystore. Similarly, in this guide, we create key databases for alice and bob and share the user certificates
between them.
Note: In this guide, we use sample applications written in C connecting using local bindings. If you
plan to use Java applications using client bindings, you must create a JKS keystore and certificates using
the keytool command, which is part of the JRE (see Quick Start Guide for Java clients on page 435 for
more details). For all other languages, and for Java applications using local bindings, the steps in this
guide are correct.
Procedure
1. Create a new key database for the user alice
mkdir /home/alice/.mqs -p
runmqakm -keydb -create -db /home/alice/.mqs/alicekey.kdb -pw passw0rd -stash
Note:
v It is advisable to use a strong password to secure the database.
v The stash parameter stores the password into the key.sth file, which interceptors can use to open
the database.
2. Ensure the key database is readable
chmod +r /home/alice/.mqs/alicekey.kdb
Note:
v For the purpose of this guide, we are using self-signed certificate which can be created without
using a Certificate Authority. For production systems, it is advisable not to use self-signed
certificates but instead rely on certificates signed by a Certificate Authority.
432
v The label parameter specifies the name for the certificate, which interceptors will look up to
receive necessary information.
v The DN parameter specifies the details of the Distinguished Name (DN), which must be unique for
each user.
4. Now we have created the key database, we should set the ownership of it, and ensure it is unreadable
by all other users.
chown alice /home/alice/.mqs/alicekey.kdb /home/alice/.mqs/alicekey.sth
chmod 600 /home/alice/.mqs/alicekey.kdb /home/alice/.mqs/alicekey.sth
Example
For this scenario, the contents of the keystore.conf will be as follows:
cms.keystore = /home/alice/.mqs/alicekey
cms.certificate = Alice_Cert
Note:
v The path to the keystore file must be provided with no file extension.
v There are the following keystore formats: CMS (Cryptographic Message Syntax), JKS (Java Keystore) and
JCEKS (Java Cryptographic Extension Keystore). For more information, refer to Structure of the
configuration file on page 445.
v HOME/.mqs/keystore.conf is the default location where WebSphere MQ Advanced Message Security
searches for the keystore.conf file. For information about how to use a non-default location for the
keystore.conf, see Using keystores and certificates on page 445.
5. Sharing Certificates:
About this task
Share the certificates between the two key databases so that each user can successfully identify the other.
This is done by directly exporting each user's certificate to the other user's key database.
Procedure
1. Export the certificate identifying alice to an external file:
runmqakm -cert -extract -db /home/alice/.mqs/alicekey.kdb -pw passw0rd -label Alice_Cert -target alice_public.arm
433
runmqakm -cert -extract -db /home/bob/.mqs/bobkey.kdb -pw passw0rd -label Bob_Cert -target bob_public.arm
Results
The two users alice and bob are now able to successfully identify each other having created and shared
self-signed certificates.
What to do next
Verify that a certificate is in the keystore by running the following commands which print out its details:
runmqakm -cert -details -db /home/bob/.mqs/bobkey.kdb -pw passw0rd -label Alice_Cert
runmqakm -cert -details -db /home/alice/.mqs/alicekey.kdb -pw passw0rd -label Bob_Cert
Note: The DNs match exactly those specified in the receptive user's certificate from the key database.
What to do next
To verify the policy you have defined, issue the following command:
dspmqspl -m QM_VERIFY_AMS
To print the policy details as a set of setmqspl commands, the -export flag. This allows storing already
defined policies:
dspmqspl -m QM_VERIFY_AMS -export >restore_my_policies.bat
434
Results
If the application has been configured properly for both users, the user alice's message is displayed
when bob runs the getting application.
8. Testing encryption:
About this task
To verify that the encryption is occurring as expected, create an alias queue which references the original
queue TEST.Q. This alias queue will have no security policy and so no user will have the information to
decrypt the message and therefore the encrypted data will be shown.
Procedure
1. Using the runmqsc command against queue manager QM_VERIFY_AMS, create an alias queue.
DEFINE QALIAS(TEST.ALIAS) TARGET(TEST.Q)
3. As the user alice, put another message using a sample application just as before:
./amqsput TEST.Q QM_VERIFY_AMS
4. As the user bob, browse the message using a sample application via the alias queue this time:
./amqsbcg TEST.ALIAS QM_VERIFY_AMS
5. As the user bob, get the message using a sample application from the local queue:
./amqsget TEST.Q QM_VERIFY_AMS
Results
The output from the amqsbcg application will show the encrypted data that is on the queue proving that
the message has been encrypted.
Quick Start Guide for Java clients:
Use this guide to quickly configure IBM WebSphere MQ Advanced Message Security to provide message
security for Java applications connecting using client bindings. By the time you complete it, you will have
created a key store to verify user identities, and defined signing/encryption policies for your queue
manager.
Before you begin
Ensure you have the appropriate components installed as described in the Quick Start Guide (Windows
or UNIX).
Security
435
3. Create and start a listener by entering the following commands into runmqsc for queue manager
QM_VERIFY_AMS
DEFINE LISTENER(AMS.LSTR) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)
START LISTENER(AMS.LSTR)
4. Create a channel for our applications to connect in through by entering the following command into
runmqsc for queue manager QM_VERIFY_AMS
DEFINE CHANNEL(AMS.SVRCONN) CHLTYPE(SVRCONN)
5. Create a queue called TEST.Q by entering the following command into runmqsc for queue manager
QM_VERIFY_AMS
DEFINE QLOCAL(TEST.Q)
Results
If the procedure completed successfully, the following command entered into runmqsc will display details
about TEST.Q:
DISPLAY Q(TEST.Q)
3. You must also allow the two users to browse the system policy queue and put messages on the error
queue.
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.POLICY.QUEUE -p alice -p bob +browse
setmqaut -m QM_VERIFY_AMS -t queue -n SYSTEM.PROTECTION.ERROR.QUEUE -p alice -p bob +put
Results
Users are now created and the required authorities granted to them.
436
What to do next
To verify if the steps were carried out correctly, use the JmsProducer and JmsConsumer samples as
described in section 7. Testing the setup on page 439.
3. Creating key database and certificates:
About this task
To encrypt the message to interceptor requires the public key of the sending users. Thus, the key
database of user identities mapped to public and private keys must be created. In the real system, where
users and applications are dispersed over several computer, each user would have its own private
keystore. Similarly, in this guide, we create key databases for alice and bob and share the user certificates
between them.
Note: In this guide, we use sample applications written in Java connecting using client bindings. If you
plan to use Java applications using local bindings or C applications, you must create a CMS keystore and
certificates using the runmqakm command. This is shown in the Quick Start Guide (Windows or UNIX).
Procedure
1. Create a directory to create your keystore in, for example /home/alice/.mqs. You might wish to create
it in the same directory as used by the Quick Start Guide (Windows or UNIX) for your platform.
Note: This directory will be referred to as keystore-dir in the following steps
2. Create a new keystore and certificate identifying the user alice for use in encryption
Note: The keytool command is part of the JRE.
keytool -genkey -alias Alice_Java_Cert -keyalg RSA -keystore keystore-dir/keystore.jks -storepass passw0rd
-dname "CN=alice, O=IBM, C=GB" -keypass passw0rd
Note:
v If your keystore-dir contains spaces, you must put quotes round the full name of your keystore
v It is advisable to use a strong password to secure the keystore.
v For the purpose of this guide, we are using self-signed certificate which can be created without
using a Certificate Authority. For production systems, it is advisable not to use self-signed
certifcates but instead rely on certificates signed by a Certificate Authority.
v The alias parameter specifies the name for the certificate, which interceptors will look up to
receive necessary information.
v The dname parameter specifies the details of the Distinguished Name (DN), which must be unique
for each user.
3. On UNIX, ensure the keystore is readable
chmod +r keystore-dir/keystore.jks
437
Example
For this scenario, the contents of the keystore.conf for alice will be as follows:
JKS.keystore = keystore-dir/keystore
JKS.certificate = Alice_Java_Cert
JKS.encrypted = no
JKS.keystore_pass = passw0rd
JKS.key_pass = passw0rd
JKS.provider = IBMJCE
For this scenario, the contents of the keystore.conf for bob will be as follows:
JKS.keystore = keystore-dir/keystore
JKS.certificate = Bob_Java_Cert
JKS.encrypted = no
JKS.keystore_pass = passw0rd
JKS.key_pass = passw0rd
JKS.provider = IBMJCE
Note:
v The path to the keystore file must be provided with no file extension.
v If you already have a keystore.conf because you have followed Quick Start Guide (Windows or
UNIX), you can edit the existing one to add in the above lines.
5. Sharing Certificates:
About this task
Share the certificates between the two keystores so that each user can successfully identify the other. This
is done by exporting each user's certificate and importing it into the other user's keystore.
Procedure
1. Export the certificate identifying alice.
keytool -export -keystore alice-keystore-dir/keystore.jks -storepass passw0rd
-alias Alice_Java_Cert -file alice-keystore-dir/Alice_Java_Cert.cer
2. Import the certificate identifying alice into the keystore that bob will use. When prompted indicate
that you will trust this certificate.
keytool -import -file alice-keystore-dir/Alice_Java_Cert.cer -alias Alice_Java_Cert
-keystore bob-keystore-dir/keystore.jks -storepass passw0rd
438
setmqspl for more information on this command. Each policy name must be the same as the queue name
it is to be applied to.
Example
This is an example of a policy defined on the TEST.Q queue, signed by the user alice using the SHA1
algorithm, and encrypted using the 256-bit AES algorithm for the user bob:
setmqspl -m QM_VERIFY_AMS -p TEST.Q -s SHA1 -a "CN=alice,O=IBM,C=GB" -e AES256 -r "CN=bob,O=IBM,C=GB"
Note: The DNs match exactly those specified in the receptive user's certificate from the key database.
What to do next
To verify the policy you have defined, issue the following command:
dspmqspl -m QM_VERIFY_AMS
To print the policy details as a set of setmqspl commands, the -export flag. This allows storing already
defined policies:
dspmqspl -m QM_VERIFY_AMS -export >restore_my_policies.bat
3. As the user bob, get a message using a sample application, connecting as a client:
java JMSConsumer -m QM_VERIFY_AMS -d TEST.Q -h localhost -p 1414 -l AMS.SVRCONN
Results
If the application has been configured properly for both users, the user alice's message is displayed
when bob runs the getting application.
Protecting remote queues:
To fully protect remote queue connections, the same policy must be set on the remote queue and local
queue to which messages are transmitted.
When a message is put into a remote queue, WebSphere MQ Advanced Message Security intercepts the
operation and processes the message according to a policy set for the remote queue. For example, for an
encryption policy, the message is encrypted before it is passed to the WebSphere MQ to handle it. After
Security
439
WebSphere MQ Advanced Message Security has processed the message put into a remote queue,
WebSphere MQ puts it into associated transmission queue and forwards it to the target queue manager
and target queue.
When a GET operation is performed on the local queue, WebSphere MQ Advanced Message Security tries
to decode the message according to the policy set on the local queue. For the operation to succeed, the
policy used to decrypt the message must be identical to the one used to encrypt it. Any discrepancy will
cause the message to be rejected.
If for any reason both policies cannot be set at the same time, a staged roll-out support is provided. The
policy can be set on a local queue with toleration flag on, which indicates that a policy associated with a
queue can be ignored when an attempt to retrieve a message from the queue involves a message that
does not have the security policy set. In this case, GET will try to decrypt the message, but will allow
non-encrypted messages to be delivered. This way policies on remote queues can be set after the local
queues has been protected (and tested).
Remember: Remove the toleration flag once the WebSphere MQ Advanced Message Security roll-out has
been completed.
Routing protected messages using WebSphere Message Broker:
IBM WebSphere MQ Advanced Message Security can protect messages in an infrastructure where
WebSphere Message Broker version 8.0.0.1 (or later) is installed. You should understand the nature of
both products before applying security in the WebSphere Message Broker environment.
About this task
WebSphere MQ Advanced Message Security provides end-to-end security of the message payload. This
means that only the parties specified as the valid senders and recipients of a message are capable of
producing or receiving it. This implies that in order to secure messages flowing through WebSphere
Message Broker, you can either allow WebSphere Message Broker to process messages without knowing
their content (Scenario 1) or make it an authorized user able to receive and send messages (Scenario 2).
Scenario 1 - Message Broker cannot see message content:
Before you begin
You should have your WebSphere Message Broker connected to an existing queue manager.. Replace
QMgrName with this existing queue manager name in the commands that follow.
About this task
In this scenario, Alice puts a protected message into an input queue QIN. Based on the message property
routeTo, the message is routed either to bob's (QBOB), 1 (QCECIL), or the default (QDEF) queue. The routing is
possible because WebSphere MQ Advanced Message Security protects only the message payload and not
its headers and properties which remain unprotected and can be read by WebSphere Message Broker.
WebSphere MQ Advanced Message Security is used only by alice, bob and cecil. It is not necessary to
install or configure it for the WebSphere Message Broker.
WebSphere Message Broker receives the protected message from the unprotected alias queue in order to
avoid any attempt to decrypt the message. If it were to use the protected queue directly, the message
would be put onto the DEAD LETTER queue as impossible to decrypt. The message is routed by
WebSphere Message Broker and arrives on the target queue unchanged. Therefore it is still signed by the
original author (both bob and cecil only accept messages sent by alice) and protected as before (only bob
and cecil can read it). WebSphere Message Broker puts the routed message to an unprotected alias. The
1. cecil's
440
recipients retrieve the message from a protected output queue where WebSphere MQ AMS will
transparently decrypt the message.
Procedure
1. Configure alice, bob and cecil to use WebSphere MQ Advanced Message Security as described in the
Quick Start Guide (Windows or UNIX). Ensure the following steps are completed:
v Creating and authorizing users
v Creating Key Database and Certificates
v Creating keystore.conf
2. Provide alice's certificate to bob and cecil, so alice can be identified by them when checking digital
signatures on messages.
runmqakm -cert -export -db <location-of-alicekey.kdb> -pw passw0rd
-label Alice_Cert -target <location-of-bobkey.kdb> -target_pw passw0rd
3. Provide bob and cecil's certificates to alice, so alice can send messages encrypted for bob and cecil.
runmqakm -cert -export -db <location-of-bobkey.kdb> -pw passw0rd
-label Bob_Cert -target <location-of-alicekey.kdb> -target_pw passw0rd
4. On your queue manager, define local queues called QIN, QBOB, QCECIL and QDEF.
DEFINE QLOCAL(QIN)
5. Setup the security policy for the QIN queue to an eligible configuration. Use the identical setup for
the QBOB, QCECIL and QDEF queues.
setmqspl -m QMgrName -p QIN -s SHA1 -a "CN=alice,O=IBM,C=GB"
-e AES256 -r "CN=bob,O=IBM,C=GB" -r "CN=cecil,O=IBM,C=GB"
This scenario assumes the security policy where alice is the only authorized sender and bob and cecil
are the recipients.
6. Define alias queues AIN, ABOB and ACECIL referencing local queues QIN, QBOB and QCECIL respectively.
DEFINE QALIAS(AIN) TARGET(QIN)
7. Verify that the security configuration for the aliases specified in the previous step is not present;
otherwise set its policy to NONE.
dspmqspl -m QMgrName -p AIN
8. In WebSphere Message Broker create a message flow to route the messages arriving on the AIN alias
queue to the BOB, CECIL, or DEF node depending on the routeTo property of the message. To do
so:
a. Create an MQInput node called IN and assign the AIN alias as its queue name.
b. Create MQOutput nodes called BOB, CECIL and DEF and assign alias queues ABOB, ACECIL and ADEF
as their respective queue names.
c. Create a route node and call it TEST.
d.
e.
f.
g.
h.
9. Deploy the message flow to the WebSphere Message Broker runtime component.
10. Running as the user Alice put a message that also contains a message property called routeTo with
a value of either bob or cecil. Running the sample application amqsstm will allow you to do this.
Security
441
11. Running as user bob retrieve the message from the queue QBOB using the sample application amqsget.
Results
When alice puts a message on the QIN queue, the message is protected. It is retrieved in protected form by
the WebSphere Message Broker from the AIN alias queue. WebSphere Message Broker decides where to
route the message reading the routeTo property which is, as all properties, not encrypted. WebSphere
Message Broker places the message on the appropriate unprotected alias avoiding its further protection.
When received by bob or cecil from the queue, the message is decrypted and the digital signature is
verified.
Scenario 2 - Message Broker can see message content:
About this task
In this scenario, a group of individuals are allowed to send messages to WebSphere Message Broker.
Another group are authorized to receive messages which are created by WebSphere Message Broker. The
transmission between the parties and WebSphere Message Broker cannot be eavesdropped.
Remember that WebSphere Message Broker reads protection policies and certificates only when a queue
is opened, so you must reload the execution group after making any updates to protection policies for the
changes to take effect.
mqsireload execution-group-name
If WebSphere Message is considered an authorized party allowed to read or sign the message payload,
you must configure WebSphere MQ Advanced Message Security for the user starting the WebSphere
Message Broker service. Be aware it is not necessarily the same user who puts/gets the messages onto
queues nor the user creating and deploying the WebSphere Message Broker applications.
Procedure
1. Configure alice, bob, cecil and dave and the WebSphere Message Broker service user, to use WebSphere
MQ Advanced Message Security as described in the Quick Start Guide (Windows or UNIX). Ensure
the following steps are completed:
v Creating and authorizing users
v Creating Key Database and Certificates
v Creating keystore.conf
2. Provide alice, bob, cecil and dave's certificate to the WebSphere Message Broker service user.
runmqakm -cert -export -db <location-of-alicekey.kdb> -pw passw0rd
-label Alice_Cert -target <location-of-Message-Broker-key-database> -target_pw passw0rd
3. Provide the WebSphere Message Broker service user's certificate to alice, bob, cecil and dave.
runmqakm -cert -export -db <location-of-Message-Broker-key-database> -pw passw0rd
-label Broker_Cert -target <location-of-alicekey.kdb> -target_pw passw0rd
Note: Alice and bob need the WebSphere Message Broker service user's certificate to encrypt the
messages correctly. The WebSphere Message Broker service user needs alice's and bob's certificates to
verify authors of the messages. The WebSphere Message Broker service user needs cecil's and dave's
442
certificates to encrypt the messages for them. cecil and dave need the WebSphere Message Broker
service user's certificate to verify if the message comes from WebSphere Message Broker.
4. Define a local queue named IN and define the security policy with alice and bob specified as authors
and WebSphere Message Broker's service user specified as recipient:
setmqspl -m QMgrName -p IN -s MD5 -a "CN=alice,O=IBM,C=GB" -a "CN=bob,O=IBM,C=GB"
-e AES256 -r "CN=broker,O=IBM,C=GB"
5. Define a local queue named OUT and define the security policy with WebSphere Message Broker's
service user specified as author and cecil and dave specified as recipients:
setmqspl -m QMgrName -p OUT -s MD5 -a "CN=broker,O=IBM,C=GB" -e AES256
-r "CN=cecil,O=IBM,C=GB" -r "CN=dave,O=IBM,C=GB"
6. In WebSphere Message Broker create a message flow with an MQInput and MQOutput node. Configure
the MQInput node to use the IN queue and the MQOutput node to use the OUT queue.
7. Deploy the message flow to the WebSphere Message Broker runtime component.
8. Running as user alice or bob put a message on the queue IN using the sample application amqsput.
9. Running as user cecil or dave retrieve the message from the queue OUT using the sample application
amqsget.
Results
Messages sent by alice or bob to the input queue IN are encrypted allowing only WebSphere Message
Broker to read it. WebSphere Message Broker will only accept messages from alice and bob and will reject
any others. The accepted messages will be appropriately processed then signed and encrypted with cecil's
and dave's keys before being put onto the output queue OUT. Only cecil and dave are capable of reading it,
messages not signed by WebSphere Message Broker are rejected.
Using WebSphere MQ AMS with WebSphere MQ Managed File Transfer:
This scenario explains how to configure WebSphere MQ Advanced Message Security to provide message
privacy for data being sent through a WebSphere MQ Managed File Transfer.
Before you begin
Ensure that you have WebSphere MQ Advanced Message Security component installed on the WebSphere
MQ installation hosting the queues used by WebSphere MQ Managed File Transfer that you wish to
protect.
If your WebSphere MQ Managed File Transfer agents are connecting in bindings mode, ensure you also
have the GSKit component installed on their local installation.
About this task
When transfer of data between two WebSphere MQ Managed File Transfer agents is interrupted, possibly
confidential data might remain unprotected on the underlying WebSphere MQ queues used to manage
the transfer. This scenario explains how to configure and use WebSphere MQ Advanced Message Security
to protect such data on the WebSphere MQ Managed File Transfer queues.
In this scenario we consider a simple topology comprising one machine with two WebSphere MQ
Managed File Transfer queues. agents, AGENT1 and AGENT2 sharing a single queue manager, hubQM, as is
described in the scenario Basic file transfer using the scripts. Both agents are connecting in the same way,
either in bindings mode or client mode.
Security
443
1. Creating certificates:
Before you begin
This scenario uses a simple model where a user ftagent in a group FTAGENTS is used to run the
WebSphere MQ Managed File Transfer agent processes, and a user ftuser in a group FTUSERS is used to
initiate file transfers. Should you be using different users, convert the commands to refer to the correct
file locations for your users.
About this task
WebSphere MQ Advanced Message Security uses public key cryptography to sign and/or encrypt
messages on protected queues.
Note:
v If your WebSphere MQ Managed File Transfer agents are running in bindings mode, the commands
that you use to create a CMS (Cryptographic Message Syntax) keystore are detailed in the Quick Start
Guide (Windows or UNIX) for your platform.
v If your WebSphere MQ Managed File Transfer agents are running in client mode, the commands you
will need to create a JKS (Java Keystore) are detailed in the Quick Start Guide for Java clients on
page 435.
Procedure
1. Create a self-signed certificate to identify the user ftagent as detailed in the appropriate Quick Start
Guide. Use a Distinguished Name (DN) as follows:
CN=ftagent, OU=MFT, O=IBM, L=Hursley, ST=Hampshire, C=GB
2. Create a keystore.conf file to identify the location of the keystore and the certificate within it as
detailed in the appropriate Quick Start Guide.
2. Configuring message protection:
About this task
You should define a security policy for the data queue used by AGENT2, using the setmqspl command. In
this scenario the same user is used to start both agents, and therefore the signer and receiver DN are the
same and match the certificate we generated.
Procedure
1. Shut down the WebSphere MQ Managed File Transfer agents in preparation for protection using the
fteStopAgent command.
2. Create a security policy to protect the SYSTEM.FTE.DATA.AGENT2 queue.
setmqspl -m hubQM -p SYSTEM.FTE.DATA.AGENT2 -s SHA1 -a "CN=ftagent, OU=MFT, O=IBM, L=Hursley, ST=Hampshire, C=GB"
-e AES128 -r "CN=ftagent, OU=MFT, O=IBM, L=Hursley, ST=Hampshire, C=GB"
3. Ensure the user running the WebSphere MQ Managed File Transfer agent process has access to
browse the system policy queue and put messages on the error queue.
setmqaut -m hubQM -t queue -n SYSTEM.PROTECTION.POLICY.QUEUE -p ftagent +browse
setmqaut -m hubQM -t queue -n SYSTEM.PROTECTION.ERROR.QUEUE -p ftagent +put
4. Restart your WebSphere MQ Managed File Transfer agents using the fteStartAgent command.
5. Confirm that your agents restarted successfully by using the fteListAgents command and verifying
that the agents are in READY status.
Results
You are now able to submit transfers from AGENT1 to AGENT2, and the file contents will be transmitted
securely between the two agents.
444
Security
445
jceks.keystore = <dir>/Keystore
jceks.certificate = <certificate_label>
jceks.encrypted = no
jceks.keystore_pass = <password>
jceks.key_pass = <password>
jceks.provider = IBMJCE
jks.keystore = <dir>/Keystore
jks.certificate = <certificate_label>
jks.encrypted = no
jks.keystore_pass = <password>
jks.key_pass = <password>
jks.provider = IBMJCE
446
Related tasks:
Protecting passwords in Java on page 453
Storing keystore and private key passwords as plain text poses a security risk so WebSphere MQ
Advanced Message Security provides a tool that can scramble those passwords using a user's key, which
is available in the keystore file.
In this example, when putting and getting messages on behalf of a client connected using the
ALICE.SVRCONN channel WebSphere MQ AMS uses the certificate with the label ALICE_CERT in the keystore
in /home/mqm/keystore/. If a client connects using the BOB.SVRCONN channel, WebSphere MQ AMS uses the
certificate with the label BOB_CERT.
Attention: Client authentication and encryption should be completed on the selected channels, for
example by using SSL and SSLPEER or CHLAUTH TYPE(SSLPEERMAP), to ensure that only authorized
clients can connect and use this capability.
Security
447
Related concepts:
Quality of protection on page 458
WebSphere MQ Advanced Message Security data-protection policies imply a quality of protection (QOP).
448
Option
Description
ocsp.enable=off
ocsp.url=<reposnder_URL>
ocsp.http.proxy.host=<OCSP_proxy>
ocsp.http.proxy.port=<port_number>
ocsp.nonce.generation=on/off
ocsp.nonce.check=on/off
ocsp.nonce.size=8
ocsp.http.get=on/off
ocsp.max_response_size=20480
ocsp.cache_size=100
ocsp.timeout=30
and enable OCSP checking by editing the $JAVA_HOME/lib/security/java.security file with the
following line:
ocsp.enable=true
2. If AIA is set up, enable OCSP checking by editing the $JAVA_HOME/lib/security/java.security file
with the following line:
ocsp.enable=true
Security
449
What to do next
If you are using Java Security Manager, too complete the configuration, add the following Java
permission to lib/security/java.policy
permission java.security.SecurityPermission "getProperty.ocsp.enable";
Using keystore.conf:
Procedure
Add the following attribute to the configuration file:
ocsp.enable=true
Important: Setting this attribute in the configuration file overrides java.security settings.
What to do next
To complete the configuration, add the following Java permissions to lib/security/java.policy:
permission java.security.SecurityPermission "getProperty.ocsp.enable";
permission java.security.SecurityPermission "setProperty.ocsp.enable";
450
Enabling certificate validation and certificate revocation list support in native interceptors:
You have to modify the keystore configuration file so that WebSphere MQ Advanced Message Security
can download CLRs from the Lightweight Directory Access Protocol (LDAP) server.
Procedure
Add the following options to the configuration file:
Note: Values for individual options provided in the table are default.
Option
Description
crl.ldap.host=<host_name>
crl.ldap.port=<port_number>
crl.cdp=off
crl.ldap.version=3
crl.ldap.user=cn=<username>
crl.ldap.pass=<password>
crl.ldap.cache_lifetime=0
crl.ldap.cache_size=50
crl.http.proxy.host=some.host.com
crl.http.proxy.port=8080
crl.http.max_response_size=204800
crl.http.timeout=30
crl.http.cache_size=0
Security
451
Header
Description
crl.ldap.host=<host_name>
crl.ldap.port=<port_number>
crl.cdp=on/off
Description
com.ibm.security.enableCRLDP
ibm.security.certpath.ldap.cache.lifetime
com.ibm.security.enableAIAEXT
452
Procedure
1. Edit the keystore.conf files to include path to the keystore and users label.
jceks.keystore = c:/Documents and Setting/Alice/AliceKeystore
jceks.certificate = AliceCert
jceks.provider = IBMJCE
An output with encrypted passwords is generated and can be copied to the keystore.conf file.
To copy the output to the keystore.conf file automatically, run:
java -cp com.ibm.mq.jmqi.jar com.ibm.mq.ese.config.KeyStoreConfigProtector keystore_password private_key_password >> ~/<path_to_keystore>/keystore.conf
Note:
For a list of default locations of keystore.conf on various platforms, see Using keystores and
certificates on page 445.
Example
Here is an example of such output:
Security policies
WebSphere MQ Advanced Message Security uses security policies to specify the cryptographic encryption
and signature algorithms for encrypting and authenticating messages that flow through the queues.
Security
453
Policy name:
The policy name is a unique name that identifies a specific WebSphere MQ Advanced Message Security
policy and the queue to which it applies.
The policy name must be the same as the queue name to which it applies. There is a one-to-one mapping
between a WebSphere MQ Advanced Message Security (WebSphere MQ AMS) policy and a queue.
By creating a policy with the same name as a queue, you activate the policy for that queue. Queues
without matching policy names are not protected by WebSphere MQ AMS.
The scope of the policy is relevant to the local queue manager and its queues. Remote queue managers
must have their own locally-defined policies for the queues they manage.
Signature algorithm:
The signature algorithm indicates the algorithm that should be used when signing data messages.
Valid values include:
v MD5
v SHA-1
v SHA-2 family:
SHA256
SHA384 (minimum key length acceptable - 768 bits)
SHA512 (minimum key length acceptable - 768 bits)
A policy that does not specify a signature algorithm, or specifies an algorithm of NONE, implies that
messages placed on the queue associated with the policy are not signed.
Note: The quality of protection used for the message put and get functions must match. If there is a
policy quality of protection mismatch between the queue and the message in the queue, the message is
not accepted and is sent to the error handling queue. This rule applies for both local and remote queues.
Encryption algorithm:
The encryption algorithm indicates the algorithm that should be used when encrypting data messages
placed on the queue associated with the policy.
Valid values include:
v RC2
v DES
v 3DES
v AES128
v AES256
A policy that does not specify an encryption algorithm or specifies an algorithm of NONE implies that
messages placed on the queue associated with the policy are not encrypted.
Note that a policy that specifies an encryption algorithm other than NONE must also specify at least one
Recipient DN and a signature algorithm because WebSphere MQ Advanced Message Security encrypted
messages are also signed.
Important: The quality of protection used for the message put and get functions must match. If there is a
policy quality of protection mismatch between the queue and the message in the queue, the message is
not accepted and is sent to the error handling queue. This rule applies for both local and remote queues.
454
Toleration:
The toleration attribute indicates whether IBM WebSphere MQ Advanced Message Security can accept
messages with no security policy specified.
When retrieving a message from a queue with a policy to encrypt messages, if the message is not
encrypted, it is returned to the calling application. Valid values include:
0
No (default).
1
Yes.
A policy that does not specify a toleration value or specifies 0, implies that messages placed on the queue
associated with the policy must match the policy rules.
Toleration is optional and exists to facilitate configuration roll-out, where policies were applied to queues
but those queues already contain messages that do not have a security policy specified.
Sender distinguished names:
The sender distinguished names (DNs) identify users who are authorized to place messages on a queue.
IBM WebSphere MQ Advanced Message Security (WebSphere MQ AMS) does not check whether a
message has been placed on a data-protected queue by a valid user until the message is retrieved. At this
time, if the policy stipulates one or more valid senders, and the user that placed the message on the
queue is not in the list of valid senders, WebSphere MQ AMS returns an error to the getting application,
and place the message on its error queue.
A policy can have 0 or more sender DNs specified. If no sender DNs are specified for the policy, any user
can put data-protected messages to the queue providing the user's certificate is trusted.
Sender distinguished names have the following form:
CN=Common Name,O=Organization,C=Country
Important:
v All DNs must be in uppercase and in the same order as listed in the table.
Component name
Value
CN
OU
ST
v If one or more sender DNs are specified for the policy, only those users can put messages to the queue
associated with the policy.
v Sender DNs, when specified, must match exactly the DN contained in the digital certificate associated
with user putting the message.
Security
455
v WebSphere MQ AMS supports DNs with values only from Latin-1 character set. To create DNs with
characters of the set, you must first create a certificate with a DN that is created in UTF-8 coding using
UNIX platforms with UTF-8 coding turned on or with the iKeyman utility. Then you must create a
policy from a UNIX platform with UTF-8 coding turned on or use the WebSphere MQ AMS plug-in to
WebSphere MQ.
Recipient distinguished names:
The recipient distinguished names (DN) identify users who are authorized to retrieve messages from a
queue.
A policy can have zero or more recipient DNs specified. Recipient distinguished names have the
following form:
CN=Common Name,O=Organization,C=Country
Important:
v All DNs must be in uppercase and in the same order as listed in the table.
Component name
Value
CN
OU
ST
v If no recipient DNs are specified for the policy, any user can get messages from the queue associated
with the policy.
v If one or more recipient DNs are specified for the policy, only those users can get messages from the
queue associated with the policy.
v Recipient DNs, when specified, must match exactly the DN contained in the digital certificate
associated with user getting the message.
v WebSphere MQ Advanced Message Security supports DNs with values only from Latin-1 character set.
To create DNs with characters of the set, you must first create a certificate with a DN that is created in
UTF-8 coding using UNIX platforms with UTF-8 coding turned on or with the iKeyman utility. Then
you must create a policy from a UNIX platform with UTF-8 coding turned on or use the WebSphere
MQ Advanced Message Security plug-in to WebSphere MQ.
456
Description
Policy name
Signature algorithm
Encryption algorithm
Recipient list
Signature DN checklist
In WebSphere MQ Advanced Message Security, messages are encrypted with a symmetric key, and the
symmetric key is encrypted with the public keys of the recipients. Public keys are encrypted with the
RSA algorithm, with keys of an effective length up to 2048 bits. The actual asymmetric key encryption
depends on the certificate key length.
The supported symmetric-key algorithms are as follows:
v RC2
v DES
v 3DES
v AES128
v AES256
WebSphere MQ Advanced Message Security also supports the following cryptographic hash functions:
v MD5
v SHA-1
v SHA-2 family:
SHA256
SHA384 (minimum key length acceptable - 768 bits)
SHA512 (minimum key length acceptable - 768 bits)
Note: The quality of protection used for the message put and get functions must match. If there is a
policy quality of protection mismatch between the queue and the message in the queue, the message is
not accepted and is sent to the error handling queue. This rule applies for both local and remote queues.
Security
457
Quality of protection:
WebSphere MQ Advanced Message Security data-protection policies imply a quality of protection (QOP).
The three quality of protection levels in WebSphere MQ Advanced Message Security depend on
cryptographic algorithms that are used to sign and encrypt the message:
v Privacy - messages placed on the queue must be signed and encrypted.
v Integrity - messages placed on the queue must be signed by the sender.
v None - no data protection is applicable.
A policy that stipulates that messages must be signed when placed on a queue has a QOP of INTEGRITY.
A QOP of INTEGRITY means that a policy stipulates a signature algorithm, but does not stipulate an
encryption algorithm. Integrity-protected messages are also referred to as "SIGNED".
A policy that stipulates that messages must be signed and encrypted when placed on a queue has a QOP
of PRIVACY. A QOP of PRIVACY means that when a policy stipulates a signature algorithm and an
encryption algorithm. Privacy-protected messages are also referred to as "SEALED".
A policy that does not stipulate a signature algorithm or an encryption algorithm has a QOP of NONE.
WebSphere MQ Advanced Message Security provides no data-protection for queues that have a policy
with a QOP of NONE.
458
v The name of a security policy must follow Rules for naming WebSphere MQ objects.
v You must have the necessary +connect +inq +chg authorities to create a security policy. For the
complete syntax of authorization change command, see setmqaut.
v Make sure that you have necessary permissions to operate on WebSphere MQ queues and queue
managers. For more information, see Granting OAM permissions on page 463
Example
Here is an example of creating a policy on queue manager QMGR. The policy specifies that messages be
signed using the SHA1 algorithm and encrypted using the AES256 algorithm for certificates with DN:
CN=joe,O=IBM,C=US and DN: CN=jane,O=IBM,C=US. This policy is attached to MY.QUEUE:
$ setmqspl -m QMGR -p MY.QUEUE -s SHA1 -e AES256 -r CN=joe,O=IBM,C=US -r CN=jane,O=IBM,C=US
Here is an example of creating policy on the queue manager QMGR. The policy specifies that messages be
encrypted using the DES algorithm for certificates with DNs: CN=john,O=IBM,C=US and
CN=jeff,O=IBM,C=US and signed with the MD5 algorithm for certificate with DN: CN=phil,O=IBM,C=US
$ setmqspl -m QMGR -p MY.OTHER.QUEUE -s MD5 -e DES -r CN=john,O=IBM,C=US -r CN=jeff,O=IBM,C=US -a CN=phil,O=IBM,C=US
Note:
v The quality of protection being used for the message put and get must match. If the policy quality of
protection that is defined for the message is weaker than that defined for a queue, the message is sent
to the error handling queue. This policy is valid for both local and remote queues.
Related reference:
Complete list of setmqspl command attributes
Changing security policies:
You can use WebSphere MQ Advanced Message Security to alter details of security policies that you have
already defined.
Before you begin
v The queue manager on which you want to operate must be running.
v You must have necessary +connect +inq +chg authorities to create security policies. For the complete
syntax of authorization change command, see setmqaut.
About this task
To change security policies, apply the setmqspl command to an already existing policy providing new
attributes.
Example
Here is an example of creating a policy named MYQUEUE on a queue manager named QMGR specifying that
messages will be encrypted using the RC2 algorithm for certificates with DN:CN=bob,O=IBM,C=US and
signed with the SHA1 algorithm for certificates with DN:CN=jeff,O=IBM,C=US.
setmqspl -m QMGR -p MYQUEUE -e RC2 -s SHA1 -a CN=jeff,O=IBM,C=US -r CN=alice,O=IBM,C=US
To alter this policy, issue the setmqspl command with all attributes from the example changing only the
values you want to modify. In this example, previously created policy is attached to a new queue and its
encryption algorithm is changed to AES256:
setmqspl -m QMGR -p MYQUEUE -e AES256 -s SHA1 -a CN=jeff,O=IBM,C=US -r CN=alice,O=IBM,C=US
Security
459
Related reference:
Complete list of setmqspl command attributes
Displaying and dumping security policies:
Use the dspmqspl command to display a list of all security policies or details of a named policy
depending on the command-line parameters you supply.
Before you begin
v To display security policies details, the queue manager must exist, and be running.
v You must have necessary +connect +inq +dsp permissions applied to a queue manager to display and
dump security policies. For the complete syntax of authorization change command, see setmqaut.
About this task
Here is the list of dspmqspl command flags:
Table 31. dspmqspl command flags.
Command flag
Explanation
-m
-p
Policy name.
-export
Example
In this example we will create two security policies for venus.queue.manager:
setmqspl -m venus.queue.manager -p AMS_POL_04_ONE -s MD5 -a "CN=signer1,O=IBM,C=US" -e NONE
setmqspl -m venus.queue.manager -p AMS_POL_06_THREE -s MD5 -a "CN=another signer,O=IBM,C=US" -e NONE
This example shows a command that displays details of all policies defined for venus.queue.manager and
the output it produces:
dspmqspl -m
venus.queue.manager
Policy Details:
Policy name: AMS_POL_04_ONE
Quality of protection: INTEGRITY
Signature algorithm: MD5
Encryption algorithm: NONE
Signer DNs:
CN=signer1,O=IBM,C=US
Recipient DNs: Toleration: 0
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Policy Details:
Policy name: AMS_POL_06_THREE
Quality of protection: INTEGRITY
Signature algorithm: MD5
Encryption algorithm: NONE
Signer DNs:
CN=another signer,O=IBM,C=US
Recipient DNs: Toleration: 0
This example shows a command that displays details of a selected security policy defined for
venus.queue.manager and the output it produces:
460
In the next example, first, we create a security policy and then, we export the policy using the -export
flag:
setmqspl -m venus.queue.manager -p AMS_POL_04_ONE -s MD5 -a "CN=signer1,O=IBM,C=US" -e NONE
dspmqspl -m venus.queue.manager -export > policies.[bat|sh]
Security
461
Related reference:
Complete list of setmqspl command attributes
To provide protection for SYSTEM.ADMIN.COMMAND.QUEUE, the command server must have access to the
keystore and the keystore.conf, which contain keys and a configuration so that the command server can
access keys and certificates. All changes made to security policy of SYSTEM.ADMIN.COMMAND.QUEUE require
the restart of the command server.
All messages that are sent and received from the command queue are signed or signed and encrypted
depending on policy settings. If an administrator defines authorised signers, command messages that do
not pass signer Distinguished Name (DN) check are not executed by the command server and are not
routed to the WebSphere MQ Advanced Message Security error handling queue. Messages that are sent
as replies to WebSphere MQ Explorer temporary dynamic queues are not protected by WebSphere MQ
AMS.
Changes to WebSphere MQ Advanced Message Security security policies require you to restart the
WebSphere MQ command server
Security policies do not have an effect on the following SYSTEM queues:
v SYSTEM.ADMIN.ACCOUNTING.QUEUE
v SYSTEM.ADMIN.ACTIVITY.QUEUE
v
v
v
v
v
SYSTEM.ADMIN.CHANNEL.EVENT
SYSTEM.ADMIN.COMMAND.EVENT
SYSTEM.ADMIN.CONFIG.EVENT
SYSTEM.ADMIN.LOGGER.EVENT
SYSTEM.ADMIN.PERFM.EVENT
v SYSTEM.ADMIN.PUBSUB.EVENT
v SYSTEM.ADMIN.QMGR.EVENT
v SYSTEM.ADMIN.STATISTICS.QUEUE
v SYSTEM.ADMIN.TRACE.ROUTE.QUEUE
v SYSTEM.AUTH.DATA.QUEUE
v SYSTEM.BROKER.ADMIN.STREAM
v SYSTEM.BROKER.CONTROL.QUEUE
v SYSTEM.BROKER.DEFAULT.STREAM
v SYSTEM.BROKER.INTER.BROKER.COMMUNICATIONS
v SYSTEM.CHANNEL.INITQ
v SYSTEM.CHANNEL.SYNCQ
v SYSTEM.CICS.INITIATION.QUEUE
462
v
v
v
v
v
SYSTEM.CLUSTER.COMMAND.QUEUE
SYSTEM.CLUSTER.HISTORY.QUEUE
SYSTEM.CLUSTER.REPOSITORY.QUEUE
SYSTEM.CLUSTER.TRANSMIT.QUEUE
SYSTEM.DEAD.LETTER.QUEUE
v
v
v
v
v
v
v
SYSTEM.DURABLE.SUBSCRIBER.QUEUE
SYSTEM.HIERARCHY.STATE
SYSTEM.INTER.QMGR.CONTROL
SYSTEM.INTER.QMGR.FANREQ
SYSTEM.INTER.QMGR.PUBS
SYSTEM.INTERNAL.REPLY.QUEUE
SYSTEM.PENDING.DATA.QUEUE
v
v
v
v
v
SYSTEM.PROTECTION.ERROR.QUEUE
SYSTEM.PROTECTION.POLICY.QUEUE
SYSTEM.RETAINED.PUB.QUEUE
SYSTEM.SELECTION.EVALUATION.QUEUE
SYSTEM.SELECTION.VALIDATION.QUEUE
Procedure
To grant necessary permissions to a user, run:
setmqaut -m SOME.QUEUE.MANAGER -t qmgr -p SOME.USER +connect +inq
setmqaut -m SOME.QUEUE.MANAGER -t queue -n SYSTEM.PROTECTION.POLICY.QUEUE -p SOME.USER +browse +put
setmqaut -m SOME.QUEUE.MANAGER -t queue -n SYSTEM.PROTECTION.ERROR.QUEUE -p SOME.USER +put
463
A command event
v Changing security policies on page 459, which generates three WebSphere MQ event messages:
A configuration event that contains old security policy values
A configuration event that contains new security policy values
A command event
v Displaying and dumping security policies on page 460, which generates one WebSphere MQ event
message:
A command event
v Removing security policies on page 461, which generates two WebSphere MQ event messages:
A configuration event
A command event
Enabling and disabling event logging:
You control command and configuration events by using the queue manager attributes CONFIGEV and
CMDEV. To enable these events, set the appropriate queue manager attribute to ENABLED. To disable these
events, set the appropriate queue manager attribute to DISABLED.
Procedure
Configuration events
To enable configuration events, set CONFIGEV to ENABLED. To disable configuration events, set
CONFIGEV to DISABLED. For example, you can enable configuration events by using the
following MQSC command:
ALTER QMGR CONFIGEV (ENABLED)
Command events
To enable command events, set CMDEV to ENABLED. To enable command events for commands
except DISPLAY MQSC commands and Inquire PCF commands, set the CMDEV to NODISPLAY.
To disable command events, set CMDEV to DISABLED. For example, you can enable command
events by using the following MQSC command:
ALTER QMGR CMDEV (ENABLED)
Related information:
Controlling configuration, command, and logger events in Websphere MQ
You control configuration, command, and logger events by using the queue manager attributes
CONFIGEV, CMDEV, and LOGGEREV. To enable these events, set the appropriate queue manager
attribute to ENABLED. To disable these events, set the appropriate queue manager attribute to DISABLED.
Command event message format:
Command event message consists of MQCFH structure and PCF parameters following it.
Here are selected MQCFH values:
Type = MQCFT_EVENT;
Command = MQCMD_COMMAND_EVENT;
MsgSeqNumber = 1;
Control = MQCFC_LAST;
ParameterCount = 2;
CompCode = MQCC_WARNING;
Reason = MQRC_COMMAND_PCF;
Note: ParameterCount value is two because there are always two paramteters of MQCFGR type (group).
Each group consists of appropriate parameters. The event data consists of two groups, CommandContext
and CommandData.
464
CommandContext contains:
EventUserID
Description:
Identifier:
Data type:
Maximum length:
Returned:
The user ID that issued the command or call that generated the event. (This is the same user
ID that is used to check the authority to issue the command or call; for commands received
from a queue, this is also the user identifier (UserIdentifier) from the MD of the command
message).
MQCACF_EVENT_USER_ID.
MQCFST.
MQ_USER_ID_LENGTH.
Always.
EventOrigin
Description:
Identifier:
Data type:
Values:
Returned:
EventQMgr
Description:
Identifier:
Data type:
Maximum length:
Returned:
The queue manager where the command or call was entered. (The queue manager where the
command is executed and that generates the event is in the MD of the event message).
MQCACF_EVENT_Q_MGR.
MQCFST.
MQ_Q_MGR_NAME_LENGTH.
Always.
EventAccountingToken
Description:
Identifier:
Data type:
Maximum length:
Returned:
EventIdentityData
Description:
Identifier:
Data type:
Maximum length:
Returned:
EventApplType
Security
465
Description:
Identifier:
Data type:
Returned:
EventApplName
Description:
Identifier:
Data type:
Maximum length:
Returned:
EventApplOrigin
Description:
Identifier:
Data type:
Maximum length:
Returned:
Command
Description:
Identifier:
Data type:
Values:
Returned:
Message buffer consist of MQCFH structure and the parameter structure that follows it. Possible MQCFH
values can be found in the Event message MQCFH (PCF header) section of the WebSphere MQ product
documentation.
466
Identifier:
Data type:
Maximum length:
Returned:
The user ID that issued the command or call that generated the event. (This is the same user
ID that is used to check the authority to issue the command or call; for commands received
from a queue, this is also the user identifier (UserIdentifier) from the MD of the command
message).
MQCACF_EVENT_USER_ID
MQCFST.
MQ_USER_ID_LENGTH.
Always.
SecurityId
Description:
Identifier:
Data type:
Maximum length:
Returned:
EventOrigin
Description:
Identifier:
Data type:
Values:
Returned:
EventQMgr
Description:
Identifier:
Data type:
Maximum length:
Returned:
The queue manager where the command or call was entered. (The queue manager where the
command is executed and that generates the event is in the MD of the event message).
MQCACF_EVENT_Q_MGR
MQCFST
MQ_Q_MGR_NAME_LENGTH
Always.
ObjectType
Security
467
Description:
Identifier:
Data type:
Value:
Returned:
Object type.
MQIACF_OBJECT_TYPE
MQCFIN
MQOT_PROT_POLICY
WebSphere MQ Advanced Message Security protection policy. 1019 - a numeric
value defined in WebSphere MQ 7.5 or in the cmqc.h file.
Always.
PolicyName
Description:
Identifier:
Data type:
Value:
Maximum length:
Returned:
PolicyVersion
Description:
Identifier:
Data type:
Value
Returned:
TolerateFlag
Description:
Identifier:
Data type:
Value
Returned:
SignatureAlgorithm
Description:
Identifier:
Data type:
Value:
Returned:
EncryptionAlgorithm
468
Description:
Identifier:
Data type:
Value:
Returned:
SignerDNs
Description:
Identifier:
Data type:
Value:
Maximum length:
Returned:
RecipientDNs
Description:
Identifier:
Data type:
Value:
Maximum length:
Returned:
Security
469
OSGi support
To use OSGi bundle with IBM WebSphere MQ Advanced Message Security additional parameters are
required.
Run the following parameter during the OSGi bundle startup:
-Dorg.osgi.framework.system.packages.extra=com.ibm.security.pkcs7
When using encrypted password in your keystore.conf, the following statement must be added when
OSGi bundle is running:
-Dorg.osgi.framework.system.packages.extra=com.ibm.security.pkcs7,com.ibm.misc
Restriction: WebSphere MQ AMS supports communication using only MQ Base Java Classes for queues
protected from within the OSGi bundle.
470
Event monitoring
Event monitoring is the process of detecting occurrences of instrumentation events in a queue manager
network. An instrumentation event is a logical combination of events that is detected by a queue
manager or channel instance. Such an event causes the queue manager or channel instance to put a
special message, called an event message, on an event queue.
WebSphere MQ instrumentation events provide information about errors, warnings, and other significant
occurrences in a queue manager. Use these events to monitor the operation of the queue managers in
your queue manager network to achieve the following goals:
v
v
v
v
471
Related reference:
Event types on page 474
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
Related information:
Event message reference
Event message format
Instrumentation events
An instrumentation event is a logical combination of conditions that a queue manager or channel instance
detects and puts a special message, called an event message, on an event queue.
WebSphere MQ instrumentation events provide information about errors, warnings, and other significant
occurrences in a queue manager. You can use these events to monitor the operation of queue managers
(with other methods such as Tivoli NetView for z/OS).
Figure 78 on page 473 illustrates the concept of instrumentation events.
472
Queue Manager
1. Event conditions
For example:
Queue full
+ event enabled
Event message
2. Event message
put on event queue
Event queue
3. Event message
processed by a
user application
User Application
473
Event types
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
WebSphere MQ instrumentation events have the following types:
v
v
v
v
v
v
v Local events
For each queue manager, each category of event has its own event queue. All events in that category
result in an event message being put onto the same queue.
This event queue:
SYSTEM.ADMIN.QMGR.EVENT
SYSTEM.ADMIN.CHANNEL.EVENT
SYSTEM.ADMIN.PERFM.EVENT
SYSTEM.ADMIN.CONFIG.EVENT
SYSTEM.ADMIN.COMMAND.EVENT
SYSTEM.ADMIN.LOGGER.EVENT
SYSTEM.ADMIN.PUBSUB.EVENT
By incorporating instrumentation events into your own system management application, you can monitor
the activities across many queue managers, across many different nodes, and for multiple WebSphere MQ
474
applications. In particular, you can monitor all the nodes in your system from a single node (for those
nodes that support WebSphere MQ events) as shown in Figure 79.
Instrumentation events can be reported through a user-written reporting mechanism to an administration
application that can present the events to an operator.
WebSphere MQ
for z/OS
WebSphere MQ
for AIX
WebSphere MQ
for Solaris
Event
messages
Event monitoring
from a single node
Figure 79. Monitoring queue managers across different platforms, on a single node
Instrumentation events also enable applications acting as agents for other administration networks, for
example Tivoli NetView for z/OS, to monitor reports and create the appropriate alerts.
Queue manager events:
Queue manager events are related to the use of resources within queue managers. For example, a queue
manager event is generated if an application tries to put a message on a queue that does not exist.
The following examples are conditions that can cause a queue manager event:
v An application issues an MQI call that fails. The reason code from the call is the same as the reason
code in the event message.
A similar condition can occur during the internal operation of a queue manager; for example, when
generating a report message. The reason code in an event message might match an MQI reason code,
even though it is not associated with any application. Do not assume that, because an event message
reason code looks like an MQI reason code, the event was necessarily caused by an unsuccessful MQI
call from an application.
v A command is issued to a queue manager and processing this command causes an event. For example:
A queue manager is stopped or started.
A command is issued where the associated user ID is not authorized for that command.
WebSphere MQ puts messages for queue manager events on the SYSTEM.ADMIN.QMGR.EVENT queue,
and supports the following queue manager event types:
Monitoring and performance
475
Local
476
Note: Client connections do not cause Channel Started or Channel Stopped events.
When a command is used to start a channel, an event is generated. Another event is generated when the
channel instance starts. However, starting a channel by a listener, the runmqchl command, or a queue
manager trigger message does not generate an event. In these cases, an event is generated only when the
channel instance starts.
A successful start or stop channel command generates at least two events. These events are generated for
both queue managers connected by the channel (providing they support events).
If a channel event is put on an event queue, an error condition causes the queue manager to create an
event.
The event messages for channel and bridge events are put on the SYSTEM.ADMIN.CHANNEL.EVENT
queue.
The channel event messages can contain the following event data:
v Channel Activated
v
v
v
v
v Channel Started
v Channel Stopped
v Channel Stopped By User
v Channel Blocked
SSL events
The only Secure Sockets Layer (SSL or TLS) event is the Channel SSL Error event. This event is reported
when a channel using SSL or TLS fails to establish an SSL connection.
The SSL event messages can contain the following event data:
v Channel SSL Error
v Channel SSL Warning
477
Performance events:
Performance events are notifications that a resource has reached a threshold condition. For example, a
queue depth limit has been reached.
Performance events relate to conditions that can affect the performance of applications that use a
specified queue. They are not generated for the event queues themselves.
The event type is returned in the command identifier field in the message data.
If a queue manager tries to put a queue manager event or performance event message on an event queue
and an error that would typically create an event is detected, another event is not created and no action
is taken.
MQGET and MQPUT calls within a unit of work can generate performance events regardless of whether
the unit of work is committed or backed out.
The event messages for performance events are put on the SYSTEM.ADMIN.PERFM.EVENT queue.
There are two types of performance event:
Queue depth events
Queue depth events relate to the number of messages on a queue; that is, how full or empty the
queue is. These events are supported for shared queues. The queue depth event messages can
contain the following event data:
v Queue Depth High
v Queue Depth Low
v Queue Full
Queue service interval events
Queue service interval events relate to whether messages are processed within a user-specified
time interval. These events are not supported for shared queues.
Configuration events:
Configuration events are generated when a configuration event is requested explicitly, or automatically
when an object is created, modified, or deleted.
A configuration event message contains information about the attributes of an object. For example, a
configuration event message is generated if a namelist object is created, and contains information about
the attributes of the namelist object.
The event messages for configuration events are put on the SYSTEM.ADMIN.CONFIG.EVENT queue.
There are four types of configuration event:
Create object events
Create object events are generated when an object is created. The event message contains the
following event data: Create object.
Change object events
Change object events are generated when an object is changed. The event message contains the
following event data: Change object.
Delete object events
Delete object events are generated when an object is deleted. The event message contains the
following event data: Delete object.
478
Authority events
Channel events
Channel Activated
Channel Auto-definition Error
Channel Auto-definition OK
Channel Blocked
Channel Conversion Error
Channel Not Activated
Channel Started
Channel Stopped
Channel Stopped By User
Command events
Command
479
Event type
Configuration events
Create object
Change object
Delete object
Refresh object
Bridge Started
Bridge Stopped
Inhibit events
Get Inhibited
Put Inhibited
Local events
Logger events
Logger
Performance events
Remote events
SSL events
Controlling events
You enable and disable events by specifying the appropriate values for queue manager, queue attributes,
or both, depending on the type of event.
You must enable each instrumentation event that you want to be generated. For example, the conditions
causing a Queue Full event are:
v Queue Full events are enabled for a specified queue, and
v An application issues an MQPUT request to put a message on that queue, but the request fails because
the queue is full.
Enable and disable events by using any of the following techniques:
v WebSphere MQ script commands (MQSC).
v The corresponding WebSphere MQ PCF commands.
480
Authority
Inhibit
Local
Remote
Start and Stop
AUTHOREV (ENABLED)
INHIBTEV (ENABLED)
LOCALEV (ENABLED)
REMOTEEV (ENABLED)
STRSTPEV (ENABLED)
481
Table 33. Enabling channel and bridge events using MQSC commands
Event
Channel
Related to channel errors only
IMS Bridge
SSL
Channel auto-definition
CHLEV (ENABLED)
CHLEV (EXCEPTION)
BRIDGEEV (ENABLED)
SSLEV (ENABLED)
CHADEV(ENABLED)
With CHLEV set to exception, the following return codes, and corresponding reason qualifiers are
generated:
v MQRC_CHANNEL_ACTIVATED
v MQRC_CHANNEL_CONV_ERROR
v MQRC_CHANNEL_NOT_ACTIVATED
v MQRC_CHANNEL_STOPPED
with the following ReasonQualifiers:
- MQRQ_CHANNEL_STOPPED_ERROR
- MQRQ_CHANNEL_STOPPED_RETRY
- MQRQ_CHANNEL_STOPPED_DISABLED
v MQRC_CHANNEL_STOPPED_BY_USER
v MQRC_CHANNEL_BLOCKED
with the following ReasonQualifiers:
- MQRQ_CHANNEL_BLOCKED_NOACCESS
- MQRQ_CHANNEL_BLOCKED_USERID
- MQRQ_CHANNEL_BLOCKED_ADDRESS
Controlling performance events:
You control performance events using the PERFMEV queue manager attribute. To enable performance
events, set PERFMEV to ENABLED. To disable performance events, set the PERFMEV queue manager
attribute to DISABLED.
To set the PERFMEV queue manager attribute to ENABLED, use the following MQSC command:
ALTER QMGR PERFMEV (ENABLED)
To enable specific performance events, set the appropriate queue attribute. Also, specify the conditions
that cause the event.
Queue depth events
By default, all queue depth events are disabled. To configure a queue for any of the queue depth
events:
1. Enable performance events on the queue manager.
2. Enable the event on the required queue.
3. Set the limits, if required, to the appropriate levels, expressed as a percentage of the
maximum queue depth.
Queue service interval events
To configure a queue for queue service interval events you must:
1. Enable performance events on the queue manager.
2. Set the control attribute for a Queue Service Interval High or OK event on the queue as
required.
482
3. Specify the service interval time by setting the QSVCINT attribute for the queue to the
appropriate length of time.
Note: When enabled, a queue service interval event can be generated at any appropriate time,
not necessarily waiting until an MQI call for the queue is issued. However, if an MQI call is used
on a queue to put or remove a message, any applicable performance event is generated at that
time. The event is not generated when the elapsed time becomes equal to the service interval
time.
Controlling configuration, command, and logger events:
You control configuration, command, and logger events by using the queue manager attributes
CONFIGEV, CMDEV, and LOGGEREV. To enable these events, set the appropriate queue manager
attribute to ENABLED. To disable these events, set the appropriate queue manager attribute to DISABLED.
Configuration events
To enable configuration events, set CONFIGEV to ENABLED. To disable configuration events, set
CONFIGEV to DISABLED. For example, you can enable configuration events by using the
following MQSC command:
ALTER QMGR CONFIGEV (ENABLED)
Command events
To enable command events, set CMDEV to ENABLED. To enable command events for commands
except DISPLAY MQSC commands and Inquire PCF commands, set the CMDEV to NODISPLAY. To
disable command events, set CMDEV to DISABLED. For example, you can enable command events
by using the following MQSC command:
ALTER QMGR CMDEV (ENABLED)
Logger events
To enable logger events, set LOGGEREV to ENABLED. To disable logger events, set LOGGEREV to
DISABLED. For example, you can enable logger events by using the following MQSC command:
ALTER QMGR LOGGEREV(ENABLED)
Event queues
When an event occurs, the queue manager puts an event message on the defined event queue. The event
message contains information about the event.
You can define event queues either as local queues, alias queues, or as local definitions of remote queues.
If you define all your event queues as local definitions of the same remote queue on one queue manager,
you can centralize your monitoring activities.
You must not define event queues as transmission queues, because event messages have formats that are
incompatible with the message format that is required for transmission queues.
Shared event queues are local queues defined with the QSGDISP(SHARED) value.
For more information about defining shared queues on z/OS, see Application programming with shared
queues.
483
However, you can define the event queue as a remote queue. Then, if there is a problem on the remote
system putting messages to the resolved queue, the event message arrives on the dead-letter queue of the
remote system.
An event queue might be unavailable for many different reasons including:
v The queue has not been defined.
v The queue has been deleted.
v The queue is full.
v The queue has been put-inhibited.
The absence of an event queue does not prevent the event from occurring. For example, after a
performance event, the queue manager changes the queue attributes and resets the queue statistics. This
change happens whether the event message is put on the performance event queue or not. The same is
true in the case of configuration and command events.
484
queue managers, these event messages have a unique correlation identifier (CorrelId) set in the message
descriptor (MQMD).
Related reference:
Activity report MQMD (message descriptor) on page 567
Use this page to view the values contained by the MQMD structure for an activity report
Activity report MQEPH (Embedded PCF header) on page 571
Use this page to view the values contained by the MQEPH structure for an activity report
Activity report MQCFH (PCF header) on page 572
Use this page to view the PCF values contained by the MQCFH structure for an activity report
Related information:
Event
Event
Event
Event
Event
message
message
message
message
message
reference
format
MQMD (message descriptor)
MQCFH (PCF header)
descriptions
Performance events
Performance events relate to conditions that can affect the performance of applications that use a
specified queue. The scope of performance events is the queue. MQPUT calls and MQGET calls on one queue
do not affect the generation of performance events on another queue.
Performance event messages can be generated at any appropriate time, not necessarily waiting until an
MQI call for the queue is issued. However, if you use an MQI call on a queue to put or remove a
message, any appropriate performance events are generated at that time.
Every performance event message that is generated is placed on the queue,
SYSTEM.ADMIN.PERFM.EVENT.
The event data contains a reason code that identifies the cause of the event, a set of performance event
statistics, and other data. The types of event data that can be returned in performance event messages are
described in the following list:
v Queue Depth High
v Queue Depth Low
v Queue Full
v Queue Service Interval High
v Queue Service Interval OK
Examples that illustrate the use of performance events assume that you set queue attributes by using the
appropriate WebSphere MQ commands (MQSC). On , you can also set queue attributes using the
operations and controls panels for queue managers.
Related reference:
Event types on page 474
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
485
queue associated with the event. The event data also contains statistics related to the event. Table 34
summarizes the event statistics that you can use to analyze the behavior of a queue. All the statistics refer
to what has happened since the last time the statistics were reset.
Table 34. Performance event statistics
Parameter
Description
TimeSinceReset
HighQDepth
The maximum number of messages on the queue since the statistics were
last reset.
MsgEnqCount
MsgDeqCount
Performance event statistics are reset when any of the following changes occur:
v A performance event occurs (statistics are reset on all active queue managers).
v A queue manager stops and restarts.
v The PCF command, Reset Queue Statistics, is issued from an application program.
Related concepts:
Performance events on page 485
Performance events relate to conditions that can affect the performance of applications that use a
specified queue. The scope of performance events is the queue. MQPUT calls and MQGET calls on one queue
do not affect the generation of performance events on another queue.
The service timer on page 488
Queue service interval events use an internal timer, called the service timer, which is controlled by the
queue manager. The service timer is used only if a queue service interval event is enabled.
Rules for queue service interval events on page 488
Formal rules control when the service timer is set and queue service interval events are generated.
Related tasks:
Enabling queue service interval events on page 489
To configure a queue for queue service interval events you set the appropriate queue manager and queue
attributes.
Related information:
Queue Depth High
Reset Queue Statistics
RESET QSTATS
486
Queue depth
Figure 80 shows a graph of queue depth against time. At time P1, an application issues an MQPUT, to
put a message on the queue. At time G1, another application issues an MQGET to remove the message
from the queue.
PUT
GET
P1
G1
Time
487
Related information:
Queue Service Interval OK
Queue Service Interval High
QServiceIntervalEvent (MQLONG)
QServiceIntervalEvent (10-digit signed integer)
ServiceIntervalEvent property
The service timer:
Queue service interval events use an internal timer, called the service timer, which is controlled by the
queue manager. The service timer is used only if a queue service interval event is enabled.
What precisely does the service timer measure?
The service timer measures the elapsed time between an MQPUT call to an empty queue or a get
operation, and the next put or get, provided the queue depth is nonzero between these two
operations.
When is the service timer active?
The service timer is always active (running), if the queue has messages on it (depth is nonzero)
and a queue service interval event is enabled. If the queue becomes empty (queue depth zero),
the timer is put into an OFF state, to be restarted on the next put.
When is the service timer reset?
The service timer is always reset after a get operation . It is also reset by an MQPUT call to an
empty queue. However, it is not necessarily reset on a queue service interval event.
How is the service timer used?
Following a get operation or an MQPUT call, the queue manager compares the elapsed time as
measured by the service timer, with the user-defined service interval. The result of this
comparison is that:
v An OK event is generated if there is a get operation and the elapsed time is less than or equal
to the service interval, AND this event is enabled.
v A high event is generated if the elapsed time is greater than the service interval, AND this
event is enabled.
Can applications read the service timer?
No, the service timer is an internal timer that is not available to applications.
What about the TimeSinceReset parameter?
The TimeSinceReset parameter is returned as part of the event statistics in the event data. It
specifies the time between successive queue service interval events, unless the event statistics are
reset.
Rules for queue service interval events:
Formal rules control when the service timer is set and queue service interval events are generated.
Rules for the service timer
The service timer is reset to zero and restarted as follows:
v After an MQPUT call to an empty queue.
v After an MQGET call, if the queue is not empty after the MQGET call.
The resetting of the timer does not depend on whether an event has been generated.
At queue manager startup the service timer is set to startup time if the queue depth is greater than zero.
488
If the queue is empty following a get operation, the timer is put into an OFF state.
Queue Service Interval High events
The Queue Service Interval event must be enabled (set to HIGH).
Queue Service Interval High events are automatically enabled when a Queue Service Interval OK event is
generated.
If the service time is greater than the service interval, an event is generated on, or before, the next
MQPUT or get operation.
Queue Service Interval OK events
Queue Service Interval OK events are automatically enabled when a Queue Service Interval High event is
generated.
If the service time (elapsed time) is less than or equal to the service interval, an event is generated on, or
before, the next get operation.
Related tasks:
Enabling queue service interval events
To configure a queue for queue service interval events you set the appropriate queue manager and queue
attributes.
Enabling queue service interval events:
To configure a queue for queue service interval events you set the appropriate queue manager and queue
attributes.
About this task
The high and OK events are mutually exclusive; that is, when one is enabled, the other is automatically
disabled:
v When a high event is generated on a queue, the queue manager automatically disables high events and
enables OK events for that queue.
v When an OK event is generated on a queue, the queue manager automatically disables OK events and
enables high events for that queue.
Table 35. Enabling queue service interval events using MQSC
Queue service interval event
Queue attributes
QSVCIEV (HIGH)
QSVCIEV (OK)
QSVCIEV (NONE)
Service interval
489
2. Set the control attribute, QSVCIEV, for a Queue Service Interval High or OK event on the queue, as
required.
3. Set the QSVCINT attribute for the queue to specify the appropriate service interval time.
Example
To enable Queue Service Interval High events with a service interval time of 10 seconds (10 000
milliseconds) use the following MQSC commands:
ALTER QMGR PERFMEV(ENABLED)
ALTER QLOCAL(MYQUEUE) QSVCINT(10000) QSVCIEV(HIGH)
490
Related concepts:
Queue service interval events on page 486
Queue service interval events indicate whether an operation was performed on a queue within a
user-defined time interval called the service interval. Depending on your installation, you can use queue
service interval events to monitor whether messages are being taken off queues quickly enough.
The service timer on page 488
Queue service interval events use an internal timer, called the service timer, which is controlled by the
queue manager. The service timer is used only if a queue service interval event is enabled.
Queue service interval events: example 1:
A basic sequence of MQGET calls and MQPUT calls, where the queue depth is always one or zero.
Key:
Service interval
Service timer ON
Service timer OFF
Queue depth
PUT
TO
GET
P1
PUT
G1
GET
P2
G2
Time
Enabled events
High
OK
High event
OK event
Commentary
1. At P1, an application puts a message onto an empty queue. This starts the service timer.
Note that T0 might be queue manager startup time.
2. At G1, another application gets the message from the queue. Because the elapsed time between P1
and G1 is greater than the service interval, a Queue Service Interval High event is generated on the
MQGET call at G1. When the high event is generated, the queue manager resets the event control
attribute so that:
a. The OK event is automatically enabled.
b. The high event is disabled.
Because the queue is now empty, the service timer is switched to an OFF state.
Monitoring and performance
491
3. At P2, a second message is put onto the queue. This restarts the service timer.
4. At G2, the message is removed from the queue. However, because the elapsed time between P2 and
G2 is less than the service interval, a Queue Service Interval OK event is generated on the MQGET
call at G2. When the OK event is generated, the queue manager resets the control attribute so that:
a. The high event is automatically enabled.
b. The OK event is disabled.
Because the queue is empty, the service timer is again switched to an OFF state.
Event statistics summary
Table 36 summarizes the event statistics for this example.
Table 36. Event statistics summary for example 1
Event 1
Event 2
Time of event
T(G1)
T(G2)
Type of event
High
OK
TimeSinceReset
T(G1) - T(0)
T(G2) - T(G1)
HighQDepth
MsgEnqCount
MsgDeqCount
The middle part of Figure 81 on page 491 shows the elapsed time as measured by the service timer
compared to the service interval for that queue. To see whether a queue service interval event might
occur, compare the length of the horizontal line representing the service timer (with arrow) to that of the
line representing the service interval. If the service timer line is longer, and the Queue Service Interval
High event is enabled, a Queue Service Interval High event occurs on the next get. If the timer line is
shorter, and the Queue Service Interval OK event is enabled, a Queue Service Interval OK event occurs
on the next get.
Queue service interval events: example 2:
A sequence of MQPUT calls and MQGET calls, where the queue depth is not always one or zero.
This example also shows instances of the timer being reset without events being generated, for example,
at time P2.
492
Key:
Service interval
Service timer ON
Service timer OFF
Queue depth
T0
P1
P2
G1
G2
Time
Enabled events
High
OK
OK event
Commentary
In this example, OK events are enabled initially and queue statistics were reset at time T0.
1. At P1, the first put starts the service timer.
2. At P2, the second put does not generate an event because a put cannot cause an OK event.
3. At G1, the service interval has now been exceeded and therefore an OK event is not generated.
However, the MQGET call causes the service timer to be reset.
4. At G2, the second get occurs within the service interval and this time an OK event is generated. The
queue manager resets the event control attribute so that:
a. The high event is automatically enabled.
b. The OK event is disabled.
Because the queue is now empty, the service timer is switched to an OFF state.
Event statistics summary
Table 37 on page 494 summarizes the event statistics for this example.
493
T(G2)
Type of event
OK
TimeSinceReset
T(G2) - T(0)
HighQDepth
MsgEnqCount
MsgDeqCount
Key:
Service interval
Service timer ON
Service timer OFF
Queue depth
TO
P1
P2
P3
G1
G2
G3
Time
Enabled events
High
OK
High event
OK event
Commentary
1. At time T(0), the queue statistics are reset and Queue Service Interval High events are enabled.
2. At P1, the first put starts the service timer.
3. At P2, the second put increases the queue depth to two. A high event is not generated here because
the service interval time has not been exceeded.
494
4. At P3, the third put causes a high event to be generated. (The timer has exceeded the service interval.)
The timer is not reset because the queue depth was not zero before the put. However, OK events are
enabled.
5. At G1, the MQGET call does not generate an event because the service interval has been exceeded
and OK events are enabled. The MQGET call does, however, reset the service timer.
6. At G2, the MQGET call does not generate an event because the service interval has been exceeded
and OK events are enabled. Again, the MQGET call resets the service timer.
7. At G3, the third get empties the queue and the service timer is equal to the service interval. Therefore
an OK event is generated. The service timer is reset and high events are enabled. The MQGET call
empties the queue, and this puts the timer in the OFF state.
Event statistics summary
Table 38 summarizes the event statistics for this example.
Table 38. Event statistics summary for example 3
Event 1
Event 2
Time of event
T(P3)
T(G3)
Type of event
High
OK
TimeSinceReset
T(P3) - T(0)
T(G3) - T(P3)
HighQDepth
MsgEnqCount
MsgDeqCount
495
A Queue Full Event is generated when an application attempts to put a message on a queue that has
reached its maximum depth. Queue Depth High events give advance warning that a queue is filling up.
This means that having received this event, the system administrator needs to take some preventive
action. You can configure the queue manager such that, if the preventive action is successful and the
queue depth drops to a safer level, the queue manager generates a Queue Depth Low event.
The first queue depth event example illustrates the effect of presumed action preventing the queue
becoming full.
Related concepts:
Queue depth events examples on page 498
Use these examples to understand the information that you can obtain from queue depth events
Related information:
Queue Full
Queue Depth High
Queue Depth Low
Enabling queue depth events:
To configure a queue for any of the queue depth events you set the appropriate queue manager and
queue attributes.
About this task
By default, all queue depth events are disabled. When enabled, queue depth events are generated as
follows:
v A Queue Depth High event is generated when a message is put on the queue, causing the queue depth
to be greater than or equal to the value determined by the Queue Depth High limit.
A Queue Depth High event is automatically enabled by a Queue Depth Low event on the same
queue.
A Queue Depth High event automatically enables both a Queue Depth Low and a Queue Full event
on the same queue.
v A Queue Depth Low event is generated when a message is removed from a queue by a get operation
causing the queue depth to be less than or equal to the value determined by the Queue Depth Low
limit.
A Queue Depth Low event is automatically enabled by a Queue Depth High event or a Queue Full
event on the same queue.
A Queue Depth Low event automatically enables both a Queue Depth High and a Queue Full event
on the same queue.
v A Queue Full event is generated when an application is unable to put a message onto a queue because
the queue is full.
A Queue Full event is automatically enabled by a Queue Depth High or a Queue Depth Low event
on the same queue.
A Queue Full event automatically enables a Queue Depth Low event on the same queue.
Perform the following steps to configure a queue for any of the queue depth events:
Procedure
1. Enable performance events on the queue manager, using the queue manager attribute PERFMEV.
2. Set one of the following attributes to enable the event on the required queue:
v QDepthHighEvent (QDPHIEV in MQSC)
v QDepthLowEvent (QDPLOEV in MQSC)
496
To enable Queue Depth Low events on the queue MYQUEUE with a limit set at 20%, use the following
MQSC commands:
ALTER QMGR PERFMEV(ENABLED)
ALTER QLOCAL(MYQUEUE) QDEPTHLO(20) QDPLOEV(ENABLED)
To enable Queue Full events on the queue MYQUEUE, use the following MQSC commands:
ALTER QMGR PERFMEV(ENABLED)
ALTER QLOCAL(MYQUEUE) QDPMAXEV(ENABLED)
497
Related concepts:
Queue depth events on page 495
Queue depth events are related to the queue depth, that is, the number of messages on the queue.
Related tasks:
Enabling queue depth events on page 496
To configure a queue for any of the queue depth events you set the appropriate queue manager and
queue attributes.
Related information:
The MQSC commands
Queue depth events: example 1:
A basic sequence of queue depth events.
Figure 84 on page 499 shows the variation of queue depth over time.
498
100
Depth high
limit
80
Depth low
limit
20
0
T0
T1
T2
T3
T4 Time
Enabled events
High
Low
Full
Commentary
1. At T(1), the queue depth is increasing (more MQPUT calls than MQGET calls) and crosses the Queue
Depth Low limit. No event is generated at this time.
2. The queue depth continues to increase until T(2), when the depth high limit (80%) is reached and a
Queue Depth High event is generated.
This enables both Queue Full and Queue Depth Low events.
3. The (presumed) preventive actions instigated by the event prevent the queue from becoming full. By
time T(3), the Queue Depth High limit has been reached again, this time from above. No event is
generated at this time.
4. The queue depth continues to fall until T(4), when it reaches the depth low limit (20%) and a Queue
Depth Low event is generated.
This enables both Queue Full and Queue Depth High events.
Event statistics summary
Table 39 on page 500 summarizes the queue event statistics and Table 40 on page 500 summarizes which
events are enabled.
499
Table 39. Event statistics summary for queue depth events (example 1)
Event 2
Event 4
Time of event
T(2)
T(4)
Type of event
TimeSinceReset
T(2) - T(0)
T(4) - T(2)
800
900
MsgEnqCount
1157
1220
MsgDeqCount
357
1820
Before T(1)
ENABLED
T(1) to T(2)
ENABLED
T(2) to T(3)
ENABLED
ENABLED
T(3) to T(4)
ENABLED
ENABLED
After T(4)
ENABLED
ENABLED
500
100
80
20
0
T0
T1
T2
T3
T4 T5
T6
T7
T8 T9
T10 T11
T12
High
Low
Full
Queue
Queue
Queue
Queue
Queue
Time
Commentary
1. No Queue Depth Low event is generated at the following times:
v T(1) (Queue depth increasing, and not enabled)
v T(2) (Not enabled)
v T(3) (Queue depth increasing, and not enabled)
2. At T(4) a Queue Depth High event occurs. This enables both Queue Full and Queue Depth Low
events.
3. At T(9) a Queue Full event occurs after the first message that cannot be put on the queue because the
queue is full.
4. At T(12) a Queue Depth Low event occurs.
Event statistics summary
Table 41 on page 502 summarizes the queue event statistics and Table 42 on page 502 summarizes which
events are enabled at different times for this example.
501
Table 41. Event statistics summary for queue depth events (example 2)
Event 4
Event 6
Event 8
Event 9
Event 12
Time of event
T(4)
T(6)
T(8)
T(9)
T(12)
Type of event
Queue Depth
Low
Queue Depth
High
Queue Full
Queue Depth
Low
TimeSinceReset
T(4) - T(0)
T(6) - T(4)
T(8) - T(6)
T(9) - T(8)
T(12) - T(9)
HighQDepth
800
855
800
1000
1000
MsgEnqCount
1645
311
1377
324
221
MsgDeqCount
845
911
777
124
1021
T(0) to T(4)
ENABLED
T(4) to T(6)
ENABLED
ENABLED
T(6) to T(8)
ENABLED
ENABLED
T(8) to T(9)
ENABLED
ENABLED
T(9) to T(12)
ENABLED
After T(12)
ENABLED
ENABLED
Note: Events are out of syncpoint. Therefore you could have an empty queue, then fill it up causing an
event, then roll back all of the messages under the control of a syncpoint manager. However, event
enabling has been automatically set, so that the next time the queue fills up, no event is generated.
Configuration events
Configuration events are notifications that are generated when an object is created, changed, or deleted,
and can also be generated by explicit requests.
Configuration events notify you about changes to the attributes of an object. There are four types of
configuration events:
v Create object events
v Change object events
v Delete object events
v Refresh object events
The event data contains the following information:
Origin information
comprises the queue manager from where the change was made, the ID of the user that made the
change, and how the change came about, for example by a console command.
Context information
a replica of the context information in the message data from the command message.
Context information is included in the event data only when the command was entered as a
message on the SYSTEM.COMMAND.INPUT queue.
Object identity
comprises the name, type and disposition of the object.
Object attributes
comprises the values of all the attributes in the object.
502
In the case of change object events, two messages are generated, one with the information before the
change, the other with the information after.
Every configuration event message that is generated is placed on the queue
SYSTEM.ADMIN.CONFIG.EVENT.
Related concepts:
Configuration events on page 478
Configuration events are generated when a configuration event is requested explicitly, or automatically
when an object is created, modified, or deleted.
Related reference:
Event types on page 474
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
Related information:
Create object
Change object
Delete object
Refresh object
DELETE
DELETE
DELETE
DELETE
DELETE
CFSTRUCT
CHANNEL
NAMELIST
PROCESS
QMODEL/QALIAS/QREMOTE
DELETE STGCLASS
DELETE TOPIC
REFRESH QMGR
v any of the following commands, or their PCF equivalent, are issued even if there is no change to the
object:
DEFINE/ALTER AUTHINFO
DEFINE/ALTER CFSTRUCT
DEFINE/ALTER CHANNEL
DEFINE/ALTER NAMELIST
DEFINE/ALTER PROCESS
DEFINE/ALTER QMODEL/QALIAS/QREMOTE
DEFINE/ALTER STGCLASS
DEFINE/ALTER TOPIC
DEFINE MAXSMSGS
SET CHLAUTH
ALTER QMGR, unless the CONFIGEV attribute is DISABLED and is not changed to ENABLED
Monitoring and performance
503
v any of the following commands, or their PCF equivalent, are issued for a local queue that is not
temporary dynamic, even if there is no change to the queue.
DELETE QLOCAL
DEFINE/ALTER QLOCAL
v an MQSET call is issued, other than for a temporary dynamic queue, even if there is no change to the
object.
504
v DELETE object
if the queue manager attribute CONFIGEV is enabled, but the configuration event message cannot be put
on the configuration event queue, for example the event queue has not been defined, the command or
MQSET call is executed regardless.
Effects of CMDSCOPE
For commands where CMDSCOPE is used, the configuration event message or messages will be
generated on the queue manager or queue managers where the command is executed, not where the
command is entered. However, all the origin and context information in the event data will relate to the
original command as entered, even where the command using CMDSCOPE is one that has been
generated by the source queue manager.
Where a queue sharing group includes queue managers that are not at the current version, events will be
generated for any command that is executed by means of CMDSCOPE on a queue manager that is at the
current version, but not on those that are at a previous version. This happens even if the queue manager
where the command is entered is at the previous version, although in such a case no context information
is included in the event data.
Related concepts:
Configuration events on page 502
Configuration events are notifications that are generated when an object is created, changed, or deleted,
and can also be generated by explicit requests.
Related information:
Introduction to Programmable Command Formats
Programmable Command Formats (PCFs) define command and reply messages that can be exchanged
between a program and any queue manager (that supports PCFs) in a network. PCFs simplify queue
manager administration and other network administration. They can be used to solve the problem of
complex administration of distributed networks especially as networks grow in size and complexity.
MQSET - Set object attributes
MQSET - Set object attributes
505
definition stored by the queue manager. This might cause unacceptable processing times and event
message generation. Consider specifying some selection criteria.
The REFRESH QMGR command that generates the refresh events can be used in the following situations:
v When configuration data is wanted about all or some of the objects in a system regardless of whether
the objects have been recently manipulated, for example, when configuration events are first enabled.
Consider using several commands, each with a different selection of objects, but such that all are
included.
v If there has been an error in the SYSTEM.ADMIN.CONFIG.EVENT queue. In this circumstance, no
configuration event messages are generated for Create, Change, or Delete events. When the error on
the queue has been corrected, the Refresh Queue Manager command can be used to request the
generation of event messages, which were lost while there was an error in the queue. In this situation
consider setting the refresh interval to the time for which the queue was unavailable.
Related concepts:
Configuration events on page 502
Configuration events are notifications that are generated when an object is created, changed, or deleted,
and can also be generated by explicit requests.
Related information:
REFRESH QMGR
Refresh Queue Manager
Command events
Command events are notifications that an MQSC, or PCF command has run successfully.
The event data contains the following information:
Origin information
comprises the queue manager from where the command was issued, the ID of the user that
issued the command, and how the command was issued, for example by a console command.
Context information
a replica of the context information in the message data from the command message. If a
command is not entered using a message, context information is omitted.
Context information is included in the event data only when the command was entered as a
message on the SYSTEM.COMMAND.INPUT queue.
Command information
the type of command that was issued.
Command data
v for PCF commands, a replica of the command data
v for MQSC commands, the command text
The command data format does not necessarily match the format of the original command. For
example, on distributed platforms the command data format is always in PCF format, even if the
original request was an MQSC command.
Every command event message that is generated is placed on the command event queue,
SYSTEM.ADMIN.COMMAND.EVENT.
506
Related reference:
Event types on page 474
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
Related information:
Command
507
For example, if an object is changed unexpectedly, information regarding who made the alteration and
when it was done can be stored. This can be particularly useful when configuration events are also
enabled. If an MQSC or PCF command causes a command event and a configuration event to be
generated, both event messages will share the same correlation identifier in their message descriptor.
If a command event message is generated, but cannot be put on the command event queue, for example
if the command event queue has not been defined, the command for which the command event was
generated still runs regardless.
Effects of CMDSCOPE
For commands where CMDSCOPE is used, the command event message or messages will be generated
on the queue manager or queue managers where the command runs, not where the command is entered.
However, all the origin and context information in the event data will relate to the original command as
entered, even where the command using CMDSCOPE is one that has been generated by the source queue
manager.
Related concepts:
Command events on page 506
Command events are notifications that an MQSC, or PCF command has run successfully.
Command event generation on page 507
Use this page to view the situations that cause command events to be generated and to understand the
circumstances in which command events are not generated
Related information:
The MQSC commands
PCF commands and responses in groups
Logger events
Logger events are notifications that a queue manager has started writing to a new log extent.
The event data contains the following information:
v The name of the current log extent.
v The name of the earliest log extent needed for restart recovery.
v The name of the earliest log extent needed for media recovery.
v The directory in which the log extents are located.
Every logger event message that is generated is placed on the logger event queue,
SYSTEM.ADMIN.LOGGER.EVENT.
Related reference:
Event types on page 474
Use this page to view the types of instrumentation event that a queue manager or channel instance can
report
Related information:
Logger
508
v When the LOGGEREV queue manager attribute is specified as ENABLED and the queue manager
starts.
v When the LOGGEREV queue manager attribute is changed from DISABLED to ENABLED.
Tip: You can use the RESET QMGR MQSC command to request a queue manager to start writing to a
new log extent.
509
/* <N_OCO_COPYRIGHT>
*/
/* Licensed Materials - Property of IBM
*/
/*
*/
/* 63H9336
*/
/* (c) Copyright IBM Corp. 2005 All Rights Reserved.
*/
/*
*/
/* US Government Users Restricted Rights - Use, duplication or
*/
/* disclosure restricted by GSA ADP Schedule Contract with
*/
/* IBM Corp.
*/
/* <NOC_COPYRIGHT>
*/
/******************************************************************************/
/*
*/
/* Function: AMQSLOG is a sample program which monitors the logger event
*/
/* queue for new event messages, reads those messages, and puts the contents */
/* of the message to stdout.
*/
/*
*/
/******************************************************************************/
/*
*/
/* AMQSLOG has 1 parameter - the queue manager name (optional, if not
*/
/* specified then the default queue manager is implied)
*/
/*
*/
/******************************************************************************/
/******************************************************************************/
/* Includes
*/
/******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <cmqc.h>
#include <cmqcfc.h>
/* MQI constants*/
/* PCF constants*/
/******************************************************************************/
/* Constants
*/
/******************************************************************************/
#define
MAX_MESSAGE_LENGTH
8000
hConn,
hEventQueue,
pBuffer);
510
/* Function: main
*/
/**********************************************************************/
int main(int argc, char * argv[])
{
MQLONG
CompCode;
MQLONG
Reason;
MQHCONN hConn = MQHC_UNUSABLE_HCONN;
MQOD
ObjDesc = { MQOD_DEFAULT };
MQCHAR
QMName[MQ_Q_MGR_NAME_LENGTH+1] = "";
MQCHAR
LogEvQ[MQ_Q_NAME_LENGTH] = "SYSTEM.ADMIN.LOGGER.EVENT";
MQHOBJ
hEventQueue;
PMQCHAR pBuffer = NULL;
printf("\n/*************************************/\n");
printf("/* Sample Logger Event Monitor start */\n");
printf("/*************************************/\n");
/********************************************************************/
/* Parse any command line options
*/
/********************************************************************/
if (argc > 1)
strncpy(QMName, argv[1], (size_t)MQ_Q_MGR_NAME_LENGTH);
pBuffer = (char *)malloc(MAX_MESSAGE_LENGTH);
if (!pBuffer)
{
printf("Cant allocate %d bytes\n",MAX_MESSAGE_LENGTH);
goto MOD_EXIT;
}
/********************************************************************/
/* Connect to the specified (or default) queue manager
*/
/********************************************************************/
MQCONN(QMName,
&hConn,
&CompCode,
&Reason);
if (Reason != MQCC_OK)
{
printf("Error in call to MQCONN, Reason %d, CompCode %d\n", Reason,
CompCode);
goto MOD_EXIT;
}
/* Open the logger event queue for input
*/
strncpy(ObjDesc.ObjectQMgrName,QMName, MQ_Q_MGR_NAME_LENGTH);
strncpy(ObjDesc.ObjectName, LogEvQ, MQ_Q_NAME_LENGTH);
MQOPEN(
hConn,
&ObjDesc,
MQOO_INPUT_EXCLUSIVE,
&hEventQueue,
&CompCode,
&Reason);
if (Reason)
{
printf("MQOPEN failed for queue manager %.48s Queue %.48s Reason: %d\n",
ObjDesc.ObjectQMgrName,
ObjDesc.ObjectName,
Reason);
goto MOD_EXIT;
}
else
Monitoring and performance
511
{
ProcessPCF(hConn, hEventQueue, pBuffer);
}
MOD_EXIT:
if (pBuffer != NULL) {
free(pBuffer);
}
/********************************************************************/
/* Disconnect
*/
/********************************************************************/
if (hConn != MQHC_UNUSABLE_HCONN) {
MQDISC(&hConn, &CompCode, &Reason);
}
return 0;
}
/******************************************************************************/
/* Function: ProcessPCF
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Handle to queue manager connection
*/
/*
Handle to the opened logger event queue object
*/
/*
Pointer to a memory buffer to store the incoming PCF msg*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Logic: Wait for messages to appear on the logger event queue and display
*/
/* their contents.
*/
/*
*/
/******************************************************************************/
static void ProcessPCF(MQHCONN
hConn,
MQHOBJ
hEventQueue,
PMQCHAR
pBuffer)
{
MQCFH * pCfh;
MQCFST * pCfst;
MQGMO
Gmo
= { MQGMO_DEFAULT };
MQMD
Mqmd
= { MQMD_DEFAULT };
PMQCHAR pPCFCmd;
MQLONG
Reason = 0;
MQLONG
CompCode;
MQLONG
MsgLen;
PMQCHAR Parm = NULL;
/* Set timeout value
*/
Gmo.Options
|= MQGMO_WAIT;
Gmo.Options |= MQGMO_CONVERT;
Gmo.WaitInterval = MQWI_UNLIMITED;
/********************************************************************/
/* Process response Queue
*/
/********************************************************************/
while (Reason == MQCC_OK)
{
memcpy(&Mqmd.MsgId;
, MQMI_NONE, sizeof(Mqmd.MsgId));
memset(&Mqmd.CorrelId, 0, sizeof(Mqmd.CorrelId));
MQGET( hConn,
hEventQueue,
&Mqmd,
&Gmo,
MAX_MESSAGE_LENGTH,
pBuffer,
&MsgLen,
512
&CompCode,
&Reason);
if (Reason != MQCC_OK)
{
switch(Reason)
{
case MQRC_NO_MSG_AVAILABLE:
printf("Timed out");
break;
default:
printf("MQGET failed RC(%d)\n", Reason);
break;
}
goto MOD_EXIT;
}
/******************************************************************/
/* Only expect PCF event messages on this queue
*/
/******************************************************************/
if (memcmp(Mqmd.Format, MQFMT_EVENT, sizeof(Mqmd.Format)))
{
printf("Unexpected message format %8.8s received\n",Mqmd.Format);
continue;
}
/*******************************************************************/
/* Build the output by parsing the received PCF message, first the */
/* header, then each of the parameters
*/
/*******************************************************************/
pCfh = (MQCFH *)pBuffer;
if (pCfh -> Reason)
{
printf("-----------------------------------------------------------------\n");
printf("Event Message Received\n");
Parm = ParmToString(pCfh->Command);
if (Parm != NULL) {
printf("Command :%s \n",Parm);
}
else
{
printf("Command :%d \n",pCfh->Command);
}
printf("CompCode :%d\n"
,pCfh->CompCode);
Parm = ParmToString(pCfh->Reason);
if (Parm != NULL) {
printf("Reason
:%s \n",Parm);
}
else
{
printf("Reason
:%d \n",pCfh->Reason);
}
}
pPCFCmd = (char *) (pCfh+1);
printf("-----------------------------------------------------------------\n");
while(pCfh -> ParameterCount--)
{
pCfst = (MQCFST *) pPCFCmd;
switch(pCfst -> Type)
{
Monitoring and performance
513
case MQCFT_STRING:
Parm = ParmToString(pCfst -> Parameter);
if (Parm != NULL) {
printf("%-32s",Parm);
}
else
{
printf("%-32d",pCfst -> Parameter);
}
fwrite( pCfst -> String, pCfst -> StringLength, 1, stdout);
pPCFCmd += pCfst -> StrucLength;
break;
default:
printf("Unrecoginised datatype %d returned\n",pCfst->Type);
goto MOD_EXIT;
}
putchar(\n);
}
printf("-----------------------------------------------------------------\n");
}
MOD_EXIT:
return;
}
/******************************************************************************/
/* Function: ParmToString
*/
/******************************************************************************/
/*
*/
/* Input Parameters: Parameter for which to get string description
*/
/*
*/
/* Output Parameters: None
*/
/*
*/
/* Logic: Takes a parameter as input and returns a pointer to a string
*/
/* description for that parameter, or NULL if the parameter does not */
/* have an associated string description
*/
/******************************************************************************/
static PMQCHAR ParmToString(MQLONG Parameter){
long i;
for (i=0 ; i< sizeof(ParmTable)/sizeof(ParmTableEntry); i++)
{
if (ParmTable[i].ConstVal == Parameter ParmTable[i].Desc)
return ParmTable[i].Desc;
}
return NULL;
}
Sample output
This application produces the following form of output:
/*************************************/
/* Sample Logger Event Monitor start */
/*************************************/
----------------------------------------------------------------Event Message Received
Command :Logger Event Command
CompCode :0
Reason :Logger Status
----------------------------------------------------------------Queue Manager Name
CSIM
Current Log Extent
514
AMQA000001
Related concepts:
Logger event usage on page 509
Use this page to view how you can use logger events to determine the log extents that are no longer
required for queue manager restart, or media recovery.
Command event usage on page 507
Use this page to view how you can use command events to generate an audit trail of the commands that
have run
Related reference:
Logger event generation on page 508
Use this page to view the situations that cause logger events to be generated and to understand the
circumstances in which logger events are not generated
515
#define PRINTREAS(param)
case param:
printf("Reason = %s\n",#param);
break;
\
\
\
/********************************************************************/
/* global variable
*/
/********************************************************************/
MQCFH
*evtmsg;
/* evtmsg message buffer
*/
int main(int argc, char **argv)
{
/******************************************************************/
/* declare variables
*/
/******************************************************************/
int i;
/* auxiliary counter
*/
/******************************************************************/
/* Declare MQI structures needed
*/
/******************************************************************/
MQOD
od = {MQOD_DEFAULT};
/* Object Descriptor
*/
MQMD
md = {MQMD_DEFAULT};
/* Message Descriptor
*/
MQGMO gmo = {MQGMO_DEFAULT};
/* get message options
*/
/******************************************************************/
/* note, uses defaults where it can
*/
/******************************************************************/
MQHCONN Hcon;
MQHOBJ Hobj;
MQLONG O_options;
MQLONG C_options;
MQLONG CompCode;
MQLONG OpenCode;
MQLONG Reason;
MQLONG CReason;
MQLONG buflen;
MQLONG evtmsglen;
MQCHAR command[1100];
MQCHAR p1[600];
MQCHAR p2[900];
MQCHAR p3[600];
MQLONG mytype;
char
QMName[50];
MQCFST *paras;
int
counter;
time_t ltime;
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
/*
connection handle
object handle
MQOPEN options
MQCLOSE options
completion code
MQOPEN completion code
reason code
reason code for MQCONN
buffer length
message length received
call command string ...
ApplId insert
evtmsg insert
Environment insert
saved application type
queue manager name
the parameters
loop counter
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
/******************************************************************/
/* Connect to queue manager
*/
/******************************************************************/
QMName[0] = 0;
/* default queue manager
*/
if (argc > 1)
strcpy(QMName, argv[1]);
MQCONN(QMName,
/* queue manager
*/
&Hcon,
/* connection handle
*/
&CompCode,
/* completion code
*/
&CReason);
/* reason code
*/
/******************************************************************/
/* Initialize object descriptor for subject queue
*/
/******************************************************************/
strcpy(od.ObjectName, "SYSTEM.ADMIN.QMGR.EVENT");
if (argc > 2)
strcpy(od.ObjectName, argv[2]);
516
/******************************************************************/
/* Open the event queue for input; exclusive or shared. Use of
*/
/* the queue is controlled by the queue definition here
*/
/******************************************************************/
O_options = MQOO_INPUT_AS_Q_DEF
+ MQOO_FAIL_IF_QUIESCING
+ MQOO_BROWSE;
MQOPEN(Hcon,
&od,
O_options,
&Hobj,
&CompCode,
&Reason);
*/
*/
/* connection handle
*/
/* object descriptor for queue*/
/* open options
*/
/* object handle
*/
/* completion code
*/
/* reason code
*/
/******************************************************************/
/* Get messages from the message queue
*/
/******************************************************************/
while (CompCode != MQCC_FAILED)
{
/****************************************************************/
/* I dont know how big this message is so just get the
*/
/* descriptor first
*/
/****************************************************************/
gmo.Options = MQGMO_WAIT + MQGMO_LOCK
+ MQGMO_BROWSE_FIRST + MQGMO_ACCEPT_TRUNCATED_MSG;
/* wait for new messages
*/
gmo.WaitInterval = MQWI_UNLIMITED;/* no time limit
*/
buflen = 0;
/* amount of message to get
*/
/****************************************************************/
/* clear selectors to get messages in sequence
*/
/****************************************************************/
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId));
memcpy(md.CorrelId, MQCI_NONE, sizeof(md.CorrelId));
/****************************************************************/
/* wait for event message
*/
/****************************************************************/
printf("...>\n");
MQGET(Hcon,
/* connection handle
*/
Hobj,
/* object handle
*/
&md,
/* message descriptor
*/
&gmo,
/* get message options
*/
buflen,
/* buffer length
*/
evtmsg,
/* evtmsg message buffer
*/
&evtmsglen,
/* message length
*/
&CompCode,
/* completion code
*/
&Reason);
/* reason code
*/
/****************************************************************/
/* report reason, if any
*/
/****************************************************************/
if (Reason != MQRC_NONE && Reason != MQRC_TRUNCATED_MSG_ACCEPTED)
{
printf("MQGET ==> %ld\n", Reason);
}
else
{
gmo.Options = MQGMO_NO_WAIT + MQGMO_MSG_UNDER_CURSOR;
buflen = evtmsglen;
/* amount of message to get
*/
evtmsg = malloc(buflen);
if (evtmsg != NULL)
{
Monitoring and performance
517
/************************************************************/
/* clear selectors to get messages in sequence
*/
/************************************************************/
memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId));
memcpy(md.CorrelId, MQCI_NONE, sizeof(md.CorrelId));
/************************************************************/
/* get the event message
*/
/************************************************************/
printf("...>\n");
MQGET(Hcon,
/* connection handle
*/
Hobj,
/* object handle
*/
&md,
/* message descriptor
*/
&gmo,
/* get message options
*/
buflen,
/* buffer length
*/
evtmsg,
/* evtmsg message buffer
*/
&evtmsglen,
/* message length
*/
&CompCode,
/* completion code
*/
&Reason);
/* reason code
*/
/************************************************************/
/* report reason, if any
*/
/************************************************************/
if (Reason != MQRC_NONE)
{
printf("MQGET ==> %ld\n", Reason);
}
}
else
{
CompCode = MQCC_FAILED;
}
}
/****************************************************************/
/* . . . process each message received
*/
/****************************************************************/
if (CompCode != MQCC_FAILED)
{
/**************************************************************/
/* announce a message
*/
/**************************************************************/
printf("\a\a\a\a\a\a\a");
time(<ime);
printf(ctime(<ime));
if (evtmsglen != buflen)
printf("DataLength = %ld?\n", evtmsglen);
else
{
/************************************************************/
/* right lets look at the data
*/
/************************************************************/
if (evtmsg->Type != MQCFT_EVENT)
{
printf("Somethings wrong this isnt an event message,"
" its type is %ld\n",evtmsg->Type);
}
else
{
if (evtmsg->Command == MQCMD_Q_MGR_EVENT)
{
printf("Queue Manager event: ");
}
else
518
if (evtmsg->Command == MQCMD_CHANNEL_EVENT)
{
printf("Channel event: ");
}
else
..
.
{
printf("Unknown Event message, %ld.",
evtmsg->Command);
}
if
(evtmsg->CompCode == MQCC_OK)
printf("CompCode(OK)\n");
else if (evtmsg->CompCode == MQCC_WARNING)
printf("CompCode(WARNING)\n");
else if (evtmsg->CompCode == MQCC_FAILED)
printf("CompCode(FAILED)\n");
else
printf("* CompCode wrong * (%ld)\n",
evtmsg->CompCode);
if (evtmsg->StrucLength != MQCFH_STRUC_LENGTH)
{
printf("its the wrong length, %ld\n",evtmsg->StrucLength);
}
if (evtmsg->Version != MQCFH_VERSION_1)
{
printf("its the wrong version, %ld\n",evtmsg->Version);
}
if (evtmsg->MsgSeqNumber != 1)
{
printf("its the wrong sequence number, %ld\n",
evtmsg->MsgSeqNumber);
}
if (evtmsg->Control != MQCFC_LAST)
{
printf("its the wrong control option, %ld\n",
evtmsg->Control);
}
printreas(evtmsg->Reason);
printf("parameter count is %ld\n", evtmsg->ParameterCount);
/**********************************************************/
/* get a pointer to the start of the parameters
*/
/**********************************************************/
paras = (MQCFST *)(evtmsg + 1);
counter = 1;
while (counter <= evtmsg->ParameterCount)
{
switch (paras->Type)
{
case MQCFT_STRING:
printfmqcfst(paras);
paras = (MQCFST *)((char *)paras
+ paras->StrucLength);
break;
case MQCFT_INTEGER:
printfmqcfin((MQCFIN*)paras);
paras = (MQCFST *)((char *)paras
Monitoring and performance
519
+ paras->StrucLength);
break;
default:
printf("unknown parameter type, %ld\n",
paras->Type);
counter = evtmsg->ParameterCount;
break;
}
counter++;
}
}
} /* end evtmsg action
*/
free(evtmsg);
evtmsg = NULL;
}
/* end process for successful GET */
}
/* end message processing loop
*/
/******************************************************************/
/* close the event queue - if it was opened
*/
/******************************************************************/
if (OpenCode != MQCC_FAILED)
{
C_options = 0;
/* no close options
*/
MQCLOSE(Hcon,
/* connection handle
*/
&Hobj,
/* object handle
*/
C_options,
&CompCode,
/* completion code
*/
&Reason);
/* reason code
*/
/******************************************************************/
/* Disconnect from queue manager (unless previously connected)
*/
/******************************************************************/
if (CReason != MQRC_ALREADY_CONNECTED)
{
MQDISC(&Hcon,
/* connection handle
*/
&CompCode,
/* completion code
*/
&Reason);
/* reason code
*/
/********************************************************************/
/*
*/
/* END OF EVMON
*/
/*
*/
/********************************************************************/
}
#define PRINTPARAM(param)
case param:
{
char *p = #param;
strncpy(thestring,pmqcfst->String,min(sizeof(thestring),
pmqcfst->StringLength));
printf("%s %s\n",p,thestring);
}
break;
\
\
\
\
\
\
\
\
#define PRINTAT(param)
case param:
printf("MQIA_APPL_TYPE = %s\n",#param);
break;
\
\
\
520
PRINTPARAM(MQCA_BASE_Q_NAME)
PRINTPARAM(MQCA_PROCESS_NAME)
PRINTPARAM(MQCA_Q_MGR_NAME)
PRINTPARAM(MQCA_Q_NAME)
PRINTPARAM(MQCA_XMIT_Q_NAME)
PRINTPARAM(MQCACF_APPL_NAME)
..
.
default:
printf("Invalid parameter, %ld\n",pmqcfst->Parameter);
break;
}
}
521
..
.
default :
printf("Invalid parameter, %ld\n",pmqcfst->Parameter);
break;
}
}
void printreas(MQLONG reason)
{
switch (reason)
{
PRINTREAS(MQRCCF_CFH_TYPE_ERROR)
PRINTREAS(MQRCCF_CFH_LENGTH_ERROR)
PRINTREAS(MQRCCF_CFH_VERSION_ERROR)
PRINTREAS(MQRCCF_CFH_MSG_SEQ_NUMBER_ERR)
..
.
PRINTREAS(MQRC_NO_MSG_LOCKED)
PRINTREAS(MQRC_CONNECTION_NOT_AUTHORIZED)
PRINTREAS(MQRC_MSG_TOO_BIG_FOR_CHANNEL)
PRINTREAS(MQRC_CALL_IN_PROGRESS)
default:
printf("Its an unknown reason, %ld\n",
reason);
break;
}
}
Related concepts:
Instrumentation events on page 472
An instrumentation event is a logical combination of conditions that a queue manager or channel instance
detects and puts a special message, called an event message, on an event queue.
Event monitoring on page 471
Event monitoring is the process of detecting occurrences of instrumentation events in a queue manager
network. An instrumentation event is a logical combination of events that is detected by a queue
manager or channel instance. Such an event causes the queue manager or channel instance to put a
special message, called an event message, on an event queue.
Related reference:
Sample program to monitor the logger event queue on page 509
Use this page to view a sample C program that monitors the logger event queue for new event messages,
reads those messages, and puts the contents of the message to stdout.
Related information:
C programming
522
Message monitoring
Message monitoring is the process of identifying the route a message has taken through a queue manager
network. By identifying the types of activities, and the sequence of activities performed on behalf of a
message, the message route can be determined.
As a message passes through a queue manager network, various processes perform activities on behalf of
the message. Use one of the following techniques to determine a message route:
v The WebSphere MQ display route application (dspmqrte)
v Activity recording
v Trace-route messaging
These techniques all generate special messages that contain information about the activities performed on
the message as it passed through a queue manager network. Use the information returned in these
special messages to achieve the following objectives:
v Record message activity.
v Determine the last known location of a message.
v Detect routing problems in your queue manager network.
v Assist in determining the causes of routing problems in your queue manager network.
v Confirm that your queue manager network is running correctly.
v Familiarize yourself with the running of your queue manager network.
v Trace published messages.
Related information:
Types of message
523
Message routes
Depending on your reason for determining a message route, you can use the following general
approaches:
Using activity information recorded for a trace-route message
Trace-route messages record activity information for a specific purpose. You can use them to
determine configuration issues with a queue manager network, or to determine the last known
location of a message. If a trace-route message is generated to determine the last known location
of a message that did not reach its intended destination, it can mimic the original message. This
gives the trace-route message the greatest chance of following the route taken by the original
message.
The WebSphere MQ display route application can generate trace-route messages.
Using activity information recorded for the original message
You can enable any message for activity recording and have activity information recorded on its
behalf. If a message does not reach its intended destination, you can use the recorded activity
information to determine the last known location of the message. By using activity information
from the original message, the most accurate possible message route can be determined, leading
to the last known location. To use this approach, the original message must be enabled for
activity recording.
Warning: Avoid enabling all messages in a queue manager network for activity recording.
Messages enabled for activity recording can have many activity reports generated on their behalf.
If every message in a queue manager network is enabled for activity recording, the queue
manager network traffic can increase to an unacceptable level.
524
Related concepts:
Message monitoring on page 523
Message monitoring is the process of identifying the route a message has taken through a queue manager
network. By identifying the types of activities, and the sequence of activities performed on behalf of a
message, the message route can be determined.
Message route techniques
Activity recording and trace-route messaging are techniques that allow you to record activity information
for a message as it is routed through a queue manager network.
Trace-route messaging on page 532
Trace-route messaging is a technique that uses trace-route messages to record activity information for a
message. Trace-route messaging involves sending a trace-route message into a queue manager network.
Related information:
Writing your own message channel agents
525
Benefit
Activity recording
Trace-route
messaging
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
526
Related concepts:
Activity recording
Activity recording is a technique for determining the routes that messages take through a queue manager
network. To determine the route that a message has taken, the activities performed on behalf of the
message are recorded.
Trace-route messaging on page 532
Trace-route messaging is a technique that uses trace-route messages to record activity information for a
message. Trace-route messaging involves sending a trace-route message into a queue manager network.
Related reference:
The TraceRoute PCF group on page 538
Attributes in the TraceRoute PCF group control the behavior of a trace-route message. The TraceRoute PCF
group is in the message data of every trace-route message.
Activity report message data on page 574
Use this page to view the parameters contained by the Activity PCF group in an activity report message.
Some parameters are returned only when specific operations have been performed.
Activity recording
Activity recording is a technique for determining the routes that messages take through a queue manager
network. To determine the route that a message has taken, the activities performed on behalf of the
message are recorded.
When using activity recording, each activity performed on behalf of a message can be recorded in an
activity report. An activity report is a type of report message. Each activity report contains information
about the application that performed the activity on behalf of the message, when the activity took place,
and information about the operations that were performed as part of the activity. Activity reports are
typically delivered to a reply-to queue where they are collected together. By studying the activity reports
related to a message, you can determine the route that the message took through the queue manager
network.
527
Procedure
1. Request activity reports for a message
a. In the message descriptor of the message, specify MQRO_ACTIVITY in the Report field.
b. In the message descriptor of the message, specify the name of a reply-to queue in the ReplyToQ
field.
Warning: Avoid enabling all messages in a queue manager network for activity recording. Messages
enabled for activity recording can have many activity reports generated on their behalf. If every
message in a queue manager network is enabled for activity recording, the queue manager network
traffic can increase to an unacceptable level.
2. Enable or disable the queue manager for activity recording. Use the MQSC command ALTER QMGR,
specifying the parameter ACTIVREC, to change the value of the queue manager attribute. The value can
be:
MSG
The queue manager is enabled for activity recording. Any activity reports generated are
delivered to the reply-to queue specified in the message descriptor of the message. This is the
default value.
QUEUE
The queue manager is enabled for activity recording. Any activity reports generated are
delivered to the local system queue SYSTEM.ADMIN.ACTIVITY.QUEUE. The system queue
can also be used to forward activity reports to a common queue.
DISABLED
The queue manager is disabled for activity recording. No activity reports are generated while
in the scope of this queue manager.
528
For example, to enable a queue manager for activity recording and specify that any activity reports
generated are delivered to the local system queue SYSTEM.ADMIN.ACTIVITY.QUEUE, use the
following MQSC command:
ALTER QMGR ACTIVREC(QUEUE)
Remember: When you modify the ACTIVREC queue manager attribute, a running MCA does not
detect the change until the channel is restarted.
3. Ensure that your application uses the same algorithm as MCAs use to determine whether to generate
an activity report for a message:
a. Verify that the message has requested activity reports to be generated
b. Verify that the queue manager where the message currently resides is enabled for activity
recording
c. Put the activity report on the queue determined by the ACTIVREC queue manager attribute
Procedure
1. Select or define a queue manager as the single node
2. On the single node, select or define a queue for use as the common queue
3. On all queue managers where activity reports are to be delivered to the common queue, redefine the
local system queue SYSTEM.ADMIN.ACTIVITY.QUEUE as a remote queue definition:
a. Specify the name of the single node as the remote queue manager name
b. Specify the name of the common queue as the remote queue name
529
Procedure
1. Identify all related activity reports on the reply-to queue by comparing identifiers of the activity
reports and the original message. Ensure you set the report option of the original message such that
the activity reports can be correlated with the original message.
2. Order the identified activity reports from the reply-to queue. You can use the following parameters
from the activity report:
OperationType
The types of operations performed might enable you to determine the activity report that was
generated directly before, or after, the current activity report.
For example, an activity report details that an MCA sent a message from a transmission queue
down a channel. The last operation detailed in the activity report has an OperationType of send
and details that the message was sent using the channel, CH1, to the destination queue
manager, QM1. This means that the next activity performed on the message will have
occurred on queue manager, QM1, and that it will have begun with a receive operation from
channel, CH1. By using this information you can identify the next activity report, providing it
exists and has been acquired.
OperationDate and OperationTime
You can determine the general order of the activities from the dates and times of the
operations in each activity report.
Warning: Unless every queue manager in the queue manager network has their system clocks
synchronized, ordering by date and time does not guarantee that the activity reports are in
the correct sequence. You must establish the order manually.
The order of the activity reports represents the route, or partial route, that the message took through
the queue manager network.
3. Obtain the information you need from the activity information in the ordered activity reports. If you
have insufficient information about the message, you might be able to acquire further activity reports.
530
Procedure
1. For any queue managers in the queue manager network that deliver activity reports to a common
queue, retrieve activity reports from the common queue that have a CorrelId that matches the MsgId of
the original message.
2. For any queue managers in the queue manager network that do not deliver activity reports to a
common queue, retrieve activity reports as follows:
a. Examine the existing activity reports to identify queue managers through which the message was
routed.
b. For these queue managers, identify the queue managers that are enabled for activity recording.
c. For these queue managers, identify any that did not return activity reports to the specified reply-to
queue.
d. For each of the queue managers that you identify, check the system queue
SYSTEM.ADMIN.ACTIVITY.QUEUE and retrieve any activity reports that have a CorrelId that
matches the MsgId of the original message.
e. If you find no activity reports on the system queue, check the queue manager dead letter queue, if
one exists. An activity report can only be delivered to a dead letter queue if the report option,
MQRO_DEAD_LETTER_Q, is set.
3. Arrange all the acquired activity reports in order. The order of the activity reports then represents the
route, or partial route, that the message took.
4. Obtain the information you need from the activity information in the ordered activity reports. In some
circumstances, recorded activity information cannot reach the specified reply-to queue, a common
queue, or a system queue.
531
Trace-route messaging
Trace-route messaging is a technique that uses trace-route messages to record activity information for a
message. Trace-route messaging involves sending a trace-route message into a queue manager network.
As the trace-route message is routed through the queue manager network, activity information is
recorded. This activity information includes information about the applications that performed the
activities, when they were performed, and the operations that were performed as part of the activities.
You can use the information recorded using trace-route messaging for the following purposes:
To determine the last known location of a message
If a message does not reach its intended destination, you can use the activity information
recorded for a trace-route message to determine the last known location of the message. A
trace-route message is sent into a queue manager network with the same target destination as the
original message, intending that it follows the same route. Activity information can be
accumulated in the message data of the trace-route message, or recorded using activity reports.
To increase the probability that the trace-route message follows the same route as the original
message, you can modify the trace-route message to mimic the original message.
To determine configuration issues with a queue manager network
Trace-route messages are sent into a queue manager network and activity information is recorded.
By studying the activity information recorded for a trace-route message, it can become apparent
that the trace-route message did not follow the expected route. There are many reasons why this
can occur, for example, a channel might be inactive, forcing the message to take an alternative
route. In these situations, a system administrator can determine whether there are any problems
in the queue manager network, and if there are, correct them.
You can use the WebSphere MQ display route application to configure, generate, and put trace-route
messages into a queue manager network.
Warning: If you put a trace-route message to a distribution list, the results are undefined.
532
Related concepts:
Trace-route message reference on page 590
Use this page to obtain an overview of the trace-route message format. The trace-route message data
includes parameters that describe the activities that the trace-route message has caused
Procedure
v Retrieve the trace-route message. The Deliver parameter, in the TraceRoute PCF group, controls whether
a trace-route message is placed on the target queue on arrival, or whether it is discarded. If the
trace-route message is delivered to the target queue, you can retrieve the trace-route message from this
queue. Then, you can use the WebSphere MQ display route application to display the activity
information.
Monitoring and performance
533
To request that activity information is accumulated in the message data of a trace-route message, set
the Accumulate parameter in the TraceRoute PCF group to MQROUTE_ACCUMULATE_IN_MSG.
v Use a trace-route reply message. When a trace-route message reaches its intended destination, or the
trace-route message cannot be routed any further in a queue manager network, a trace-route reply
message can be generated. A trace-route reply message contains a duplicate of all the activity
information from the trace-route message, and is either delivered to a specified reply-to queue, or the
system queue SYSTEM.ADMIN.TRACE.ROUTE.QUEUE. You can use the WebSphere MQ display route
application to display the activity information.
To request a trace-route reply message, set the Accumulate parameter in the TraceRoute PCF group to
MQROUTE_ACCUMULATE_AND_REPLY.
v Use activity reports. If activity reports are generated for a trace-route message, you must locate the
activity reports before you can acquire the activity information. Then, to determine the sequence of
activities, you must order the activity reports.
Procedure
v Define how activity information is to be recorded for the trace-route message. Refer to Generating and
configuring a trace-route message on page 536
v If you want to accumulate activity information in the trace-route message, ensure that the queue
manager is enabled for trace-route messaging
v If you want to accumulate activity information in the trace-route message, ensure that applications
performing activities on the trace-route message are capable of writing activity information to the
message data of the trace-route message
Related concepts:
Generating and configuring a trace-route message on page 536
A trace-route message comprises specific message descriptor and message data parts. To generate a
trace-route message, either create the message manually or use the WebSphere MQ display route
application.
Related tasks:
Controlling activity recording on page 528
Enable activity recording at the queue manager level. To enable an entire queue manager network,
individually enable every queue manager in the network for activity recording. If you enable more queue
managers, more activity reports are generated.
Enabling queue managers for trace-route messaging:
To control whether queue managers are enabled or disabled for trace-route messaging use the queue
manager attribute ROUTEREC.
534
Use the MQSC command ALTER QMGR, specifying the parameter ROUTEREC to change the value of the
queue manager attribute. The value can be:
MSG
The queue manager is enabled for trace-route messaging. Applications within the scope of the
queue manager can write activity information to the trace-route message.
If the Accumulate parameter in the TraceRoute PCF group is set as MQROUTE_ACCUMULATE_AND_REPLY,
and the next activity to be performed on the trace-route message:
v is a discard
v is a put to a local queue (target queue or dead-letter queue)
v will cause the total number of activities performed on the trace-route message to exceed the
value of parameter the MaxActivities, in the TraceRoute PCF group .
a trace-route reply message is generated, and delivered to the reply-to queue specified in the
message descriptor of the trace-route message.
QUEUE
The queue manager is enabled for trace-route messaging. Applications within the scope of the
queue manager can write activity information to the trace-route message.
If the Accumulate parameter in the TraceRoute PCF group is set as MQROUTE_ACCUMULATE_AND_REPLY,
and the next activity to be performed on the trace-route message:
v is a discard
v is a put to a local queue (target queue or dead-letter queue)
v will cause the total number of activities performed on the trace-route message to exceed the
value of parameter the MaxActivities, in the TraceRoute PCF group .
a trace-route reply message is generated, and delivered to the local system queue
SYSTEM.ADMIN.TRACE.ROUTE.QUEUE.
DISABLED
The queue manager is disabled for trace-route messaging. Activity information is not
accumulated in the the trace-route message, however the TraceRoute PCF group can be updated
while in the scope of this queue manager.
For example, to disable a queue manager for trace-route messaging, use the following MQSC command:
ALTER QMGR ROUTEREC(DISABLED)
Remember: When you modify the ROUTEREC queue manager attribute, a running MCA does not detect
the change until the channel is restarted.
Enabling applications for trace-route messaging:
To enable trace-route messaging for a user application, base your algorithm on the algorithm used by
message channel agents (MCAs)
Before you begin
If you are not familiar with the format of a trace-route message, see Trace-route message reference on
page 590.
About this task
Message channel agents (MCAs) are enabled for trace-route messaging. To enable a user application for
trace-route messaging, use the following steps from the algorithm that MCAs use:
535
Procedure
1. Determine whether the message being processed is a trace-route message. If the message does not
conform to the format of a trace-route message, the message is not processed as a trace-route message.
2. Determine whether activity information is to be recorded. If the detail level of the performed activity
is not less than the level of detail specified by the Detail parameter, activity information is recorded
under specific circumstances. This information is only recorded if the trace-route message requests
accumulation, and the queue manager is enabled for trace-route messaging, or if the trace-route
message requests an activity report and the queue manager is enabled for activity recording.
v If activity information is to be recorded, increment the RecordedActivities parameter.
v If activity information is not to be recorded, increment the UnrecordedActivities parameter.
3. Determine whether the total number of activities performed on the trace-route message exceeds the
value of the MaxActivities parameter.
The total number of activities is the sum of RecordedActivities, UnrecordedActivities, and
DiscontinuityCount.
If the total number of activities exceeds MaxActivities, reject the message with feedback
MQFB_MAX_ACTIVITIES.
4. If value of Accumulate is set as MQROUTE_ACCUMULATE_IN_MSG or
MQROUTE_ACCUMULATE_AND_REPLY, and the queue manager is enabled for trace-route
messaging, write an Activity PCF group to the end of the PCF block in the message data of a
trace-route message.
5. Deliver the trace-route message to a local queue.
v If the parameter, Deliver, is specified as MQROUTE_DELIVER_NO, reject the trace-route message
with feedback MQFB_NOT_DELIVERED.
v If the parameter, Deliver, is specified as MQROUTE_DELIVER_YES, deliver the trace-route message
to the local queue.
6. Generate a trace-route reply message if all the following conditions are true:
v The trace-route message was delivered to a local queue or rejected
v The value of the parameter, Accumulate, is MQROUTE_ACCUMULATE_AND_REPLY
v The queue manager is enabled for trace-route messaging
The trace-route reply message is put on the queue determined by the ROUTEREC queue manager
attribute.
7. If the trace-route message requested an activity report and the queue manager is enabled for activity
recording, generate an activity report. The activity report is put on the queue determined by the
ACTIVREC queue manager attribute.
536
The trace-route message data consists of the TraceRoute PCF group and one or more Activity PCF groups.
Manual generation
When generating a trace-route message manually, an Activity PCF group is not required. Activity PCF
groups are written to the message data of the trace-route message when an MCA or user-written
application performs an activity on its behalf.
537
Type
TraceRoute
Detail
RecordedActivities
UnrecordedActivities
DiscontinuityCount
MaxActivities
Accumulate
Forward
Deliver
MQCFGR
MQCFIN
MQCFIN
MQCFIN
MQCFIN
MQCFIN
MQCFIN
MQCFIN
MQCFIN
Specifies the detail level of activity information that is to be recorded. The value can be:
MQROUTE_DETAIL_LOW
Only activities performed by user application are recorded.
MQROUTE_DETAIL_MEDIUM
Activities specified in MQROUTE_DETAIL_LOW should be recorded. Additionally,
activities performed by MCAs are recorded.
MQROUTE_DETAIL_HIGH
Activities specified in MQROUTE_DETAIL_LOW, and MQROUTE_DETAIL_MEDIUM
should be recorded. MCAs do not record any further activity information at this level of
detail. This option is only available to user applications that are to record further activity
information. For example, if a user application determines the route a message takes by
considering certain message characteristics, the information about the routing logic could
be included with this level of detail.
RecordedActivities
Specifies the number of recorded activities performed on behalf of the trace-route message. An
activity is considered to be recorded if information about it has been written to the trace-route
message, or if an activity report has been generated. For every recorded activity, RecordedActivities
increments by one.
UnrecordedActivities
Specifies the number of unrecorded activities performed on behalf of the trace-route message. An
activity is considered to be unrecorded if an application that is enabled for trace-route messaging
neither accumulates, nor writes the related activity information to an activity report.
An activity performed on behalf of a trace-route message is unrecorded in the following
circumstances:
v The detail level of the performed activity is less than the level of detail specified by the
parameter Detail.
v The trace-route message requests an activity report but not accumulation, and the queue
manager is not enabled for activity recording.
538
v The trace-route message requests accumulation but not an activity report, and the queue
manager is not enabled for trace-route messaging.
v The trace-route message requests both accumulation and an activity report, and the queue
manager is not enabled for activity recording and trace route messaging.
v The trace-route message requests neither accumulation nor an activity report.
For every unrecorded activity the parameter, UnrecordedActivities, increments by one.
DiscontinuityCount
Specifies the number of times the trace-route message has been routed through a queue manager
with applications that were not enabled for trace-route messaging. This value is incremented by
the queue manager. If this value is greater than 0, only a partial message route can be
determined.
MaxActivities
Specifies the maximum number of activities that can be performed on behalf of the trace-route
message.
The total number of activities is the sum of RecordedActivities, UnrecordedActivities, and
DiscontinuityCount. The total number of activities must not exceed the value of MaxActivities.
The value of MaxActivities can be:
A positive integer
The maximum number of activities.
If the maximum number of activities is exceeded, the trace-route message is rejected with
feedback MQFB_MAX_ACTIVITIES. This can prevent the trace-route message from being
forwarded indefinitely if caught in an infinite loop.
MQROUTE_UNLIMITED_ACTIVITIES
An unlimited number of activities can be performed on behalf of the trace-route message.
Accumulate
Specifies the method used to accumulate activity information. The value can be:
MQROUTE_ACCUMULATE_IN_MSG
If the queue manager is enabled for trace-route messaging, activity information is
accumulated in the message data of the trace-route message.
If this value is specified, the trace-route message data consists of the following:
v The TraceRoute PCF group.
v Zero or more Activity PCF groups.
MQROUTE_ACCUMULATE_AND_REPLY
If the queue manager is enabled for trace-route messaging, activity information is
accumulated in the message data of the trace-route message, and a trace-route reply
message is generated if any of the following occur:
v The trace-route message is discarded by a WebSphere MQ Version 6 (or later) queue
manager.
v The trace-route message is put to a local queue (target queue or dead-letter queue) by a
WebSphere MQ Version 6 (or later) queue manager.
v The number of activities performed on the trace-route message exceeds the value of
MaxActivities.
If this value is specified, the trace-route message data consists of the following:
v The TraceRoute PCF group.
v Zero or more Activity PCF groups.
MQROUTE_ACCUMULATE_NONE
Activity information is not accumulated in the message data of the trace-route message.
Monitoring and performance
539
If this value is specified, the trace-route message data consists of the following:
v The TraceRoute PCF group.
Forward
Specifies where a trace-route message can be forwarded to. The value can be:
MQROUTE_FORWARD_IF_SUPPORTED
The trace-route message is only forwarded to queue managers that will honor the value
of the Deliver parameter from the TraceRoute group.
MQROUTE_FORWARD_ALL
The trace-route message is forwarded to any queue manager, regardless of whether the
value of the Deliver parameter will be honored.
Queue managers use the following algorithm when determining whether to forward a trace-route
message to a remote queue manager:
1. Determine whether the remote queue manager is capable of supporting trace-route messaging.
v If the remote queue manager is capable of supporting trace-route messaging, the algorithm
continues to step 4.
v If the remote queue manager is not capable of supporting trace-route messaging, the
algorithm continues to step 2
2. Determine whether the Deliver parameter from the TraceRoute group contains any
unrecognized delivery options in the MQROUTE_DELIVER_REJ_UNSUP_MASK bit mask.
v If any unrecognized delivery options are found, the trace-route message is rejected with
feedback MQFB_UNSUPPORTED_DELIVERY.
v If no unrecognized delivery options are found, the algorithm continues to step 3.
3. Determine the value of the parameter Deliver from the TraceRoute PCF group in the trace-route
message.
v If Deliver is specified as MQROUTE_DELIVER_YES, the trace-route message is forwarded to
the remote queue manager.
v If Deliver is specified as MQROUTE_DELIVER_NO, the algorithm continues to step 4.
4. Determine whether the Forward parameter from the TraceRoute group contains any
unrecognized forwarding options in the MQROUTE_FORWARDING_REJ_UNSUP_MASK bit
mask.
v If any unrecognized forwarding options are found, the trace-route message is rejected with
feedback MQFB_UNSUPPORTED_FORWARDING.
v If no unrecognized forwarding options are found, the algorithm continues to step 5.
5. Determine the value of the parameter Forward from the TraceRoute PCF group in the
trace-route message.
v If Forward is specified as MQROUTE_FORWARD_IF_SUPPORTED, the trace-route message
is rejected with feedback MQFB_NOT_FORWARDED.
v If Forward is specified as MQROUTE_FORWARD_ALL, trace-route message can be
forwarded to the remote queue manager.
Deliver Specifies the action to be taken if the trace-route message reaches its intended destination.
User-written applications must check this attribute before placing a trace-route message on its
target queue. The value can be:
MQROUTE_DELIVER_YES
On arrival, the trace-route message is put on the target queue. Any application
performing a get operation on the target queue can retrieve the trace-route message.
MQROUTE_DELIVER_NO
On arrival, the trace-route message is not delivered to the target queue. The message is
processed according to its report options.
540
Procedure
1. Select or define a queue manager as the single node
2. On the single node, select or define a queue for use as the common queue
3. On all queue managers that forward trace-route reply messages to the common queue, redefine the
local system queue SYSTEM.ADMIN.TRACE.ROUTE.QUEUE as a remote queue definition
a. Specify the name of the single node as the remote queue manager name
b. Specify the name of the common queue as the remote queue name
541
542
Identifier
MQGACF_VALUE_NAMING.
Data type
MQCFGR
Parameters in group
ParameterName
ParameterValue
ParameterName
Table 45. Parameter name
Description
Identifier
MQCA_VALUE_NAME.
Data type
MQCFST
Included in PCF
group:
GroupName.
Value:
ParameterValue
Table 46. Parameter value
Description
Identifier:
Data type:
Included in PCF
group:
GroupName.
Value:
543
Example 1:
Additional activity information is recorded by a user application in a format where the parameter
identifier is not recognized by the WebSphere MQ display route application.
1. The WebSphere MQ display route application is used to generate and put a trace-route message into a
queue manager network. The necessary options are set to request the following:
v Activity information is accumulated in the message data of the trace-route message.
v On arrival at the target queue the trace-route message is discarded, and a trace-route reply message
is generated and delivered to a specified reply-to queue.
v On receipt of the trace-route reply message, the WebSphere MQ display route application displays
the accumulated activity information.
The trace-route message is put into the queue manager network.
2. As the trace-route message is routed through the queue manager network a user application, that is
enabled for trace-route messaging, performs a low detail activity on behalf of the message. In addition
to writing the standard activity information to the trace-route message, the user application writes the
following PCF parameter to the end of the Activity group:
ColorValue
Identifier
65536
Data type
MQCFST
Value 'Red'
This additional PCF parameter gives further information about the activity that was performed,
however it is written in a format where the parameter identifier is not recognized by the WebSphere
MQ display route application.
3. The trace-route messages reaches the target queue and a trace-route reply message is returned to the
WebSphere MQ display route application. The additional activity information is displayed as follows:
65536: Red
The WebSphere MQ display route application does not recognize the parameter identifier of the PCF
parameter and displays it as a numeric value. The context of the additional information is not clear.
For an example of when the WebSphere MQ display route application does recognize the parameter
identifier of the PCF parameter, see Example 2.
Example 2:
Additional activity information is recorded by a user application in a format where the parameter
identifier is recognized by the WebSphere MQ display route application.
1. TheWebSphere MQ display route application is used to generate and put a trace-route message into a
queue manager network in the same fashion as in Example 1.
2. As the trace-route message is routed through the queue manager network a user application, that is
enabled for trace-route messaging, performs a low detail activity on behalf of the message. In addition
to writing the standard activity information to the trace-route message, the user application writes the
following PCF parameters to the end of the Activity group:
ColorInfo
544
Identifier:
MQGACF_VALUE_NAMING.
Data type:
MQCFGR.
Parameters in group:
ColorName
ColorValue
ColorName
Table 48. Color name
Description
Identifier:
MQCA_VALUE_NAME.
Data type:
MQCFST.
Included in PCF
group:
ColorInfo.
Value:
'Color'
ColorValue
Table 49.
Description
Identifier:
65536.
Data type:
MQCFST.
Included in PCF
group:
ColorInfo.
Value:
'Red'
These additional PCF parameters gives further information about the activity that was performed.
These PCF parameters are written in a format where the parameter identifier is recognized by the
WebSphere MQ display route application.
3. The trace-route messages reaches the target queue and a trace-route reply message is returned to the
WebSphere MQ display route application. The additional activity information is displayed as follows:
Color: Red
The WebSphere MQ display route application recognizes that the parameter identifier of the PCF
structure containing the value of the additional activity information has a corresponding name. The
corresponding name is displayed instead of the numeric value.
545
546
no
The generated trace-route message inherits its persistence value from the destination specified
by -q TargetQName or -ts TargetTopicString. (MQPER_PERSISTENCE_AS_Q_DEF).
A trace-route reply message, or any report messages, returned will share the same persistence value
as the original trace-route message.
If Persistence is specified as yes, you must specify the parameter -rq ReplyToQ. The reply-to queue
must not resolve to a temporary dynamic queue.
Monitoring and performance
547
If you do not specify this parameter, the generated trace-route message is not persistent.
-p Priority
Specifies the priority of the trace-route message. The value of Priority is either greater than or equal
to 0, or MQPRI_PRIORITY_AS_Q_DEF. MQPRI_PRIORITY_AS_Q_DEF specifies that the priority
value is taken from the destination specified by -q TargetQName or -ts TargetTopicString.
If you do not specify this parameter, the priority value is taken from the destination specified by -q
TargetQName or -ts TargetTopicString.
-xs Expiry
Specifies the expiry time for the trace-route message, in seconds.
If you do not specify this parameter, the expiry time is specified as 60 seconds.
-ro none | ReportOption
none
ReportOption
Specifies report options for the trace-route message. Multiple report options can be specified
using a comma as a separator. Possible values for ReportOption are:
activity
The report option MQRO_ACTIVITY is set.
coa
cod
exception
The report option MQRO_EXCEPTION_WITH_FULL_DATA is set.
expiration
The report option MQRO_EXPIRATION_WITH_FULL_DATA is set.
discard
The report option MQRO_DISCARD_MSG is set.
If neither -ro ReportOption nor -ro none are specified, then the MQRO_ACTIVITY and
MQRO_DISCARD_MSG report options are specified.
The WebSphere MQ display route application does not allow you to add user data to the trace-route
message. If you require user data to be added to the trace-route message you must generate the
trace-route message manually.
Recorded activity information:
Use this page to specify the method used to return recorded activity information, which you can then use
to determine the route that a trace-route message has taken
Recorded activity information can be returned as follows:
v In activity reports
v In a trace-route reply message
v In the trace-route message itself (having been put on the target queue)
When using dspmqrte, the method used to return recorded activity information is determined using the
following parameters:
The activity report option, specified using -ro
Specifies that activity information is returned using activity reports. By default activity recording is
enabled.
548
-ac -ar
Specifies that activity information is accumulated in the trace-route message, and that a trace-route
reply message is to be generated.
-ac
Specifies that activity information is to be accumulated within the trace-route message.
If you do not specify this parameter, activity information is not accumulated within the
trace-route message.
-ar
Requests that a trace-route reply message containing all accumulated activity information is
generated in the following circumstances:
v The trace-route message is discarded by a WebSphere MQ queue manager.
v The trace-route message is put to a local queue (target queue or dead-letter queue) by a
WebSphere MQ queue manager.
v The number of activities performed on the trace-route message exceeds the value of specified
in -s Activities.
-ac -d yes
Specifies that activity information is accumulated in the trace-route message, and that on arrival, the
trace-route message will be put on the target queue.
-ac
Specifies that activity information is to be accumulated within the trace-route message.
If you do not specify this parameter, activity information is not accumulated within the
trace-route message.
-d yes
On arrival, the trace-route message is put to the target queue, even if the queue manager does
not support trace-route messaging.
If you do not specify this parameter, the trace-route message is not put to the target queue.
The trace-route message can then be retrieved from the target queue, and the recorded activity
information acquired.
You can combine these methods as required.
Additionally, the detail level of the recorded activity information can be specified using the following
parameter:
-t Detail
Specifies the activities that are recorded. The possible values for Detail are:
low
medium
549
Activities specified in low are recorded. Additionally, publish activities and activities performed by MCAs are
recorded.
high
Activities specified in low, and medium are recorded. MCAs do not expose any further activity information at this
level of detail. This option is available to user-defined applications that are to expose further activity information
only. For example, if a user-defined application determines the route a message takes by considering certain message
characteristics, the routing logic could be included with this level of detail.
If you do not specify this parameter, medium level activities are recorded.
By default the WebSphere MQ display route application uses a temporary dynamic queue to store the
returned messages. When the WebSphere MQ display route application ends, the temporary dynamic
queue is closed, and any messages are purged. If the returned messages are required beyond the current
execution of the WebSphere MQ display route application ends, then a permanent queue must be
specified using the following parameters:
-rq ReplyToQ
Specifies the name of the reply-to queue that all responses to the trace-route message are sent to. If
the trace-route message is persistent, or if the -n parameter is specified, a reply-to queue must be
specified that is not a temporary dynamic queue.
If you do not specify this parameter then a dynamic reply-to queue is created using the system
default model queue, SYSTEM.DEFAULT.MODEL.QUEUE.
-rqm ReplyToQMgr
Specifies the name of the queue manager where the reply-to queue resides. The name can contain up
to 48 characters.
If you do not specify this parameter, the queue manager to which the WebSphere MQ display route
application is connected is used as the reply-to queue manager.
How the trace-route message is handled:
Use this page to control how a trace-route message is handled as it is routed through a queue manager
network.
The following parameters can restrict where the trace-route message can be routed in the queue manager
network:
-d Deliver
Specifies whether the trace-route message is to be delivered to the target queue on arrival. Possible
values for Deliver are:
yes
On arrival, the trace-route message is put to the target queue, even if the
queue manager does not support trace-route messaging.
no
If you do not specify this parameter, the trace-route message is not put to the target queue.
-f Forward
Specifies the type of queue manager that the trace-route message can be forwarded to. For details of
the algorithm that queue managers use to determine whether to forward a message to a remote
queue manager, refer toThe TraceRoute PCF group on page 538. The possible values for Forward
are:
all
550
Warning: If forwarded to a WebSphere MQ queue manager earlier than Version 6.0, the
trace-route message will not be recognized and can be delivered to a local queue despite the
value of the -d Deliver parameter.
supported
The trace-route message is only forwarded to a queue manager that will honor the Deliver
parameter from the TraceRoute PCF group
If you do not specify this parameter, the trace-route message will only be forwarded to a queue
manager that will honor the Deliver parameter.
The following parameters can prevent a trace-route message from remaining in a queue manager network
indefinitely:
-s Activities
Specifies the maximum number of recorded activities that can be performed on behalf of the
trace-route message before it is discarded. This prevents the trace-route message from being
forwarded indefinitely if caught in an infinite loop. The value of Activities is either greater than or
equal to 1, or MQROUTE_UNLIMITED_ACTIVITIES. MQROUTE_UNLIMITED_ACTIVITIES
specifies that an unlimited number of activities can be performed on behalf of the trace-route
message.
If you do not specify this parameter, an unlimited number of activities can be performed on behalf of
the trace-route message.
-xs Expiry
Specifies the expiry time for the trace-route message, in seconds.
If you do not specify this parameter, the expiry time is specified as 60 seconds.
-xp PassExpiry
Specifies whether the expiry time from the trace-route message is passed on to a trace-route reply
message. Possible values for PassExpiry are:
yes
no
551
552
all
none
No information is displayed.
outline DisplayOption
Specifies display options for the trace-route message. Multiple display options can be
specified using a comma as a separator.
If
v
v
v
553
QM1
QM2
AR
DSPMQRTE
QLOCAL:
ACTIV.REPLY.Q
TR Put
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
A
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
XMITQ:
QM1
QREMOTE:
QM1
QLOCAL:
TARGET.Q
v The ACTIVREC attribute of each queue manager (QM1 and QM2) is set to MSG.
v The following command is issued:
dspmqrte -m QM1 -q TARG.AT.QM2 -rq ACTIV.REPLY.Q
QM1 is the name of the queue manager to which the WebSphere MQ display route application
connects, TARG.AT.QM2 is the name of the target queue, and ACTIV.REPLY.Q is the name of the
queue to which it is requested that all responses to the trace-route message are sent.
Default values are assumed for all options that are not specified, but note in particular the -f option
(the trace-route message is forwarded only to a queue manager that honors the Deliver parameter of
the TraceRoute PCF group), the -d option (on arrival, the trace-route message is not put on the target
queue), the -ro option (MQRO_ACTIVITY and MQRO_DISCARD_MSG report options are specified),
and the -t option (medium detail level activity is recorded).
v DSPMQRTE generates the trace-route message and puts it on the remote queue TARG.AT.QM2.
v DSPMQRTE then looks at the value of the ACTIVREC attribute of queue manager QM1. The value is
MSG, therefore DSPMQRTE generates an activity report and puts it on the reply queue
ACTIV.REPLY.Q.
554
QM1
DSPMQRTE
QM2
QLOCAL:
AR
ACTIV.REPLY.Q
Get
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
A
TR Send
QREMOTE: XMITQ:
QM2
TARG.AT.QM2
XMITQ:
QM1
QREMOTE:
QM1
QLOCAL:
TARGET.Q
v The sending message channel agent (MCA) gets the trace-route message from the transmission queue.
The message is a trace-route message, therefore the MCA begins to record the activity information.
v The ACTIVREC attribute of the queue manager (QM1) is MSG, and the MQRO_ACTIVITY option is
specified in the Report field of the message descriptor, therefore the MCA will later generate an activity
report. The RecordedActivities parameter value in the TraceRoute PCF group is incremented by 1.
v The MCA checks that the MaxActivities value in the TraceRoute PCF group has not been exceeded.
v Before the message is forwarded to QM2 the MCA follows the algorithm that is described in
Forwarding (steps 1 on page 540, 4 on page 540, and 5 on page 540) and the MCA chooses to send the
message.
v The MCA then generates an activity report and puts it on the reply queue (ACTIV.REPLY.Q).
555
QM1
DSPMQRTE
QM2
QLOCAL:
ACTIV.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
Receive A TR
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
XMITQ:
QM1
QREMOTE:
QM1
AR
Discard
QLOCAL:
TARGET.Q
v The receiving MCA receives the trace-route message from the channel. The message is a trace-route
message, therefore the MCA begins to record the information about the activity.
v If the queue manager that the trace-route message has come from is Version 5.3.1 or earlier, the MCA
increments the DiscontinuityCount parameter of the TraceRoute PCF by 1. This is not the case here.
v The ACTIVREC attribute of the queue manager (QM2) is MSG, and the MQRO_ACTIVITY option is
specified, therefore the MCA will generate an activity report. The RecordedActivities parameter value
is incremented by 1.
v The target queue is a local queue, therefore the message is discarded with feedback
MQFB_NOT_DELIVERED, in accordance with the Deliver parameter value in the TraceRoute PCF
group.
v The MCA then generates the final activity report and puts it on the reply queue. This resolves to the
transmission queue that is associated with queue manager QM1 and the activity report is returned to
queue manager QM1 (ACTIV.REPLY.Q).
556
QM1
QM2
AR
DSPMQRTE
QLOCAL:
ACTIV.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
A
QREMOTE: XMITQ:
QM2
TARG.AT.QM2
XMITQ:
QM1
QREMOTE:
QM1
QLOCAL:
TARGET.Q
AR
v Meanwhile, DSPMQRTE has been continually performing MQGETs on the reply queue
(ACTIV.REPLY.Q), waiting for activity reports. It will wait for up to 120 seconds (60 seconds longer
than the expiry time of the trace-route message) since -w was not specified when DSPMQRTE was
started.
v DSPMQRTE gets the 3 activity reports off the reply queue.
v The activity reports are ordered using the RecordedActivities, UnrecordedActivities, and
DiscontinuityCount parameters in the TraceRoute PCF group for each of the activities. The only value
that is non-zero in this example is RecordedActivities, therefore this is the only parameter that is
actually used.
v The program ends as soon as the discard operation is displayed. Even though the final operation was a
discard, it is treated as though a put took place because the feedback is MQFB_NOT_DELIVERED.
The output that is displayed follows:
AMQ8653: DSPMQRTE command started with options -m QM1 -q TARG.AT.QM2
-rq ACTIV.REPLY.Q.
AMQ8659: DSPMQRTE command successfully put a message on queue QM2,
queue manager QM1.
AMQ8674: DSPMQRTE command is now waiting for information to display.
AMQ8666: Queue QM2 on queue manager QM1.
AMQ8666: Queue TARGET.Q on queue manager QM2.
AMQ8652: DSPMQRTE command has finished.
557
QM1
DSPMQRTE
QM2
QLOCAL:
TR.REPLY.Q
TR Put
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
A
QREMOTE: XMITQ:
QM2
TARG.AT.QM2
XMITQ:
QM1
QREMOTE:
QM1
QLOCAL:
TARGET.Q
v The ROUTEREC attribute of each queue manager (QM1 and QM2) is set to MSG.
v The following command is issued:
dspmqrte -m QM1 -q TARG.AT.QM2 -rq TR.REPLY.Q -ac -ar -ro discard
QM1 is the name of the queue manager to which the WebSphere MQ display route application
connects, TARG.AT.QM2 is the name of the target queue, and ACTIV.REPLY.Q is the name of the
queue to which it is requested that all responses to the trace-route message are sent. The -ac option
specifies that activity information is accumulated in the trace-route message, the -ar option specifies
that all accumulated activity is sent to the reply-to queue that is specified by the -rq option (that is,
TR.REPLY.Q). The -ro option specifies that report option MQRO_DISCARD_MSG is set which means
that activity reports are not generated in this example.
v DSPMQRTE accumulates activity information in the trace-route message before the message is put on
the target route. The queue manager attribute ROUTEREC must not be DISABLED for this to happen.
558
QM1
QM2
M
C
A
QLOCAL:
TR.REPLY.Q
DSPMQRTE
QM2.TO.QM1 M
C
A
M QM1.TO.QM2
C
A
TR Send
Get
XMITQ:
QM1
QREMOTE:
QM1
M
C
A
QREMOTE: XMITQ:
QM2
TARG.AT.QM2
QLOCAL:
TARGET.Q
v The message is a trace-route message, therefore the sending MCA begins to record information about
the activity.
v The queue manager attribute ROUTEREC on QM1 is not DISABLED, therefore the MCA accumulates
the activity information within the message, before the message is forwarded to queue manager QM2.
QM1
DSPMQRTE
QM2
QLOCAL:
TR.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
Receive A
QREMOTE: XMITQ:
QM2
TARG.AT.QM2
XMITQ:
QM1
QREMOTE:
QM1
RM
TR
Discard
QLOCAL:
TARGET.Q
v The message is a trace-route message, therefore the receiving MCA begins to record information about
the activity.
v The queue manager attribute ROUTEREC on QM2 is not DISABLED, therefore the MCA accumulates
the information within the message.
Monitoring and performance
559
v The target queue is a local queue, therefore the message is discarded with feedback
MQFB_NOT_DELIVERED, in accordance with the Deliver parameter value in the TraceRoute PCF
group.
v This is the last activity that will take place on the message, and because the queue manager attribute
ROUTEREC on QM1 is not DISABLED, the MCA generates a trace-route reply message in accordance
with the Accumulate value. The value of ROUTEREC is MSG, therefore the reply message is put on the
reply queue. The reply message contains all the accumulated activity information from the trace-route
message.
QM1
QM2
RM
DSPMQRTE
QLOCAL:
TR.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2 M
C
A
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
XMITQ:
QM1
QREMOTE:
QM1
QLOCAL:
TARGET.Q
v Meanwhile DSPMQRTE is waiting for the trace-route reply message to return to the reply queue. When
it returns, DSPMQRTE parses each activity that it contains and prints it out. The final operation is a
discard operation. DSPMQRTE ends after it has been printed.
The output that is displayed follows:
AMQ8653: DSPMQRTE command started with options -m QM1 -q TARG.AT.QM2 -rq
TR.REPLY.Q.
AMQ8659: DSPMQRTE command successfully put a message on queue QM2, queue
manager QM1.
AMQ8674: DSPMQRTE command is now waiting for information to display.
AMQ8666: Queue QM2 on queue manager QM1.
AMQ8666: Queue TARGET.Q on queue manager QM2.
AMQ8652: DSPMQRTE command has finished.
560
QM1
DSPMQRTE
QM2
QLOCAL:
ACTIV.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2
XMITQ:
QM1
QREMOTE:
QM1
M
AR
C
Receive A TR
Discard
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
QLOCAL:
TARGET.Q
QLOCAL:
SYSTEM.
ADMIN.
ACTIVITY.
QUEUE
v The message is a trace-route message, therefore the receiving MCA begins to record information about
the activity.
v The value of the ACTIVREC queue manager attribute on QM2 is now QUEUE, therefore the MCA
generates an activity report, but puts it on the system queue (SYSTEM.ADMIN.ACTIVITY.QUEUE) and
not on the reply queue (ACTIV.REPLY.Q).
QM1
QM2
QLOCAL:
ACTIVE.REPLY.Q
M
C
A
QM2.TO.QM1 M
C
A
M
C
A
QM1.TO.QM2
M
C
A
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
XMITQ: QREMOTE:
QM1
QM1
DSPMQRTE
AR
QLOCAL: QLOCAL:
TARGET.Q SYSTEM.
ADMIN.
ACTIVITY.
QUEUE
561
v Meanwhile DSPMQRTE has been waiting for activity reports to arrive on ACTIV.REPLY.Q. Only two
arrive. DSPMQRTE continues waiting for 120 seconds because it seems that the route is not yet
complete.
The output that is displayed follows:
AMQ8653: DSPMQRTE command started with options -m QM1 -q TARG.AT.QM2 -rq
ACTIV.REPLY.Q -v outline identifiers.
AMQ8659: DSPMQRTE command successfully put a message on queue QM2, queue
manager QM1.
AMQ8674: DSPMQRTE command is now waiting for information to display.
-------------------------------------------------------------------------------Activity:
ApplName: cann\output\bin\dspmqrte.exe
Operation:
OperationType: Put
Message:
MQMD:
MsgId: X414D51204C4152474551202020202020A3C9154220001502
CorrelId: X414D51204C4152474551202020202020A3C9154220001503
QMgrName: QM1
QName: TARG.AT.QM2
ResolvedQName: QM2
RemoteQName: TARGET.Q
RemoteQMgrName: QM2
-------------------------------------------------------------------------------Activity:
ApplName: cann\output\bin\runmqchl.EXE
Operation:
OperationType: Get
Message:
MQMD:
MsgId: X414D51204C4152474551202020202020A3C9154220001505
CorrelId: X414D51204C4152474551202020202020A3C9154220001502
EmbeddedMQMD:
MsgId: X414D51204C4152474551202020202020A3C9154220001502
CorrelId: X414D51204C4152474551202020202020A3C9154220001503
QMgrName: QM1
QName: QM2
ResolvedQName: QM2
Operation:
OperationType: Send
Message:
MQMD:
MsgId: X414D51204C4152474551202020202020A3C9154220001502
CorrelId: X414D51204C4152474551202020202020A3C9154220001503
QMgrName: QM1
RemoteQMgrName: QM2
ChannelName: QM1.TO.QM2
ChannelType: Sender
XmitQName: QM2
562
v The last operation that DSPMQRTE observed was a Send, therefore the channel is running. Now we
must work out why we did not receive any more activity reports from queue manager QM2 (as
identified in RemoteQMgrName).
v To check whether there is any activity information on the system queue, start DSPMQRTE on QM2 to
try and collect more activity reports. Use the following command to start DSPMQRTE:
dspmqrte -m QM2 -q SYSTEM.ADMIN.ACTIVITY.QUEUE
-i 414D51204C4152474551202020202020A3C9154220001502 -v outline
v This activity report indicates that the route information is now complete. No problem occurred.
v Just because route information is unavailable, or because DSPMQRTE cannot display all of the route,
this does not mean that the message was not delivered. For example, the queue manager attributes of
different queue managers might be different, or a reply queue might not be defined to get the response
back.
563
QM1
QM2
M
C
A
AR
DSPMQRTE
QLOCAL:
ACTIV.REPLY.Q
QM2.TO.QM1 M
C
A
XMITQ:
QM1
QREMOTE:
QM1
TR Put
QREMOTE: XMITQ:
TARG.AT.QM2
QM2
QLOCAL:
TARGET.Q
564
565
MQMD structure
Structure identifier
Structure version
Report options
Message type
Expiration time
Feedback
Encoding
Coded character set ID
Message format
Priority
Persistence
Message identifier
Correlation identifier
Backout count
Reply-to queue
Reply-to queue manager
User identifier
Accounting token
Application identity data
Application type
Application name
Put date
Put time
Application origin data
Group identifier
Message sequence number
Offset
Message flags
Original length
Structure identifier
Structure version
Structure length
Encoding
Coded character set ID
Message format
Flags
PCF header (MQCFH)
Structure type
Structure length
Structure version
Command identifier
Message sequence number
Control options
Completion code
Reason code
Parameter count
2 3 4 5 7
Notes:
1. Returned for Get and Browse operations.
2.
3.
4.
5.
6.
Returned
Returned
Returned
Returned
Returned
for
for
for
for
for
Discard operations.
Put, Put Reply, and Put Report operations.
Receive operations.
Send operations.
trace-route messages.
7. Not returned for Put operations to a topic, contained within Publish activities.
8. Not returned for Excluded Publish operations. For Publish and Discarded Publish operations,
returned containing a subset of parameters.
9. Returned for Publish, Discarded Publish, and Excluded Publish operations.
10. Returned for Discarded Publish and Excluded Publish operations.
566
567
Feedback
Description:
Data type:
Value:
Encoding
Description:
Data type:
Value:
CodedCharSetId
Description:
Data type:
Value:
Format
Description:
Data type:
Value:
Priority
Description:
Data type:
Value:
Persistence
Description:
Data type:
Value:
MsgId
Description:
Data type:
Values:
Message identifier.
MQBYTE24.
If the Report field in the original message descriptor is specified as MQRO_PASS_MSG_ID,
the message identifier from the original message is used.
Otherwise, a unique value will be generated by the queue manager.
CorrelId
568
Description:
Data type:
Value:
Correlation identifier.
MQBYTE24.
If the Report field in the original message descriptor is specified as
MQRO_PASS_CORREL_ID, the correlation identifier from the original message is used.
Otherwise, the message identifier is copied from the original message.
BackoutCount
Description:
Data type:
Value:
Backout counter.
MQLONG.
0.
ReplyToQ
Description:
Data type:
Values:
ReplyToQMgr
Description:
Data type:
Value:
UserIdentifier
Description:
Data type:
Value:
The user identifier of the application that generated the report message.
MQCHAR12.
Copied from the original message descriptor.
AccountingToken
Description:
Data type:
Value:
Accounting token that allows an application to charge for work done as a result of the
message.
MQBYTE32.
Copied from the original message descriptor.
ApplIdentityData
Description:
Data type:
Values:
PutApplType
569
Description:
Data type:
Value:
PutApplName
Description:
Data type:
Value:
PutDate
Description:
Data type:
Value:
PutTime
Description:
Data type:
Value:
ApplOriginData
Description:
Data type:
Value:
Identifies to which message group or logical message the physical message belongs.
MQBYTE24.
Copied from the original message descriptor.
MsgSeqNumber
Description:
Data type:
Value:
Offset
570
Description:
Data type:
Value:
MsgFlags
Description:
Data type:
Value:
Message flags that specify attributes of the message or control its processing.
MQLONG.
Copied from the original message descriptor.
OriginalLength
Description:
Data type:
Value:
Structure identifier.
MQCHAR4.
MQEPH_STRUC_ID.
Version
Description:
Data type:
Values:
StrucLength
Description:
Data type:
Value:
Structure length.
MQLONG.
Total length of the structure including the PCF parameter structures that follow it.
Encoding
Description:
Data type:
Value:
Numeric encoding of the message data that follows the last PCF parameter structure.
MQLONG.
If any data from the original application message data is included in the report message, the
value will be copied from the Encoding field of the original message descriptor.
Otherwise, 0.
CodedCharSetId
571
Description:
Data type:
Value:
Character set identifier of the message data that follows the last PCF parameter structure.
MQLONG.
If any data from the original application message data is included in the report message, the
value will be copied from the CodedCharSetId field of the original message descriptor.
Otherwise, MQCCSI_UNDEFINED.
Format
Description:
Data type:
Value:
Format name of message data that follows the last PCF parameter structure.
MQCHAR8.
If any data from the original application message data is included in the report message, the
value will be copied from the Format field of the original message descriptor.
Otherwise, MQFMT_NONE.
Flags
Description:
Data type:
Value:
PCFHeader
Description:
Data type:
Value:
StrucLength
Description:
Data type:
Value:
Structure length.
MQLONG.
MQCFH_STRUC_LENGTH
Length in bytes of MQCFH structure.
Version
572
Description:
Data type:
Values:
Command
Description:
Data type:
Values:
MsgSeqNumber
Description:
Data type:
Values:
Message sequence number. This is the sequence number of the message within a group of
related messages.
MQLONG.
1.
Control
Description:
Data type:
Values:
Control options.
MQLONG.
MQCFC_LAST.
CompCode
Description:
Data type:
Values:
Completion code.
MQLONG.
MQCC_OK.
Reason
Description:
Data type:
Values:
ParameterCount
Description:
Data type:
Values:
Count of parameter structures. This is the number of parameter structures that follow the
MQCFH structure. A group structure (MQCFGR), and its included parameter structures, are
counted as one structure only.
MQLONG.
1 or greater.
573
Returned:
TraceRoute
Always.
ActivityApplName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
ActivityApplType
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
ActivityDescription
574
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Operation
Description:
Identifier:
Data type:
Included in PCF
group:
Parameters in PCF
group:
Returned:
Note: Additional parameters are returned in this group depending on the operation type.
These additional parameters are described as Operation-specific activity report message data.
One Operation PCF group per operation in the activity.
OperationType
Description:
Identifier:
Data type:
Included in PCF
group:
Values:
Returned:
OperationDate
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
OperationTime
575
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Message
Description:
Identifier:
Data type:
Included in PCF
group:
Parameters in group:
Returned:
EmbeddedMQMD
Always, except for Excluded Publish operations.
MsgLength
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Length of the message that caused the activity, before the activity occurred.
MQIACF_MSG_LENGTH.
MQCFIN.
Message.
Always.
MQMD
Description:
Identifier:
Data type:
Included in PCF
group:
576
Grouped parameters related to the message descriptor of the message that caused the
activity.
MQGACF_MQMD.
MQCFGR.
Message.
Parameters in group:
StrucId
Version
Report
MsgType
Expiry
Feedback
Encoding
CodedCharSetId
Format
Priority
Persistence
MsgId
CorrelId
BackoutCount
ReplyToQ
ReplyToQMgr
UserIdentifier
AccountingToken
ApplIdentityData
PutApplType
PutApplName
PutDate
PutTime
ApplOriginData
GroupId
MsgSeqNumber
Offset
MsgFlags
Returned:
OriginalLength
Always, except for Excluded Publish operations.
EmbeddedMQMD
Description:
Identifier:
Data type:
Included in PCF
group:
577
Parameters in group:
StrucId
Version
Report
MsgType
Expiry
Feedback
Encoding
CodedCharSetId
Format
Priority
Persistence
MsgId
CorrelId
BackoutCount
ReplyToQ
ReplyToQMgr
UserIdentifier
AccountingToken
ApplIdentityData
PutApplType
PutApplName
PutDate
PutTime
ApplOriginData
GroupId
MsgSeqNumber
Offset
MsgFlags
Returned:
OriginalLength
For Get operations where the queue resolves to a transmission queue.
StrucId
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Structure identifier
MQCACF_STRUC_ID.
MQCFST.
MQMD or EmbeddedMQMD.
4.
Always, except for Excluded Publish operations and in MQMD for Publish and Discarded
Publish operations.
Version
578
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Report
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
MsgType
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Expiry
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Message lifetime.
MQIACF_EXPIRY.
MQCFIN.
MQMD or EmbeddedMQMD.
Always, except for Excluded Publish operations and in MQMD for Publish and Discarded
Publish operations.
Feedback
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Encoding
579
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
CodedCharSetId
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Format
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Priority
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Message priority.
MQIACF_PRIORITY.
MQCFIN.
MQMD or EmbeddedMQMD.
Always, except for Excluded Publish operations.
Persistence
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Message persistence.
MQIACF_PERSISTENCE.
MQCFIN.
MQMD or EmbeddedMQMD.
Always, except for Excluded Publish operations.
MsgId
580
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Message identifier.
MQBACF_MSG_ID.
MQCFBS.
MQMD or EmbeddedMQMD.
MQ_MSG_ID_LENGTH.
Always, except for Excluded Publish operations.
CorrelId
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Correlation identifier.
MQBACF_CORREL_ID.
MQCFBS.
MQMD or EmbeddedMQMD.
MQ_CORREL_ID_LENGTH.
Always, except for Excluded Publish operations.
BackoutCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Backout counter.
MQIACF_BACKOUT_COUNT.
MQCFIN.
MQMD or EmbeddedMQMD.
Always, except for Excluded Publish operations and in MQMD for Publish and Discarded
Publish operations.
ReplyToQ
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
ReplyToQMgr
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
UserIdentifier
581
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
AccountingToken
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Accounting token that allows an application to charge for work done as a result of the
message.
MQBACF_ACCOUNTING_TOKEN.
MQCFBS.
MQMD or EmbeddedMQMD.
MQ_ACCOUNTING_TOKEN_LENGTH.
Always, except for Excluded Publish Operations.
ApplIdentityData
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
PutApplType
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
PutApplName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
PutDate
582
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
PutTime
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
ApplOriginData
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
GroupId
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Identifies to which message group or logical message the physical message belongs.
MQBACF_GROUP_ID.
MQCFBS.
MQMD or EmbeddedMQMD.
MQ_GROUP_ID_LENGTH.
If the Version is specified as MQMD_VERSION_2. Not returned in Excluded Publish
Operations and in MQMD for Publish and Discarded Publish Operations.
MsgSeqNumber
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Offset
583
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
MsgFlags
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Message flags that specify attributes of the message or control its processing.
MQIACF_MSG_FLAGS.
MQCFIN.
MQMD or EmbeddedMQMD.
If Version is specified as MQMD_VERSION_2. Not returned in Excluded Publish Operations
and in MQMD for Publish and Discarded Publish Operations.
OriginalLength
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
QMgrName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
QSGName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
Name of the queue-sharing group to which the queue manager where the activity was
performed belongs.
MQCA_QSG_NAME.
MQCFST.
Operation.
MQ_QSG_NAME_LENGTH
If the activity was performed on a WebSphere MQ for z/OS queue manager.
TraceRoute
584
Description:
Identifier:
Data type:
Contained in PCF
group:
Parameters in group:
Returned:
Deliver
If the activity was performed on behalf of the trace-route message.
The values of the parameters in the TraceRoute PCF group are those from the trace-route message
at the time the activity report was generated.
ResolvedQName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
585
Discard (MQOPER_DISCARD):
The additional activity report message data parameters that are returned in the PCF group Operation for
the Discard (MQOPER_DISCARD) operation type (a message was discarded).
Feedback
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
QName
Description:
Identifier:
Data type:
Maximum length:
Included in PCF
group:
Returned:
RemoteQMgrName
Description:
Identifier:
Data type:
Maximum length:
Included in PCF
group:
Returned:
The name of the queue manager to which the message was destined.
MQCA_REMOTE_Q_MGR_NAME.
MQCFST.
MQ_Q_MGR_NAME_LENGTH
Operation.
If the value of Feedback is MQFB_NOT_FORWARDED.
SubLevel
586
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Feedback
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
587
ResolvedQName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
RemoteQName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
The name of the opened queue, as it is known on the remote queue manager.
MQCA_REMOTE_Q_NAME.
MQCFST.
Operation.
MQ_Q_NAME_LENGTH
If the opened queue is a remote queue. Not returned if the Put operation is to a topic,
contained within a publish activity.
RemoteQMgrName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
The name of the remote queue manager on which the remote queue is defined.
MQCA_REMOTE_Q_MGR_NAME.
MQCFST.
Operation.
MQ_Q_MGR_NAME_LENGTH
If the opened queue is a remote queue. Not returned if the Put operation is to a topic,
contained within a publish activity.
TopicString
588
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Feedback
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The reason for the message being put on the dead-letter queue.
MQIACF_FEEDBACK.
MQCFIN.
Operation.
If the message was put on the dead-letter queue.
Receive (MQOPER_RECEIVE):
The additional activity report message data parameters that are returned in the PCF group Operation for
the Receive (MQOPER_RECEIVE) operation type (a message was received on a channel).
ChannelName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
ChannelType
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
RemoteQMgrName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
The name of the queue manager from which the message was received.
MQCA_REMOTE_Q_MGR_NAME.
MQCFST.
Operation.
MQ_Q_MGR_NAME_LENGTH
Always.
589
Send (MQOPER_SEND):
The additional activity report message data parameters that are returned in the PCF group Operation for
the Send (MQOPER_SEND) operation type (a message was sent on a channel).
ChannelName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
ChannelType
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
XmitQName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
RemoteQMgrName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
The name of the remote queue manager to which the message was sent.
MQCA_REMOTE_Q_MGR_NAME.
MQCFST.
Operation.
MQ_Q_MGR_NAME_LENGTH
Always.
590
591
MQMD structure
Structure identifier
Structure version
Report options
Message type
Expiration time
Feedback
Encoding
Coded character set ID
Message format
Priority
Persistence
Message identifier
Correlation identifier
Backout count
Reply-to queue
Reply-to queue manager
User identifier
Accounting token
Application identity data
Application type
Application name
Put date
Put time
Application origin data
Group identifier
Message sequence number
Offset
Message flags
Original length
Structure identifier
Structure version
Structure length
Encoding
Coded character set ID
Message format
Flags
PCF header (MQCFH)
Structure type
Structure length
Structure version
Command identifier
Message sequence number
Control options
Completion code
Reason code
Parameter count
Structure identifier.
MQCHAR4.
MQMD_STRUC_ID.
Version
Description:
Data type:
Values:
Report
592
Description:
Data type:
Value:
MsgType
Description:
Data type:
Value:
Type of message.
MQLONG.
If the Accumulate parameter in the TraceRoute group is specified as
MQROUTE_ACCUMULATE_AND_REPLY, then message type is MQMT_REQUEST
Otherwise:
MQMT_DATAGRAM.
Expiry
Description:
Data type:
Value:
Message lifetime.
MQLONG.
Set according to requirements. This parameter can be used to ensure trace-route messages
are not left in a queue manager network indefinitely.
Feedback
Description:
Data type:
Value:
Encoding
Description:
Data type:
Value:
CodedCharSetId
Description:
Data type:
Value:
Format
593
Description:
Data type:
Value:
Priority
Description:
Data type:
Value:
Message priority.
MQLONG.
Set according to requirements.
Persistence
Description:
Data type:
Value:
Message persistence.
MQLONG.
Set according to requirements.
MsgId
Description:
Data type:
Value:
Message identifier.
MQBYTE24.
Set according to requirements.
CorrelId
Description:
Data type:
Value:
Correlation identifier.
MQBYTE24.
Set according to requirements.
BackoutCount
Description:
Data type:
Value:
Backout counter.
MQLONG.
0.
ReplyToQ
Description:
Data type:
Values:
ReplyToQMgr
594
Description:
Data type:
Value:
UserIdentifier
Description:
Data type:
Value:
AccountingToken
Description:
Data type:
Value:
Accounting token that allows an application to charge for work done as a result of the
message.
MQBYTE32.
Set as normal.
ApplIdentityData
Description:
Data type:
Values:
PutApplType
Description:
Data type:
Value:
PutApplName
Description:
Data type:
Value:
PutDate
Description:
Data type:
Value:
PutTime
Description:
Data type:
Value:
ApplOriginData
595
Description:
Data type:
Value:
Structure identifier.
MQCHAR4.
MQEPH_STRUC_ID.
Version
Description:
Data type:
Values:
StrucLength
Description:
Data type:
Value:
Structure length.
MQLONG.
Total length of the structure including the PCF parameter structures that follow it.
Encoding
Description:
Data type:
Value:
Numeric encoding of the message data that follows the last PCF parameter structure.
MQLONG.
The encoding of the message data.
CodedCharSetId
Description:
Data type:
Value:
Character set identifier of the message data that follows the last PCF parameter structure.
MQLONG.
The character set of the message data.
Format
596
Description:
Data type:
Value:
Format name of the message data that follows the last PCF parameter structure.
MQCHAR8.
The format name of the message data.
Flags
Description:
Data type:
Value:
PCFHeader
Description:
Data type:
Value:
StrucLength
Description:
Data type:
Value:
Structure length.
MQLONG.
MQCFH_STRUC_LENGTH
Length in bytes of MQCFH structure.
Version
Description:
Data type:
Values:
Command
597
Description:
Data type:
Values:
MsgSeqNumber
Description:
Data type:
Values:
Message sequence number. This is the sequence number of the message within a group of
related messages.
MQLONG.
1.
Control
Description:
Data type:
Values:
Control options.
MQLONG.
MQCFC_LAST.
CompCode
Description:
Data type:
Values:
Completion code.
MQLONG.
MQCC_OK.
Reason
Description:
Data type:
Values:
ParameterCount
Description:
Data type:
Values:
Count of parameter structures. This is the number of parameter structures that follow the
MQCFH structure. A group structure (MQCFGR), and its included parameter structures, are
counted as one structure only.
MQLONG.
1 or greater.
598
Description:
Identifier:
Data type:
Contained in PCF
group:
Parameters in group:
Detail
Description:
Identifier:
Data type:
Contained in PCF
group:
Values:
RecordedActivities
Description:
Identifier:
Data type:
Contained in PCF
group:
The number of activities that the trace-route message has caused, where information was
recorded.
MQIACF_RECORDED_ACTIVITIES.
MQCFIN.
TraceRoute.
UnrecordedActivities
599
Description:
Identifier:
Data type:
Contained in PCF
group:
The number of activities that the trace-route message has caused, where information was not
recorded.
MQIACF_UNRECORDED_ACTIVITIES.
MQCFIN.
TraceRoute.
DiscontinuityCount
Description:
Identifier:
Data type:
Contained in PCF
group:
The number of times a trace-route message has been received from a queue manager that
does not support trace-route messaging.
MQIACF_DISCONTINUITY_COUNT.
MQCFIN.
TraceRoute.
MaxActivities
Description:
Identifier:
Data type:
Contained in PCF
group:
Value:
The maximum number of activities the trace-route message can be involved in before it
stops being processed.
MQIACF_MAX_ACTIVITIES.
MQCFIN.
TraceRoute.
A positive integer
The maximum number of activities.
MQROUTE_UNLIMITED_ACTIVITIES
An unlimited number of activities.
Accumulate
Description:
Identifier:
Data type:
Contained in PCF
group:
Value:
Specifies whether activity information is accumulated within the trace-route message, and
whether a reply message containing the accumulated activity information is generated before
the trace-route message is discarded or is put on a non-transmission queue.
MQIACF_ROUTE_ACCUMULATION.
MQCFIN.
TraceRoute.
MQROUTE_ACCUMULATE_NONE
Activity information is not accumulated in the message data of the trace-route
message.
MQROUTE_ACCUMULATE_IN_MSG
Activity information is accumulated in the message data of the trace-route message.
MQROUTE_ACCUMULATE_AND_REPLY
Activity information is accumulated in the message data of the trace-route message,
and a trace-route reply message will be generated.
Forward
600
Description:
Identifier:
Data type:
Contained in PCF
group:
Value:
Specifies queue managers that the trace-route message can be forwarded to. When
determining whether to forward a message to a remote queue manager, queue managers use
the algorithm that is described in Forwarding.
MQIACF_ROUTE_FORWARDING.
MQCFIN.
TraceRoute.
MQROUTE_FORWARD_IF_SUPPORTED
The trace-route message is only forwarded to queue managers that will honor the
value of the Deliver parameter from the TraceRoute group.
MQROUTE_FORWARD_ALL
The trace-route message is forwarded to any queue manager, regardless of whether
the value of the Deliver parameter will be honored.
Deliver
Description:
Identifier:
Data type:
Contained in PCF
group:
Value:
Specifies the action to be taken if the trace-route message arrives at the destination queue
successfully.
MQIACF_ROUTE_DELIVERY.
MQCFIN.
TraceRoute.
MQROUTE_DELIVER_YES
On arrival, the trace-route message is put on the target queue. Any application
performing a destructive get on the target queue can receive the trace-route
message.
MQROUTE_DELIVER_NO
On arrival, the trace-route message is discarded.
601
Structure identifier
Structure version
Report options
Message type
Expiration time
Feedback
Encoding
Coded character set ID
Message format
Priority
Persistence
Message identifier
Correlation identifier
Backout count
Reply-to queue
Reply-to queue manager
User identifier
Accounting token
Application identity data
Application type
Application name
Put date
Put time
Application origin data
Group identifier
Message sequence number
Offset
Message flags
Original length
Activity
Activity application name
Activity application type
Activity description
Operation
Operation type
Operation date
Operation time
Message
Message length
MQMD
EmbeddedMQMD
Queue manager name
Queue sharing group name
Queue name 1 2 3
Resolved queue name 1 3
Remote queue name 3
Remote queue managername 2 3 4 5
Feedback 2
Channel name 4 5
Channel type 4 5
Transmission queue name 5
TraceRoute
Detail
Recorded activities
Unrecorded activities
Discontinuity count
Max activities
Accumulate
Deliver
Note:
1. Returned for Get and Browse operations.
2. Returned for Discard operations.
3. Returned for Put, Put Reply, and Put Report operations.
4. Returned for Receive operations.
5. Returned for Send operations.
602
Description:
Data type:
Value:
Type of message.
MQLONG.
MQMT_REPLY
Feedback
Description:
Data type:
Value:
Encoding
Description:
Data type:
Value:
CodedCharSetId
Description:
Data type:
Value:
Format
Description:
Data type:
Value:
603
Statistics messages
Statistics messages are used to record information about the activities occurring in a WebSphere
MQ system, see Statistics messages on page 608.
Accounting and statistics messages are delivered to one of two system queues. User applications can
retrieve the messages from these system queues and use the recorded information for various purposes:
v
v
v
v
v
v
v
Accounting messages
Accounting messages record information about the MQI operations performed by WebSphere MQ
applications. An accounting message is a PCF message that contains a number of PCF structures.
When an application disconnects from a queue manager, an accounting message is generated and
delivered to the system accounting queue (SYSTEM.ADMIN.ACCOUNTING.QUEUE). For long running
WebSphere MQ applications, intermediate accounting messages are generated as follows:
v When the time since the connection was established exceeds the configured interval.
v When the time since the last intermediate accounting message exceeds the configured interval.
Accounting messages are in the following categories:
MQI accounting messages
MQI accounting messages contain information relating to the number of MQI calls made using a
connection to a queue manager.
Queue accounting messages
Queue accounting messages contain information relating to the number of MQI calls made using
connections to a queue manager, grouped by queue.
Each queue accounting message can contain up to 100 records, with every record relating to an
activity performed by the application with respect to a specific queue.
Accounting messages are recorded only for local queues. If an application makes an MQI call
against an alias queue, the accounting data is recorded against the base queue, and, for a remote
queue, the accounting data is recorded against the transmission queue.
604
Related reference:
MQI accounting message data on page 621
Use this page to view the structure of an MQI accounting message
Queue accounting message data on page 632
Use this page to view the structure of a queue accounting message
MQI accounting information is collected for every connection to the queue manager.
OFF
For example, to enable MQI accounting information collection use the following MQSC command:
ALTER QMGR ACCTMQI(ON)
605
Queue accounting information for this queue is collected for every connection to the queue
manager that opens the queue.
OFF
QMGR
The collection of queue accounting information for this queue is controlled according to the value
of the queue manager attribute ACCTQ. This is the default value.
To change the value of the queue manager attribute, use the MQSC command, ALTER QMGR and specify
the parameter ACCTQ. The queue manager attribute ACCTQ can have the following values:
ON
Queue accounting information is collected for queues that have the queue attribute ACCTQ set as
QMGR.
OFF
Queue accounting information is not collected for queues that have the queue attribute ACCTQ
set as QMGR. This is the default value.
NONE
The collection of queue accounting information is disabled for all queues, regardless of the queue
attribute ACCTQ.
If the queue manager attribute, ACCTQ, is set to NONE, the collection of queue accounting information
is disabled for all queues, regardless of the queue attribute ACCTQ.
For example, to enable accounting information collection for the queue, Q1, use the following MQSC
command:
ALTER QLOCAL(Q1) ACCTQ(ON)
To enable accounting information collection for all queues that specify the queue attribute ACCTQ as
QMGR, use the following MQSC command:
ALTER QMGR ACCTQ(ON)
MQCONNX options:
Use the ConnectOpts parameter on the MQCONNX call to modify the collection of both MQI and queue
accounting information at the connection level by overriding the effective values of the queue manager
attributes ACCTMQI and ACCTQ
The ConnectOpts parameter can have the following values:
MQCNO_ACCOUNTING_MQI_ENABLED
If the value of the queue manager attribute ACCTMQI is specified as OFF, MQI accounting is
enabled for this connection. This is equivalent of the queue manager attribute ACCTMQI being
specified as ON.
If the value of the queue manager attribute ACCTMQI is not specified as OFF, this attribute has
no effect.
606
MQCNO_ACCOUNTING_MQI_DISABLED
If the value of the queue manager attribute ACCTMQI is specified as ON, MQI accounting is
disabled for this connection. This is equivalent of the queue manager attribute ACCTMQI being
specified as OFF.
If the value of the queue manager attribute ACCTMQI is not specified as ON, this attribute has
no effect.
MQCNO_ACCOUNTING_Q_ENABLED
If the value of the queue manager attribute ACCTQ is specified as OFF, queue accounting is
enabled for this connection. All queues with ACCTQ specified as QMGR, are enabled for queue
accounting. This is equivalent of the queue manager attribute ACCTQ being specified as ON.
If the value of the queue manager attribute ACCTQ is not specified as OFF, this attribute has no
effect.
MQCNO_ACCOUNTING_Q_DISABLED
If the value of the queue manager attribute ACCTQ is specified as ON, queue accounting is
disabled for this connection. This is equivalent of the queue manager attribute ACCTQ being
specified as OFF.
If the value of the queue manager attribute ACCTQ is not specified as ON, this attribute has no
effect.
These overrides are by disabled by default. To enable them, set the queue manager attribute ACCTCONO
to ENABLED. To enable accounting overrides for individual connections use the following MQSC
command:
ALTER QMGR ACCTCONO(ENABLED)
607
Statistics messages
Statistics messages record information about the activities occurring in a WebSphere MQ system. An
statistics messages is a PCF message that contains a number of PCF structures.
Statistics messages are delivered to the system queue (SYSTEM.ADMIN.STATISTICS.QUEUE) at
configured intervals.
Statistics messages are in the following categories:
MQI statistics messages
MQI statistics messages contain information relating to the number of MQI calls made during a
configured interval. For example, the information can include the number of MQI calls issued by
a queue manager.
Queue statistics messages
Queue statistics messages contain information relating to the activity of a queue during a
configured interval. The information includes the number of messages put on, and retrieved
from, the queue, and the total number of bytes processed by a queue.
Each queue statistics message can contain up to 100 records, with each record relating to the
activity per queue for which statistics were collected.
Statistics messages are recorded only for local queues. If an application makes an MQI call
against an alias queue, the statistics data is recorded against the base queue, and, for a remote
queue, the statistics data is recorded against the transmission queue.
Channel statistics messages
Channel statistics messages contain information relating to the activity of a channel during a
configured interval. For example the information might be the number of messages transferred by
the channel, or the number of bytes transferred by the channel.
Each channel statistics message contains up to 100 records, with each record relating to the
activity per channel for which statistics were collected.
Related reference:
MQI statistics information on page 609
Use the queue manager attribute STATMQI to control the collection of MQI statistics information
Queue statistics information on page 609
Use the queue attribute STATQ and the queue manager attribute STATQ to control the collection of queue
statistics information
Channel statistics information on page 610
Use the channel attribute STATCHL to control the collection of channel statistics information. You can
also set queue manager attributes to control information collection. These attributes are available on
distributed platforms and on IBM i.
608
Statistics message data comprises PCF parameters that store the statistics information. The content of
statistics messages depends on the message category as follows:
MQI statistics message
MQI statistics message data consists of a number of PCF parameters, but no PCF groups.
Queue statistics message
Queue statistics message data consists of a number of PCF parameters, and in the range 1
through 100 QStatisticsData PCF groups.
There is one QStatisticsData PCF group for every queue was active in the interval. If more than
100 queues were active in the interval, multiple statistics messages are generated. Each message
has the SeqNumber in the MQCFH (PCF header) updated accordingly, and the last message in the
sequence has the Control parameter in the MQCFH specified as MQCFC_LAST.
Channel statistics message
Channel statistics message data consists of a number of PCF parameters, and in the range 1
through 100 ChlStatisticsData PCF groups.
There is one ChlStatisticsData PCF group for every channel that was active in the interval. If more
than 100 channels were active in the interval, multiple statistics messages are generated. Each
message has the SeqNumber in the MQCFH (PCF header) updated accordingly, and the last
message in the sequence has the Control parameter in the MQCFH specified as MQCFC_LAST.
MQI statistics information is collected for every connection to the queue manager.
OFF
For example, to enable MQI statistics information collection use the following MQSC command:
ALTER QMGR STATMQI(ON)
609
The same queue can have several put operations and get operations through several Object Handles.
Some Object Handles might have been opened before statistics collection was enabled, but others were
opened afterwards. Therefore, it is possible for the queue statistics to record the activity of some put
operations and get operations, and not all.
To ensure that the Queue Statistics are recording the activity of all applications, you must close and
reopen new Object Handles on the queue, or queues, that you are monitoring. The best way to achieve
this, is to end and restart all applications after enabling statistics collection.
To change the value of the queue attribute STATQ, use the MQSC command, ALTER QLOCAL and specify
the parameter STATQ. The queue attribute STATQ can have the following values:
ON
Queue statistics information is collected for every connection to the queue manager that opens
the queue.
OFF
QMGR
The collection of queue statistics information for this queue is controlled according to the value of
the queue manager attribute, STATQ. This is the default value.
To change the value of the queue manager attribute STATQ, use the MQSC command, ALTER QMGR and
specify the parameter STATQ. The queue manager attribute STATQ can have the following values:
ON
Queue statistics information is collected for queues that have the queue attribute STATQ set as
QMGR
OFF
Queue statistics information is not collected for queues that have the queue attribute STATQ set
as QMGR. This is the default value.
NONE
The collection of queue statistics information is disabled for all queues, regardless of the queue
attribute STATQ.
If the queue manager attribute STATQ is set to NONE, the collection of queue statistics information is
disabled for all queues, regardless of the queue attribute STATQ.
For example, to enable statistics information collection for the queue, Q1, use the following MQSC
command:
ALTER QLOCAL(Q1) STATQ(ON)
To enable statistics information collection for all queues that specify the queue attribute STATQ as
QMGR, use the following MQSC command:
ALTER QMGR STATQ(ON)
610
Automatically defined cluster-sender channels are not WebSphere MQ objects, so do not have attributes
in the same way as channel objects. To control automatically defined cluster-sender channels, use the
queue manager attribute STATACLS. This attribute determines whether automatically defined
cluster-sender channels within a queue manager are enabled or disabled for channel statistics information
collection.
You can set channel statistics information collection to one of the three monitoring levels: low, medium or
high. You can set the monitoring level at either object level or at the queue manager level. The choice of
which level to use is dependent on your system. Collecting statistics information data might require some
instructions that are relatively expensive computationally, so to reduce the impact of channel statistics
information collection, the medium and low monitoring options measure a sample of the data at regular
intervals rather than collecting data all the time. Table 53 summarizes the levels available with channel
statistics information collection:
Table 53. Detail level of channel statistics information collection
Level
Description
Usage
Low
Measure a small sample of the data, at regular For objects that process a high volume of
intervals.
messages.
Medium
High
To change the value of the channel attribute STATCHL, use the MQSC command, ALTER CHANNEL and
specify the parameter STATCHL.
To change the value of the queue manager attribute STATCHL, use the MQSC command, ALTER QMGR and
specify the parameter STATCHL.
To change the value of the queue manager attribute STATACLS, use the MQSC command, ALTER QMGR
and specify the parameter STATACLS.
The channel attribute, STATCHL, can have the following values:
LOW
MEDIUM
Channel statistics information is collected with a medium level of detail.
HIGH Channel statistics information is collected with a high level of detail.
OFF
QMGR
The channel attribute is set as QMGR. The collection of statistics information for this channel is
controlled by the value of the queue manager attribute, STATCHL.
This is the default value.
The queue manager attribute, STATCHL, can have the following values:
LOW
Channel statistics information is collected with a low level of detail, for all channels that have the
channel attribute STATCHL set as QMGR.
MEDIUM
Channel statistics information is collected with a medium level of detail, for all channels that
have the channel attribute STATCHL set as QMGR.
Monitoring and performance
611
HIGH Channel statistics information is collected with a high level of detail, for all channels that have
the channel attribute STATCHL set as QMGR.
Channel statistics information is not collected for all channels that have the channel attribute
STATCHL set as QMGR.
OFF
LOW
MEDIUM
Statistics information is collected with a medium level of detail for automatically defined
cluster-sender channels.
HIGH Statistics information is collected with a high level of detail for automatically defined
cluster-sender channels.
Statistics information is not for automatically defined cluster-sender channels.
OFF
QMGR
To enable statistics information collection, at a medium level of detail, for all channels that specify the
channel attribute STATCHL as QMGR, use the following MQSC command:
ALTER QMGR STATCHL(MEDIUM)
To enable statistics information collection, at a medium level of detail, for all automatically defined
cluster-sender channels, use the following MQSC command:
ALTER QMGR STATACLS(MEDIUM)
To write the currently collected statistics data to the statistics queue before the statistics collection interval
is due to expire, use the MQSC command RESET QMGR TYPE(STATISTICS). Issuing this command causes
the collected statistics data to be written to the statistics queue and a new statistics data collection
interval to begin.
612
Syntax
amqsmon
-t
-m
Type
-a
-i
-c
QMgrName
-b
-d
Depth
ConnectionId
ChannelName
-q
QueueName
-w
TimeOut
-s
StartTime
-e
EndTime
,
-l
Parameter
Required parameters
-t Type
The type of messages to process. Specify Type as one of the following:
accounting
Accounting records are processed. Messages are read from the system queue,
SYSTEM.ADMIN.ACCOUNTING.QUEUE.
statistics
Statistics records are processed. Messages are read from the system queue,
SYSTEM.ADMIN.STATISTICS.QUEUE.
Optional Parameters
-m QMgrName
The name of the queue manager from which accounting or statistics messages are to be processed.
If you do not specify this parameter, the default queue manager is used.
-a Process messages containing MQI records only.
Only display MQI records. Messages not containing MQI records will always be left on the queue
they were read from.
613
-q QueueName
QueueName is an optional parameter.
If QueueName is not supplied:
If QueueName is supplied:
-c ChannelName
ChannelName is an optional parameter.
If ChannelName is not supplied:
If ChannelName is supplied:
This parameter is available when displaying statistics messages only, (-t statistics).
-i ConnectionId
Displays records related to the connection identifier specified by ConnectionId only.
This parameter is available when displaying accounting messages only, (-t accounting).
If -b is not specified then the statistics messages from which the records came are discarded. Since
statistics messages can also contain records from other channels, if -b is not specified then unseen
records can be discarded.
-b Browse messages.
Messages are retrieved non-destructively.
-d Depth
The maximum number of messages that can be processed.
If you do not specify this parameter, then an unlimited number of messages can be processed.
-w TimeOut
Time maximum number of seconds to wait for a message to become available.
If you do not specify this parameter, amqsmon will end once there are no more messages to process.
-s StartTime
Process messages put after the specified StartTime only.
StartTime is specified in the format yyyy-mm-dd hh.mm.ss. If a date is specified without a time, then
the time will default to 00.00.00 on the date specified. Times are in GMT.
For the effect of not specifying this parameter, see Note 1.
-e EndTime
Process messages put before the specified EndTime only.
The EndTime is specified in the format yyyy-mm-dd hh.mm.ss. If a date is specified without a time,
then the time will default to 23.59.59 on the date specified. Times are in GMT.
For the effect of not specifying this parameter, see Note 1.
614
-l Parameter
Only display the selected fields from the records processed. Parameter is a comma-separated list of
integer values, with each integer value mapping to the numeric constant of a field, see amqsmon
example 5.
If you do not specify this parameter, then all available fields are displayed.
Note:
1. If you do not specify -s StartTime or -e EndTime, the messages that can be processed are not restricted
by put time.
amqsmon examples
Use this page to view examples of running the amqsmon (Display formatted monitoring information)
sample program
1.
The following command displays all MQI statistics messages from queue manager
saturn.queue.manager:
amqsmon -m saturn.queue.manager -t statistics -a
2.
The following command displays all queue statistics messages for queue LOCALQ on queue manager
saturn.queue.manager:
amqsmon -m saturn.queue.manager -t statistics -q LOCALQ
615
3. The following command displays all of the statistics messages recorded since 15:30 on 30 April 2005
from queue manager saturn.queue.manager.
amqsmon -m saturn.queue.manager -t statistics -s "2005-04-30 15.30.00"
616
QueueName: SAMPLEQ
CreateDate: 2005-03-08
CreateTime: 17.07.02
QueueType: Predefined
...
4. The following command displays all accounting messages recorded on 30 April 2005 from queue
manager saturn.queue.manager:
amqsmon -m saturn.queue.manager -t accounting -s "2005-04-30" -e "2005-04-30"
5. The following command browses the accounting queue and displays the application name and
connection identifier of every application for which MQI accounting information is available:
Monitoring and performance
617
618
Structure identifier
Structure version
Report options
Message type
Expiration time
Feedback code
Encoding
Coded character set ID
Message format
Message priority
Persistence
Message identifier
Correlation identifier
Backout count
Reply-to queue
Reply-to queue manager
User identifier
Accounting token
Application identity data
Application type
Application name
Put date
Put time
Application origin data
Group identifier
Message sequence number
Offset
Message flags
Original length
Structure type
Structure length
Structure version
Command identifier
Message sequence number
Control options
Completion code
Reason code
Parameter count
Queue manager
Interval start date
Interval start time
Interval end date
Interval end time
Command level
Connection identifier
Sequence number
Application name
Application process identifier
Application thread identifier
User identifier
Connection date
Connection time
Connection name
Channel name
Disconnect date
Disconnect time
Disconnect type
Open count
Open fail count
Close count
Close fail count
Put count
Put fail count
Put1 count
Put1 fail count
Put bytes
Get count
Get fail count
Get bytes
Browse count
Browse fail count
Browse bytes
Commit count
Commit fail count
Backout count
Inquire count
Inquire fail count
Set count
Set fail count
Note:
1. The parameters shown are those returned for an MQI accounting message. The actual accounting or statistics
message data depends on the message category.
619
Some of the parameters contained in the message descriptor of accounting and statistics message contain
fixed data supplied by the queue manager that generated the message.
The MQMD also specifies the name of the queue manager (truncated to 28 characters) that put the
message, and the date and time when the message was put on the accounting, or statistics, queue.
Version
620
Description:
Data type:
Value:
Platforms:
System queue:
SYSTEM.ADMIN.ACCOUNTING.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartTime
621
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
CommandLevel
Description:
Identifier:
Data type:
Returned:
ConnectionId
Description:
Identifier:
Data type:
Maximum length:
Returned:
SeqNumber
Description:
Identifier:
Data type:
Returned:
The sequence number. This value is incremented for each subsequent record for long
running connections.
MQIACF_SEQUENCE_NUMBER
MQCFIN
Always
ApplicationName
622
Description:
Identifier:
Data type:
Maximum length:
Returned:
The name of the application. The contents of this field are equivalent to the contents of the
PutApplName field in the message descriptor.
MQCACF_APPL_NAME
MQCFST
MQ_APPL_NAME_LENGTH
Always
ApplicationPid
Description:
Identifier:
Data type:
Returned:
ApplicationTid
Description:
Identifier:
Data type:
Returned:
UserId
Description:
Identifier:
Data type:
Maximum length:
Returned:
ConnDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
ConnTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
ConnName
623
Description:
Identifier:
Data type:
Maximum length:
Returned:
ChannelName
Description:
Identifier:
Data type:
Maximum length:
Returned:
DiscDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
DiscTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
DiscType
Description:
Identifier:
Data type:
Values:
Type of disconnect
MQIAMO_DISC_TYPE
MQCFIN
The possible values are:
MQDISCONNECT_NORMAL
Requested by application
MQDISCONNECT_IMPLICIT
Abnormal application termination
Returned:
MQDISCONNECT_Q_MGR
Connection broken by queue manager
When available
OpenCount
624
Description:
Identifier:
Data type:
Returned:
The number of objects opened. This parameter is an integer list indexed by object type, see
Reference note 1.
MQIAMO_OPENS
MQCFIL
When available
OpenFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful attempts to open an object. This parameter is an integer list
indexed by object type, see Reference note 1.
MQIAMO_OPENS_FAILED
MQCFIL
When available
CloseCount
Description:
Identifier:
Data type:
Returned:
The number of objects closed. This parameter is an integer list indexed by object type, see
Reference note 1.
MQIAMO_CLOSES
MQCFIL
When available
CloseFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful attempts to close an object. This parameter is an integer list
indexed by object type, see Reference note 1.
MQIAMO_CLOSES_FAILED
MQCFIL
When available
PutCount
Description:
Identifier:
Data type:
Returned:
The number persistent and nonpersistent messages successfully put to a queue, with the
exception of messages put using the MQPUT1 call. This parameter is an integer list indexed
by persistence value, see Reference note 2.
MQIAMO_PUTS
MQCFIL
When available
PutFailCount
Description:
Identifier:
Data type:
Returned:
Put1Count
625
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages successfully put to the queue using
MQPUT1 calls. This parameter is an integer list indexed by persistence value, see Reference
note 2.
MQIAMO_PUT1S
MQCFIL
QAccountingData
When available
Put1FailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
PutBytes
Description:
Identifier:
Data type:
Returned:
The number bytes written using put calls for persistent and nonpersistent messages. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO64_PUT_BYTES
MQCFIL64
When available
GetCount
Description:
Identifier:
Data type:
Returned:
The number of successful destructive MQGET calls for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2.
MQIAMO_GETS
MQCFIL
When available
GetFailCount
Description:
Identifier:
Data type:
Returned:
GetBytes
Description:
Identifier:
Data type:
Returned:
Total number of bytes retrieved for persistent and nonpersistent messages. This parameter is
an integer list indexed by persistence value, see Reference note 2.
MQIAMO64_GET_BYTES
MQCFIL64
When available
BrowseCount
626
Description:
Identifier:
Data type:
Returned:
The number of successful non-destructive MQGET calls for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2.
MQIAMO_BROWSES
MQCFIL
When available
BrowseFailCount
Description:
Identifier:
Data type:
Returned:
BrowseBytes
Description:
Identifier:
Data type:
Returned:
Total number of bytes browsed for persistent and nonpersistent messages. This parameter is
an integer list indexed by persistence value, see Reference note 2.
MQIAMO64_BROWSE_BYTES
MQCFIL64
When available
CommitCount
Description:
Identifier:
Data type:
Returned:
The number of successful transactions. This number includes those transactions committed
implicitly by the connected application. Commit requests where there is no outstanding
work are included in this count.
MQIAMO_COMMITS
MQCFIN
When available
CommitFailCount
Description:
Identifier:
Data type:
Returned:
BackCount
Description:
Identifier:
Data type:
Returned:
InqCount
627
Description:
Identifier:
Data type:
Returned:
The number of successful objects inquired upon. This parameter is an integer list indexed by
object type, see Reference note 1.
MQIAMO_INQS
MQCFIL
When available
InqFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful object inquire attempts. This parameter is an integer list
indexed by object type, see Reference note 1.
MQIAMO_INQS_FAILED
MQCFIL
When available
SetCount
Description:
Identifier:
Data type:
Returned:
The number of successful MQSET calls. This parameter is an integer list indexed by object
type, see Reference note 1.
MQIAMO_SETS
MQCFIL
When available
SetFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful MQSET calls. This parameter is an integer list indexed by object
type, see Reference note 1.
MQIAMO_SETS_FAILED
MQCFIL
When available
SubCountDur
Description:
The number of succesful subscribe requests which created, altered or resumed durable
subscriptions. This is an array of values indexed by the type of operation
0 = The number of subscriptions created
1 = The number of subscriptions altered
Identifier:
Data type:
Returned:
SubCountNDur
628
Description:
The number of succesful subscribe requests which created, altered or resumed non-durable
subscriptions. This is an array of values indexed by the type of operation
0 = The number of subscriptions created
1 = The number of subscriptions altered
Identifier:
Data type:
Returned:
SubFailCount
Description:
Identifier:
Data type:
Returned:
UnsubCountDur
Description:
The number of succesful unsubscribe requests for durable subscriptions. This is an array of
values indexed by the type of operation
0 - The subscription was closed but not removed
Identifier:
Data type:
Returned:
UnsubCountNDur
Description:
The number of succesful unsubscribe requests for durable subscriptions. This is an array of
values indexed by the type of operation
0 - The subscription was closed but not removed
Identifier:
Data type:
Returned:
UnsubFailCount
Description:
Identifier:
Data type:
Returned:
SubRqCount
629
Description:
Identifier:
Data type:
Returned:
SubRqFailCount
Description:
Identifier:
Data type:
Returned:
CBCount
Description:
The number of successful MQCB requests. This is an array of values indexed by the type of
operation
0 - A callback was created or altered
1 - A callback was removed
2 - A callback was resumed
Identifier:
Data type:
Returned:
CBFailCount
Description:
Identifier:
Data type:
Returned:
CtlCount
Description:
The number of successful MQCTL requests. This is an array of values indexed by the type of
operation
0 - The connection was started
1 - The connection was stopped
2 - The connection was resumed
Identifier:
Data type:
Returned:
CtlFailCount
630
Description:
Identifier:
Data type:
Returned:
StatCount
Description:
Identifier:
Data type:
Returned:
StatFailCount
Description:
Identifier:
Data type:
Returned:
PutTopicCount
Description:
Identifier:
Data type:
Returned:
The number persistent and nonpersistent messages successfully put to a topic, with the
exception of messages put using the MQPUT1 call. This parameter is an integer list indexed
by persistence value, see Reference note 2.
Note: Messages put using a queue alias which resolve to a topic are included in this value.
MQIAMO_TOPIC_PUTS
MQCFIL
When available.
PutTopicFailCount
Description:
Identifier:
Data type:
Returned:
Put1TopicCount
Description:
Identifier:
Data type:
Returned:
The number of persistent and nonpersistent messages successfully put to a topic using
MQPUT1 calls. This parameter is an integer list indexed by persistence value, see Reference
note 2.
Note: Messages put using a queue alias which resolve to a topic are included in this value.
MQIAMO_TOPIC_PUT1S
MQCFIL
When available.
Put1TopicFailCount
631
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful attempts to put a message to a topic using MQPUT1 calls.
MQIAMO_TOPIC_PUT1S_FAILED
MQCFIN
When available.
PutTopicBytes
Description:
Identifier:
Data type:
Returned:
The number bytes written using put calls for persistent and nonpersistent messages which
resolve to a publish operation. This is number of bytes put by the application and not the
resultant number of bytes delivered to subscribers. This parameter is an integer list indexed
by persistence value, see Reference note 2.
MQIAMO64_TOPIC_PUT_BYTES
MQCFIL64
When available.
Platforms:
System queue:
SYSTEM.ADMIN.ACCOUNTING.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndDate
632
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
CommandLevel
Description:
Identifier:
Data type:
Returned:
ConnectionId
Description:
Identifier:
Data type:
Maximum length:
Returned:
SeqNumber
Description:
Identifier:
Data type:
Returned:
The sequence number. This value is incremented for each subsequent record for long
running connections.
MQIACF_SEQUENCE_NUMBER
MQCFIN
Always
ApplicationName
Description:
Identifier:
Data type:
Maximum length:
Returned:
The name of the application. The contents of this field are equivalent to the contents of the
PutApplName field in the message descriptor.
MQCACF_APPL_NAME
MQCFST
MQ_APPL_NAME_LENGTH
Always
ApplicationPid
633
Description:
Identifier:
Data type:
Returned:
ApplicationTid
Description:
Identifier:
Data type:
Returned:
UserId
Description:
Identifier:
Data type:
Maximum length:
Returned:
ObjectCount
Description:
Identifier:
Data type:
Returned:
The number of queues accessed in the interval for which accounting data has been recorded.
This value is set to the number of QAccountingData PCF groups contained in the message.
MQIAMO_OBJECT_COUNT
MQCFIN
Always
QAccountingData
Description:
Identifier:
Data type:
634
Parameters in group:
QName
CreateDate
CreateTime
QType
QDefinitionType
OpenCount
OpenDate
OpenTime
CloseDate
CloseTime
PutCount
PutFailCount
Put1Count
Put1FailCount
PutBytes
PutMinBytes
PutMaxBytes
GetCount
GetFailCount
GetBytes
GetMinBytes
GetMaxBytes
BrowseCount
BrowseFailCount
BrowseBytes
BrowseMinBytes
BrowseMaxBytes
TimeOnQMin
TimeOnQAvg
Returned:
TimeOnQMax
Always
QName
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
CreateDate
635
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
CreateTime
Description:
Identifier:
Data type:
Included in PCF
group:
Maximum length:
Returned:
QType
Description:
Identifier:
Data type:
Included in PCF
group:
Value:
Returned:
QDefinitionType
Description:
Identifier:
Data type:
Included in PCF
group:
Values:
Returned:
When available
OpenCount
636
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of times this queue was opened by the application in this interval
MQIAMO_OPENS
MQCFIL
QAccountingData
When available
OpenDate
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The date the queue was first opened in this recording interval. If the queue was already
open at the start of this interval, this value reflects the date the queue was originally opened.
MQCAMO_OPEN_DATE
MQCFST
QAccountingData
When available
OpenTime
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The time the queue was first opened in this recording interval. If the queue was already
open at the start of this interval, this value reflects the time the queue was originally
opened.
MQCAMO_OPEN_TIME
MQCFST
QAccountingData
When available
CloseDate
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The date of the final close of the queue in this recording interval. If the queue is still open
then the value is not returned.
MQCAMO_CLOSE_DATE
MQCFST
QAccountingData
When available
CloseTime
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The time of final close of the queue in this recording interval. If the queue is still open then
the value is not returned.
MQCAMO_CLOSE_TIME
MQCFST
QAccountingData
When available
PutCount
637
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages successfully put to the queue, with the
exception of MQPUT1 calls. This parameter is an integer list indexed by persistence value,
see Reference note 2.
MQIAMO_PUTS
MQCFIL
QAccountingData
When available
PutFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of unsuccessful attempts to put a message, with the exception of MQPUT1 calls
MQIAMO_PUTS_FAILED
MQCFIN
QAccountingData
When available
Put1Count
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages successfully put to the queue using
MQPUT1 calls. This parameter is an integer list indexed by persistence value, see Reference
note 2.
MQIAMO_PUT1S
MQCFIL
QAccountingData
When available
Put1FailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
PutBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The total number of bytes put for persistent and nonpersistent messages. This parameter is
an integer list indexed by persistence value, see Reference note 2.
MQIAMO64_PUT_BYTES
MQCFIL64
QAccountingData
When available
PutMinBytes
638
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The smallest persistent and nonpersistent message size placed on the queue. This parameter
is an integer list indexed by persistence value, see Reference note 2.
MQIAMO_PUT_MIN_BYTES
MQCFIL
QAccountingData
When available
PutMaxBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The largest persistent and nonpersistent message size placed on the queue. This parameter is
an integer list indexed by persistence value, see Reference note 2.
MQIAMO_PUT_MAX_BYTES
MQCFIL
QAccountingData
When available
GeneratedMsgCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
GetCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of successful destructive MQGET calls for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2.
MQIAMO_GETS
MQCFIL
QAccountingData
When available
GetFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
GetBytes
639
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of bytes read in destructive MQGET calls for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2.
MQIAMO64_GET_BYTES
MQCFIL64
QAccountingData
When available
GetMinBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The size of the smallest persistent and nonpersistent message retrieved rom the queue. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO_GET_MIN_BYTES
MQCFIL
QAccountingData
When available
GetMaxBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The size of the largest persistent and nonpersistent message retrieved rom the queue. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO_GET_MAX_BYTES
MQCFIL
QAccountingData
When available
BrowseCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of successful non-destructive MQGET calls for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2.
MQIAMO_BROWSES
MQCFIL
QAccountingData
When available
BrowseFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
BrowseBytes
640
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of bytes read in non-destructive MQGET calls that returned persistent messages
MQIAMO64_BROWSE_BYTES
MQCFIL64
QAccountingData
When available
BrowseMinBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The size of the smallest persistent and nonpersistent message browsed from the queue. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO_BROWSE_MIN_BYTES
MQCFIL
QAccountingData
When available
BrowseMaxBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The size of the largest persistent and nonpersistent message browsed from the queue. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO_BROWSE_MAX_BYTES
MQCFIL
QAccountingData
When available
CBCount
Description:
The number of successful MQCB requests. This is an array of values indexed by the type of
operation
0 - A callback was created or altered
1 - A callback was removed
2 - A callback was resumed
Identifier:
Data type:
Returned:
CBFailCount
Description:
Identifier:
Data type:
Returned:
TimeOnQMin
641
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The shortest time a persistent and nonpersistent message remained on the queue before
being destructively retrieved, in microseconds. For messages retrieved under syncpoint this
value does not included the time before the get operation is committed. This parameter is an
integer list indexed by persistence value, see Reference note 2.
MQIAMO64_Q_TIME_MIN
MQCFIL64
QAccountingData
When available
TimeOnQAvg
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The average time a persistent and nonpersistent message remained on the queue before
being destructively retrieved, in microseconds. For messages retrieved under syncpoint this
value does not included the time before the get operation is committed. This parameter is an
integer list indexed by persistence value, see Reference note 2.
MQIAMO64_Q_TIME_AVG
MQCFIL64
QAccountingData
When available
TimeOnQMax
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The longest time a persistent and nonpersistent message remained on the queue before
being destructively retrieved, in microseconds. For messages retrieved under syncpoint this
value does not included the time before the get operation is committed. This parameter is an
integer list indexed by persistence value, see Reference note 2.
MQIAMO64_Q_TIME_MAX
MQCFIL64
QAccountingData
When available
Platforms:
System queue:
SYSTEM.ADMIN.STATISTICS.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartDate
642
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
CommandLevel
Description:
Identifier:
Data type:
Returned:
ConnCount
Description:
Identifier:
Data type:
Returned:
ConnFailCount
643
Description:
Identifier:
Data type:
Returned:
ConnsMax
Description:
Identifier:
Data type:
Returned:
DiscCount
Description:
The number of disconnects from the queue manager. This is an integer array, indexed by the
following constants:
v MQDISCONNECT_NORMAL
v MQDISCONNECT_IMPLICIT
Identifier:
Data type:
Returned:
v MQDISCONNECT_Q_MGR
MQIAMO_DISCS.
MQCFIL.
When available.
OpenCount
Description:
Identifier:
Data type:
Returned:
The number of objects successfully opened. This parameter is an integer list indexed by
object type, see Reference note 1.
MQIAMO_OPENS.
MQCFIL.
When available.
OpenFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful open object attempts. This parameter is an integer list indexed
by object type, see Reference note 1.
MQIAMO_OPENS_FAILED.
MQCFIL.
When available.
CloseCount
Description:
Identifier:
Data type:
Returned:
The number of objects successfully closed. This parameter is an integer list indexed by object
type, see Reference note 1.
MQIAMO_CLOSES.
MQCFIL.
When available.
CloseFailCount
644
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful close object attempts. This parameter is an integer list indexed
by object type, see Reference note 1.
MQIAMO_CLOSES_FAILED.
MQCFIL.
When available.
InqCount
Description:
Identifier:
Data type:
Returned:
The number of objects successfully inquired upon. This parameter is an integer list indexed
by object type, see Reference note 1.
MQIAMO_INQS.
MQCFIL.
When available.
InqFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful object inquire attempts. This parameter is an integer list
indexed by object type, see Reference note 1.
MQIAMO_INQS_FAILED.
MQCFIL.
When available.
SetCount
Description:
Identifier:
Data type:
Returned:
The number of objects successfully updated (SET). This parameter is an integer list indexed
by object type, see Reference note 1.
MQIAMO_SETS.
MQCFIL.
When available.
SetFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful SET attempts. This parameter is an integer list indexed by
object type, see Reference note 1.
MQIAMO_SETS_FAILED.
MQCFIL.
When available.
PutCount
Description:
Identifier:
Data type:
Returned:
The number of persistent and nonpersistent messages successfully put to a queue, with the
exception of MQPUT1 requests. This parameter is an integer list indexed by persistence
value, see Reference note 2.
MQIAMO_PUTS.
MQCFIL.
When available.
PutFailCount
645
Description:
Identifier:
Data type:
Returned:
Put1Count
Description:
Identifier:
Data type:
Returned:
The number of persistent and nonpersistent messages successfully put to a queue using
MQPUT1 requests. This parameter is an integer list indexed by persistence value, see
Reference note 2
MQIAMO_PUT1S.
MQCFIL.
When available.
Put1FailCount
Description:
Identifier:
Data type:
Returned:
PutBytes
Description:
Identifier:
Data type:
Returned:
The number bytes for persistent and nonpersistent messages written in using put requests.
This parameter is an integer list indexed by persistence value, see Reference note 2
MQIAMO64_PUT_BYTES.
MQCFIL64.
When available.
GetCount
Description:
Identifier:
Data type:
Returned:
The number of successful destructive get requests for persistent and nonpersistent messages.
This parameter is an integer list indexed by persistence value, see Reference note 2
MQIAMO_GETS.
MQCFIL.
When available.
GetFailCount
Description:
Identifier:
Data type:
Returned:
GetBytes
646
Description:
Identifier:
Data type:
Returned:
The number of bytes read in destructive gets requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2
MQIAMO64_GET_BYTES.
MQCFIL64.
When available.
BrowseCount
Description:
Identifier:
Data type:
Returned:
The number of successful non-destructive get requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2
MQIAMO_BROWSES.
MQCFIL.
When available.
BrowseFailCount
Description:
Identifier:
Data type:
Returned:
BrowseBytes
Description:
Identifier:
Data type:
Returned:
The number of bytes read in non-destructive get requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value, see Reference note
2
MQIAMO64_BROWSE_BYTES.
MQCFIL64.
When available.
CommitCount
Description:
Identifier:
Data type:
Returned:
CommitFailCount
Description:
Identifier:
Data type:
Returned:
BackCount
647
Description:
Identifier:
Data type:
Returned:
The number of backouts processed, including implicit backout upon abnormal disconnect.
MQIAMO_BACKOUTS.
MQCFIN.
When available.
ExpiredMsgCount
Description:
Identifier:
Data type:
Returned:
The number of persistent and nonpersistent messages that were discarded because they had
expired, before they could be retrieved.
MQIAMO_MSGS_EXPIRED.
MQCFIN.
When available.
PurgeCount
Description:
Identifier:
Data type:
Returned:
SubCountDur
Description:
The number of successful Subscribe requests which created, altered or resumed durable
subscriptions. This is an array of values indexed by the type of operation
0 = The number of subscriptions created
1 = The number of subscriptions altered
Identifier:
Data type:
Returned:
SubCountNDur
Description:
The number of successful Subscribe requests which created, altered or resumed non-durable
subscriptions. This is an array of values indexed by the type of operation
0 = The number of subscriptions created
1 = The number of subscriptions altered
Identifier:
Data type:
Returned:
SubFailCount
648
Description:
Identifier:
Data type:
Returned:
UnsubCountDur
Description:
The number of succesful unsubscribe requests for durable subscriptions. This is an array of
values indexed by the type of operation
0 - The subscription was closed but not removed
Identifier:
Data type:
Returned:
UnsubCountNDur
Description:
The number of succesful unsubscribe requests for non-durable subscriptions. This is an array
of values indexed by the type of operation
0 - The subscription was closed but not removed
Identifier:
Data type:
Returned:
UnsubFailCount
Description:
Identifier:
Data type:
Returned:
SubRqCount
Description:
Identifier:
Data type:
Returned:
SubRqFailCount
Description:
Identifier:
Data type:
Returned:
CBCount
649
Description:
The number of successful MQCB requests. This is an array of values indexed by the type of
operation
0 - A callback was created or altered
1 - A callback was removed
2 - A callback was resumed
Identifier:
Data type:
Returned:
CBFailCount
Description:
Identifier:
Data type:
Returned:
CtlCount
Description:
Identifier:
Data type:
Returned:
CtlFailCount
Description:
Identifier:
Data type:
Returned:
StatCount
Description:
Identifier:
Data type:
Returned:
StatFailCount
650
Description:
Identifier:
Data type:
Returned:
SubCountDurHighWater
Description:
The high-water mark on the number of durable subscriptions during the time interval. This
is an array of values indexed by SUBTYPE
0 - The high-water mark for all durable subscriptions in the system
1 - The high-water mark for durable application subscriptions (MQSUBTYPE_API)
2 - The high-water mark for durable admin subscription (MQSUBTYPE_ADMIN)
Identifier:
Data type:
Returned:
SubCountDurLowWater
Description:
The low-water mark on the number of durable subscriptions during the time interval. This is
an array of values indexed by SUBTYPE.
0 - The low-water mark for all durable subscriptions in the system
1 - The low-water mark for durable application subscriptions (MQSUBTYPE_API)
2 - The low-water mark for durable admin subscriptions (MQSUBTYPE_ADMIN)
Identifier:
Data type:
Returned:
SubCountNDurHighWater
Description:
The high-water mark on the number of non-durable subscriptions during the time interval.
This is an array of values indexed by SUBTYPE
0 - The high-water mark for all non-durable subscriptions in the system
1 - The high-water mark for non-durable application subscriptions (MQSUBTYPE_API)
2 - The high-water mark for non-durable admin subscription (MQSUBTYPE_ADMIN)
Identifier:
Data type:
Returned:
SubCountNDurLowWater
651
Description:
The low-water mark on the number of non-durable subscriptions during the time interval.
This is an array of values indexed by SUBTYPE.
0 - The low-water mark for all non-durable subscriptions in the system
1 - The low-water mark for non-durable application subscriptions (MQSUBTYPE_API)
2 - The low-water mark for non-durable admin subscriptions (MQSUBTYPE_ADMIN)
Identifier:
Data type:
Returned:
PutTopicCount
Description:
Identifier:
Data type:
Returned:
The number persistent and nonpersistent messages successfully put to a topic, with the
exception of messages put using the MQPUT1 call. This parameter is an integer list indexed
by persistence value, see Reference note 2.
Note: Messages put using a queue alias which resolve to a topic are included in this value.
MQIAMO_TOPIC_PUTS.
MQCFIL.
When available.
PutTopicFailCount
Description:
Identifier:
Data type:
Returned:
Put1TopicCount
Description:
Identifier:
Data type:
Returned:
The number of persistent and nonpersistent messages successfully put to a topic using
MQPUT1 calls. This parameter is an integer list indexed by persistence value, see Reference
note 2.
Note: Messages put using a queue alias which resolve to a topic are included in this value.
MQIAMO_TOPIC_PUT1S.
MQCFIL.
When available.
Put1TopicFailCount
Description:
Identifier:
Data type:
Returned:
The number of unsuccessful attempts to put a message to a topic using MQPUT1 calls.
MQIAMO_TOPIC_PUT1S_FAILED.
MQCFIN.
When available.
PutTopicBytes
652
Description:
Identifier:
Data type:
Returned:
The number bytes written using put calls for persistent and nonpersistent messages which
resolve to a publish operation. This is number of bytes put by the application and not the
resultant number of bytes delivered to subscribers, see PublishMsgBytes for this value. This
parameter is an integer list indexed by persistence value, see Reference note 2.
MQIAMO64_TOPIC_PUT_BYTES.
MQCFIL64.
When available.
PublishMsgCount
Description:
Identifier:
Data type:
Returned:
The number of messages delivered to subscriptions in the time interval. This parameter is an
integer list indexed by persistence value, see Reference note 2.
MQIAMO64_PUBLISH_MSG_COUNT
MQCFIL.
When available.
PublishMsgBytes
Description:
Identifier:
Data type:
Returned:
The number of bytes delivered to subscriptions in the time interval. This parameter is an
integer list indexed by persistence value, see Reference note 2.
MQIAMO64_PUBLISH_MSG_BYTES
MQCFIL64.
When available.
Platforms:
System queue:
SYSTEM.ADMIN.STATISTICS.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartTime
653
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
CommandLevel
Description:
Identifier:
Data type:
Returned:
ObjectCount
Description:
Identifier:
Data type:
Returned:
The number of queue objects accessed in the interval for which statistics data has been
recorded. This value is set to the number of QStatisticsData PCF groups contained in the
message.
MQIAMO_OBJECT_COUNT
MQCFIN
Always
QStatisticsData
Description:
Identifier:
Data type:
654
Parameters in group:
QName
CreateDate
CreateTime
QType
QDefinitionType
QMinDepth
QMaxDepth
AvgTimeOnQ
PutCount
PutFailCount
Put1Count
Put1FailCount
PutBytes
GetCount
GetFailCount
GetBytes
BrowseCount
BrowseFailCount
BrowseBytes
NonQueuedMsgCount
ExpiredMsgCount
Returned:
PurgeCount
Always
QName
Description:
Identifier:
Data type:
Maximum length:
Returned:
CreateDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
CreateTime
655
Description:
Identifier:
Data type:
Maximum length:
Returned:
QType
Description:
Identifier:
Data type:
Value:
Returned:
QDefinitionType
Description:
Identifier:
Data type:
Values:
Returned:
v MQQDT_TEMPORARY_DYNAMIC
When available
QMinDepth
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
QMaxDepth
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
AvgTimeOnQ
656
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The average latency, in microseconds, of messages destructively retrieved from the queue
during the monitoring period. This parameter is an integer list indexed by persistence value,
see Reference note 2.
MQIAMO64_AVG_Q_TIME
MQCFIL64
QStatisticsData
When available
PutCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages successfully put to the queue, with
exception of MQPUT1 requests. This parameter is an integer list indexed by persistence
value. See Reference note 2.
MQIAMO_PUTS
MQCFIL
QStatisticsData
When available
PutFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
Put1Count
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages successfully put to the queue using
MQPUT1 calls. This parameter is an integer list indexed by persistence value. See Reference
note 2.
MQIAMO_PUT1S
MQCFIL
QStatisticsData
When available
Put1FailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
PutBytes
657
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
GetCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of successful destructive get requests for persistent and nonpersistent messages.
This parameter is an integer list indexed by persistence value. See Reference note 2.
MQIAMO_GETS
MQCFIL
QStatisticsData
When available
GeneratedMsgCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
GetFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
GetBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of bytes read in destructive put requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value. See Reference note
2.
MQIAMO64_GET_BYTES
MQCFIL64
QStatisticsData
When available
BrowseCount
658
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of successful non-destructive get requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value. See Reference note
2.
MQIAMO_BROWSES
MQCFIL
QStatisticsData
When available
BrowseFailCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
BrowseBytes
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of bytes read in non-destructive get requests for persistent and nonpersistent
messages. This parameter is an integer list indexed by persistence value. See Reference note
2.
MQIAMO64_BROWSE_BYTES
MQCFIL64
QStatisticsData
When available
NonQueuedMsgCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of messages that bypassed the queue and were transferred directly to a waiting
application.
Bypassing a queue can only occur in certain circumstances. This number represents how
many times WebSphere MQ was able to bypass the queue, and not the number of times an
application was waiting.
MQIAMO_MSGS_NOT_QUEUED
MQCFIN
QStatisticsData
When available
ExpiredMsgCount
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
The number of persistent and nonpersistent messages that were discarded because they had
expired before they could be retrieved.
MQIAMO_MSGS_EXPIRED
MQCFIN
QStatisticsData
When available
PurgeCount
659
Description:
Identifier:
Data type:
Included in PCF
group:
Returned:
CBCount
Description:
The number of successful MQCB requests. This is an array of values indexed by the type of
operation
0 - A callback was created or altered
1 - A callback was removed
2 - A callback was resumed
Identifier:
Data type:
Returned:
CBFailCount
Description:
Identifier:
Data type:
Returned:
Platforms:
System queue:
SYSTEM.ADMIN.STATISTICS.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartDate
660
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalStartTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndDate
Description:
Identifier:
Data type:
Maximum length:
Returned:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
Returned:
CommandLevel
Description:
Identifier:
Data type:
Returned:
ObjectCount
Description:
Identifier:
Data type:
Returned:
The number of Channel objects accessed in the interval for which statistics data has been
recorded. This value is set to the number of ChlStatisticsData PCF groups contained in the
message.
MQIAMO_OBJECT_COUNT
MQCFIN.
Always.
ChlStatisticsData
661
Description:
Identifier:
Data type:
Parameters in group:
Returned:
PutRetryCount
Always.
ChannelName
Description:
Identifier:
Data type:
Maximum length:
Returned:
ChannelType
Description:
Identifier:
Data type:
Values:
Returned:
662
MQCHT_CLUSSDR
Cluster sender channel.
Always.
RemoteQmgr
Description:
Identifier:
Data type:
Maximum length:
Returned:
ConnectionName
Description:
Identifier:
Data type:
Maximum length:
Returned:
MsgCount
Description:
Identifier:
Data type:
Returned:
TotalBytes
Description:
Identifier:
Data type:
Returned:
The number of bytes sent or received for persistent and nonpersistent messages. This
parameter is an integer list indexed by persistence value, see Reference note 2
MQIAMO64_BYTES.
MQCFIN64.
When available.
NetTimeMin
Description:
Identifier:
Data type:
Returned:
The shortest recorded channel round trip measured in the recording interval, in
microseconds.
MQIAMO_NET_TIME_MIN.
MQCFIN.
When available.
NetTimeAvg
Description:
Identifier:
Data type:
Returned:
The average recorded channel round trip measured in the recording interval, in
microseconds.
MQIAMO_NET_TIME_AVG.
MQCFIN.
When available.
NetTimeMax
663
Description:
Identifier:
Data type:
Returned:
The longest recorded channel round trip measured in the recording interval, in
microseconds.
MQIAMO_NET_TIME_MAX.
MQCFIN.
When available.
ExitTimeMin
Description:
Identifier:
Data type:
Returned:
The shortest recorded time, in microseconds, spent executing a user exit in the recording
interval,
MQIAMO_EXIT_TIME_MIN.
MQCFIN.
When available.
ExitTimeAvg
Description:
Identifier:
Data type:
Returned:
The average recorded time, in microseconds, spent executing a user exit in the recording
interval. Measured in microseconds.
MQIAMO_EXIT_TIME_AVG.
MQCFIN.
When available.
ExitTimeMax
Description:
Identifier:
Data type:
Returned:
The longest recorded time, in microseconds, spent executing a user exit in the recording
interval. Measured in microseconds.
MQIAMO_EXIT_TIME_MAX.
MQCFIN.
When available.
FullBatchCount
Description:
Identifier:
Data type:
Returned:
The number of batches processed by the channel that were sent because the value of the
channel attributes BATCHSZ or BATCHLIM was reached.
MQIAMO_FULL_BATCHES.
MQCFIN.
When available.
IncmplBatchCount
Description:
Identifier:
Data type:
Returned:
The number of batches processed by the channel, that were sent without the value of the
channel attribute BATCHSZ being reached.
MQIAMO_INCOMPLETE_BATCHES.
MQCFIN.
When available.
AverageBatchSize
664
Description:
Identifier:
Data type:
Returned:
PutRetryCount
Description:
Identifier:
Data type:
Returned:
The number of times in the time interval that a message failed to be put, and entered a retry
loop.
MQIAMO_PUT_RETRIES.
MQCFIN.
When available.
Reference notes
Use this page to view the notes to which descriptions of the structure of accounting and statistics
messages refer
The following message data descriptions refer to these notes:
v MQI accounting message data on page 621
v Queue accounting message data on page 632
v MQI statistics message data on page 642
v Queue statistics message data on page 653
v Channel statistics message data on page 660
1. This parameter relates to WebSphere MQ objects. This parameter is an array of values (MQCFIL or
MQCFIL64) indexed by the following constants:
Table 55. Array indexed by object type
Object type
Value context
MQOT_Q (1)
MQOT_NAMELIST (2)
MQOT_PROCESS (3)
MQOT_Q_MGR (5)
MQOT_CHANNEL (6)
MQOT_AUTH_INFO (7)
MQOT_TOPIC (8)
Note: An array of 13 MQCFIL or MQCFIL64 values are returned but only those listed are meaningful.
2. This parameter relates to WebSphere MQ messages. This parameter is an array of values (MQCFIL or
MQCFIL64) indexed by the following constants:
665
Value
Note: The index for each of these arrays starts at zero, so an index of 1 refers to the second row of the
array. Elements of these arrays not listed in these tables contain no accounting or statistics information.
666
Enabling application activity trace can affect performance. The overhead can be reduced by tuning the
ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application
activity trace on page 672.
Procedure
1.
2.
3.
4.
Example
To change the value of the ACTVTRC parameter, you use the MQSC command ALTER QMGR. For example, to
enable MQI application activity trace information collection use the following MQSC command:
ALTER QMGR ACTVTRC(ON)
What to do next
Enabling application activity trace can affect performance. The overhead can be reduced by tuning the
ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application
activity trace on page 672.
Procedure
1. Set the queue manager attribute ACTVCONO to ENABLED.
Note: If an application attempts to modify the accounting behavior of an application using the
ConnectOpts parameter, and the QMGR attribute ACTVCONO is set to DISABLED, then no error is returned
to the application, and activity trace collection is defined by the queue manager attributes or the
activity trace configuration file mqat.ini.
2. Set the ConnectOpts parameter on the MQCONNX call to MQCNO_ ACTIVITY_ TRACE_ENABLED.
Monitoring and performance
667
The ConnectOpts parameter on the MQCONNX call can have the following values:
MQCNO_ACTIVITY_ TRACE_DISABLED
Activity trace is switched off for the connection.
MQCNO_ ACTIVITY_ TRACE_ENABLED
Activity trace is switched on for the connection.
Note: If an application selects both MQCNO_ ACTIVITY_ TRACE_ENABLED and MQCNO_ACTIVITY_
TRACE_DISABLED for MQCONNX, the call fails with a reason code of MQRC_OPTIONS_ERROR.
3. Check that these activity trace settings are not being overridden by settings in the activity trace
configuration file mqat.ini.
See Configuring activity trace behavior using mqat.ini.
What to do next
Enabling application activity trace can affect performance. The overhead can be reduced by tuning the
ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application
activity trace on page 672.
On Windows systems, mqat.ini is located in the queue manager data directory C:\Program
Files\IBM\WebSphere MQ\qmgrs. Users running applications to be traced need permission to read this file.
Windows
668
The AllActivityTrace stanza defines settings for the activity trace that is applied to all WebSphere MQ
connections unless overridden.
Individual values in the AllActivityTrace stanza can be overridden by more specific information in an
ApplicationTrace stanza.
If more than one AllActivityTrace stanza is specified then the values in the last stanza is used. Parameters
missing from the chosen AllActivityTrace take default values. Parameters and values from previous
AllActivityTrace stanzas are ignored
ApplicationTrace stanza
The ApplicationTrace stanza defines settings which can be applied to a specific name, type or both of
WebSphere MQ connection.
This stanza includes ApplName and ApplClass values which are used according to the matching rules
defined in Connection Matching Rules to determine whether the stanza applies to a particular connection.
Parameter/Value Pairs
The following table lists the parameter/value pairs which may be used in the activity trace configuration
file.
Table 57. Parameter/value pairs that can be used in the activity trace configuration file
Name
Stanza Type
Description
Trace
ApplicationTrace
ON / OFF
ActivityInterval
AllActivityTrace
ApplicationTrace
0-99999999 (0=off)
669
Table 57. Parameter/value pairs that can be used in the activity trace configuration file (continued)
Name
Stanza Type
Description
ActivityCount
AllActivityTrace
ApplicationTrace
0-99999999 (0=off)
Number of MQI or XA
operations between trace
messages. If this value is 0
then the trace message is
written when the
connection disconnects (or
when the activity interval
has elapsed).
TraceLevel
AllActivityTrace
ApplicationTrace
Amount of parameter
detail traced for each
operation. The description
of individual operations
details which parameters
are included for each trace
level.
TraceMessageData
AllActivityTrace
ApplicationTrace
ApplName
ApplicationTrace
670
Table 57. Parameter/value pairs that can be used in the activity trace configuration file (continued)
Name
Stanza Type
Description
ApplClass
ApplicationTrace
The following table shows how the AppClass values correspond to the APICallerType and
APIEnvironment fields in the connection API exit context structure.
Table 58. Appclass values and how they correspond to the APICallerType and APIEnvironment fields
APPLCLASS
API Environment:
Description
USER
MQXACT_EXTERNAL
MQXE_OTHER
MCA
(Any value)
MQXE_MCA
MQXE_MCA_CLNTCONN
MQXE_MCA_SVRCONN
INTERNAL
MQXACT_EXTERNAL
MQXE_COMMAND_SERVER
MQXE_MQSC
INTERNAL
MQXACT_INTERNAL
(Any value)
ALL
(Any value)
(Any value)
671
5. If after applying the rules in points 2, 3, and 4, there is more than one stanza that matches the
connections ApplName and ApplClass, then the values from the last matching will be used and all
other stanzas will be ignored.
ActivityCount=0
TraceLevel=MEDIUM
TraceMessageData=0
#
#
#
#
#
#
#
#
#
#
#
#
ApplicationTrace:
ApplClass=USER
ApplName=AppName*
Trace=OFF
ActivityInterval=0
ActivityCount=0
TraceLevel=MEDIUM
TraceMessageData=0
# Application type
Values: (USER | MCA | INTERNAL | ALL)
Default: USER
Application name (may be wildcarded)
(matched to app name without path)
Default: *
Activity trace switch for application
Values: ( ON | OFF )
Default: OFF
Time interval between trace messages
Values: 0-99999999 (0=off)
Default: 0
Number of operations between trace msgs
Values: 0-99999999 (0=off)
Default: 0
Amount of data traced for each operation
Values: LOW | MEDIUM | HIGH
Default: MEDIUM
Amount of message data traced
Values: 0-100000000
Default: 0
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
#
What to do next
Enabling application activity trace can affect performance. The overhead can be reduced by tuning the
ActivityCount and the ActivityInterval settings. See Tuning the performance impact of application
activity trace.
672
where a service level agreement (SLA) requires a minimum response time from the messaging provider, it
might not be appropriate to collect application activity trace or it might be necessary to adjust the detail
or frequency of trace activity messages that are produced. The preset values of ActivityInterval,
ActivityCount and TraceLevel in the mqat.ini file give a default balance of detail and performance.
However, you can tune these values to meet the precise functional and performance requirements of your
system.
Procedure
v Only trace the applications that you need.
Do this by creating an ApplicationTrace application-specific stanza in mqat.ini, or by changing the
application to specify MQCNO_ACTIVITY_TRACE_ENABLED in the options field on the MQCNO structure on an
MQCONNX call. See Configuring activity trace behavior using mqat.ini on page 668 and Setting
MQCONNX options to control collection of activity trace information on page 667.
v Before starting trace, check that at least one application is running and is ready to retrieve the activity
trace message data from the SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE.
v Keep the queue depth as low as possible, by increasing the number of applications draining the queue.
v Set the TraceLevel value in the mqat.ini file to collect the minimum amount of data required.
TraceLevel=LOW has the lowest impact to messaging performance. See Configuring activity trace
behavior using mqat.ini on page 668.
v Tune the ActivityCount and ActivityInterval values in mqat.ini, to adjust how often activity trace
messages are generated.
If you are tracing multiple applications, the activity trace messages might be being produced faster
than they can be removed from the SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE. However, when you
reduce how often activity trace messages are generated, you are also increasing the storage space
required by the queue manager and the size of the messages when they are written to the queue.
What to do next
673
CorrelId
Description:
Value:
Correlation identifier.
Initialized with the ConnectionId of the application
StrucLength
Description:
Data type:
Value:
Version
Description:
Data type:
Values:
Command
Description:
Data type:
Values:
MsgSeqNumber
674
Description:
Data type:
Values:
Message sequence number. This field is the sequence number of the message within a group
of related messages.
MQLONG.
1
Control
Description:
Data type:
Values:
Control options.
MQLONG.
MQCFC_LAST.
CompCode
Description:
Data type:
Values:
Completion code.
MQLONG.
MQCC_OK.
Reason
Description:
Data type:
Values:
ParameterCount
Description:
Data type:
Values:
Count of parameter structures. This field is the number of parameter structures that follow
the MQCFH structure. A group structure (MQCFGR), and its included parameter structures,
are counted as one structure only.
MQLONG.
1 or greater
System queue:
SYSTEM.ADMIN.TRACE.ACTIVITY.QUEUE.
QueueManager
Description:
Identifier:
Data type:
Maximum length:
QSGName
HostName
675
Description:
Identifier:
Data type:
IntervalStartDate
Description:
Identifier:
Data type:
Maximum length:
IntervalStartTime
Description:
Identifier:
Data type:
Maximum length:
IntervalEndDate
Description:
Identifier:
Data type:
Maximum length:
IntervalEndTime
Description:
Identifier:
Data type:
Maximum length:
CommandLevel
Description:
Identifier:
Data type:
SeqNumber
Description:
Identifier:
Data type:
The sequence number normally zero. This value is incremented for each subsequent record
for long running connections.
MQIACF_SEQUENCE_NUMBER
MQCFIN
ApplicationName
676
Description:
Identifier:
Data type:
Maximum length:
ApplClass
Description:
Identifier:
Data type:
ApplicationPid
Description:
Identifier:
Data type:
UserId
Description:
Identifier:
Data type:
Maximum length:
APICallerType
Description:
Identifier:
Data type:
Environment
Description:
Identifier:
Data type:
Detail
Description:
Identifier:
Data type:
The detail level that is recorded for the connection. Possible values: 1=LOW 2=MEDIUM
3=HIGH
MQIACF_TRACE_DETAIL
MQCFIN
TraceDataLength
677
Description:
Identifier:
Data type:
The length of message data (in bytes) that is traced for this connection.
MQIACF_TRACE_DATA_LENGTH
MQCFIN
Pointer Size
Description:
Identifier:
Data type:
The length (in bytes) of pointers on the platform the application is running (to assist in
interpretation of binary structures )
MQIACF_POINTER_SIZE
MQCFIN
Platform
Description:
Identifier:
Data type:
The platform on which the queue manager is running. Value is one of the MQPL_* values.
MQIA_PLATFORM
MQCFIN
678
MQBACK:
Application has started the MQBACK MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type
Reason
Description:
PCF Parameter:
Trace level:
Type
MQBEGIN:
Application has started the MQBEGIN MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type
Reason
Description:
PCF Parameter:
Trace level:
Type
MQBO
Description:
PCF Parameter:
Trace level:
Type
Length:
The MQBEGIN options structure. This parameter is not included if a NULL pointer is used
on the MQBEGIN call.
MQBACF_MQBO_STRUCT
3
MQCFBS
The length in bytes of the MQBO structure.
679
MQCALLBACK:
Application has started the MQCALLBACK function
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type
CallType
Description:
PCF Parameter:
Trace level:
Type
MsgBuffer
Description:
PCF Parameter:
Trace level:
Type
Length:
Message data.
MQBACF_MESSAGE_DATA
1
MQCFBS
Length is governed by the TRACEDATA() parameter set in the APPTRACE configuration. If
TRACEDATA=NONE then this parameter is omitted.
MsgLength
Description:
PCF Parameter:
Trace level:
Type
Length of the message. (Taken from the DataLength field in the MQCBC structure).
MQIACF_MSG_LENGTH
1
MQCFIN
HighResTime
Description:
PCF Parameter:
Trace level:
Type
ReportOptions
Description:
PCF Parameter:
Trace level:
Type
MsgType
680
Description:
PCF Parameter:
Trace level:
Type
Type of message
MQIACF_MSG_TYPE
2
MQCFIN
Expiry
Description:
PCF Parameter:
Trace level:
Type
Message lifetime
MQIACF_EXPIRY
2
MQCFIN
Format
Description:
PCF Parameter:
Trace level:
Type
Length:
Priority
Description:
PCF Parameter:
Trace level:
Type
Message priority
MQIACF_PRIORITY
2
MQCFIN
Persistence
Description:
PCF Parameter:
Trace level:
Type
Message persistence
MQIACF_PERSISTENCE
2
MQCFIN
MsgId
Description:
PCF Parameter:
Trace level:
Type
Length:
Message identifier
MQBACF_MSG_ID
2
MQCFBS
MQ_MSG_ID_LENGTH
CorrelId
681
Description:
PCF Parameter:
Trace level:
Type
Length:
Correlation identifier
MQBACF_CORREL_ID
2
MQCFBS
MQ_CORREL_ID_LENGTH
ObjectName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
The local name of the queue from which the message was retrieved.
MQCACF_RESOLVED_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
ReplyToQueue
Description:
PCF Parameter:
Trace level:
Type
MQ_Q_NAME_LENGTH
MQCACF_REPLY_TO_Q
2
MQCFST
ReplyToQMgr
Description:
PCF Parameter:
Trace level:
Type
MQ_Q_MGR_NAME_LENGTH
MQCACF_REPLY_TO_Q_MGR
2
MQCFST
CodedCharSetId
Description:
PCF Parameter:
Trace level:
Type
Encoding
682
Description:
PCF Parameter:
Trace level:
Type
PutDate
Description:
PCF Parameter:
Trace level:
Type
MQ_PUT_DATE_LENGTH
MQCACF_PUT_DATE
2
MQCFST
PutTime
Description:
PCF Parameter:
Trace level:
Type
MQ_PUT_TIME_LENGTH
MQCACF_PUT_TIME
2
MQCFST
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
PolicyName
683
Description:
PCF Parameter:
Trace level:
Type
Length:
XmitqMsgId
Description:
PCF Parameter:
Trace level:
Type
Length:
XmitqCorrelId
Description:
PCF Parameter:
Trace level:
Type
Length:
XmitqPutTime
Description:
PCF Parameter:
Trace level:
Type
Length:
XmitqPutDate
Description:
PCF Parameter:
Trace level:
Type
Length:
XmitqRemoteQName
684
Description:
PCF Parameter:
Trace level:
Type
Length:
The remote queue destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_Name
2
MQCFST
MQ_Q_NAME_LENGTH
XmitqRemoteQMgr
Description:
PCF Parameter:
Trace level:
Type
Length:
MsgDescStructure
Description:
PCF Parameter:
Trace level:
Type
Length:
The MQMD structure. This parameter is omitted if a version 4 MQGMO was used to request
that a Message Handle be returned instead of an MQMD
MQBACF_MQMD_STRUCT
3
MQCFBS
The length in bytes of the MQMD structure (actual size is dependent on structure version)
GetMsgOptsStructure
Description:
PCF Parameter:
Trace level:
Type
Length:
MQCBContextStructure
Description:
PCF Parameter:
Trace level:
Type
Length:
MQCB:
Application has started the manage callback MQI function
CallbackOperation
685
Description:
PCF Parameter:
Trace level:
Type
The manage callback function operation. Set to one of the MQOP_* values
MQIACF_MQCB_OPERATION
1
MQCFIN
CallbackType
Description:
PCF Parameter:
Trace level:
Type
The type of the callback function (CallbackType field from the MQCBD structure). Set to one
of the MQCBT_* values
MQIACF_MQCB_TYPE
1
MQCFIN
CallbackOptions
Description:
PCF Parameter:
Trace level:
Type
CallbackFunction
Description:
PCF Parameter:
Trace level:
Type
Length:
CallbackName
Description:
PCF Parameter:
Trace level:
Type
Length:
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type
MaxMsgLength
686
Description:
PCF Parameter:
Trace level:
Type
CompCode
Description:
PCF Parameter:
Trace level:
Type
Reason
Description:
PCF Parameter:
Trace level:
Type
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
CallBack DescriptorStructure
687
Description:
PCF Parameter:
Trace level:
Type
Length:
The MQCBD structure. This parameter is omitted if a NULL MQCBC value is passed to the
MQCB call.
MQBACF_MQCBD_STRUCT
3
MQCFBS
The length in bytes of the MQCBC structure
MsgDescStructure
Description:
PCF Parameter:
Trace level:
Type
Length:
The MQMD structure. The MsgDescStructure parameter is omitted if a NULL MQMD value
is passed to the MQCB call.
MQBACF_MQMD_STRUCT
3
MQCFBS
The length in bytes of the MQMD structure (actual size depends on structure version)
GetMsgOptsStructure
Description:
PCF Parameter:
Trace level:
Type
Length:
The MQGMO structure. This parameter is omitted if a NULL MQGMO value is passed to
the MQCB call.
MQBACF_MQGMO_STRUCT
3
MQCFBS
The length in bytes of the MQGMO structure (actual size depends on structure version)
MQCLOSE:
Application has started the MQCLOSE MQI function
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type
CloseOptions
Description:
PCF Parameter:
Trace level:
Type
Close options
MQIACF_CLOSE_OPTIONS
1
MQCFIN
CompCode
688
Description:
PCF Parameter:
Trace level:
Type
Reason
Description:
PCF Parameter:
Trace level:
Type
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
MQCMIT:
Application has started the MQCMIT MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type
Reason
689
Description:
PCF Parameter:
Trace level:
Type
QueueManagerName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
The (unresolved) name of the queue manager used in the MQCONN(X) call
MQCA_Q_MGR_NAME
1
MQCFST
MQ_Q_MGR_NAME_LENGTH
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
ConnectOptions
Description:
PCF Parameter:
Trace level:
Type:
ConnectionOptionsStructure
690
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ChannelDefinitionStructure
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQCTL:
Application has started the MQCTL MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
CtlOperation
Description:
PCF Parameter:
Trace level:
Type:
MQDISC:
Application has started the MQDISC MQI function
CompCode
691
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
MQGET:
Application has started the MQGET MQI function
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type:
GetOptions
Description:
PCF Parameter:
Trace level:
Type:
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
MsgBuffer
692
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MsgLength
Description:
PCF Parameter:
Trace level:
Type:
HighResTime
Description:
PCF Parameter:
Trace level:
Type:
BufferLength
Description:
PCF Parameter:
Trace level:
Type:
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Length:
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
The local name of the queue from which the message was retrieved.
MQCACF_RESOLVED_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
ReportOptions
693
Description:
PCF Parameter:
Trace level:
Type:
MsgType
Description:
PCF Parameter:
Trace level:
Type:
Type of message
MQIACF_MSG_TYPE
2
MQCFIN
Expiry
Description:
PCF Parameter:
Trace level:
Type:
Message lifetime
MQIACF_EXPIRY
2
MQCFIN
Format
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
Priority
Description:
PCF Parameter:
Trace level:
Type:
Message priority
MQIACF_PRIORITY
2
MQCFIN
Persistence
Description:
PCF Parameter:
Trace level:
Type:
Message persistence
MQIACF_PERSISTENCE
2
MQCFIN
MsgId
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
Message identifier
MQBACF_MSG_ID
2
MQCFBS
MQ_MSG_ID_LENGTH
CorrelId
694
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
Correlation identifier
MQBACF_CORREL_ID
2
MQCFBS
MQ_CORREL_ID_LENGTH
ReplyToQueue
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQCACF_REPLY_TO_Q
2
MQCFST
MQ_Q_NAME_LENGTH
ReplyToQMgr
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQCACF_REPLY_TO_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
CodedCharSetId
Description:
PCF Parameter:
Trace level:
Type:
Encoding
Description:
PCF Parameter:
Trace level:
Type:
PutDate
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQCACF_PUT_DATE
2
MQCFST
MQ_PUT_DATE_LENGTH
PutTime
695
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQCACF_PUT_TIME
2
MQCFST
MQ_PUT_TIME_LENGTH
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
PolicyName
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqMsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqCorrelId
696
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutTime
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutDate
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqRemoteQName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
XmitqRemoteQMgr
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue manager destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_MGR
2
MQCFST
MQ_Q_NAME_LENGTH
MsgDescStructure
697
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
GetMsgOptsStructure
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
MQINQ:
Application has started the MQINQ MQI function
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type:
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
SelectorCount
Description:
PCF Parameter:
Trace level:
Type:
Selectors
698
Description:
PCF Parameter:
Trace level:
Type:
The list of attributes (integer or character) whose values must be returned by MQINQ.
MQIACF_SELECTORS
2
MQCFIL
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type:
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
IntAttrCount
Description:
PCF Parameter:
Trace level:
Type:
IntAttrs
Description:
PCF Parameter:
Trace level:
Type:
The integer attribute values returned by the inquire operation. This parameter is only
present if IntAttrCount is > 0 when MQINQ returns.
MQIACF_INT_ATTRS
3
MQCFIL
CharAttrs
699
Description:
PCF Parameter:
Trace level:
Type:
The character attributes returned by the inquire operation. The values are concatenated
together. This parameter is only included if CharAttrLength is > 0 when MQINQ returns.
MQCACF_CHAR_ATTRS
3
MQCFST
MQOPEN:
Application has started the MQOPEN MQI function
ObjectType
Description:
PCF Parameter:
Trace level:
Type:
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
The name of the object passed to the MQI call before any queue name resolution is
attempted.
MQCACF_OBJECT_NAME
1
MQCFST
MQ_Q_NAME_LENGTH
ObjectQMgrName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
The name of the object queue manager passed to the MQI call before any queue name
resolution is attempted.
MQCACF_OBJECT_Q_MGR_NAME
1
MQCFST
MQ_Q_MGR_NAME_LENGTH
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type:
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
700
Description:
PCF Parameter:
Trace level:
Type:
OpenOptions
Description:
PCF Parameter:
Trace level:
Type:
AlternateUserId
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
RecsPresent
Description:
PCF Parameter:
Trace level:
Type:
The number of object name records present. Only included if MQOD Version >=
MQOD_VERSION_2
MQIACF_RECS_PRESENT
1
MQCFIN
KnownDestCount
Description:
PCF Parameter:
Trace level:
Type:
Number of local queues opened successfully Only included if MQOD Version >=
MQOD_VERSION_2
MQIACF_KNOWN_DEST_COUNT
1
MQCFIN
UnknownDestCount
Description:
PCF Parameter:
Trace level:
Type:
Number of remote queues opened successfully Only included if MQOD Version >=
MQOD_VERSION_2
MQIACF_UNKNOWN_DEST_COUNT
1
MQCFIN
InvalidDestCount
701
Description:
PCF Parameter:
Trace level:
Type:
Number of queues that failed to open Only included if MQOD Version >=
MQOD_VERSION_2
MQIACF_INVALID_DEST_COUNT
1
MQCFIN
DynamicQName
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ResolvedLocalQName23
Description:
PCF Parameter:
Trace level:
Type:
Range:
Maximum length:
Contains the local queue name after name resolution has been carried out. (e.g. for remote
queues this will be the name of the transmit queue)
MQCACF_RESOLVED_LOCAL_Q_NAME
2
MQCFST
If MQOD.Version is less than MQOD_VERSION_3 this contains the value of the
MQOD.ObjectName field after the MQOPEN call has completed. If MQOD.Version is equal
or greater than MQOD_VERSION_3 this contains the value in the MQOD. ResolvedQName
field.
MQ_Q_NAME_LENGTH
ResolvedLocalQMgrName23
Description:
PCF Parameter:
Trace level:
Type:
Range:
Maximum length:
The local queue manager name after name resolution has been performed.
MQCACF_RESOLVED_LOCAL_Q_MGR
2
MQCFST
Only if MQOD.Version >= MQOD_VERSION_3
MQ_Q_MGR_NAME_LENGTH
ResolvedQName23
Description:
PCF Parameter:
Trace level:
Type:
Range:
Maximum length:
The queue name after name resolution has been carried out.
MQCACF_RESOLVED_Q_NAME
2
MQCFST
If MQOD.Version is less than MQOD_VERSION_3 this contains the value of the
MQOD.ObjectName field after the MQOPEN call has completed. If MQOD.Version is equal
or greater than MQOD_VERSION_3 this contains the value in the MQOD. ResolvedQName
field.
MQ_Q_NAME_LENGTH
ResolvedQMgrName23
702
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
Contains the queue manager name after name resolution has been carried out. If
MQOD.Version is less than MQOD_VERSION_3 this contains the value of the MQOD.
ObjectQMgrName field after the MQOPEN call has completed. If MQOD.Version is equal or
greater than MQOD_VERSION_3 this contains the value in the MQOD. ResolvedQMgrName
field.
MQCACF_RESOLVED_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
AlternateSecurityId
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ObjectString
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
SelectionString
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type:
Maximum length:
The long object name after the queue manager resolves the name provided in the
ObjectName field. Only included for topics and queue aliases that reference a topic object if
MQOD.Version is equal or greater than MQOD_VERSION_4 and VSLength is
MQVS_NULL_TERMINATED or greater than zero.
MQCACF_RESOLVED_OBJECT_STRING
2
MQCFST
Length varies.
ResolvedType
703
Description:
PCF Parameter:
Trace level:
Type:
The type of the resolved (base) object being opened. Only included if MQOD.Version is
equal or greater than MQOD_VERSION_4. Possible values are MQOT_Q, MQOT_TOPIC, or
MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
Value
Description
Type
MQCFT_GROUP
StrucLength
Parameter
MQGACF_APP_DIST_LIST
ParameterCount
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Length:
ObjectQMgrName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of the queue manager on which the queue named in ObjectName is defined.
MQCACF_OBJECT_Q_MGR_NAME
2
MQCFST
MQ_Q_MGR_NAME_LENGTH. Only included if MQOR structures are provided.
CompCode
2. This parameter is only included if the object being opened resolves to a queue, and the queue is opened for MQOO_INPUT_*,
MQOO_OUTPUT, or MQOO_BROWSE
3. The ResolvedLocalQName parameter is only included if it is different from the ResolvedQName parameter.
704
Description:
PCF Parameter:
Trace level:
Type:
The completion code indicating the result of the open for this object. Only included if MQRR
structures are provided and the reason code for the MQOPEN is
MQRC_MULTIPLE_REASONS
MQIACF_COMP_CODE
2
MQCFIN
Reason
Description:
PCF Parameter:
Trace level:
Type:
The reason code indicating the result of the open for this object. Only included if MQRR
structures are provided and the reason code for the MQOPEN is
MQRC_MULTIPLE_REASONS
MQIACF_REASON_CODE
2
MQCFIN
MQPUT:
Application has started the MQPUT MQI function.
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type:
PutOptions
Description:
PCF Parameter:
Trace level:
Type:
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
MsgBuffer
705
Description:
PCF Parameter:
Trace level:
Type:
Length:
Message data.
MQBACF_MESSAGE_DATA
1
MQCFBS
Length is governed by the TRACEDATA() parameter set in the APPTRACE configuration. If
TRACEDATA=NONE then this parameter is omitted.
MsgLength
Description:
PCF Parameter:
Trace level:
Type:
RecsPresent
Description:
PCF Parameter:
Trace level:
Type:
The number of put message records or response records present. Only included if MQPMO
Version >= MQPMO_VERSION_2
MQIACF_RECS_PRESENT
1
MQCFIN
KnownDestCount
Description:
PCF Parameter:
Trace level:
Type:
UnknownDestCount
Description:
PCF Parameter:
Trace level:
Type:
InvalidDestCount
Description:
PCF Parameter:
Trace level:
Type:
HighResTime
706
Description:
PCF Parameter:
Trace level:
Type:
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Length:
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of the queue after queue name resolution has been performed.
MQCACF_RESOLVED_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
ResolvedQMgrName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The queue manager name after name resolution has been performed.
MQCACF_RESOLVED_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
ResolvedLocalQName4
Description:
PCF Parameter:
Trace level:
Type:
Contains the local queue name after name resolution has been carried out.
MQCACF_RESOLVED_LOCAL_Q_NAME
2
MQCFST
ResolvedLocalQMgrName4
Description:
PCF Parameter:
Trace level:
Type:
Length:
Contains the local queue manager name after name resolution has been carried out.
MQCACF_RESOLVED_LOCAL_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
ReportOptions
707
Description:
PCF Parameter:
Trace level:
Type:
MsgType
Description:
PCF Parameter:
Trace level:
Type:
Type of message
MQIACF_MSG_TYPE
2
MQCFIN
Expiry
Description:
PCF Parameter:
Trace level:
Type:
Message lifetime
MQIACF_EXPIRY
2
MQCFIN
Format
Description:
PCF Parameter:
Trace level:
Type:
Length:
Priority
Description:
PCF Parameter:
Trace level:
Type:
Message priority
MQIACF_PRIORITY
2
MQCFIN
Persistence
Description:
PCF Parameter:
Trace level:
Type:
Message persistence
MQIACF_PERSISTENCE
2
MQCFIN
MsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
Message identifier
MQBACF_MSG_ID
2
MQCFBS
MQ_MSG_ID_LENGTH
CorrelId
708
Description:
PCF Parameter:
Trace level:
Type:
Length:
Correlation identifier
MQBACF_CORREL_ID
2
MQCFBS
MQ_CORREL_ID_LENGTH
ReplyToQueue
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_REPLY_TO_Q
2
MQCFST
MQ_Q_NAME_LENGTH
ReplyToQMgr
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_REPLY_TO_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
CodedCharSetId
Description:
PCF Parameter:
Trace level:
Type:
Encoding
Description:
PCF Parameter:
Trace level:
Type:
PutDate
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_PUT_DATE
2
MQCFST
MQ_PUT_DATE_LENGTH
PutTime
709
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_PUT_TIME
2
MQCFST
MQ_PUT_TIME_LENGTH
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type:
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type:
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type:
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
PolicyName
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqMsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqCorrelId
710
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutTime
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutDate
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqRemoteQName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
XmitqRemoteQMgr
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue manager destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_MGR
2
MQCFST
MQ_Q_NAME_LENGTH
PutMsgOptsStructure
711
Description:
PCF Parameter:
Trace level:
Type:
Length:
PCF Parameter:
Trace level:
Type:
The completion code indicating the result of the operation. Only included if MQRR
structures are provided and the reason code for the MQPUT is
MQRC_MULTIPLE_REASONS
MQIACF_COMP_CODE
2
MQCFIN
Reason
Description:
PCF Parameter:
Trace level:
Type:
The reason code indicating the result of the put for this object. Only included if MQRR
structures are provided and the reason code for the MQPUT is
MQRC_MULTIPLE_REASONS
MQIACF_REASON_CODE
2
MQCFIN
MsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
CorrelId
4. The ResolvedLocalQName parameter is only included if it is different from the ResolvedQName parameter.
712
Description:
PCF Parameter:
Trace level:
Type:
Length:
GroupId
Description:
PCF Parameter:
Trace level:
Type:
Length:
Feedback
Description:
PCF Parameter:
Trace level:
Type:
AccountingToken
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQPUT1:
Application has started the MQPUT1 MQI function
ObjectType
Description:
PCF Parameter:
Trace level:
Type:
ObjectName
713
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of the object passed to the MQI call before any queue name resolution is
attempted.
MQCACF_OBJECT_NAME
1
MQCFST
MQ_Q_NAME_LENGTH
ObjectQMgrName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of the object queue manager passed to the MQI call before any queue name
resolution is attempted.
MQCACF_OBJECT_Q_MGR_NAME
1
MQCFST
MQ_Q_MGR_NAME_LENGTH
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
PutOptions
Description:
PCF Parameter:
Trace level:
Type:
AlternateUserId
Description:
PCF Parameter:
Trace level:
Type:
Length:
RecsPresent
714
Description:
PCF Parameter:
Trace level:
Type:
KnownDestCount
Description:
PCF Parameter:
Trace level:
Type:
UnknownDestCount
Description:
PCF Parameter:
Trace level:
Type:
InvalidDestCount
Description:
PCF Parameter:
Trace level:
Type:
MsgBuffer
Description:
PCF Parameter:
Trace level:
Type:
Length:
Message data.
MQBACF_MESSAGE_DATA
1
MQCFBS
Length is governed by the TRACEDATA() parameter set in the APPTRACE configuration. If
TRACEDATA=NONE then this parameter is omitted.
MsgLength
Description:
PCF Parameter:
Trace level:
Type:
HighResTime
Description:
PCF Parameter:
Trace level:
Type:
ResolvedQName
715
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of the queue after queue name resolution has been performed.
MQCACF_RESOLVED_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
ResolvedQMgrName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The queue manager name after name resolution has been performed.
MQCACF_RESOLVED_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
ResolvedLocalQName5
Description:
PCF Parameter:
Trace level:
Type:
Contains the local queue name after name resolution has been carried out
MQCACF_RESOLVED_LOCAL_Q_NAME
2
MQCFST
ResolvedLocalQMgrName5
Description:
PCF Parameter:
Trace level:
Type:
Length:
Contains the local queue manager name after name resolution has been carried out.
MQCACF_RESOLVED_LOCAL_Q_MGR
2
MQCFST
MQ_Q_MGR_NAME_LENGTH
AlternateSecurityId
Description:
PCF Parameter:
Trace level:
Type:
Length:
ObjectString
Description:
PCF Parameter:
Trace level:
Type:
Length:
ResObjectString
716
Description:
PCF Parameter:
Trace level:
Type:
Length:
The long object name after the queue manager resolves the name provided in the
ObjectName field. Only included for topics and queue aliases that reference a topic object if
MQOD.Version is equal or greater than MQOD_VERSION_4 and VSLength is
MQVS_NULL_TERMINATED or greater than zero.
MQCACF_RESOLVED_OBJECT_STRING
2
MQCFST
Length varies.
ResolvedType
Description:
PCF Parameter:
Trace level:
Type:
The type of the resolved (base) object being opened. Only included if MQOD.Version is
equal or greater than MQOD_VERSION_4. Possible values are MQOT_Q, MQOT_TOPIC, or
MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
ReportOptions
Description:
PCF Parameter:
Trace level:
Type:
MsgType
Description:
PCF Parameter:
Trace level:
Type:
Type of message
MQIACF_MSG_TYPE
2
MQCFIN
Expiry
Description:
PCF Parameter:
Trace level:
Type:
Message lifetime
MQIACF_EXPIRY
2
MQCFIN
Format
Description:
PCF Parameter:
Trace level:
Type:
Length:
Priority
717
Description:
PCF Parameter:
Trace level:
Type:
Message priority
MQIACF_PRIORITY
2
MQCFIN
Persistence
Description:
PCF Parameter:
Trace level:
Type:
Message persistence
MQIACF_PERSISTENCE
2
MQCFIN
MsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
Message identifier
MQBACF_MSG_ID
2
MQCFBS
MQ_MSG_ID_LENGTH
CorrelId
PCF Parameter:
Description:
Trace level:
Type:
Length:
Correlation identifier
MQBACF_CORREL_ID
2
MQCFBS
MQ_CORREL_ID_LENGTH
ReplyToQueue
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_REPLY_TO_Q
2
MQCFST
MQ_Q_NAME_LENGTH
ReplyToQMgr
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_REPLY_TO_Q_MGR
2
MQCFST
MQCFST
CodedCharSetId
718
Description:
PCF Parameter:
Trace level:
Type:
Encoding
Description:
PCF Parameter:
Trace level:
Type:
PutDate
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_PUT_DATE
2
MQCFST
MQ_PUT_DATE_LENGTH
PutTime
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQCACF_PUT_TIME
2
MQCFST
MQ_PUT_TIME_LENGTH
PolicyName
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqMsgId
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqCorrelId
719
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutTime
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqPutDate
Description:
PCF Parameter:
Trace level:
Type:
Length:
XmitqRemoteQName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
XmitqRemoteQMgr
Description:
PCF Parameter:
Trace level:
Type:
Length:
The remote queue manager destination of the message in the transmission queue header.
Note: Only when Format is MQFMT_XMIT_Q_HEADER
MQCACF_XQH_REMOTE_Q_MGR
2
MQCFST
MQ_Q_NAME_LENGTH
PutMsgOptsStructure
720
Description:
PCF Parameter:
Trace level:
Type:
Length:
PCF Parameter:
Trace level:
Type:
The completion code indicating the result of the put for this object. Only included if MQRR
structures are provided and the reason code for the MQPUT1 is
MQRC_MULTIPLE_REASONS
MQIACF_COMP_CODE
2
MQCFIN
Reason
Description:
PCF Parameter:
Trace level:
Type:
The reason code indicating the result of the put for this object. Only included if MQRR
structures are provided and the reason code for the MQPUT1 is
MQRC_MULTIPLE_REASONS
MQIACF_REASON_CODE
2
MQCFIN
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Length:
The name of a queue in the distribution list. Only included if MQOR structures are
provided.
MQCACF_OBJECT_NAME
2
MQCFST
MQ_Q_NAME_LENGTH
MsgId
5. The ResolvedLocalQName parameter is only included if it is different from the ResolvedQName parameter.
Monitoring and performance
721
Description:
PCF Parameter:
Trace level:
Type:
Length:
CorrelId
Description:
PCF Parameter:
Trace level:
Type:
Length:
GroupId
Description:
PCF Parameter:
Trace level:
Type:
Length:
Feedback
Description:
PCF Parameter:
Trace level:
Type:
AccountingToken
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQSET:
Application has started the MQSET MQI function
ObjectHandle
722
Description:
PCF Parameter:
Trace level:
Type:
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
SelectorCount
Description:
PCF Parameter:
Trace level:
Type:
Selectors
Description:
PCF Parameter:
Trace level:
Type:
The list of attributes (integer or character) whose values are being updated by MQSET.
MQIACF_SELECTORS
2
MQCFIL
ResolvedQName
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
723
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
IntAttrCount
Description:
PCF Parameter:
Trace level:
Type:
IntAttrs
Description:
PCF Parameter:
Trace level:
Type:
Range:
CharAttrs
Description:
PCF Parameter:
Trace level:
Type:
Range:
The character attributes to be updated by the set operation. The values are concatenated
together.
MQCACF_CHAR_ATTRS
3
MQCFST
This parameter is only included if CharAttrLength is > 0
MQSUB:
Application has started the MQSUB MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
SubHandle
724
Description:
PCF Parameter:
Trace level:
Type:
ObjectHandle
Description:
PCF Parameter:
Trace level:
Type:
Options
Description:
PCF Parameter:
Trace level:
Type:
Subscription options
MQIACF_SUB_OPTIONS
1
MQCFIN
ObjectName
Description:
PCF Parameter:
Trace level:
Type:
Length:
ObjectString
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
AlternateUserId
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
MQCACF_ALTERNATE_USERID
2
MQCFST
Only included if MQSO_ALTERNATE_USER_AUTHORITY is specified.
MQ_USER_ID_LENGTH
AlternateSecurityId
725
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
SubName
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
Subscription Name
MQCACF_SUB_NAME
2
MQCFST
Only included if the VSLength field of MQSD.SubName is greater than zero or
MQVS_NULL_TERMINATED.
Length varies.
SubUserData
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
SubCorrelId
Description:
PCF Parameter:
Trace level:
Type:
Length:
SelectionString
Description:
PCF Parameter:
Trace level:
Type:
Range:
Length:
Selection string.
MQCACF_SELECTION_STRING
2
MQCFST
Only included if the VSLength field of MQSD. SelectionString is
MQVS_NULL_TERMINATED or greater than zero.
Length varies.
ResolvedQName
726
Description:
PCF Parameter:
Trace level:
Type
Length:
ResObjectString
Description:
PCF Parameter:
Trace level:
Type
Length:
ResolvedType
Description:
PCF Parameter:
Trace level:
Type
The type of the object referred to by the ObjectHandle. Possible values are MQOT_Q,
MQOT_TOPIC, or MQOT_NONE.
MQIACF_RESOLVED_TYPE
2
MQCFIN
SubDescriptorStructure
Description:
PCF Parameter:
Trace level:
Type:
Length:
MQSUBRQ:
Application has started the MQSUBRQ MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
SubHandle
727
Description:
PCF Parameter:
Trace level:
Type:
SubOptions
Description:
PCF Parameter:
Trace level:
Type:
Action
Description:
PCF Parameter:
Trace level:
Type:
NumPubs
Description:
PCF Parameter:
Trace level:
Type:
MQSTAT:
Application has started the MQSTAT MQI function
CompCode
Description:
PCF Parameter:
Trace level:
Type:
Reason
Description:
PCF Parameter:
Trace level:
Type:
Type
728
Description:
PCF Parameter:
Trace level:
Type:
StatusStructure
Description:
PCF Parameter:
Trace level:
Type:
Length:
729
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
AXUNREG:
Application has started the AXUNREG AX function
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
730
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XACLOSE:
Application has started the XACLOSE AX function
Xa_info
Description:
PCF Parameter:
Trace level:
Type:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XACOMMIT:
Application has started the XACOMMIT AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
731
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XACOMPLETE:
Application has started the XACOMPLETE AX function
Handle
Description:
PCF Parameter:
Trace level:
Type:
Retval
Description:
PCF Parameter:
Trace level:
Type:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
732
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XAEND:
Application has started the XAEND AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
733
XAFORGET:
Application has started the AXREG AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XAOPEN:
Application has started the XAOPEN AX function
Xa_info
Description:
PCF Parameter:
Trace level:
Type:
Rmid
734
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XAPREPARE:
Application has started the XAPREPARE AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
735
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XARECOVER:
Application has started the XARECOVER AX function
Count
Description:
PCF Parameter:
Trace level:
Type:
Count of XIDs
MQIACF_XA_COUNT
1
MQCFIN
XIDs
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
736
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XAROLLBACK:
Application has started the XAROLLBACK AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
XASTART:
Application has started the XASTART AX function
XID
Description:
PCF Parameter:
Trace level:
Type:
Length:
Rmid
737
Description:
PCF Parameter:
Trace level:
Type:
Flags
Description:
PCF Parameter:
Trace level:
Type:
Flags
MQIACF_XA_FLAGS
1
MQCFIN
XARetCode
Description:
PCF Parameter:
Trace level:
Type:
Return code
MQIACF_XA_RETCODE
1
MQCFIN
Real-time monitoring
Real-time monitoring is a technique that allows you to determine the current state of queues and
channels within a queue manager. The information returned is accurate at the moment the command was
issued.
A number of commands are available that when issued return real-time information about queues and
channels. Information can be returned for one or more queues or channels and can vary in quantity.
Real-time monitoring can be used in the following tasks:
v Helping system administrators understand the steady state of their WebSphere MQ system. This helps
with problem diagnosis if a problem occurs in the system.
v Determining the condition of your queue manager at any moment, even if no specific event or problem
has been detected.
v Assisting with determining the cause of a problem in your system.
With real-time monitoring, information can be returned for either queues or channels. The amount of
real-time information returned is controlled by queue manager, queue, and channel attributes.
v You monitor a queue by issuing commands to ensure that the queue is being serviced properly. Before
you can use some of the queue attributes, you must enable them for real-time monitoring.
v You monitor a channel by issuing commands to ensure that the channel is running properly. Before
you can use some of the channel attributes, you must enable them for real-time monitoring.
Real-time monitoring for queues and channels is in addition to, and separate from, performance and
channel event monitoring.
738
Description
Usage
Low
Measure a small sample of the data, at regular For objects that process a high volume of
intervals.
messages.
Medium
High
For real-time monitoring of queues, you can set the MONQ attribute to one of the three monitoring
levels, low, medium or high. However, there is no distinction between these values. The values all enable
data collection, but do not affect the size of the sample.
Examples
The following examples demonstrate how to set the necessary queue, channel, and queue manager
attributes to control the level of monitoring. For all of the examples, when monitoring is enabled, queue
and channel objects have a medium level of monitoring.
1. To enable both queue and channel monitoring for all queues and channels at the queue manager
level, use the following commands:
ALTER QMGR MONQ(MEDIUM) MONCHL(MEDIUM)
ALTER QL(Q1) MONQ(QMGR)
ALTER CHL(QM1.TO.QM2) CHLTYPE(SDR) MONCHL(QMGR)
2. To enable monitoring for all queues and channels, with the exception of local queue, Q1, and sender
channel, QM1.TO.QM2, use the following commands:
ALTER QMGR MONQ(MEDIUM) MONCHL(MEDIUM)
ALTER QL(Q1) MONQ(OFF)
ALTER CHL(QM1.TO.QM2) CHLTYPE(SDR) MONCHL(OFF)
Monitoring and performance
739
3. To disable both queue and channel monitoring for all queues and channels, with the exception of local
queue, Q1, and sender channel, QM1.TO.QM2, use the following commands:
ALTER QMGR MONQ(OFF) MONCHL(OFF)
ALTER QL(Q1) MONQ(MEDIUM)
ALTER CHL(QM1.TO.QM2) CHLTYPE(SDR) MONCHL(MEDIUM)
4. To disable both queue and channel monitoring for all queues and channels, regardless of individual
object attributes, use the following command:
ALTER QMGR MONQ(NONE) MONCHL(NONE)
5. To control the monitoring capabilities of automatically defined cluster-sender channels use the
following command:
ALTER QMGR MONACLS(MEDIUM)
6. To specify that automatically defined cluster-sender channels are to use the queue manager setting for
channel monitoring, use the following command:
ALTER QMGR MONACLS(QMGR)
Related concepts:
Real-time monitoring on page 738
Real-time monitoring is a technique that allows you to determine the current state of queues and
channels within a queue manager. The information returned is accurate at the moment the command was
issued.
Using WebSphere MQ online monitoring
You can collect monitoring data for queues and channels (including automatically defined cluster-server
channels) by setting the MONQ, MONCHL, and MONACLS attributes.
Related tasks:
Displaying queue and channel monitoring data
To display real-time monitoring information for a queue or channel, use either the WebSphere MQ
Explorer or the appropriate MQSC command. Some monitoring fields display a comma-separated pair of
indicator values, which help you to monitor the operation of your queue manager. Examples demonstrate
how you can display monitoring data.
Related information:
Working with queue managers
Examples of MQSC commands that you can use to display or alter queue manager attributes.
Monitoring (MONCHL)
740
These indicator values are most useful to detect changes in the operation of your queue manager. This
requires knowledge of the times these indicators show when in normal use, in order to detect increases in
these times. By collecting and checking these values regularly you can detect fluctuations in the operation
of your queue manager. This can indicate a change in performance.
Obtain real-time monitoring information as follows:
Procedure
1. To display
the MQSC
2. To display
the MQSC
real-time monitoring information for a queue, use either the WebSphere MQ Explorer or
command DISPLAY QSTATUS, specifying the optional parameter MONITOR.
real-time monitoring information for a channel, use either the WebSphere MQ Explorer or
command DISPLAY CHSTATUS, specifying the optional parameter MONITOR.
Example
The queue, Q1, has the attribute MONQ set to the default value, QMGR, and the queue manager that
owns the queue has the attribute MONQ set to MEDIUM. To display the monitoring fields collected for
this queue, use the following command:
DISPLAY QSTATUS(Q1) MONITOR
The monitoring fields and monitoring level of queue, Q1 are displayed as follows:
QSTATUS(Q1)
TYPE(QUEUE)
MONQ(MEDIUM)
QTIME(11892157,24052785)
MSGAGE(37)
LPUTDATE(2005-03-02)
LPUTTIME(09.52.13)
LGETDATE(2005-03-02)
LGETTIME(09.51.02)
The sender channel, QM1.TO.QM2, has the attribute MONCHL set to the default value, QMGR, and the
queue manager that owns the queue has the attribute MONCHL set to MEDIUM. To display the
monitoring fields collected for this sender channel, use the following command:
DISPLAY CHSTATUS(QM1.TO.QM2) MONITOR
The monitoring fields and monitoring level of sender channel, QM1.TO.QM2 are displayed as follows:
CHSTATUS(QM1.TO.QM2)
XMITQ(Q1)
CONNAME(127.0.0.1)
CURRENT
CHLTYPE(SDR)
STATUS(RUNNING)
SUBSTATE(MQGET)
MONCHL(MEDIUM)
XQTIME(755394737,755199260)
NETTIME(13372,13372)
EXITTIME(0,0)
XBATCHSZ(50,50)
COMPTIME(0,0)
STOPREQ(NO)
RQMNAME(QM2)
741
Related concepts:
Real-time monitoring on page 738
Real-time monitoring is a technique that allows you to determine the current state of queues and
channels within a queue manager. The information returned is accurate at the moment the command was
issued.
Related information:
DISPLAY QSTATUS
Monitoring queues
Use this page to view tasks that help you to resolve a problem with a queue and the application that
services that queue. Various monitoring options are available to determine the problem
Frequently, the first sign of a problem with a queue that is being serviced is that the number of messages
on the queue (CURDEPTH) increases. If you expect an increase at certain times of day or under certain
workloads, an increasing number of messages might not indicate a problem. However, if you have no
explanation for the increasing number of messages, you might want to investigate the cause.
You might have an application queue where there is a problem with the application, or a transmission
queue where there is a problem with the channel. Additional monitoring options are available when the
application that services the queue is a channel.
The following examples investigate problems with a particular queue, called Q1, and describe the fields
that you look at in the output of various commands:
Procedure
1. Ensure that the application that is running against the queue is the application that you expect. Issue
the following command for the queue in question:
DISPLAY QSTATUS(Q1) TYPE(HANDLE) ALL
In the output, look at the APPLTAG field, and check that the name of your application is shown. If
the name of your application is not shown, or if there is no output at all, start your application.
2. If the queue is a transmission queue, look in the output at the CHANNEL field. If the channel name
is not shown in the CHANNEL field, determine whether the channel is running.
3. Ensure that the application that is running against the queue has the queue open for input. Issue the
following command:
DISPLAY QSTATUS(Q1) TYPE(QUEUE) ALL
In the output, look at the IPPROCS field to see if any application has the queue open for input. If the
value is 0 and this is a user application queue, make sure that the application opens the queue for
input to get the messages off the queue.
742
Procedure
1. Ensure that your application is not asking for a specific message ID or correlation ID when it should
be processing all the messages on the queue.
2. Although the current depth of the queue might show that there is an increasing number of messages
on the queue, some messages on the queue might not be available to be got by an application,
because they are not committed; the current depth includes the number of uncommitted MQPUTs of
messages to the queue. Issue the following command:
DISPLAY QSTATUS(Q1) TYPE(QUEUE) ALL
In the output, look at the UNCOM field to see whether there are any uncommitted messages on the
queue.
3. If your application is attempting to get any messages from the queue, check whether the putting
application is committing the messages correctly. Issue the following command to find out the names
of applications that are putting messages to this queue:
DISPLAY QSTATUS(Q1) TYPE(HANDLE) OPENTYPE(OUTPUT)
4. Then issue the following command, inserting in <appltag> the APPLTAG value from the output of the
previous command:
DISPLAY CONN(*) WHERE(APPLTAG EQ <appltag>) UOWSTDA UOWSTTI
This shows when the unit of work was started and will help you discover whether the application is
creating a long running unit of work. If the putting application is a channel, you might want to
investigate why a batch is taking a long time to complete.
Procedure
1. Ensure that the application that is running against the queue is actually processing messages from the
queue. Issue the following command:
DISPLAY QSTATUS(Q1) TYPE(QUEUE) ALL
In the output, look at the LGETDATE and LGETTIME fields which show when the last get was done
from the queue.
2. If the last get from this queue was longer ago than expected, ensure that the application is processing
messages correctly. If the application is a channel, check whether messages are moving through that
channel
743
Procedure
1. Issue the following command periodically to gather performance data about the queue:
DISPLAY QSTATUS(Q1) TYPE(QUEUE) ALL
If the values in the QTIME indicators are high, or are increasing over the period, and you have
already ruled out the possibility of long running Units of Work by checking that messages on the
queue are available, the getting application might not be keeping up with the putting applications.
2. If your getting application cannot keep up with the putting applications, consider adding another
getting application to process the queue. Whether you can add another getting application depends
on the design of the application and whether the queue can be shared by more than one application.
Features such as message grouping or getting by correlation ID might help to ensure that two
applications can process a queue simultaneously.
Procedure
Issue the following command periodically:
DISPLAY QSTATUS(Q1) TYPE(QUEUE) MSGAGE QTIME
In the output, if the value in MSGAGE increases over the period of time, and your application is
designed to process all messages, this might indicate that some messages are not being processed at all.
Monitoring channels
Use this page to view tasks that help you to resolve a problem with a transmission queue and the
channel that services that queue. Various channel monitoring options are available to determine the
problem.
Frequently, the first sign of a problem with a queue that is being serviced is that the number of messages
on the queue (CURDEPTH) increases. If you expect an increase at certain times of day or under certain
workloads, an increasing number of messages might not indicate a problem. However, if you have no
explanation for the increasing number of messages, you might want to investigate the cause.
You might have a problem with the channel that services a transmission queue. Various channel
monitoring options are available to help you to determine the problem.
The following examples investigate problems with a transmission queue called QM2 and a channel called
QM1.TO.QM2. This channel is used to send messages from queue manager, QM1, to queue manager,
QM2. The channel definition at queue manager QM1 is either a sender or server channel, and the channel
definition at queue manager, QM2, is either a receiver or requester channel.
744
Procedure
1. Issue the following command to find out which channel you expect to process the transmission queue
QM2:
DIS CHANNEL(*) WHERE(XMITQ EQ QM2)
In this example, the output of this command shows that the channel servicing the transmission queue
is QM1.TO.QM2
2. Issue the following command to determine the status of the channel, QM1.TO.QM2:
DIS CHSTATUS(QM1.TO.QM2) ALL
3. Inspect the STATUS field of the output from the CHSTATUS command:
v If the value of the STATUS field is RUNNING, check that the channel is moving messages
v If the output from the command shows no status, or the value of the STATUS field is STOPPED,
RETRY, BINDING, or REQUESTING, perform the appropriate step, as follows:
4. Optional: If the value of the STATUS field shows no status, the channel is inactive, so perform the
following steps:
a. If the channel should have been started automatically by a trigger, check that the messages on the
transmission queue are available. If there are messages available on the transmission queue, check
that the trigger settings on the transmission queue are correct.
b. Issue the following command to start the channel again manually:
START CHANNEL(QM1.TO.QM2)
5. Optional: If the value of the STATUS field is STOPPED, perform the following steps:
a. Check the error logs to determine why the channel stopped. If the channel stopped owing to an
error, correct the problem. Ensure also that the channel has values specified for the retry attributes:
SHORTRTY and LONGRTY. In the event of transient failures such as network errors, the channel
will then attempt to restart automatically.
b. Issue the following command to start the channel again manually:
START CHANNEL(QM1.TO.QM2)
6. Optional: If the value of the STATUS field is RETRY, perform the following steps:
a. Check the error logs to identify the error, then correct the problem.
b. Issue the following command to start the channel again manually:
START CHANNEL(QM1.TO.QM2)
Note:
1) In some cases there might be a substate at one end of the channel only.
2) Many substates are transitory, so issue the command a few times to detect whether a channel
is stuck in a particular substate.
Monitoring and performance
745
Responding MCA
substate 2
NAMESERVER
SCYEXIT
CHADEXIT
RCVEXIT
SENDEXIT
MSGEXIT
MREXIT
RCVEXIT
SENDEXIT
MSGEXIT
MREXIT
SERIALIZE
SERIALIZE
NETCONNECT
SSLHANDSHAKE
Notes
SSLHANDSHAKE
Notes:
1) The initiating MCA is the end of the channel which started the conversation. This can be
senders, cluster-senders, fully-qualified servers and requesters. In a server-requester pair, it is
the end from which you started the channel.
2) The responding MCA is the end of the channel which responded to the request to start the
conversation. This can be receivers, cluster-receivers, requesters (when the server or sender is
started), servers (when the requester is started) and senders (in a requester-sender call-back
pair of channels).
746
Procedure
1. In the output from the display channel status command, DIS CHSTATUS(QM1.TO.QM2) ALL, look at the
following fields:
MSGS
Number of messages sent or received (or, for server-connection channels, the number of MQI
calls handled) during this session (since the channel was started).
BUFSSENT
Number of transmission buffers sent. This includes transmissions to send control information
only.
BYTSSENT
Number of bytes sent during this session (since the channel was started). This includes control
information sent by the message channel agent.
LSTMSGDA
Date when the last message was sent or MQI call was handled, see LSTMSGTI.
LSTMSGTI
Time when the last message was sent or MQI call was handled. For a sender or server, this is
the time the last message (the last part of it if it was split) was sent. For a requester or
receiver, it is the time the last message was put to its target queue. For a server-connection
channel, it is the time when the last MQI call completed.
CURMSGS
For a sending channel, this is the number of messages that have been sent in the current
batch. For a receiving channel, it is the number of messages that have been received in the
current batch. The value is reset to zero, for both sending and receiving channels, when the
batch is committed.
2. Determine whether the channel has sent any messages since it started. If any have been sent,
determine when the last message was sent.
3. If the channel has started a batch that has not yet completed, as indicated by a non-zero value in
CURMSGS, the channel might be waiting for the other end of the channel to acknowledge the batch.
Look at the SUBSTATE field in the output and refer to Table 62:
Table 62. Sender and receiver MCA substates
Sender SUBSTATE
Receiver SUBSTATE
Notes
MQGET
RECEIVE
SEND
RECEIVE
RECEIVE
Note: You might also want to determine whether the channel can process messages fast enough,
especially if the channel has a substate associated with exit processing.
747
Procedure
v Check whether the network is slow. A slow network can affect the time it takes to complete a batch.
The measurements that result in the indicators for the NETTIME field are measured at the end of a
batch. However, the first batch affected by a slowdown in the network is not indicated with a change
in the NETTIME value because it is measured at the end of the batch.
v Check whether the channel is using message retry. If the receiver channel fails to put a message to a
target queue, it might use message retry processing, rather than put the message to a dead-letter
immediately. Retry processing can cause the batch to slow down. In between MQPUT attempts, the
channel will have STATUS(PAUSED), indicating that it is waiting for the message retry interval to pass.
Procedure
1. Check whether exits are processing. If exits are used on the channel that is delivering these messages,
they might add to the time spent processing messages. To identify if this is the case, do the following
checks:
a. In the output of the command DIS CHSTATUS(QM1.TO.QM2) ALL, check the EXITTIME field. If the
time spent in exits is higher than expected, review the processing in your exits for any
unnecessary loops or extra processing, especially in message, send, and receive exits. Such
processing affects all messages moved across the channel.
b. In the output of the command DIS CHSTATUS(QM1.TO.QM2) ALL, check the SUBSTATE field. If the
channel has of one of the following substates for a significant time, review the processing in your
exits:
v SCYEXIT
v RCVEXIT
v SENDEXIT
748
v MSGEXIT
v MREXIT
2. Check whether the network is slow. If messages are not moving fast enough across a channel, it might
be because the network is slow. To identify if this is the case, do the following checks:
a. In the output of the command DIS CHSTATUS(QM1.TO.QM2) ALL, check the NETTIME field. These
indicators are measured when the sending channel asks its partner for a response. This happens at
the end of each batch and, when a channel is idle during heartbeating.
b. If this indicator shows that round trips are taking longer than expected, use other network
monitoring tools to investigate the performance of your network.
3. Check whether the channel is using compression. If the channel is using compression, this adds to the
time spent processing messages. If the channel is using only one compression algorithm, do the
following checks:
a. In the output of the command DIS CHSTATUS(QM1.TO.QM2) ALL, check the COMPTIME field. These
indicators show the time spent during compression or decompression.
b. If the chosen compression is not reducing the amount of data to send by the expected amount,
change the compression algorithm.
4. If the channel is using multiple compression algorithms, do the following checks:
a. In the output of the command DIS CHSTATUS(QM1.TO.QM2) ALL, check the COMPTIME,
COMPHDR, and COMPMSG fields.
b. Change the compression algorithms specified on the channel definition, or consider writing a
message exit to override the channel's choice of compression algorithm for particular messages if
the rate of compression, or choice of algorithm, is not providing the required compression or
performance.
Procedure
1. Issue the following command:
DIS CHSTATUS(*) WHERE(XQMSGSA GT 1)
Note: If you have a busy cluster that has many messages moving, consider issuing this command
with a higher number to eliminate the channels that have only a few messages available to deliver.
2. Look through the output for the channel, or channels, that have large values in the field XQMSGSA.
Determine why the channel is not moving messages, or is not moving them fast enough. Use the
tasks outlined in Monitoring channels on page 744 to diagnose the problems with the channels
found to be causing the build up.
749
750
Windows
UNIX
Linux
753
For information about solving problems, see Dealing with problems on page 762.
For information about solving problems for WebSphere MQ Telemetry, see Troubleshooting for
WebSphere MQ Telemetry on page 787.
For information about solving problems when you are using channel authentication records, see
Troubleshooting channel authentication records on page 803.
Information that is produced by WebSphere MQ can help you to find and resolve problems. For more
information, see the following topics:
v Using logs on page 807
v Using trace on page 811
v First Failure Support Technology (FFST) on page 829
For information about recovering after a problem, see Recovering after failure on page 854.
You can also read the general troubleshooting guidance in the following topics:
v IBM Support Assistant (ISA) on page 836
v Searching knowledge bases on page 838
v Contacting IBM Software Support on page 845
v Getting product fixes on page 853
If a WebSphere MQ component or command has returned an error, and you want further information
about a message written to the screen or the log, you can browse for details of the message, see Reason
codes on page 856.
Related information:
Troubleshooting and support reference
Troubleshooting overview
Troubleshooting is the process of finding and eliminating the cause of a problem. Whenever you have a
problem with your IBM software, the troubleshooting process begins as soon as you ask yourself "what
happened?"
A basic troubleshooting strategy at a high level involves:
1. Recording the symptoms of the problem on page 752
2. Re-creating the problem on page 752
Copyright IBM Corp. 2007, 2014
751
752
v Check the contents of qm.ini for any configuration changes or errors. For more information on
changing configuration information, see:
UNIX
Linux
Windows
Changing configuration information on Windows, UNIX and Linux
systems
v If your application development teams are reporting something unexpected, you use trace to
investigate the problems. For information about using trace, see Using trace on page 811.
753
v If you are unsure whether your application is working as expected, for example, you are not unsure of
the parameters being passed into the MQI or out of the MQI, you can use trace to collect information
about all the inputs and outputs of your MQI calls. For more information about using trace, see Using
trace on page 811.
v For more information about handling errors in MQI applications, see Handling program errors.
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
Dealing with problems on page 762
Learn how to resolve some of the typical problems that can occur.
IBM Support Assistant (ISA) on page 836
The IBM Support Assistant (ISA) helps you to resolve questions and problems with IBM software
products by providing access to support-related information and troubleshooting tools.
Reason codes on page 856
You can use the following messages and reason codes to help you solve problems with your WebSphere
MQ components or applications.
Related tasks:
Searching knowledge bases on page 838
If you have a problem with your IBM software, you want it resolved quickly. Begin by searching the
available knowledge bases to determine whether the resolution to your problem is already documented.
Contacting IBM Software Support on page 845
IBM Software Support provides assistance with product defects.
Related reference:
PCF reason codes on page 1072
Reason codes might be returned by a broker in response to a command message in PCF format,
depending on the parameters used in that message.
Related information:
Troubleshooting and support reference
Have any changes been made since the last successful run?
Changes that have been made to your WebSphere MQ configuration, maintenance updates, or chances to
other programs that interact with WebSphere MQ could be the cause of your problem.
When you are considering changes that might recently have been made, think about the WebSphere MQ
system, and also about the other programs it interfaces with, the hardware, and any new applications.
Consider also the possibility that a new application that you are not aware of might have been run on the
system.
v Have you changed, added, or deleted any queue definitions?
754
v Have you changed or added any channel definitions? Changes might have been made to either
WebSphere MQ channel definitions or any underlying communications definitions required by your
application.
v Do your applications deal with return codes that they might get as a result of any changes you have
made?
v Have you changed any component of the operating system that could affect the operation of
WebSphere MQ? For example, have you modified the Windows Registry.
Are there any error messages or return codes to explain the problem?
You might find error messages or return codes that help you to determine the location and cause of your
problem.
WebSphere MQ uses error logs to capture messages concerning its own operation, any queue managers
that you start, and error data coming from the channels that are in use. Check the error logs to see if any
messages have been recorded that are associated with your problem.
WebSphere MQ also logs errors in the Windows Application Event Log. On Windows, check if the
Windows Application Event Log shows any WebSphere MQ errors. To open the log, from the Computer
Management panel, expand Event Viewer and select Application.
UNIX
Linux
Windows
For information about the locations and contents of the error logs, see
Error logs on Windows, UNIX and Linux systems on page 807
For each WebSphere MQ Message Queue Interface (MQI) and WebSphere MQ Administration Interface
(MQAI) call, a completion code and a reason code are returned by the queue manager or by an exit
routine, to indicate the success or failure of the call. If your application gets a return code indicating that
a Message Queue Interface (MQI) call has failed, check the reason code to find out more about the
problem.
For a list of reason codes, see API completion and reason codes on page 856.
Detailed information on return codes is contained within the description of each MQI call.
755
Related reference:
PCF reason codes on page 1072
Reason codes might be returned by a broker in response to a command message in PCF format,
depending on the parameters used in that message.
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) return codes on page 1149
WebSphere MQ can use Secure Sockets Layer (SSL) with the various communication protocols. Use this
topic to identify the error codes that can be returned by SSL.
WCF custom channel exceptions on page 1153
Diagnostic messages are listed in this topic in numeric order, grouped according to the part of the WCF
custom channel from which they originate.
Related information:
Diagnostic messages: AMQ4000-9999
Troubleshooting and support reference
756
757
Consider that the message could have been received, but that your application failed to process it in
some way. For example, did an error in the expected format of the message cause your program to reject
it? If so, refer to the subsequent information in this topic.
758
v Is data conversion involved? If the data formats between the sending and receiving applications differ,
data conversion is necessary. Automatic conversion occurs when the MQGET call is issued if the
format is recognized as one of the built-in formats.
If the data format is not recognized for conversion, the data conversion exit is taken to allow you to
perform the translation with your own routines.
Refer to Data conversion for further information about data conversion.
759
The dead-letter queue header structure contains a reason or feedback code describing the problem. See
MQDLH - Dead-letter header and Using the dead-letter (undelivered message) queue for information
about the dead-letter queue header structure (MQDLH).
If the dead-letter queue contains messages, you can use the provided browse sample application
(amqsbcg) to browse the messages using the MQGET call. The sample application steps through all the
messages on a named queue for a named queue manager, displaying both the message descriptor and
the message context fields for all the messages on the named queue.
v Has a message been sent to the error log?
See Error log directories on page 809for further information.
v Are the queues enabled for put and get operations?
v Is the WaitInterval long enough?
If your MQGET call has timed out, a completion code of MQCC_FAILED and a reason code of
MQRC_NO_MSG_AVAILABLE are returned. (See WaitInterval (MQLONG) for information about the
WaitInterval field, and completion and reason codes from MQGET.)
v If you are using your own application program to put commands onto the
SYSTEM.ADMIN.COMMAND.QUEUE, do you need to take a sync point?
Unless you have excluded your request message from sync point, you need to take a sync point before
receiving reply messages.
v Are the MAXDEPTH and MAXMSGL attributes of your queues set sufficiently high?
v Are you using the CorrelId and MsgId fields correctly?
Set the values of MsgId and CorrelId in your application to ensure that you receive all messages from
the queue.
Try stopping the command server and then restarting it, responding to any error messages that are
produced.
If the system still does not respond, the problem could be with either a queue manager or the whole of
the WebSphere MQ system. First, try stopping individual queue managers to isolate a failing queue
manager. If this step does not reveal the problem, try stopping and restarting WebSphere MQ, responding
to any messages that are produced in the error log.
If the problem still occurs after restart, contact your IBM Support Center for help.
760
If a program has been run successfully on many previous occasions, check the current queue status
and the files that were being processed when the error occurred. It is possible that they contain some
unusual data value that invokes a rarely-used path in the program.
v Does the application check all return codes?
Has your WebSphere MQ system been changed, perhaps in a minor way, such that your application
does not check the return codes it receives as a result of the change. For example, does your
application assume that the queues it accesses can be shared? If a queue has been redefined as
exclusive, can your application deal with return codes indicating that it can no longer access that
queue?
v Does the application run on other WebSphere MQ systems?
Could it be that there is something different about the way that this WebSphere MQ system is set up
that is causing the problem? For example, have the queues been defined with the same message length
or priority?
Before you look at the code, and depending upon which programming language the code is written in,
examine the output from the translator, or the compiler and linkage editor, to see if any errors have been
reported.
If your application fails to translate, compile, or link-edit into the load library, it will also fail to run if
you attempt to invoke it. See Developing applications for information about building your application.
If the documentation shows that each of these steps was accomplished without error, consider the coding
logic of the application. Do the symptoms of the problem indicate the function that is failing and,
therefore, the piece of code in error? See the following section for some examples of common errors that
cause problems with WebSphere MQ applications.
761
If you find that performance degradation is not dependent on system loading, but happens sometimes
when the system is lightly loaded, a poorly-designed application program is probably to blame. This
could appear to be a problem that only occurs when certain queues are accessed.
If the performance issue persists, the problem might lie with WebSphere MQ itself. If you suspect this,
contact your IBM Support Center for help.
A common cause of slow application performance, or the build up of messages on a queue (usually a
transmission queue) is one or more applications that write persistent messages outside a unit of work; for
more information, see Message persistence.
Windows
UNIX
Linux
753
You can use the information acquired from the following locations to help you rectify the problem:
v Logs, see Using logs on page 807
v Trace, see Using trace on page 811
Use the following topics to help you solve specific problems:
762
v
v
v
v
v
763
v Solution: Ensure that the configuration files exist, and that the WebSphere MQ configuration file
references the correct queue manager and log directories. On Windows, check for problems in the
qm.ini file.
764
Symptom
1 : display chs(*)
AMQ8417: Display Channel Status details.
CHANNEL(DEMO.QM2)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.QUEUE)
CONNAME(computer.ibm.com(1414))
CURRENT
CHLTYPE(CLUSSDR)
STATUS(RETRYING)
Cause
1. The remote queue manager is not available.
2. An incorrect parameter is defined either for the local manual cluster-sender channel or the remote
cluster-receiver channel.
Solution
Check whether the problem is the availability of the remote queue manager.
1. Are there any error messages?
2. Is the queue manager active?
3. Is the listener running?
4. Is the cluster-sender channel able to start?
If the remote queue manager is available, is there a problem with a channel definition? Check the
definition type of the cluster queue manager to see if the channel is continually trying to start; for
example:
1 : dis clusqmgr(*) deftype where(channel eq DEMO.QM2)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2) CHANNEL(DEMO.QM2) CLUSTER(DEMO)
DEFTYPE(CLUSSDRA)
If the definition type is CLUSSDR the channel is using the local manual cluster-sender definition. Alter any
incorrect parameters in the local manual cluster-sender definition and restart the channel.
If the definition type is either CLUSSDRA or CLUSSDRB the channel is using an auto-defined cluster-sender
channel. The auto-defined cluster-sender channel is based on the definition of a remote cluster receiver
channel. Alter any incorrect parameters in the remote cluster receiver definition. For example, the conname
parameter might be incorrect:
1 : alter chl(demo.qm2) chltype(clusrcvr) conname(newhost(1414))
AMQ8016: WebSphere MQ channel changed.
Changes to the remote cluster-receiver definition are propagated out to any cluster queue managers that
are interested. The corresponding auto-defined channels are updated accordingly. You can check that the
updates have been propagated correctly by checking the changed parameter. For example:
1 : dis clusqmgr(qm2) conname
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2) CHANNEL(DEMO.QM2) CLUSTER(DEMO) CONNAME(newhost(1414))
Symptom
1 : display clusqmgr(*)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1)
CLUSTER(DEMO)
Troubleshooting and support
765
CHANNEL(DEMO.QM1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(SYSTEM.TEMPUUID.computer.hursley.ibm.com(1414))
CLUSTER(DEMO)
CHANNEL(DEMO.QM2)
Cause
The queue manager has not received any information from the full repository queue manager that the
manually defined CLUSSDR channel points to. The manually defined CLUSSDR channel must be in
running state.
Solution
Check that the CLUSRCVR definition is also correct, especially its CONNAME and CLUSTER parameters. Alter the
channel definition, if the definition is wrong.
It might take some time for the remote queue managers to attempt a new restart, and start their channels
with the corrected definition.
Specific problems
See Specific problems generating RC2035 on page 886 for information on:
v JMSWMQ2013 invalid security authentication
v MQRC_NOT_AUTHORIZED on a queue or channel
v MQRC_NOT_AUTHORIZED (AMQ4036 on a client) as an administrator
v MQS_REPORT_NOAUTH and MQSAUTHERRORS environment variables
Symptom
Applications receive a return code of 2035 MQRC_NOT_AUTHORIZED when trying to open a queue in a cluster.
Cause
Your application receives the return code of MQRC_NOT_AUTHORIZED when trying to open a queue in a
cluster. The authorization for that queue is correct. It is likely that the application is not authorized to put
to the cluster transmission queue.
Solution
The solution depends on whether the queue is on z/OS or not. See the related information topic.
766
Cause
The queue manager where the object exists or this queue manager might not have successfully entered
the cluster.
Solution
Make sure that they can each display all the full repositories in the cluster. Also make sure that the
CLUSSDR channels to the full repositories are trying to start.
If the queue is in the cluster, check that you have used appropriate open options. You cannot get
messages from a remote cluster queue, so make sure that the open options are for output only.
1 : display clusqmgr(*) qmtype status
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1)
CLUSTER(DEMO)
CHANNEL(DEMO.QM1)
QMTYPE(NORMAL)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2)
CLUSTER(DEMO)
CHANNEL(DEMO.QM2)
QMTYPE(REPOS)
STATUS(RUNNING)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM3)
CLUSTER(DEMO)
CHANNEL(DEMO.QM3)
QMTYPE(REPOS)
STATUS(RUNNING)
Symptom
Applications receive a return code of 2189 MQRC_CLUSTER_RESOLUTION_ERROR when trying to open a queue
in the cluster.
Cause
The queue is being opened for the first time and the queue manager cannot contact any full repositories.
Solution
Make sure that the CLUSSDR channels to the full repositories are not continually trying to start.
1 : display clusqmgr(*) qmtype status
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1)
CLUSTER(DEMO)
CHANNEL(DEMO.QM1)
QMTYPE(NORMAL)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2)
CLUSTER(DEMO)
CHANNEL(DEMO.QM2)
QMTYPE(REPOS)
STATUS(RUNNING)
767
Problem
An MQOPEN or MQPUT1 call was issued specifying an alias queue as the target, but the BaseQName in
the alias queue attributes is not recognized as a queue name.
This reason code can also occur when BaseQName is the name of a cluster queue that cannot be resolved
successfully.
MQRC_UNKNOWN_ALIAS_BASE_Q might indicate that the application is specifying the
ObjectQmgrName of the queue manager that it is connecting to, and the queue manager that is hosting the
alias queue. This means that the queue manager looks for the alias target queue on the specified queue
manager and fails because the alias target queue is not on the local queue manager.
Solution
Leave the ObjectQmgrName parameter blank so that the clustering decides which queue manager to route
to.
Symptom
Messages are not arriving on the destination queues.
Cause
The messages might be stuck at their origin queue manager.
Solution
1. Identify the transmission queue that is sending messages to the destination and the status of the
channel.
1 : dis clusqmgr(QM1) CHANNEL(*) STATUS DEFTYPE QMTYPE XMITQ
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1)
CLUSTER(DEMO)
CHANNEL(DEMO.QM1) DEFTYPE(CLUSSDRA)
QMTYPE(NORMAL)
STATUS(RUNNING)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.DEMO.QM1)
768
Symptom
Messages put to an alias queue go to SYSTEM.DEAD.LETTER.QUEUE with reason
MQRC_UNKNOWN_ALIAS_BASE_Q.
Cause
A message is routed to a queue manager where a clustered alias queue is defined. A local target queue is
not defined on that queue manager. Because the message was put with the MQOO_BIND_ON_OPEN open
option, the queue manager cannot requeue the message.
When MQOO_BIND_ON_OPEN is used, the cluster queue alias is firmly bound. The resolved name is the name
of the target queue and any queue manager on which the cluster queue alias is defined. The queue
manager name is placed in the transmission queue header. If the target queue does not exist on the queue
manager to which the message is sent, the message is put on the dead letter queue. The destination is not
recomputed, because the transmission header contains the name of the target queue manager resolved by
MQOO_BIND_ON_OPEN. If the alias queue had been opened with MQOO_BIND_NOT_FIXED, then the transmission
queue header would contain a blank queue manager name, and the destination would be recomputed. In
which case, if the local queue is defined elsewhere in the cluster, the message would be sent there.
Solution
1. Change all alias queue definitions to specify DEFBIND(NOTFIXED).
2. Use MQOO_BIND_NOT_FIXED as an open option when the queue is opened.
3. If you specify MQOO_BIND_ON_OPEN, ensure that a cluster alias that resolves to a local queue defined on
the same queue manager as the alias.
A queue manager has out of date information about queues and channels in the
cluster
Symptom
DISPLAY QCLUSTER and DISPLAY CLUSQMGR show objects which are out of date.
Cause
Updates to the cluster only flow between the full repositories over manually defined CLUSSDR channels.
After the cluster has formed CLUSSDR channels display as DEFTYPE(CLUSSDRB) channels because they are
both manual and automatic channels. There must be enough CLUSSDR channels to form a complete
network between all the full repositories.
Solution
v Check that the queue manager where the object exists and the local queue manager are still connected
to the cluster.
v Check that each queue manager can display all the full repositories in the cluster.
v Check whether the CLUSSDR channels to the full repositories are continually trying to restart.
v Check that the full repositories have enough CLUSSDR channels defined to correctly connect them
together.
1 : dis clusqmgr(QM1) CHANNEL(*) STATUS DEFTYPE QMTYPE
XMITQ
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM1)
CLUSTER(DEMO)
CHANNEL(DEMO.QM1) DEFTYPE(CLUSSDRA)
QMTYPE(NORMAL)
STATUS(RUNNING)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.DEMO.QM1)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM2)
CLUSTER(DEMO)
Troubleshooting and support
769
CHANNEL(DEMO.QM2) DEFTYPE(CLUSRCVR)
QMTYPE(REPOS)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.DEMO.QM2)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM3)
CLUSTER(DEMO)
CHANNEL(DEMO.QM3) DEFTYPE(CLUSSDRB)
QMTYPE(REPOS)
STATUS(RUNNING)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.DEMO.QM3)
AMQ8441: Display Cluster Queue Manager details.
CLUSQMGR(QM4)
CLUSTER(DEMO)
CHANNEL(DEMO.QM4) DEFTYPE(CLUSSDRA)
QMTYPE(NORMAL)
STATUS(RUNNING)
XMITQ(SYSTEM.CLUSTER.TRANSMIT.DEMO.QM4)
No changes in the cluster are being reflected in the local queue manager
The repository manager process is not processing repository commands, possibly because of a problem
with receiving or processing messages in the command queue.
Symptom
No changes in the cluster are being reflected in the local queue manager.
Cause
The repository manager process is not processing repository commands.
Solution
1. Check that the SYSTEM.CLUSTER.COMMAND.QUEUE is empty.
1 : display ql(SYSTEM.CLUSTER.COMMAND.QUEUE) curdepth
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.COMMAND.QUEUE) CURDEPTH(0)
2. Check that there are no error messages in the error logs indicating the queue manager has a
temporary resource shortage.
The cluster functions correctly with the older version of the queue manager being ignored, until it ages
out of the cluster completely after about 90 days.
Cause
1. The queue manager might have been deleted and then recreated and redefined.
2. It might have been cold-started on z/OS, without first following the procedure to remove a queue
manager from a cluster.
Solution
To remove all trace of the queue manager immediately use the RESET CLUSTER command from a full
repository queue manager. The command removes the older unwanted queue manager and its queues
from the cluster.
770
Using the RESET CLUSTER command stops auto-defined cluster sender channels for the affected queue
manager. You must manually restart any cluster sender channels that are stopped, after completing the
RESET CLUSTER command.
Symptom
A queue manager does not rejoin a cluster after issuing the RESET CLUSTER and REFRESH CLUSTER
commands.
Cause
A side effect of the RESET and REFRESH commands might be that a channel is stopped. A channel is
stopped in order that the correct version of the channel runs when RESET or REFRESH command is
completed.
Solution
Check that the channels between the problem queue manager and the full repositories are running and
use the START CHANNEL command if necessary.
Related information:
Clustering: Using REFRESH CLUSTER best practices
Problem
After an image backup of QM1, a partial repository in cluster DEMO has been restored and the cluster
information it contains is out of date.
Solution
On QM1, issue the command REFRESH CLUSTER(DEMO).
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while it is
in progress, and again at 27 day intervals thereafter when the cluster objects automatically send status
updates to all interested queue managers. See Refreshing in a large cluster can affect performance and
availability of the cluster.
QM1 removes all information it has about the cluster DEMO, except that relating to the cluster queue
managers which are the full repositories in the cluster. Assuming that this information is still correct, QM1
contacts the full repositories. QM1 informs the full repositories about itself and its queues. It recovers the
information for queues and queue managers that exist elsewhere in the cluster as they are opened.
771
Problem
The command, RESET CLUSTER(DEMO) QMNAME(QM1) ACTION(FORCEREMOVE) was issued on a full repository
in cluster DEMO by mistake.
Solution
On QM1, issue the command REFRESH CLUSTER(DEMO).
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while it is
in progress, and again at 27 day intervals thereafter when the cluster objects automatically send status
updates to all interested queue managers. See Refreshing in a large cluster can affect performance and
availability of the cluster.
Problem
Messages destined for QM1 were removed from the SYSTEM.CLUSTER.TRANSMIT.QUEUE in other queue
managers and they might have been repository messages.
Solution
On QM1, issue the command REFRESH CLUSTER(DEMO).
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while it is
in progress, and again at 27 day intervals thereafter when the cluster objects automatically send status
updates to all interested queue managers. See Refreshing in a large cluster can affect performance and
availability of the cluster.
QM1 removes all information it has about the cluster DEMO, except that relating to the cluster queue
managers which are the full repositories in the cluster. Assuming that this information is still correct, QM1
contacts the full repositories. QM1 informs the full repositories about itself and its queues. It recovers the
information for queues and queue managers that exist elsewhere in the cluster as they are opened.
Problem
Cluster DEMO contains two full repositories, QM1 and QM2. They were both moved to a new location on the
network at the same time.
Solution
1. Alter the CONNAME in the CLUSRCVR and CLUSSDR channels to specify the new network addresses.
2. Alter one of the queue managers (QM1 or QM2) so it is no longer a full repository for any cluster.
3. On the altered queue manager, issue the command REFRESH CLUSTER(*) REPOS(YES).
772
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while
it is in progress, and again at 27 day intervals thereafter when the cluster objects automatically send
status updates to all interested queue managers. See Refreshing in a large cluster can affect
performance and availability of the cluster.
4. Alter the queue manager so it is acting as a full repository.
Recommendation
You could avoid the problem as follows:
1. Move one of the queue managers, for example QM2, to its new network address.
2. Alter the network address in the QM2 CLUSRCVR channel.
3. Start the QM2 CLUSRCVR channel.
4.
5.
6.
7.
8.
Wait for the other full repository queue manager, QM1, to learn the new address of QM2.
Move the other full repository queue manager, QM1, to its new network address.
Alter the network address in the QM1 CLUSRCVR channel.
Start the QM1 CLUSRCVR channel.
Alter the manually defined CLUSSDR channels for the sake of clarity, although at this stage they are not
needed for the correct operation of the cluster.
The procedure forces QM2 to reuse the information from the correct CLUSSDR channel to re-establish contact
with QM1 and then rebuild its knowledge of the cluster. Additionally, having once again contacted QM1, it
is given its own correct network address based on the CONNAME in QM2 CLUSRCVR definition.
Problem
Under normal conditions the full repositories exchange information about the queues and queue
managers in the cluster. If one full repository is refreshed, the cluster information is recovered from the
other.
The problem is how to completely reset all the systems in the cluster to restore a known state to the
cluster.
Solution
To stop cluster information being updated from the unknown state of the full repositories, all the
CLUSRCVR channels to full repositories are stopped. The CLUSSDR channels change to inactive.
When you refresh the full repository systems, none of them are able to communicate, so they start from
the same cleared state.
When you refresh the partial repository systems, they rejoin the cluster and rebuild it to the complete set
of queue managers and queues. The cluster information in the rebuilt full is restored to a known state.
Note: For large clusters, use of the REFRESH CLUSTER command can be disruptive to the cluster while it is
in progress, and again at 27 day intervals thereafter when the cluster objects automatically send status
updates to all interested queue managers. See Refreshing in a large cluster can affect performance and
availability of the cluster.
1. On all the full repository queue managers, follow these steps:
a. Alter queue managers that are full repositories so they are no longer full repositories.
Troubleshooting and support
773
Problem
If a message-batch is sent to a particular queue manager and that queue manager becomes unavailable,
what happens at the sending queue manager?
Explanation
Except for non-persistent messages on an NPMSPEED(FAST) channel, the undelivered batch of messages
is backed out to the cluster transmission queue on the sending queue manager. On an NPMSPEED(FAST)
channel, non-persistent messages are not batched, and one might be lost.
v Indoubt messages, and messages that are bound to the unavailable queue manager, wait until the
queue manager becomes available again.
v Other messages are delivered to alternative queue managers selected by the workload management
routine.
Solution
The unavailable cluster queue manager can be restarted automatically, either by being configured as a
multi-instance queue manager, or by a platform-specific high availability mechanism.
Problem
1. Cluster information is sent to repositories (whether full or partial) on a local queue called
SYSTEM.CLUSTER.COMMAND.QUEUE. If this queue fills up, perhaps because the queue manager has
stopped working, the cluster-information messages are routed to the dead-letter queue.
2. The repository runs out of storage.
Solution
1. Monitor the messages on your queue manager log to detect if SYSTEM.CLUSTER.COMMAND.QUEUE is filling
up. If it is, you need to run an application to retrieve the messages from the dead-letter queue and
reroute them to the correct destination.
2. If errors occur on a repository queue manager, messages tell you what error has occurred and how
long the queue manager waits before trying to restart.
774
v When you have identified and resolved the error, enable the SYSTEM.CLUSTER.COMMAND.QUEUE so that
the queue manager can restart successfully.
3. In the unlikely event of the repository running out of storage, storage allocation errors are sent to the
queue-manager log. To fix the storage problem, stop and then restart the queue manager. When the
queue manager is restarted, more storage is automatically allocated to hold all the repository
information.
Problem
When a cluster queue is disabled for MQPUT, its status is reflected in the repository of each queue
manager that is interested in that queue. The workload management algorithm tries to send messages to
destinations that are enabled for MQPUT. If there are no destinations enabled for MQPUT and no local
instance of a queue, an MQOPEN call that specified MQOO_BIND_ON_OPEN returns a return code of
MQRC_CLUSTER_PUT_INHIBITED to the application. If MQOO_BIND_NOT_FIXED is specified, or there is a local
instance of the queue, an MQOPEN call succeeds but subsequent MQPUT calls fail with return code
MQRC_PUT_INHIBITED.
Solution
You can write a user exit program to modify the workload management routines so that messages can be
routed to a destination that is disabled for MQPUT.
A message can arrive at a destination that is disabled for MQPUT. The message might have been in flight
at the time the queue became disabled, or a workload exit might have chosen the destination explicitly.
The workload management routine at the destination queue manager has a number of ways to deal with
the message:
v Choose another appropriate destination, if there is one.
v Place the message on the dead-letter queue.
v Return the message to the originator, if there is no dead-letter queue
775
Overview
You receive at least one of the following error messages, for every problem documented within this topic.
JMSWMQ0018
Failed to connect to queue manager 'queue-manager-name' with connection mode 'connection-mode'
and host name 'host-name'
and, with the exception of the error caused by Using non-FIPS cipher with FIPS enabled on client, the
message:
JMSCMQ001
WebSphere MQ call failed with completion code 2 ('MQCC_FAILED') reason 2397
('MQRC_JSSE_ERROR')
The cause of the exception is listed as the first item within each section.
You should always list out the stacks and the cause of the first exception.
Although the information for each error consists of the:
v Output from the sample SystemOut.log or Console.
v Queue manager error log information.
v Solution to the problem.
depending on how the application, and framework you are using, is written the information might not
come to stdout.
Attention: The sample code includes stacks and line numbers. This information is useful guidance, but
the stacks and line numbers are likely to change from one fix pack to another.
You should use the stacks and line numbers as a guide to locating the correct section, and not use the
information specifically for diagnostic purposes.
776
Caused by:
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at com.ibm.jsse2.tc.a(tc.java:438)
at com.ibm.jsse2.tc.g(tc.java:416)
at com.ibm.jsse2.tc.a(tc.java:60)
at com.ibm.jsse2.tc.startHandshake(tc.java:381)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection$6.run
(RemoteTCPConnection.java:1005)
at java.security.AccessController.doPrivileged(AccessController.java:202)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect
(RemoteTCPConnection.java:1000)
... 11 more
Caused by:
java.io.EOFException: SSL peer shut down incorrectly
at com.ibm.jsse2.a.a(a.java:120)
at com.ibm.jsse2.tc.a(tc.java:540)
... 17 more
Caused by:
javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: PKIX path validation failed:
java.security.cert.CertPathBuilderException:
PKIXCertPathBuilderImpl could not build a valid CertPath.;internal cause is:
777
Caused by:
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed.
[1=java.net.SocketException[Software caused connection abort: socket write error],
3=localhost/127.0.0.1:1414 (localhost),4=SSLSocket.startHandshake,5=default]
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect
(RemoteTCPConnection.java:1020)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect
(RemoteConnection.java:1112)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection
(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
... 8 more
Caused by:
java.net.SocketException: Software caused connection abort: socket write error
Cipherspec Mismatch
Output
Caused by:
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9641: Remote CipherSpec error
for channel SYSTEM.DEF.SVRCONN to host . [3=SYSTEM.DEF.SVRCONN]
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.analyseErrorSegment
(RemoteConnection.java:4322)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.receiveTSH
(RemoteConnection.java:2902)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.initSess
(RemoteConnection.java:1440)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect
(RemoteConnection.java:1115)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection
(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
778
779
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress
(RemoteTCPConnection.java:674)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect
(RemoteTCPConnection.java:991)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect
(RemoteConnection.java:1112)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection
(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect
(RemoteFAP.java:1599)
... 8 more
Caused by:
java.lang.IllegalArgumentException: Unsupported ciphersuite SSL_RSA_WITH_NULL_MD5
or ciphersuite is not supported in FIPS mode
at com.ibm.jsse2.q.a(q.java:84)
at com.ibm.jsse2.r.(r.java:75)
at com.ibm.jsse2.tc.setEnabledCipherSuites(tc.java:184)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1741)
Using a non-FIPS cipher with FIPS enabled on the server (not on client)
Output
Caused by:
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2397;AMQ9771: SSL handshake failed.
[1=javax.net.ssl.SSLHandshakeException[Received fatal alert: handshake_failure],
3=localhost/127.0.0.1:1418 (localhost),4=SSLSocket.startHandshake,5=default]
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect
(RemoteTCPConnection.java:1020)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect
(RemoteConnection.java:1112)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection
(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
... 8 more
Caused by:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.n.a(n.java:8)
780
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection
(RemoteConnectionPool.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1599)
... 8 more
Caused by:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.n.a(n.java:8)
Caused by:
java.lang.IllegalArgumentException: Unsupported ciphersuite SSL_RSA_WITH_NULL_MD5 or
ciphersuite is not supported in FIPS mode
at com.ibm.jsse2.q.a(q.java:84)
781
Caused by:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
Caused by:
782
Caused by:
java.net.SocketException: java.security.NoSuchAlgorithmException: SSLContext
Default implementation not found:
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:1)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1699)
... 13 more
Caused by:
java.security.NoSuchAlgorithmException: SSLContext Default implementation not found:
at java.security.Provider$Service.newInstance(Provider.java:894)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:299)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:25)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:15)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:17)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.chooseSocketFactory
(RemoteTCPConnection.java:2158)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1689)
... 13 more
Caused by:
java.security.KeyStoreException: IBMKeyManager: Problem accessing key store java.lang.Exception:
Keystore file does not exist: C:\keystore\wrongfile.jks
783
Caused by:
java.net.SocketException: java.security.NoSuchAlgorithmException:
SSLContext Default implementation not found:
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:1)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1699)
... 13 more
Caused by:
java.security.NoSuchAlgorithmException: SSLContext Default implementation not found:
at java.security.Provider$Service.newInstance(Provider.java:894)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:299)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:25)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:15)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:17)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.chooseSocketFactory
(RemoteTCPConnection.java:2158)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1689)
... 13 more
Caused by:
java.security.KeyStoreException: IBMKeyManager: Problem accessing key store
java.io.IOException: Keystore was tampered with, or password was incorrect
Caused by:
java.net.SocketException: java.security.NoSuchAlgorithmException:
SSLContext Default implementation not found:
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:1)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1699)
... 13 more
Caused by:
java.security.NoSuchAlgorithmException: SSLContext Default implementation not found:
at java.security.Provider$Service.newInstance(Provider.java:894)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:299)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:25)
784
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:15)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:17)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.chooseSocketFactory
(RemoteTCPConnection.java:2158)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1689)
... 13 more
Caused by:
java.lang.Exception: Truststore file does not exist: C:\keystore\wrongfile.jks
Caused by:
java.net.SocketException: java.security.NoSuchAlgorithmException:
SSLContext Default implementation not found:
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:7)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:1)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1699)
... 13 more
Caused by:
java.security.NoSuchAlgorithmException: SSLContext Default implementation not found:
at java.security.Provider$Service.newInstance(Provider.java:894)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:299)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:25)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:15)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:17)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.chooseSocketFactory
(RemoteTCPConnection.java:2158)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.makeSocketSecure
(RemoteTCPConnection.java:1689)
... 13 more
Caused by:
java.io.IOException: Keystore was tampered with, or password was incorrect
at com.ibm.crypto.provider.JavaKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:414)
at com.ibm.jsse2.uc.a(uc.java:54)
at com.ibm.jsse2.lc.f(lc.java:12)
at com.ibm.jsse2.lc.(lc.java:16)
785
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1345)
at java.security.Provider$Service.newInstance(Provider.java:880)
... 20 more
Caused by:
java.security.UnrecoverableKeyException: Password verification failed
786
If sharing conversations is enabled, the server channel is always in the correct state for the
communications layer to detect that the partner has gone.
787
Server-side logs
The installation wizard for WebSphere MQ Telemetry writes messages to its installation log:
WMQ program directory\mqxr
The telemetry (MQXR) service writes messages to the WebSphere MQ queue manager error log, and FDC
files to the WebSphere MQ error directory:
WMQ data directory\Qmgrs\qMgrName\errors\AMQERR01.LOG
WMQ data directory\errors\AMQnnn.n.FDC
It also writes a log for the telemetry (MQXR) service. The log displays the properties the service started
with, and errors it has found acting as a proxy for an MQTT client. For example, unsubscribing from a
subscription that the client did not create. The log path is:
WMQ data directory\Qmgrs\qMgrName\errors\mqxr.log
The WebSphere MQ telemetry sample configuration created by WebSphere MQ explorer starts the
telemetry (MQXR) service using the command runMQXRService, which is in WMQ Telemetry install
directory\bin. This command writes to:
WMQ data directory\Qmgrs\qMgrName\mqxr.stdout
WMQ data directory\Qmgrs\qMgrName\mqxr.stderr
Modify runMQXRService to display the paths configured for the telemetry (MQXR) service, or to echo the
initialization before starting the telemetry (MQXR) service.
JVM
Set Java properties that are passed as arguments to the telemetry (MQXR) service in the file,
java.properties. The properties in the file are passed directly to the JVM running the telemetry
(MQXR) service. They are passed as additional JVM properties on the Java command line.
Properties set on the command line take precedence over properties added to the command line
from the java.properties file.
Find the java.properties file in the same folder as the telemetry configurations. See Figure 97
and Figure 98.
Modify java.properties by specifying each property as a separate line. Format each property
exactly as you would to pass the property to the JVM as an argument. For example:
-Xmx1024m
-Xms1024m
788
JAAS
The JAAS configuration file is described in Telemetry channel JAAS configuration , which
includes the sample JAAS configuration file, JAAS.config, shipped with WebSphere MQ
Telemetry.
If you configure JAAS, you are almost certainly going to write a class to authenticate users to
replace the standard JAAS authentication procedures.
To include your Login class in the class path used by the telemetry (MQXR) service class path,
provide a WebSphere MQ service.env configuration file.
Set the class path for your JAAS LoginModule in service.env. You cannot use the variable,
%classpath% in service.env. The class path in service.env is added to the class path already set
in the telemetry (MQXR) service definition.
Display the class paths that are being used by the telemetry (MQXR) service by adding echo set
classpath to runMQXRService.bat. The output is sent to mqxr.stdout.
The default location for the service.env file is:
WMQ data directory\service.env
Override these settings with a service.env file for each queue manager in:
WMQ data directory\Qmgrs\qMgrName\service.env
Trace
See Tracing the telemetry (MQXR) service on page 790. the parameters to configure trace are
stored in two files:
WMQ data directory\Qmgrs\qMgrName\mqxr\trace.config
WMQ data directory\Qmgrs\qMgrName\mqxr\mqxrtrace.properties
789
Java -Dcom.ibm.micro.client.mqttv3.trace=c:\\MqttTrace.properties
-Dcom.ibm.ssl.keyStore=C:\\MyKeyStore.jks
See Tracing the MQTT v3 Java client on page 792. For links to client API documentation for the MQTT
client libraries, see MQTT client programming reference.
Value
Cause
REASON_CODE_BROKER_UNAVAILABLE
REASON_CODE_CLIENT_ALREADY_CONNECTED
32100
REASON_CODE_CLIENT_ALREADY_DISCONNECTED
32101
REASON_CODE_CLIENT_DISCONNECT_PROHIBITED 32107
REASON_CODE_CLIENT_DISCONNECTING
32102
REASON_CODE_CLIENT_EXCEPTION
REASON_CODE_CLIENT_NOT_CONNECTED
32104
REASON_CODE_CLIENT_TIMEOUT
32000
REASON_CODE_FAILED_AUTHENTICATION
REASON_CODE_INVALID_CLIENT_ID
REASON_CODE_INVALID_PROTOCOL_VERSION
REASON_CODE_NO_MESSAGE_IDS_AVAILABLE
32001
REASON_CODE_NOT_AUTHORIZED
REASON_CODE_SERVER_CONNECT_ERROR
32103
REASON_CODE_SOCKET_FACTORY_MISMATCH
32105
REASON_CODE_SSL_CONFIG_ERROR
32106
REASON_CODE_UNEXPECTED_ERROR
790
Procedure
1. Set the trace options to control the amount of detail and the size of the trace. The options apply to a
trace started with either the strmqtrc or the controlMQXRChannel command.
Set the trace options in the following files:
mqxrtrace.properties
trace.config
The files are in the following directory:
v On Windows systems: WebSphere MQ data directory\qmgrs\qMgrName\mqxr.
v On AIX or Linux systems: var/mqm/qmgrs/qMgrName/mqxr.
2. Open a command window in the following directory:
v On Windows systems: WebSphere MQ installation directory\mqxr\bin.
v On AIX or Linux systems: /opt/mqm/mqxr/bin.
3. Run the following command to start an SYSTEM.MQXR.SERVICE trace:
./controlMQXRChannel.sh
controlMQXRChannel.bat
-qmgr=
qMgrName
-mode=
starttrace
stoptrace
-clientid= ClientIdentifier
Mandatory parameters
qmgr=qmgrName
Set qmgrName to the queue manager name
mode=starttrace|stoptrace
Set starttrace to begin tracing or to stoptrace to end tracing
Optional parameters
clientid=ClientIdentifier
Set ClientIdentifier to the ClientIdentifier of a client. clientid filters trace to a single
client. Run the trace command multiple times to trace multiple clients.
For example:
/opt/mqm/mqxr/bin/controlMQXRChannel.sh -qmgr=QM1 -mode=starttrace -clientid=problemclient
Results
To view the trace output, go to the following directory:
v On Windows systems: WebSphere MQ data directory\trace.
v On AIX or Linux systems: /var/mqm/trace.
Trace files are named mqxr_PPPPP.trc, where PPPPP is the process ID.
791
Related information:
strmqtrc
Procedure
1. Create a Java properties file containing the trace configuration.
In the properties file specify the following optional properties. If a property key is specified more than
once, the last occurrence sets the property.
a. com.ibm.micro.client.mqttv3.trace.outputName
The directory to write the trace file to. It defaults to the client working directory. The trace file is
called mqtt-n.trc.
com.ibm.micro.client.mqttv3.trace.outputName=c:\\MQTT_Trace
b. com.ibm.micro.client.mqttv3.trace.count
The number of trace files to write. The default is one file, of unlimited size.
com.ibm.micro.client.mqttv3.trace.count=5
c. com.ibm.micro.client.mqttv3.trace.limit
The maximum size of file to write, the default is 500000. The limit only applies if more than one
trace file is requested.
com.ibm.micro.client.mqttv3.trace.limit=100000
d. com.ibm.micro.client.mqttv3.trace.client.clientIdentifier.status
Turn trace on or off, per client. If clientIdentifier=*, trace is turned on or off for all clients. By
default, trace is turned off for all clients.
com.ibm.micro.client.mqttv3.trace.client.*.status=on
com.ibm.micro.client.mqttv3.trace.client.Client10.status=on
2. Pass the trace properties file to the JVM using a system property.
-Dcom.ibm.micro.client.mqttv3.trace=c:\\MqttTrace.properties
Displays help
6. Java uses the correct path delimiter. You can code the delimiter in a property file as / or \\; \ is the escape character
792
-i traceFile
Required. Passes in the input file (for example, mqtt-0.trc).
-o outputFile
Required. Defines the output file (for example, mqtt-0.trc.html or mqtt-0.trc.txt).
-h
Output as HTML. The output files extension must be .html. If not specified, the output is
plain text.
-d time
Indents a line with * if the time difference in milliseconds is greater than or equal to (>=)
time. Not applicable for HTML output.
The following example will output the trace file in HTML format
com.ibm.micro.client.mqttv3.internal.trace.TraceFormatter -i mqtt-0.trc -o mqtt-0.trc.html -h
The second example will output the trace file as plain text, with any consecutive timestamps that have
milliseconds with a difference of 50 or greater indented with an asterisk (*).
com.ibm.micro.client.mqttv3.internal.trace.TraceFormatter -i mqtt-0.trc -o mqtt-0.trc.txt -d 50
The final example will output the trace file as plain text:
com.ibm.micro.client.mqttv3.internal.trace.TraceFormatter -i mqtt-0.trc -o mqtt-0.trc.txt
793
Procedure
1. Consider what inferences can be drawn from the reason code that the telemetry (MQXR) service
returned to MqttClient.Connect. What type of connection failure is it?
Option
Description
REASON_CODE_INVALID_PROTOCOL_VERSION
REASON_CODE_INVALID_CLIENT_ID
REASON_CODE_SERVER_CONNECT_ERROR
If you have written an MQTT client library rather than use one of the libraries provided by
WebSphere MQ Telemetry, look at the CONNACK return code.
From these three errors you can infer that the client has connected to the telemetry (MQXR) service,
but the service has found an error.
2. Consider what inferences can be drawn from the reason codes that the client produces when the
telemetry (MQXR) service does not respond:
Option
Description
REASON_CODE_CLIENT_EXCEPTION
REASON_CODE_CLIENT_TIMEOUT
794
The telemetry (MQXR) service might not have responded to the client, and the timeout at the client
expires. The WebSphere MQ Telemetry Java client only hangs if the application has set an indefinite
timeout. The client throws one of these exceptions after the timeout set for MqttClient.Connect expires
with an undiagnosed connection problem.
Unless you find an FDC file that correlates with the connection failure you cannot infer that the client
tried to connect to the server:
a. Confirm that the client sent a connection request.
Check the TCPIP request with a tool such as tcpmon, available from https://tcpmon.dev.java.net/
b. Does the remote socket address used by the client match the socket address defined for the
telemetry channel?
The default file persistence class in the Java SE MQTT client supplied with WebSphere MQ
Telemetry creates a folder with the name: clientIdentifier-tcphostNameport or clientIdentifiersslhostNameport in the client working directory. The folder name tells you the hostName and port
used in the connection attempt; see Client-side log files on page 789.
c. Can you ping the remote server address?
d. Does netstat on the server show the telemetry channel is running on the port the client is
connecting too?
3. Check whether the telemetry (MQXR) service found a problem in the client request.
The telemetry (MQXR) service writes errors it detects into mqxr.log, and the queue manager writes
errors into AMQERR01.LOG; see
4. Attempt to isolate the problem by running another client.
v Run the MQTT sample application using the same telemetry channel.
v Run the wmqttSample GUI client to verify the connection. Get wmqttSample by downloading
SupportPac IA92.
Note: Older versions of IA92 do not include the MQTT v3 Java client library.
Run the sample programs on the server platform to eliminate uncertainties about the network
connection, then run the samples on the client platform.
5. Other things to check:
a. Are tens of thousands of MQTT clients trying to connect at the same time?
Telemetry channels have a queue to buffer a backlog of incoming connections. Connections are
processed in excess of 10,000 a second. The size of the backlog buffer is configurable using the
telemetry channel wizard in WebSphere MQ Explorer. Its default size is 4096. Check that the
backlog has not been configured to a low value.
b. Are the telemetry (MQXR) service and queue manager still running?
c. Has the client connected to a high availability queue manager that has switched its TCPIP
address?
d. Is a firewall selectively filtering outbound or return data packets?
795
MqttCallback.ConnectionLost method. The method is only called after the connection has been
successfully established. The symptom is different to MqttClient.Connect throwing an exception after
receiving a negative acknowledgment or timing out.
If the MQTT client application is not using the MQTT client libraries supplied by WebSphere MQ, the
symptom depends on the client. In the MQTT v3 protocol, the symptom is a lack of timely response to a
request to the server, or the failure of the TCP/IP connection.
Procedure
1. Has another client started that used the same ClientIdentifier?
If a second client is started, or the same client is restarted, using the same ClientIdentifier, the first
connection to the first client is dropped.
2. Has the client accessed a topic that it is not authorized to publish or subscribe to?
Any actions the telemetry service takes on behalf of a client that return MQCC_FAIL result in the service
dropping the client connection.
The reason code is not returned to the client.
v Look for log messages in the mqxr.log and AMQERR01.LOG files for the queue manager the client is
connected to; see Server-side logs on page 788.
3. Has the TCP/IP connection dropped?
A firewall might have a low timeout setting for marking a TCPIP connection as inactive, and dropped
the connection.
v Shorten the inactive TCPIP connection time using MqttConnectOptions.setKeepAliveInterval.
796
Procedure
1. If the lost message had the "Fire and forget" quality of service, set the "At least once" or "At most
once" quality of service. Attempt to lose the message again.
v Messages sent with "Fire and forget" quality of service are thrown away by WebSphere MQ in a
number of circumstances:
Communications loss and channel stopped.
Queue manager shut down.
Excessive number of messages.
v The delivery of "Fire and forget" messages depends upon the reliability of TCP/IP. TCP/IP
continues to send data packets again until their delivery is acknowledged. If the TCP/IP session is
broken, messages with the "Fire and forget" quality of service are lost. The session might be broken
by the client or server closing down, a communications problem, or a firewall disconnecting the
session.
2. Check that client is restarting the previous session, in order to send undelivered messages with "At
least once" or "At most once" quality of service again.
a. If the client application is using the Java SE MQTT client, check that it sets
MqttClient.CleanSession to false
b. If you are using different client libraries, check that a session is being restarted correctly.
3. Check that the client application is restarting the same session, and not starting a different session by
mistake.
To start the same session again, cleanSession = false, and the Mqttclient.clientIdentifier and the
MqttClient.serverURI must be the same as the previous session.
4. If a session closes prematurely, check that the message is available in the persistence store at the client
to send again.
a. If the client application is using the Java SE MQTT client, check that the message is being saved in
the persistence folder; see Client-side log files on page 789
b. If you are using different client libraries, or you have implemented your own persistence
mechanism, check that it is working correctly.
5. Check that no one has deleted the message before it was delivered.
Undelivered messages awaiting delivery to MQTT clients are stored in SYSTEM.MQTT.TRANSMIT.QUEUE.
Messages awaiting delivery to the telemetry server are stored by the client persistence mechanism; see
Message persistence in MQTT clients.
6. Check that the client has a subscription for the publication it expects to receive.
List subscriptions using WebSphere MQ Explorer, or by using runmqsc or PCF commands. All MQTT
client subscriptions are named. They are given a name of the form: ClientIdentifier:Topic name
7. Check that the publisher has authority to publish, and the subscriber to subscribe to the publication
topic.
Troubleshooting and support
797
In a clustered publish/subscribe system, the subscriber must be authorized to the topic on the queue
manager to which the subscriber is connected. It is not necessary for the subscriber to be authorized
to subscribe to the topic on the queue manager where the publication is published. The channels
between the queue managers must be correctly authorized to pass on the proxy subscription and
forward the publication.
Create the same subscription and publish to it using WebSphere MQ Explorer. Simulate your
application client publishing and subscribing by using the client utility. Start the utility from
WebSphere MQ Explorer and change its user ID to match the one adopted by your client application.
8. Check that the subscriber has permission to put the publication on the SYSTEM.MQTT.TRANSMIT.QUEUE.
dspmqaut -m qMgr -n queueName -t queue -p user ID
9. Check that the WebSphere MQ point-to-point application has authority to put its message on the
SYSTEM.MQTT.TRANSMIT.QUEUE.
dspmqaut -m qMgr -n queueName -t queue -p user ID
Procedure
1. Start the service
Result The service stops immediately. A window displays an error message; for example:
WebSphere MQ cannot process the request because the
executable specified cannot be started. (AMQ4160)
Reason
Files are missing from the installation, or the permissions on installed files are set wrongly.
798
The WebSphere MQ Telemetry feature is installed only on one of a pair of highly available
queue managers. If the queue manager instance switches over to a standby, it tries to start
SYSTEM.MQXR.SERVICE. The command to start the service fails because the telemetry
(MQXR) service is not installed on the standby.
Investigation
Look in error logs; see Server-side logs on page 788.
Actions
Install, or uninstall and reinstall the WebSphere MQ Telemetry feature.
2. Start the service; wait for 30 seconds; refresh the Explorer and check the service status.
Result The service starts and then stops.
Reason
SYSTEM.MQXR.SERVICE started the runMQXRService command, but the command failed.
Investigation
Look in error logs; see Server-side logs on page 788.
See if the problem occurs with only the sample channel defined. Backup and the clear the
contents of the WMQ data directory\Qmgrs\qMgrName\mqxr\ directory. Run the sample
configuration wizard and try to start the service.
Actions
Look for permission and path problems.
Procedure
1. Look in mqxr.log for an exception thrown by javax.security.auth.login.LoginException.
See Server-side logs on page 788 for the path to mqxr.log, and Figure 106 on page 802 for an
example of the exception listed in the log.
2. Correct your JAAS configuration by comparing it with the worked example in Example JAAS
configuration on page 800.
Troubleshooting and support
799
3. Replace your login class by the sample JAASLoginModule, after refactoring it into your authentication
package and deploy it using the same path. Switch the value of loggedIn between true and false.
If the problem goes away when loggedIn is true, and appears the same when loggedIn is false, the
problem lies in your login class.
4. Check whether the problem is with authorization rather than authentication.
a. Change the telemetry channel definition to perform authorization checking using a fixed user ID.
Select a user ID that is a member of the mqm group.
b. Rerun the client application.
If the problem disappears, the solution lies with the user ID being passed for authorization. What
is the user name being passed? Print it to file from your login module. Check its access
permissions using WebSphere MQ Explorer, or dspmqauth.
com.ibm.mq.MQXR.channel/JAASMCAUser: \
com.ibm.mq.MQXR.Port=1884;\
com.ibm.mq.MQXR.JAASConfig=JAASConfig;\
com.ibm.mq.MQXR.UserName=Admin;\
com.ibm.mq.MQXR.StartWithMQXRService=true
The JAAS configuration file has a stanza named JAASConfig that names the Java class
security.jaas.JAASLogin, which JAAS is to use to authenticate clients.
JAASConfig {
security.jaas.JAASLogin required debug=true;
};
When SYSTEM.MQTT.SERVICE starts, it adds the path in Figure 102 to its classpath.
CLASSPATH=C:\WMQTelemtryApps;
Figure 103 on page 801 shows the additional path in Figure 102 added to the classpath that is set up for
the telemetry (MQXR) service.
800
CLASSPATH=;C:\IBM\MQ\Program\mqxr\bin\\..\lib\MQXRListener.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\lib\WMQCommonServices.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\lib\objectManager.utils.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\lib\com.ibm.micro.xr.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\..\java\lib\com.ibm.mq.jmqi.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\..\java\lib\com.ibm.mqjms.jar;
C:\IBM\MQ\Program\mqxr\bin\\..\..\java\lib\com.ibm.mq.jar;
C:\WMQTelemtryApps;
The output in Figure 104 shows that the telemetry (MQXR) service has started with the channel definition
shown in Figure 100 on page 800.
C:\WMQTelemetryApps>java com.ibm.mq.id.PubAsyncRestartable
Starting a clean session for instance "Admin_PubAsyncRestartab"
Publishing "Hello World Fri May 21 17:23:23 BST 2010" on topic "MQTT Example"
for client instance: "Admin_PubAsyncRestartab" using QoS=1 on address tcp://localhost:1884"
Userid: "Admin", Password: "Password"
Delivery token "528752516" has been received: false
Connection lost on instance "Admin_PubAsyncRestartab" with cause "MqttException"
MqttException (0) - java.io.EOFException
at com.ibm.micro.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:118)
at java.lang.Thread.run(Thread.java:801)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:269)
at com.ibm.micro.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:56)
at com.ibm.micro.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:90)
... 1 more
Client is not connected (32104)
at com.ibm.micro.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:33)
at com.ibm.micro.client.mqttv3.internal.ClientComms.internalSend(ClientComms.java:100)
at com.ibm.micro.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:117)
at com.ibm.micro.client.mqttv3.internal.ClientComms.disconnect(ClientComms.java:229)
at com.ibm.micro.client.mqttv3.MqttClient.disconnect(MqttClient.java:385)
at com.ibm.mq.id.PubAsyncRestartable.main(PubAsyncRestartable.java:49)
801
The error is detected by JAAS which throws javax.security.auth.login.LoginException with the cause
No LoginModules configured for JAAS. It could be caused, as in Figure 106, by a bad configuration name.
It might also be the result of other problems JAAS has encountered loading the JAAS configuration.
If no exception is reported by JAAS, JAAS has successfully loaded the security.jaas.JAASLogin class
named in the JAASConfig stanza.
Procedure
1. Check the console log.
If the daemon is running in the foreground, the console messages are written to the terminal window.
If the daemon has been started in the background, the console is where you have redirected stdout to.
2. Restart the daemon.
Changes to the configuration file are not activated until the daemon is restarted.
3. Consult Table 64:
Table 64. Symptom table
Problem
Suggested solution
802
Procedure
Set the trace_output parameter to protocol in the daemon configuration file or send a command to the
daemon using the amqtdd.upd file.
See Transfer messages between the WebSphere MQ Telemetry daemon for devices and WebSphere MQ,
for an example of using the amqtdd.upd file.
Using the protocol setting, the daemon prints a message to the console describing each MQTT packet it
sends and receives.
Multicast troubleshooting
The following hints and tips are in no significant order, and might be added to when new versions of the
documentation are released. They are subjects that, if relevant to the work that you are doing, might save
you time.
803
= 127.0.0.1
= 127.0.0.1
To:
Multicast:
Interface
= IPAddress
where IPAddress is the IP address of the interface on which multicast traffic flows.
If there is no Multicast stanza in the MQClient.ini file, add the following example:
Multicast:
Interface
= IPAddress
where IPAddress is the IP address of the interface on which multicast traffic flows.
The multicast applications now run over the multicast network.
804
Each multicast communication information (COMMINFO) object represents a different stream of data
because their group addresses are different. In this example, the topic FRUIT is defined to use
COMMINFO object MC1, and the topic FISH is defined to use COMMINFO object MC2.
WebSphere MQ Multicast has a 255 character limit for topic strings. This limitation means that care must
be taken with the names of nodes and leaf-nodes within the tree; if the names of nodes and leaf-nodes
are too long, the topic string might exceed 255 characters and return the MQRC_TOPIC_STRING_ERROR reason
code.
Troubleshooting and support
805
While this kind of multicast topology is possible to create, it is not recommended because applications
might not receive the data that they were expecting.
An application subscribing on Price/FRUIT/# receives multicast transmission on the COMMINFO MC1
group address. The application expects to receive publications on all topics at or below that point in the
topic tree.
However, the messages created by an application publishing on Price/FRUIT/ORANGES/Small are not
received by the subscriber because the messages are sent on the group address of COMMINFO MC3.
806
Using logs
There are a variety of logs that you can use to help with problem determination and troubleshooting.
Use the following links to find out about the logs available for your platform and how to use them:
UNIX
Linux
Windows
Error logs on Windows, UNIX and Linux systems
v
v Error logs on HP Integrity NonStop Server on page 810
It is possible to suppress or exclude some messages on both distributed and z/OS systems.
For details of suppressing some messages on distributed systems, see Queue manager error logs.
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
Troubleshooting overview on page 751
Troubleshooting is the process of finding and eliminating the cause of a problem. Whenever you have a
problem with your IBM software, the troubleshooting process begins as soon as you ask yourself "what
happened?"
First Failure Support Technology (FFST) on page 829
First Failure Support Technology ( FFST) for WebSphere MQ provides information that can help IBM
support personnel to diagnose a problem when a serious error occurs.
Using trace on page 811
You can use different types of trace to help you with problem determination and troubleshooting.
807
All messages relating to channels are also placed in the appropriate error files belonging to the queue
manager, unless the queue manager is unavailable, or its name is unknown. In which case,
channel-related messages are placed in the system error log directory.
To examine the contents of any error log file, use your usual system editor.
Operator messages
Operator messages identify normal errors, typically caused directly by users doing things like using
parameters that are not valid on a command. Operator messages are national-language enabled, with
message catalogs installed in standard locations.
These messages are written to the associated window, if any. In addition, some operator messages are
written to the AMQERR01.LOG file in the queue manager directory, and others to the equivalent file in
the system error log directory.
808
The list of messages you want to exclude is defined for all queue managers on the machine. Any changes
you make to the configuration will not take effect until each queue manager is restarted.
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
Using logs on page 807
There are a variety of logs that you can use to help with problem determination and troubleshooting.
Using trace on page 811
You can use different types of trace to help you with problem determination and troubleshooting.
Directory
/var/mqm/qmgrs/qmname/errors
Windows systems
MQ_INSTALLATION_PATH\QMGRS\qmname\ERRORS\AMQERR01.LOG
v If the queue manager name is not known, the location of the error log is shown in Table 66 on page
810.
809
Directory
/var/mqm/errors
Windows systems
MQ_INSTALLATION_PATH\QMGRS\@SYSTEM\ERRORS\AMQERR01.LOG
v If an error has occurred with a client application, the location of the error log on the client is shown in
Table 67.
Table 67. Client error log directory
Platform
Directory
/var/mqm/errors
Windows systems
MQ_INSTALLATION_PATH\ERRORS\AMQERR01.LOG
For example, c:\Program Files\IBM\WebSphere MQ Client\errors.
In WebSphere MQ for Windows, an indication of the error is also added to the Application Log, which
can be examined with the Event Viewer application provided with Windows systems.
Early errors
There are a number of special cases where these error logs have not yet been established and an error
occurs. WebSphere MQ attempts to record any such errors in an error log. The location of the log
depends on how much of a queue manager has been established.
If, because of a corrupt configuration file for example, no location information can be determined, errors
are logged to an errors directory that is created at installation time on the root directory (/var/mqm or
C:\Program Files\IBM\WebSphere MQ).
If WebSphere MQ can read its configuration information, and can access the value for the Default Prefix,
errors are logged in the errors subdirectory of the directory identified by the Default Prefix attribute. For
example, if the default prefix is C:\Program Files\IBM\WebSphere MQ, errors are logged in C:\Program
Files\IBM\WebSphere MQ\errors.
For further information about configuration files, see Changing WebSphere MQ and queue manager
configuration information.
Note: Errors in the Windows Registry are notified by messages when a queue manager is started.
810
The latest error messages are therefore always placed in AMQERR01.LOG. The other log files are used to
maintain a history of error messages.
To examine the contents of any error log file, use your system editor. The contents of the log files can
read by any user, but write access requires the user to be a member of the mqm group.
Using trace
You can use different types of trace to help you with problem determination and troubleshooting.
Use the following links to find out about the different types of trace, and how to run trace for your
platform:
v Using trace on Windows on page 812
v Using trace on UNIX and Linux systems on page 813
v Tracing Secure Sockets Layer (SSL) iKeyman and iKeycmd functions on page 817
v Tracing WebSphere MQ classes for JMS applications
v Tracing WebSphere MQ classes for Java applications
v Tracing the WebSphere MQ resource adapter
v Tracing additional WebSphere MQ Java components on page 818
811
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
Troubleshooting overview on page 751
Troubleshooting is the process of finding and eliminating the cause of a problem. Whenever you have a
problem with your IBM software, the troubleshooting process begins as soon as you ask yourself "what
happened?"
Using logs on page 807
There are a variety of logs that you can use to help with problem determination and troubleshooting.
First Failure Support Technology (FFST) on page 829
First Failure Support Technology ( FFST) for WebSphere MQ provides information that can help IBM
support personnel to diagnose a problem when a serious error occurs.
Related tasks:
Contacting IBM Software Support on page 845
IBM Software Support provides assistance with product defects.
A sequence number, starting at 0. If the full file name exists, this value is incremented by one
until a unique trace file name is found. A trace file name can exist if a process is reused.
Note:
1. The process identifier can contain fewer, or more, digits than shown in the example.
2. There is one trace file for each process running as part of the entity being traced.
To format or view a trace file, you must be either the creator of the trace file, or a member of the mqm
group.
SSL trace files have the names AMQ.SSL.TRC and AMQ.SSL.TRC.1. You cannot format SSL trace files; send
them unchanged to IBM support.
812
In WebSphere MQ for Windows systems, you can also start and stop tracing using the WebSphere MQ
Explorer, as follows:
1. Start the WebSphere MQ Explorer from the Start menu.
2. In the Navigator View, right-click the WebSphere MQ tree node, and select Trace.... The Trace Dialog
is displayed.
3. Click Start or Stop as appropriate.
813
Files associated with trace are created in a fixed location in the file tree, which is /var/mqm/trace.
All client tracing takes place to files in this directory.
You can handle large trace files by mounting a temporary file system over this directory.
On AIX you can use AIX system trace in addition to using the strmqtrc and endmqtrc commands. For
more information, see Tracing with the AIX system trace on page 815.
A sequence number, starting at 0. If the full file name exists, this value is incremented by one
until a unique trace file name is found. A trace file name can exist if a process is reused.
Note:
1. The process identifier can contain fewer, or more, digits than shown in the example.
2. There is one trace file for each process running as part of the entity being traced.
To format or view a trace file, you must be either the creator of the trace file, or a member of the mqm
group.
SSL trace files have the names AMQ.SSL.TRC and AMQ.SSL.TRC.1. You cannot format SSL trace files; send
them unchanged to IBM support.
For detailed information about the control command, dspmqtrc, see dspmqtrc.
814
815
Trace provides detailed execution tracing to help you to analyze problems. IBM service support personnel
might ask for a problem to be re-created with trace enabled. The files produced by trace can be very large
so it is important to qualify a trace, where possible. For example, you can optionally qualify a trace by
time and by component.
There are two ways to run trace:
1. Interactively.
The following sequence of commands runs an interactive trace on the program myprog and ends the
trace.
trace -j30D,30E -o trace.file
->!myprog
->q
2. Asynchronously.
The following sequence of commands runs an asynchronous trace on the program myprog and ends
the trace.
trace -a -j30D,30E -o trace.file
myprog
trcstop
xx
ppp
A sequence number, starting at 0. If the full file name exists, this value is incremented by one
until a unique trace file name is found. A trace file name can exist if a process is reused.
816
Note:
1. Each field can contain fewer, or more, digits than shown in the example.
2. There is one trace file for each process that is running as part of the entity that is being traced.
Trace files are created in a binary format. To format or view a trace file use the dspmqtrc command, you
must be either the creator of the trace file, or a member of the mqm group. For example, to format all
trace files in the current directory use the following command:
dspmqtrc *.TRC
For more information about the control command dspmqtrc, see ../com.ibm.mq.ref.adm.doc/
q083260_.dita.
This command enables tracing for all processes that are running in processor 2.
The -m option to select a queue manager is not relevant for use on the WebSphere MQ client for HP
Integrity NonStop Server. Specifying the -m option produces an error.
Use the -t and -x options to control the amount of trace detail to record. By default, all trace points are
enabled. Specify the points that you do not want to trace by using the -x option.
To request iKeycmd tracing, run the iKeycmd command for your platform with the following -D flags.
For Windows UNIX and Linux systems:
runmqckm -Dkeyman.debug=true -Dkeyman.jnitracing=ON
iKeyman and iKeycmd write three trace files to the directory from which you start them, so consider
starting iKeyman or iKeycmd from the trace directory to which the runtime SSL trace is written:
/var/mqm/trace on UNIX and Linux systems and MQ_INSTALLATION_PATH/trace on Windows.
MQ_INSTALLATION_PATH represents the high-level directory in which WebSphere MQ is installed. The trace
files that iKeyman and iKeycmd generate are:
817
ikmgdbg.log
Java related trace
ikmjdbg.log
JNI related trace
ikmcdbg.log
C related trace
These trace files are binary, so they must be transferred in binary transfer mode when they are
transferred from system to system using FTP. The trace files are typically approximately 1 MB each.
On UNIX, Linux, and Windows systems, you can independently request trace information for iKeyman,
iKeycmd, the runtime SSL functions, or a combination of these.
The runtime SSL trace files have the names AMQ.SSL.TRC and AMQ.SSL.TRC.1. You cannot format any
of the SSL trace files; send them unchanged to IBM support. The SSL trace files are binary files and, if
they are transferred to IBM support via FTP, they must be transferred in binary transfer mode.
Related concepts:
Using trace on UNIX and Linux systems on page 813
Use the strmqtrc and endmqtrc commands to start and end tracing, and dspmqtrc to display a trace file
Tracing additional WebSphere MQ Java components
For Java components of WebSphere MQ, for example the WebSphere MQ Explorer and the Java
implementation of WebSphere MQ Transport for SOAP, diagnostic information is output using the
standard WebSphere MQ diagnostic facilities or by Java diagnostic classes.
Related reference:
Using trace on Windows on page 812
Use the strmqtrc and endmqtrc commands or the WebSphere MQ Explorer interface to start and end
tracing.
818
For information about using the com.ibm.mq.commonservices properties file to configure diagnostics
information, see Using com.ibm.mq.commonservices.
For instructions on locating trace information and FFDC files, see Java trace and FFDC files on page
820.
Related concepts:
Using trace on UNIX and Linux systems on page 813
Use the strmqtrc and endmqtrc commands to start and end tracing, and dspmqtrc to display a trace file
Tracing Secure Sockets Layer (SSL) iKeyman and iKeycmd functions on page 817
How to request iKeyman and iKeycmd tracing.
Related reference:
Using trace on Windows on page 812
Use the strmqtrc and endmqtrc commands or the WebSphere MQ Explorer interface to start and end
tracing.
Using com.ibm.mq.commonservices
The com.ibm.mq.commonservices properties file contains the following entries relating to the output of
diagnostics from the Java components of WebSphere MQ.
Note that case is significant in all these entries:
Diagnostics.MQ=enabled|disabled
Are WebSphere MQ diagnostics to be used? If Diagnostics.MQ is enabled, diagnostic output is as
for other WebSphere MQ components; trace output is controlled by the parameters in the
strmqtrc and endmqtrc control commands, or the equivalent. The default is enabled.
Diagnostics.Java=options
Which components are traced using Java trace. Options are one or more of explorer, soap, and
wmqjavaclasses, separated by commas, where "explorer" refers to the diagnostics from the
WebSphere MQ Explorer, "soap" refers to the diagnostics from the running process within
WebSphere MQ Transport for SOAP, and "wmqjavaclasses" refers to the diagnostics from the
underlying WebSphere MQ Java classes. By default no components are traced.
Diagnostics.Java.Trace.Detail=high|medium|low
Detail level for Java trace. The high and medium detail levels match those used in WebSphere MQ
tracing but low is unique to Java trace. This property is ignored if Diagnostics.Java is not set. The
default is medium.
Diagnostics.Java.Trace.Destination.File=enabled|disabled
Whether Java trace is written to a file. This property is ignored if Diagnostics.Java is not set. The
default is disabled.
Diagnostics.Java.Trace.Destination.Console=enabled|disabled
Whether Java trace is written to the system console. This property is ignored if Diagnostics.Java is
not set. The default is disabled.
Diagnostics.Java.Trace.Destination.Pathname=dirname
The directory to which Java trace is written. This property is ignored if Diagnostics.Java is not set
or Diagnostics.Java.Trace.Destination.File=disabled. On UNIX and Linux systems, the default is
/var/mqm/trace if it is present, otherwise the Java console (System.err). On Windows, the
default is the system console.
Diagnostics.Java.FFDC.Destination.Pathname=dirname
The directory to which Java FFDC output is written. The default is the current working directory.
Diagnostics.Java.Errors.Destination.Filename=filename
The fully qualified file name to which Java error messages are written. The default is
AMQJAVA.LOG in the current working directory.
819
An example of a com.ibm.mq.commonservices properties file is given in Figure 109. Lines beginning with
the number sign (#) are treated as comments.
#
# Base WebSphere MQ diagnostics are disabled
#
Diagnostics.MQ=disabled
#
# Java diagnostics for WebSphere MQ Transport for SOAP
# and the WebSphere MQ Java Classes are both enabled
#
Diagnostics.Java=soap,wmqjavaclasses
#
# High detail Java trace
#
Diagnostics.Java.Trace.Detail=high
#
# Java trace is written to a file and not to the console.
#
Diagnostics.Java.Trace.Destination.File=enabled
Diagnostics.Java.Trace.Destination.Console=disabled
#
# Directory for Java trace file
#
Diagnostics.Java.Trace.Destination.Pathname=c:\\tracedir
#
# Directory for First Failure Data Capture
#
Diagnostics.Java.FFDC.Destination.Pathname=c:\\ffdcdir
#
# Directory for error logging
#
Diagnostics.Java.Errors.Destination.Filename=c:\\errorsdir\\SOAPERRORS.LOG
#
Figure 109. Sample com.ibm.mq.commonservices properties file
A sample properties file, WMQSoap_RAS.properties, is also supplied as part of the "Java messaging and
SOAP transport" install option.
820
Java error message output for the WebSphere MQ Explorer and for WebSphere MQ Transport for SOAP is
written to the file specified by Diagnostics.Java.Errors.Destination.Filename for the appropriate Java process.
The format of these files matches closely the format of the standard WebSphere MQ error logs.
When a process is writing trace information to a file, it appends to a single trace output file for the
lifetime of the process. Similarly, a single FFDC output file is used for the lifetime of a process.
All trace output is in the UTF-8 character set.
821
Ping
Ping is useful in determining whether the communication link and the two message channel agents that
make up a message channel are functioning across all interfaces.
Ping makes no use of transmission queues, but it does invoke some user exit programs. If any error
conditions are encountered, error messages are issued.
To use ping, you can issue the MQSC command PING CHANNEL. On , you can also use the panel
interface to select this option.
On UNIX platforms, and Windows, you can also use the MQSC command PING QMGR to test whether
the queue manager is responsive to commands. For more information, see ../com.ibm.mq.ref.adm.doc/
q085090_.dita.
822
Validation checks
A number of validation checks are made when creating, altering, and deleting channels, and where
appropriate, an error message returned.
Errors may occur when:
v A duplicate channel name is chosen when creating a channel
v Unacceptable data is entered in the channel parameter fields
v The channel to be altered is in doubt, or does not exist
In-doubt relationship
If a channel is in doubt, it is usually resolved automatically on restart, so the system operator does not
need to resolve a channel manually in normal circumstances. See In-doubt channels for further
information.
What happens:
Channel initiator
communications
subsystem failure
The channels dependent on the communications subsystem enter channel retry, and are
restarted on an appropriate queue-sharing group channel initiator by a load-balanced
start command.
The channel initiator fails, but the associated queue manager remains active. The queue
manager monitors the failure and initiates recovery processing.
The queue manager fails (failing the associated channel initiator). Other queue managers
in the queue-sharing group monitor the event and initiate peer recovery.
Shared channel recovery processing on behalf of a failed system requires connectivity to DB2 to be
available on the system managing the recovery to retrieve the shared channel status.
823
Triggered channels
If a triggered channel refuses to run, investigate the possibility of in-doubt messages here: When a
channel refuses to run
Another possibility is that the trigger control parameter on the transmission queue has been set to
NOTRIGGER by the channel. This happens when:
824
Conversion failure
Another reason for the channel refusing to run could be that neither end is able to carry out necessary
conversion of message descriptor data between ASCII and EBCDIC, and integer formats. In this instance,
communication is not possible.
Network problems
When using LU 6.2, make sure that your definitions are consistent throughout the network. For example,
if you have increased the RU sizes in your CICS Transaction Server for z/OS or Communications
Manager definitions, but you have a controller with a small MAXDATA value in its definition, the session
may fail if you attempt to send large messages across the network. A symptom of this may be that
channel negotiation takes place successfully, but the link fails when message transfer occurs.
When using TCP, if your channels are unreliable and your connections break, you can set a KEEPALIVE
value for your system or channels. You do this using the SO_KEEPALIVE option to set a system-wide
value, and on WebSphere MQ for z/OS, you can also use the KeepAlive Interval channel attribute
(KAINT) to set channel-specific keepalive values. On WebSphere MQ for z/OS you can alternatively use
the RCVTIME and RCVTMIN channel initiator parameters. These options are discussed in Checking that
the other end of the channel is still available, and Keepalive Interval (KAINT).
Registration time for DDNS:
When a group TCP/IP listener is started, it registers with DDNS. But there may be a delay until the
address is available to the network. A channel that is started in this period, and which targets the newly
registered generic name, fails with an 'error in communications configuration' message. The channel then
goes into retry until the name becomes available to the network. The length of the delay will be
dependent on the name server configuration used.
Dial-up problems
WebSphere MQ supports connection over dial-up lines but you should be aware that with TCP, some
protocol providers assign a new IP address each time you dial in. This can cause channel synchronization
problems because the channel cannot recognize the new IP addresses and so cannot ensure the
authenticity of the partner. If you encounter this problem, you need to use a security exit program to
override the connection name for the session.
Troubleshooting and support
825
This problem does not occur when a WebSphere MQ for i5/OS, UNIX systems, or Windows systems
product is communicating with another product at the same level, because the queue manager name is
used for synchronization instead of the IP address.
Retry considerations
If a link failure occurs during normal operation, a sender or server channel program will itself start
another instance, provided that:
1. Initial data negotiation and security exchanges are complete
2. The retry count in the channel definition is greater than zero
Note: For i5/OS, UNIX systems, and Windows, to attempt a retry a channel initiator must be running. In
platforms other than WebSphere MQ for i5/OS, UNIX systems, and Windows systems, this channel
initiator must be monitoring the initiation queue specified in the transmission queue that the channel is
using.
Data structures
Data structures are needed for reference when checking logs and trace entries during problem diagnosis.
More information can be found in Channel-exit calls and data structures and Developing applications
reference.
Disaster recovery
Disaster recovery planning is the responsibility of individual installations, and the functions performed
may include the provision of regular system snapshot dumps that are stored safely off-site. These
dumps would be available for regenerating the system, should some disaster overtake it. If this occurs,
you need to know what to expect of the messages, and the following description is intended to start you
thinking about it.
First a recap on system restart. If a system fails for any reason, it may have a system log that allows the
applications running at the time of failure to be regenerated by replaying the system software from a
826
syncpoint forward to the instant of failure. If this occurs without error, the worst that can happen is that
message channel syncpoints to the adjacent system may fail on startup, and that the last batches of
messages for the various channels will be sent again. Persistent messages will be recovered and sent
again, nonpersistent messages may be lost.
If the system has no system log for recovery, or if the system recovery fails, or where the disaster
recovery procedure is invoked, the channels and transmission queues may be recovered to an earlier
state, and the messages held on local queues at the sending and receiving end of channels may be
inconsistent.
Messages may have been lost that were put on local queues. The consequence of this happening depends
on the particular WebSphere MQ implementation, and the channel attributes. For example, where strict
message sequencing is in force, the receiving channel detects a sequence number gap, and the channel
closes down for manual intervention. Recovery then depends upon application design, as in the worst
case the sending application may need to restart from an earlier message sequence number.
Channel switching
A possible solution to the problem of a channel ceasing to run would be to have two message channels
defined for the same transmission queue, but with different communication links. One message channel
would be preferred, the other would be a replacement for use when the preferred channel is unavailable.
If triggering is required for these message channels, the associated process definitions must exist for each
sender channel end.
To switch message channels:
v If the channel is triggered, set the transmission queue attribute NOTRIGGER.
v Ensure the current channel is inactive.
v Resolve any in-doubt messages on the current channel.
v If the channel is triggered, change the process attribute in the transmission queue to name the process
associated with the replacement channel.
In this context, some implementations allow a channel to have a blank process object definition, in
which case you may omit this step as the queue manager will find and start the appropriate process
object.
v Restart the channel, or if the channel was triggered, set the transmission queue attribute TRIGGER.
Connection switching
Another solution would be to switch communication connections from the transmission queues.
To do this:
v If the sender channel is triggered, set the transmission queue attribute NOTRIGGER.
v Ensure the channel is inactive.
v Change the connection and profile fields to connect to the replacement communication link.
v Ensure that the corresponding channel at the remote end has been defined.
v Restart the channel, or if the sender channel was triggered, set the transmission queue attribute
TRIGGER.
Client problems
A client application may receive an unexpected error return code, for example:
v Queue manager not available
Troubleshooting and support
827
Terminating clients
Even though a client has terminated, it is still possible for its surrogate process to be holding its queues
open. Normally this will only be for a short time until the communications layer notifies that the partner
has gone.
Error logs
WebSphere MQ error messages are placed in different error logs depending on the platform. There are
error logs for:
v
Windows
UNIX
Windows
UNIX systems
On Windows, you should also examine the Windows application event log for relevant messages.
v If the queue manager name is not known (for example when there are problems in the listener or SSL
handshake):
/var/mqm/errors
When a client is installed, and there is a problem in the client application, the following log is used:
v If an error has occurred with a client application:
/var/mqm/errors/
828
Message monitoring
If a message does not reach its intended destination, you can use the WebSphere MQ display route
application, available through the control command dspmqrte, to determine the route a message takes
through the queue manger network and its final location.
The WebSphere MQ display route application is described in the WebSphere MQ display route
application on page 546 section.
Windows
UNIX
Linux
FFST: WebSphere MQ for UNIX and Linux systems on page 832
v
v FFST: WebSphere MQ for HP Integrity NonStop Server on page 834
Related concepts:
829
An FFST file contains one or more records. Each FFST record contains information about an error that is
normally severe, and possibly unrecoverable. These records typically indicate either a configuration
problem with the system or a WebSphere MQ internal error.
FFST files are named AMQnnnnn.mm.FDC, where:
nnnnn Is the ID of the process reporting the error
mm
Starts at 0. If the full file name already exists, this value is incremented by one until a unique
FFST file name is found. An FFST file name can already exist if a process is reused.
An instance of a process will write all FFST information to the same FFST file. If multiple errors occur
during a single execution of the process, an FFST file can contain many records.
When a process writes an FFST record it also sends a record to the Event Log. The record contains the
name of the FFST file to assist in automatic problem tracking. The Event log entry is made at the
application level.
A typical FFST log is shown in Figure 110 on page 831.
830
+-----------------------------------------------------------------------------+
| WebSphere MQ First Failure Symptom Report
|
| =========================================
|
|
|
| Date/Time
:- Mon January 28 2008 21:59:06 GMT
|
| UTC Time/Zone
:- 1201539869.892015 0 GMT
|
| Host Name
:- 99VXY09 (Windows XP Build 2600: Service Pack 1)
|
| PIDS
:- 5724H7200
|
| LVLS
:- 7.0.0.0
|
| Product Long Name :- WebSphere MQ for Windows
|
| Vendor
:- IBM
|
| Probe Id
:- HL010004
|
| Application Name :- MQM
|
| Component
:- hlgReserveLogSpace
|
| SCCS Info
:- lib/logger/amqhlge0.c, 1.26
|
| Line Number
:- 246
|
| Build Date
:- Jan 25 2008
|
| CMVC level
:- p000-L050202
|
| Build Type
:- IKAP - (Production)
|
| UserID
:- IBM_User
|
| Process Name
:- C:\Program Files\IBM\WebSphere MQ\bin\amqzlaa0.exe
|
| Process
:- 00003456
|
| Thread
:- 00000030
|
| QueueManager
:- qmgr2
|
| ConnId(1) IPCC
:- 162
|
| ConnId(2) QM
:- 45
|
| Major Errorcode
:- hrcE_LOG_FULL
|
| Minor Errorcode
:- OK
|
| Probe Type
:- MSGAMQ6709
|
| Probe Severity
:- 2
|
| Probe Description :- AMQ6709: The log for the Queue manager is full.
|
| FDCSequenceNumber :- 0
|
+-----------------------------------------------------------------------------+
MQM Function Stack
zlaMainThread
zlaProcessMessage
zlaProcessMQIRequest
zlaMQPUT
zsqMQPUT
kpiMQPUT
kqiPutIt
kqiPutMsgSegments
apiPutMessage
aqmPutMessage
aqhPutMessage
aqqWriteMsg
aqqWriteMsgData
aqlReservePutSpace
almReserveSpace
hlgReserveLogSpace
xcsFFST
MQM Trace History
-------------} hlgReserveLogSpace rc=hrcW_LOG_GETTING_VERY_FULL
-------------{ xllLongLockRequest
-------------} xllLongLockRequest rc=OK
...
Figure 110. Sample WebSphere MQ for Windows First Failure Symptom Report
The Function Stack and Trace History are used by IBM to assist in problem determination. In many cases
there is little that the system administrator can do when an FFST record is generated, apart from raising
problems through the IBM Support Center.
Troubleshooting and support
831
In certain circumstances a small dump file can be generated in addition to an FFST file and placed in the
c:\Program Files\IBM\WebSphere MQ\errors directory. A dump file will have the same name as the FFST
file, in the form AMQnnnnn.mm.dmp. These files can be used by IBM to assist in problem determination.
Starts at 0. If the full file name already exists, this value is incremented by one until a unique
FFST file name is found. An FFST file name can already exist if a process is reused.
An instance of a process will write all FFST information to the same FFST file. If multiple errors occur
during a single execution of the process, an FFST file can contain many records.
In order to read the contents of a FFST file, you must be either the creator of the file, or a member of the
mqm group.
When a process writes an FFST record, it also sends a record to syslog. The record contains the name of
the FFST file to assist in automatic problem tracking. The syslog entry is made at the user.error level. See
the operating-system documentation about syslog.conf for information about configuring this.
Some typical FFST data is shown in Figure 111 on page 833.
832
+-----------------------------------------------------------------------------+
|
|
| WebSphere MQ First Failure Symptom Report
|
| =========================================
|
|
|
| Date/Time
:- Mon January 28 2008 21:59:06 GMT
|
| UTC Time/Zone
:- 1201539869.892015 0 GMT
|
| Host Name
:- mqperfh2 (HP-UX B.11.23)
|
| PIDS
:- 5724H7202
|
| LVLS
:- 7.0.0.0
|
| Product Long Name :- WebSphere MQ for HP-UX
|
| Vendor
:- IBM
|
| Probe Id
:- XC034255
|
| Application Name :- MQM
|
| Component
:- xcsWaitEventSem
|
| SCCS Info
:- lib/cs/unix/amqxerrx.c, 1.204
|
| Line Number
:- 6262
|
| Build Date
:- Jan 25 2008
|
| CMVC level
:- p000-L050203
|
| Build Type
:- IKAP - (Production)
|
| UserID
:- 00000106 (mqperf)
|
| Program Name
:- amqzmuc0
|
| Addressing mode
:- 64-bit
|
| Process
:- 15497
|
| Thread
:- 1
|
| QueueManager
:- CSIM
|
| ConnId(2) QM
:- 4
|
| Major Errorcode
:- OK
|
| Minor Errorcode
:- OK
|
| Probe Type
:- INCORROUT
|
| Probe Severity
:- 4
|
| Probe Description :- AMQ6109: An internal WebSphere MQ error has occurred. |
| FDCSequenceNumber :- 0
|
|
|
+-----------------------------------------------------------------------------+
MQM Function Stack
amqzmuc0
xcsWaitEventSem
xcsFFST
MQM Trace History
Data: 0x00003c87
--} xcsCheckProcess rc=OK
--{ xcsRequestMutexSem
--} xcsRequestMutexSem rc=OK
...
Figure 111. FFST report for WebSphere MQ for UNIX systems
The Function Stack and Trace History are used by IBM to assist in problem determination. In many cases
there is little that the system administrator can do when an FFST report is generated, apart from raising
problems through the IBM Support Center.
However, there are some problems that the system administrator might be able to solve. If the FFST
shows out of resource or out of space on device descriptions when calling one of the IPC functions (for
example, semop or shmget), it is likely that the relevant kernel parameter limit has been exceeded.
If the FFST report shows a problem with setitimer, it is likely that a change to the kernel timer
parameters is needed.
833
To resolve these problems, increase the IPC limits, rebuild the kernel, and restart the machine.
First Failure Support Technology (FFST) files and UNIX and Linux clients
FFST logs are written when a severe WebSphere MQ error occurs. They are written to the directory
/var/mqm/errors.
These are normally severe, unrecoverable errors and indicate either a configuration problem with the
system or a WebSphere MQ internal error.
The files are named AMQnnnnn.mm.FDC, where:
v nnnnn is the process id reporting the error
v mm is a sequence number, normally 0
When a process creates an FFST it also sends a record to the system log. The record contains the name of
the FFST file to assist in automatic problem tracking.
The system log entry is made at the user.error level.
First Failure Support Technology is explained in detail in First Failure Support Technology (FFST).
xx
ppp
A sequence that starts at 0. If the full file name exists, this value is incremented by one until a
unique FFST file name is found. An FFST file name can exist if a process is reused.
Each field can contain fewer or more digits than shown in the example.
An instance of a process writes all FFST information to the same FFST file. If multiple errors occur during
a single execution of the process, an FFST file can contain many records.
To read the contents of an FFST file, you must be either the creator of the file, or a member of the mqm
group.
When a process writes an FFST record, it also creates an EMS event.
Figure 112 on page 835 shows a typical FFST report for a WebSphere MQ client on a HP Integrity
NonStop Server system:
834
+-----------------------------------------------------------------------------+
|
|
| WebSphere MQ First Failure Symptom Report
|
| =========================================
|
|
|
| Date/Time
:- Mon April 29 2013 10:21:26 EDT
|
| UTC Time
:- 1367245286.105303
|
| UTC Time Offset
:- -240 (EST)
|
| Host Name
:- MYHOST
|
| Operating System :- HP NonStop J06.14, NSE-AB 069194
|
|
|
| PIDS
:- 5724H7222
|
| LVLS
:- 7.1.0.0
|
| Product Long Name :- WebSphere MQ for HP NonStop Server
|
| Vendor
:- IBM
|
| Installation Path :- /home/cmarti/client/opt/mqm
|
| Probe Id
:- MQ000020
|
| Application Name :- MQM
|
| Component
:- Unknown
|
| SCCS Info
:- S:/cmd/trace/amqxdspa.c,
|
| Line Number
:- 3374
|
| Build Date
:- Apr 24 2013
|
| Build Level
:- D20130424-1027
|
| Build Type
:- ICOL - (Development)
|
| File Descriptor
:- 6
|
| Effective UserID :- 11329 (MQM.CMARTI)
|
| Real UserID
:- 11329 (MQM.CMARTI)
|
| Program Name
:- dspmqtrc
|
| Addressing mode
:- 32-bit
|
| LANG
:|
| Process
:- 1,656 $Y376 OSS 469762429
|
| Thread(n)
:- 1
|
| UserApp
:- FALSE
|
| Last HQC
:- 0.0.0-0
|
| Last HSHMEMB
:- 0.0.0-0
|
| Major Errorcode
:- krcE_UNEXPECTED_ERROR
|
| Minor Errorcode
:- OK
|
| Probe Type
:- INCORROUT
|
| Probe Severity
:- 2
|
| Probe Description :- AMQ6125: An internal WebSphere MQ error has occurred. |
| FDCSequenceNumber :- 0
|
| Comment1
:- AMQ.3.520.sq_tc.0.TRC
|
| Comment2
:- Unrecognised hookID:0x3 at file offset 0x4b84
|
|
|
+-----------------------------------------------------------------------------+
MQM Function Stack
xcsFFST
MQM Trace History
{ xppInitialiseDestructorRegistrations
} xppInitialiseDestructorRegistrations rc=OK
{ xcsGetEnvironmentInteger
-{ xcsGetEnvironmentString
...
Figure 112. Sample FFST data
The Function Stack and Trace History are used by IBM to help problem determination. In many cases,
there is little that the system administrator can do when an FFST report is generated, apart from raising
problems through the IBM Support Center. However, there are some problems that the system
administrator might be able to solve, for example, if the FFST report shows Out of resource or Out of
space on device.
Troubleshooting and support
835
For more information about FFST, see First Failure Support Technology (FFST) on page 829.
836
Procedure
1. Go to the IBM SupportAssistant web page to download the installation package.
2. Log in by using your IBM ID and password. If you do not have an IBM ID, click Get an IBM ID to
create one.
3. Select the version of ISA that you want and click Continue.
4. Click View license to read the license agreement in a separate window, then select I agree and click I
confirm.
5. Select the relevant operating system, click Download now, and save the compressed file to a
temporary directory.
6. Extract the files from the compressed file to a temporary directory. The files that you extract include a
quick start guide that tells you how to install, upgrade, and configure ISA.
7. Follow the instructions in the quick start guide to install ISA.
Results
When you have installed ISA successfully, you can use the desktop icon to open it, or you can click
Programs > IBM Support Assistant > IBM Support Assistant. (The exact name of the entry in the Start
menu depends on the version of ISA that you have installed.)
What to do next
Now that you have installed ISA, install the WMQ add-on, as described in Updating the IBM Support
Assistant (ISA).
Procedure
1. Open the IBM Support Assistant by clicking Programs > IBM Support Assistant > IBM Support
Assistant.
2. Click Update > Find New and select either Product Add-ons or Tools Add-ons.
837
3. Select the appropriate product add-ons to install and click Next. Add-ons are categorized by product
family, therefore expand WebSphere and select WebSphere MQ.
4. Select the appropriate tool add-ons and click Next.
5. Read and accept the license agreement and click Next.
6. Click Finish to install the selected add-ons.
7. When the installation completes, click Finish, then click Yes to restart ISA.
What to do next
When you have installed the add-ons in successfully, click Find Information to search various forms of
information for the products that you have selected. You can also use ISA to analyze problems and collect
and send data to IBM.
Procedure
1. Search the product documentation
IBM provides extensive documentation in the form of online product documentation. This
documentation can also be installed on your local machine or on a local intranet. You can use the
powerful search function of the product documentation to query conceptual and reference information
as well as using detailed instructions for completing tasks.
2. Search the IBM database for similar problems
IBM keeps records of all known problems with its licensed programs on its software support database
(RETAIN). IBM support center staff continually update this database as new problems are found, and
they regularly search the database to see if problems they are told about are already known. You can
use one of IBM's search tools to search the database, or you can contact IBM support center to
perform the search for you. For more information about searching the IBM database, see Searching
the IBM database for similar problems, and solutions on page 839.
3. Search the Internet
If you cannot find an answer to your question in the product documentation, search the Internet for
the latest, most complete information that might help you resolve your problem, including:
v IBM technotes
v IBM downloads
v IBM Redbooks
v IBM developerWorks
v Forums and newsgroups
v Internet search engines
You can use the IBM Support Assistant (ISA) to help in your search of knowledge bases. With ISA,
you can:
v Query multiple sources of support information
v Access available diagnostic tools
838
v
v
v
v
For more information, see IBM Support Assistant (ISA) on page 836.
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
IBM Support Assistant (ISA) on page 836
The IBM Support Assistant (ISA) helps you to resolve questions and problems with IBM software
products by providing access to support-related information and troubleshooting tools.
Related tasks:
Contacting IBM Software Support on page 845
IBM Software Support provides assistance with product defects.
Windows
UNIX
Linux
753
If the search is successful, you find a similar problem description and, usually, a fix. If the search is
unsuccessful, you should use these keywords when contacting IBM for additional assistance, or when
documenting a possible authorized program analysis report (APAR).
Searching the IBM software support database is most effective if you:
v Always spell keywords the way they are spelled in this documentation
v Include all the appropriate keywords in any discussion with your IBM support center
Use the following topics to find out more about searching the IBM database for problems:
v The search argument process on page 840
v The keyword format on page 841
v SDB format symptom-to-keyword cross reference on page 842
v WebSphere MQ component and resource manager identifiers on page 844
Troubleshooting and support
839
840
perform, the problem could be recorded as a DOC type of failure. In this case, try searching with
DOC as your type-of-failure keyword, rather than with MSGx, PERFM, or INCORROUT.
Free format
A free form keyword can consist of any piece of data that is related to the problem. To help you search
the database, a set of keywords has been defined, and you can use them to narrow your search. (For
example, if you know the name of the CSECT in error, you can use this to search, but if you add the
MSGxx or ABEND keyword, your search will be more precise.)
The following list shows keywords defined for use in a free format search:
Table 68. Keywords defined for use in a free format search
Keyword
Meaning
ABEND
ABENDxx
ABENDUxx
DOC
HALTxx
INCORROUT
INTEG
Integrity problem.
LOOP
Loop.
MSGxx
PERFM
Performance degradation.
PROCCHK
Processor check.
PROGCH
Program check.
WAIT
WAITxx
841
Meaning
AB
Abend code.
FLDS
LVLS
MS
Message identifier.
OPCS
PCSS
PIDS
PRCS
PTFS
PUBS
RECS
REGS
Register for a software program associated with a problem. The value can
be the register/PSW difference (rrddd), which the STATUS FAILDATA
subcommand of IPCS provides for abends. The difference (ddd) is a
hexadecimal offset from a probable base register or branch register (rr).
RIDS
VALU
WS
Wait state code issued by the system, or device-issued wait code. One of the
following qualifiers is required as the first character of the value:
v D for disabled wait (system disabled for I/O or external interrupts)
v E for enabled wait
For more information about which prefix keyword to use for which type of symptom, see SDB format
symptom-to-keyword cross reference.
842
Structured database (SDB) format is one of the formats that you can use for searching the RETAIN
database. Structured symptoms are also called RETAIN symptoms and "failure keywords. Table 70 lists
which prefix keyword to use for which symptom.
Searching the IBM database for similar problems, and solutions on page 839 provides details about
searching RETAIN.
Table 70. SDB format symptom-to-keyword cross-reference
Symptom
Keyword
Symptom
Keyword
abend
AB/
access method
RIDS/
address
ADRS/
APAR
PTFS/
assembler macro
RIDS/
assembler message
MS/
CLIST
RIDS/
command
PCSS/
compiler message
MS/
completion code
PRCS/
component
PIDS/
condition code
PRCS/
control block
FLDS/
ADRS/
control register
REGS/
CSECT
RIDS/
PCSS/
dependent component
PIDS/
PRCS/
WS/
displacement
ADRS/
display
DEVS/
document
PUBS/
DSECT
FLDS/
WS/
error code
PRCS/
EXEC
RIDS/
feedback code
PRCS/
field
FLDS/
field value
VALU/
file mode
PCSS/
file name
PCSS/
file type
PCSS/
flag
FLDS/
floating-point register
REGS/
full-screen mode
PCSS/
function key
PCSS/
REGS/
hang
WS/
WS/
OPCS/
incorrect output
INCORROUT*
JCL card
PCSS/
JCL parameter
PCSS/
PRCS/
key
PCSS/
label, code
FLDS/
language statement
PCSS/
level
LVLS/
library name
PCSS/
line command
PCSS/
loop
LOOP*
ADRS/
machine check
SIG/
macro as a routine
RIDS/
macro as a statement
PCSS/
maintenance level
PTFS/
message
MS/
module
RIDS/
offset
ADRS/
opcode
OPCS/
operator command
PCSS/
operator key
PCSS/
operator message
MS/
option
PCSS/
overlay
OVS/
PA key
PCSS/
panel
RIDS/
parameter
PCSS/
performance
PERFM*
Troubleshooting and support
843
Keyword
Symptom
Keyword
PF key
PCSS/
procedure name
PCSS/
process name
PCSS/
profile option
PCSS/
program check
AB/
program id
RIDS/
program key
PCSS/
program statement
PCSS/
PSW
FLDS/
PTF, PE or otherwise
PTFS/
publication
PUBS/
PUT level
PTFS/
reason code
PRCS/
register value
VALU/
register
REGS/
release level
LVLS/
reply to message
PCSS/
reply to prompt
PCSS/
request code
OPCS/
response to message
PCSS/
response to prompt
PCSS/
return code
PRCS/
routine
RIDS/
service level
PTFS/
special character
PCSS/
SRL
PUBS/
statement
PCSS/
status code
PRCS/
step code
PRCS/
structure word
FLDS/
subroutines
RIDS/
SVC
OPCS/
SYSGEN parameter
PCSS/
system check
PRCS/
table
FLDS/
terminal key
PCSS/
value
VALU/
variable
FLDS/
wait (coded)
WS/
wait (uncoded)
WAIT*
Note: An asterisk (*) indicates that there is no prefix keyword for this type of problem. Use the
type-of-failure keyword shown for searches of the software support database.
Prefix
Hex ID
Component name
RMID
AMT
AMI
CMQ
CSQm
X'94'
Connection manager
148
CSQt
X'A3'
Topic manager
163
CSQA
X'C1'
Application interface
CSQB
X'C2'
Batch adapter
CSQC
X'C3'
CICS adapter
CSQE
X'C5'
197
CSQF
X'C6'
Message generator
24
844
Prefix
Hex ID
Component name
RMID
CSQG
X'C7'
199
CSQH
X'C8'
200
CSQI
X'C9'
Data manager
201
CSQJ
X'D1'
CSQL
X'D3'
Lock manager
211
CSQM
X'D4'
Message manager
212
CSQN
X'D5'
Command server
213
CSQO
X'D6'
CSQP
X'D7'
Buffer manager
215
CSQQ
X'D8'
IMS adapter
CSQR
X'D9'
Recovery manager
CSQS
X'E2'
Storage manager
CSQT
X'E3'
Timer services
227
CSQU
X'E4'
Utilities
CSQV
X'E5'
Agent services
CSQW
X'E6'
Instrumentation facilities
16, 26
CSQX
X'E7'
Distributed queuing
231
CSQY
X'E8'
CSQZ
X'E9'
12
CSQ1
X'F1'
Service facilities
CSQ2
X'F2'
242
CSQ3
X'F3'
Subsystem support
7, 8
CSQ4
X'F4'
Sample programs
CSQ5
X'F5'
DB2 manager
245
CSQ6
X'F6'
Customization
CSQ7
X'F7'
Dump formatting
CSQ8
X'F8'
Installation
CSQ9
X'F9'
23
IMQ
C++ bindings
845
Procedure
1. Determine the effect of the problem on your business
2. Describe your problem and gather background information on page 847
3. Submit your problem to IBM Software Support on page 847
Effect on business
Severity 1
Critical effect on business: You are unable to use the program, resulting in a critical
effect on operations. This condition requires an immediate solution.
Severity 2
Severity 3
Some effect on business: The program is usable with less significant features (not critical
to operations) unavailable.
Severity 4
Minimal effect on business: The problem has little effect on operations, or a reasonable
workaround to the problem has been implemented.
846
847
848
Severity
Problem
No.
Incident No.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem/Inquiry
Abend
Incorrout
z/OS Release
Wait
Module
WebSphere MQ Release
Loop
Message
CICS Release
Performance
Other
IMS Release
DB2 Release
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Documentation available
Abend
System dump
Program output
Message
Transaction dump
Other
Trace
Translator output
Symptom string
Compiler output
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Actions
Date
Name
Activity
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Resolution
APAR
PTF
Other
If you use an electronic system for reporting problems to the support center, you should still include as
much information as possible about your problem.
You should also maintain your own in-house tracking system for problems. A problem tracking system
records and documents all problems.
849
Related concepts:
What the support center needs to know
It is important that you understand what information the support center requires.
What happens next on page 851
Use this topic to understand what happens after you contact the IBM support center.
850
The keywords are then used as search arguments on the RETAIN database, to see if your problem is a
known one that has already been the subject of an authorized program analysis report (APAR).
Finally, let the support center know if any of the following events occurred before the problem appeared:
v Changes in the level of z/OS or licensed programs
v Regenerations
v PTFs applied
v Additional features used
v Application programs changed
v Unusual operator action
You might be asked to give values from a formatted dump or trace table, or to carry out some special
activity, for example to set a trap, or to use trace with a specific type of selectivity, and then to report the
results.
Note: You will be given guidance by the support center on how to obtain this information.
How your problem is then progressed depends on its nature. The representative who handles the
problem gives you guidance on what is required from you. The possibilities are described in the next
section.
Related concepts:
What happens next
Use this topic to understand what happens after you contact the IBM support center.
As a rule, the documentation you need to submit for a problem includes all the material you need
yourself to do problem determination.
Make sure that the problem you have described can be seen in the documentation you send. If the
problem has ambiguous symptoms, you need to reveal the sequence of events leading to the failure.
Troubleshooting and support
851
Tracing is valuable in this respect but you need to provide details that trace cannot give. You are
encouraged to annotate your documentation, if your annotation is legible and does not cover up vital
information. You can highlight any data in hardcopy you send, using transparent highlighting markers.
You can also write notes in the margins, preferably using a red pen so that the notes are not overlooked.
Finally, note that if you send too little documentation, or if it is unreadable, the change team will have to
return your problem marked "insufficient documentation. It is, therefore, worthwhile preparing your
documentation carefully and sending everything relevant to the problem.
The general documentation is described in this topic. However, these are only guidelines, you must find
out from the IBM support center representative precisely what documentation you need to send for your
specific problem.
Resolving a problem
After a problem is confirmed an APAR can be raised and a PTF released. Use this topic to understand the
APAR and PTF process.
An APAR
An authorized program analysis report (APAR) is the means by which a problem with an IBM program is
documented, tracked, and corrected. It is also used to track problems with IBM documents.
An APAR is raised by the IBM change team when a new problem is reported for which a program or
documentation change is required. It is separate to the PMR that is raised when you report first report
the problem.
852
When the change team solves the problem, they might produce a local fix enabling you to get your
system running properly again. Finally, a program temporary fix (PTF) is produced to replace the module
in error, and the APAR is closed.
853
1. Open the IBM Support Assistant from the Start menu by clicking Programs > IBM Support Assistant
> IBM Support Assistant.
2. Click Product Information, WMQ, Support page, Download, then Recommended fixes. This Web
page provides links to the latest available maintenance for the in-service products.
To receive weekly e-mail notifications about fixes and other news about IBM products, follow these steps.
Procedure
1. From the support site (WebSphere MQ support web page), click Subscribe to this product in the
Notifications box on the page.
2. If you have already registered for "Notifications", skip to the next step. If you have not registered,
click register now on the sign-in page and follow the on-screen instructions.
3. Sign in to "My notifications".
4. Click the Subscribe tab. A list of products families is shown.
5. In the Software column, click WebSphere. A list of products is shown.
6. Select the product for which you want to receive notifications (for example, WebSphere MQ), then
click Continue.
7. Set options to determine what notifications you receive, how often you receive them, and to which
folder they are saved, then click Submit.
Related concepts:
Troubleshooting and support on page 751
If you are having problems with your queue manager network or WebSphere MQ applications, use the
techniques described to help you diagnose and solve the problems.
Troubleshooting overview on page 751
Troubleshooting is the process of finding and eliminating the cause of a problem. Whenever you have a
problem with your IBM software, the troubleshooting process begins as soon as you ask yourself "what
happened?"
Related tasks:
Contacting IBM Software Support on page 845
IBM Software Support provides assistance with product defects.
Searching knowledge bases on page 838
If you have a problem with your IBM software, you want it resolved quickly. Begin by searching the
available knowledge bases to determine whether the resolution to your problem is already documented.
Related information:
Applying and removing maintenance
Procedure
See the following links for instructions on how to recover from different types of failures:
v Disk drive failures on page 855
854
where QMgrName is the queue manager being recovered. -t all * indicates that all damaged objects of
any type are to be recovered. If only one or two objects have been reported as damaged, you can
specify those objects by name and type here.
v For linear logging with media recovery and with an undamaged log, you might be able to restore a
backup of the queue manager data leaving the existing log files and log control file unchanged.
Starting the queue manager applies the changes from the log to bring the queue manager back to its
state when the failure occurred.
This method relies on two things:
855
1. You must restore the checkpoint file as part of the queue manager data. This file contains the
information determining how much of the data in the log must be applied to give a consistent
queue manager.
2. You must have the oldest log file required to start the queue manager at the time of the backup,
and all subsequent log files, available in the log file directory.
If this is not possible, restore a backup of both the queue manager data and the log, both of which
were taken at the same time. This causes message integrity to be lost.
v For circular logging, if the queue manager log files are damaged, restore the queue manager from the
latest backup that you have. Once you have restored the backup, restart the queue manager and check
for damaged objects. However, because you do not have media recovery, you must find other ways of
re-creating the damaged objects.
If the queue manager log files are not damaged, the queue manager will normally be able to restart.
Following the restart you must identify all damaged objects, then delete and redefine them.
Reason codes
You can use the following messages and reason codes to help you solve problems with your WebSphere
MQ components or applications.
v
v
v
v
v
856
For a full list and explanation of the API reason codes, see API reason codes.
857
The following is a list of reason codes, in numeric order, providing detailed information to help you
understand them, including:
v An explanation of the circumstances that have caused the code to be raised
v The associated completion code
v Suggested programmer actions in response to the code
0 (0000) (RC0): MQRC_NONE on page 870
900 (0384) (RC900): MQRC_APPL_FIRST on page 870
999 (03E7) (RC999): MQRC_APPL_LAST on page 870
2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR on page 870
2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED on page 871
2003
2004
2005
2006
2007
2008
(07D3)
(07D4)
(07D5)
(07D6)
(07D7)
(07D8)
(RC2003):
(RC2004):
(RC2005):
(RC2006):
(RC2007):
(RC2008):
2038
2039
2040
2041
(07F6)
(07F7)
(07F8)
(07F9)
858
(RC2038):
(RC2039):
(RC2040):
(RC2041):
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2055
2056
2057
2058
2059
2061
(0812)
(0813)
(0814)
(0815)
(RC2066):
(RC2067):
(RC2068):
(RC2069):
859
2097
2098
2099
2100
2101
(0831)
(0832)
(0833)
(0834)
(0835)
(RC2097):
(RC2098):
(RC2099):
(RC2100):
(RC2101):
2102
2103
2104
2105
2106
2107
2108
860
2142
2143
2144
2145
2146
2148
2149
2150
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
(0886)
(0887)
(0888)
(0889)
(RC2182):
(RC2183):
(RC2184):
(RC2185):
861
2224
2225
2226
2227
2228
2229
(08B0)
(08B1)
(08B2)
(08B3)
(08B4)
(08B5)
(RC2224):
(RC2225):
(RC2226):
(RC2227):
(RC2228):
(RC2229):
(08C3)
(08C4)
(08C5)
(08C6)
(08C7)
(RC2243):
(RC2244):
(RC2245):
(RC2246):
(RC2247):
862
2261
2262
2263
2264
2265
(08D5)
(08D6)
(08D7)
(08D8)
(08D9)
(RC2261):
(RC2262):
(RC2263):
(RC2264):
(RC2265):
2266
2267
2268
2269
2270
2271
2272
2273
2274
2277
2278
2279
2280
(08E1)
(08E2)
(08E5)
(08E6)
(08E7)
(08E8)
(RC2273):
(RC2274):
(RC2277):
(RC2278):
(RC2279):
(RC2280):
(08F3)
(08F4)
(08F6)
(08F7)
(08F8)
(RC2291):
(RC2292):
(RC2294):
(RC2295):
(RC2296):
863
2321
2322
2323
2324
2325
2326
(0921)
(0922)
(0923)
(0924)
(0925)
(RC2337):
(RC2338):
(RC2339):
(RC2340):
(RC2341):
864
2354
2355
2356
2357
2358
(0932)
(0933)
(0934)
(0935)
(0936)
(RC2354):
(RC2355):
(RC2356):
(RC2357):
(RC2358):
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
865
2400
2401
2402
2406
2407
(0960)
(0961)
(0962)
(0966)
(0967)
(RC2400):
(RC2401):
(RC2402):
(RC2406):
(RC2407):
(0971)
(0972)
(0973)
(0974)
(0975)
(0976)
(RC2417):
(RC2418):
(RC2419):
(RC2420):
(RC2421):
(RC2422):
(0983)
(0984)
(0985)
(0986)
(0988)
(RC2435):
(RC2436):
(RC2437):
(RC2438):
(RC2440):
866
2461
2462
2463
2464
2465
2466
2467
2469
2470
2471
2472
2473
(09A2)
(09A3)
(09A5)
(09A6)
(09A7)
(09A8)
(09A9)
2478
2479
2480
2481
2482
2483
(RC2466):
(RC2467):
(RC2469):
(RC2470):
(RC2471):
(RC2472):
(RC2473):
(09C0)
(09C1)
(09C2)
(09C3)
(09C4)
(RC2496):
(RC2497):
(RC2498):
(RC2499):
(RC2500):
867
2517
2518
2519
2520
2521
(09D5)
(09D6)
(09D7)
(09D8)
(09D9)
(RC2517):
(RC2518):
(RC2519):
(RC2520):
(RC2521):
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
(09E1)
(09E2)
(09E3)
(09E4)
(09E5)
(09E6)
(RC2529):
(RC2530):
(RC2531):
(RC2532):
(RC2533):
(RC2534):
(09F3)
(09F4)
(09F5)
(09F6)
(09F7)
(RC2547):
(RC2548):
(RC2549):
(RC2550):
(RC2551):
868
2565
2566
2567
2568
2569
(0A05)
(0A06)
(0A07)
(0A08)
(0A09)
(RC2565):
(RC2566):
(RC2567):
(RC2568):
(RC2569):
2583
2587
2589
2590
2591
2592
6100
6101
6102
6103
6104
6105
6106
869
870
Completion Code
MQCC_FAILED
Programmer response
Correct the queue definitions.
2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED:
Explanation
An MQCONN or MQCONNX call was issued, but the application is already connected to the queue
manager.
v On z/OS, this reason code occurs for batch and IMS applications only; it does not occur for CICS
applications.
v On UNIX, IBM i, Linux and Windows, this reason code occurs if the application attempts to create a
nonshared handle when a nonshared handle exists for the thread. A thread can have no more than one
nonshared handle.
v On UNIX, IBM i, Linux and Windows, this reason code occurs if an MQCONN call is issued from
within an MQ channel exit, API Crossing Exit, or Async Consume Callback function, and a shared
hConn is bound to this thread.
v On UNIX, IBM i, Linux and Windows, this reason code occurs if an MQCONNX call that does not
specify one of the MQCNO_HANDLE_SHARE_* options is issued from within an MQ channel exit,
API Crossing Exit, or Async Consume Callback function, and a shared hConn is bound to this thread
v On Windows, MTS objects do not receive this reason code, as additional connections to the queue
manager are permitted.
Completion Code
MQCC_WARNING
Programmer response
None. The Hconn parameter returned has the same value as was returned for the previous MQCONN or
MQCONNX call.
An MQCONN or MQCONNX call that returns this reason code does not mean that an additional
MQDISC call must be issued to disconnect from the queue manager. If this reason code is returned
because the application has been called in a situation where the MQCONN has already been done, do not
issue a corresponding MQDISC, because this causes the application that issued the original MQCONN or
MQCONNX call to be disconnected as well.
2003 (07D3) (RC2003): MQRC_BACKED_OUT:
Explanation
The current unit of work encountered an unrecoverable error or was backed out. This reason code is
issued in the following cases:
v On an MQCMIT or MQDISC call, when the commit operation fails and the unit of work is backed out.
All resources that participated in the unit of work are returned to their state at the start of the unit of
work. The MQCMIT or MQDISC call completes with MQCC_WARNING in this case.
On z/OS, this reason code occurs only for batch applications.
871
v On an MQGET, MQPUT, or MQPUT1 call that is operating within a unit of work, when the unit of
work already encountered an error that prevents the unit of work from being committed (for example,
when the log space is exhausted). The application must issue the appropriate call to back out the unit
of work. (For a unit of work that is coordinated by the queue manager, this call is the MQBACK call,
although the MQCMIT call has the same effect in these circumstances.) The MQGET, MQPUT, or
MQPUT1 call completes with MQCC_FAILED in this case.
On z/OS, this case does not occur.
v On an asynchronous consumption callback (registered by an MQCB call), the unit of work is backed
out and the asynchronous consumer should call MQBACK.
On z/OS, this case does not occur.
v For the WebSphere MQ client on HP Integrity NonStop Server using TMF, this return code can occur:
For MQGET, MQPUT, and MQPUT1 calls, if you have an active transaction that is being
coordinated by TMF, but the WebSphere MQ part of the transaction is rolled back because of
inactivity on the transaction.
If the TMF/Gateway detects that TMF is rolling back the current transaction before the application
finishes with it.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Check the returns from previous calls to the queue manager. For example, a previous MQPUT call might
have failed.
2004 (07D4) (RC2004): MQRC_BUFFER_ERROR:
Explanation
The Buffer parameter is not valid for one of the following reasons:
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The parameter pointer points to storage that cannot be accessed for the entire length specified by
BufferLength.
v For calls where Buffer is an output parameter: the parameter pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR:
Explanation
The BufferLength parameter is not valid, or the parameter pointer is not valid. (It is not always possible
to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
This reason can also be returned to an MQ MQI client program on the MQCONN or MQCONNX call if
the negotiated maximum message size for the channel is smaller than the fixed part of any call structure.
872
873
The call still completes, with the CharAttrs parameter string filled in with as many character attributes as
there is room for. Only complete attribute strings are returned: if there is insufficient space remaining to
accommodate an attribute in its entirety, that attribute and subsequent character attributes are omitted.
Any space at the end of the string not used to hold an attribute is unchanged.
An attribute that represents a set of values (for example, the namelist Names attribute) is treated as a
single entityeither all of its values are returned, or none.
Completion Code
MQCC_WARNING
Programmer response
Specify a large enough value, unless only a subset of the values is needed.
2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN:
Explanation
Connection to the queue manager has been lost. This can occur because the queue manager has ended. If
the call is an MQGET call with the MQGMO_WAIT option, the wait has been canceled. All connection
and object handles are now invalid.
For MQ MQI client applications, it is possible that the call did complete successfully, even though this
reason code is returned with a CompCode of MQCC_FAILED.
Completion Code
MQCC_FAILED
Programmer response
Applications can attempt to reconnect to the queue manager by issuing the MQCONN or MQCONNX
call. It might be necessary to poll until a successful response is received.
v On z/OS for CICS applications, it is not necessary to issue the MQCONN or MQCONNX call, because
CICS applications are connected automatically.
Any uncommitted changes in a unit of work should be backed out. A unit of work that is coordinated by
the queue manager is backed out automatically.
2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR:
Explanation
The DataLength parameter is not valid. Either the parameter pointer is not valid, or it points to read-only
storage. (It is not always possible to detect parameter pointers that are not valid; if not detected,
unpredictable results occur.)
This reason can also be returned to an MQ MQI client program on the MQGET, MQPUT, or MQPUT1
call, if the BufferLength parameter exceeds the maximum message size that was negotiated for the client
channel.
Completion Code
MQCC_FAILED
874
Programmer response
Correct the parameter.
If the error occurs for an MQ MQI client program, also check that the maximum message size for the
channel is big enough to accommodate the message being sent; if it is not big enough, increase the
maximum message size for the channel.
2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR:
Explanation
On the MQOPEN call, a model queue is specified in the ObjectName field of the ObjDesc parameter, but
the DynamicQName field is not valid, for one of the following reasons:
v DynamicQName is completely blank (or blank up to the first null character in the field).
v Characters are present that are not valid for a queue name.
v An asterisk is present beyond the 33rd position (and before any null character).
v An asterisk is present followed by characters that are not null and not blank.
This reason code can also sometimes occur when a server application opens the reply queue specified by
the ReplyToQ and ReplyToQMgr fields in the MQMD of a message that the server has just received. In this
case the reason code indicates that the application that sent the original message placed incorrect values
into the ReplyToQ and ReplyToQMgr fields in the MQMD of the original message.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid name.
2012 (07DC) (RC2012): MQRC_ENVIRONMENT_ERROR:
Explanation
The call is not valid for the current environment.
v On z/OS, one of the following reasons apply:
An MQCONN or MQCONNX call was issued, but the application has been linked with an adapter
that is not supported in the environment in which the application is running. For example, when the
application is linked with the MQ RRS adapter, but the application is running in a DB2 Stored
Procedure address space. RRS is not supported in this environment. Stored Procedures that use the
MQ RRS adapter must run in a DB2 WLM-managed Stored Procedure address space.
An MQCMIT or MQBACK call was issued, but the application has been linked with the RRS batch
adapter CSQBRSTB. This adapter does not support the MQCMIT and MQBACK calls.
An MQCMIT or MQBACK call was issued in the CICS or IMS environment.
The RRS subsystem is not operational on the z/OS system that ran the application.
An MQCTL call with MQOP_START or an MQCB call registering an Event Listener was issued, but the
application is not allowed to create a POSIX thread.
A WebSphere MQ classes for Java application has instantiated an MQQueueManager object using
the CLIENT transport. The z/OS environment only supports the use of the BINDINGS transport.
v On IBM i, HP Integrity NonStop Server, UNIX systems, and Windows, one of the following applies:
The application is linked to the wrong libraries (threaded or nonthreaded).
Troubleshooting and support
875
An MQBEGIN, MQCMIT, or MQBACK call was issued, but an external unit-of-work manager is in
use. For example, this reason code occurs on Windows when an MTS object is running as a DTC
transaction. This reason code also occurs if the queue manager does not support units of work.
The MQBEGIN call was issued in an MQ MQI client environment.
An MQXCLWLN call was issued, but the call did not originate from a cluster workload exit.
An MQCONNX call was issued specifying the option MQCNO_HANDLE_SHARE_NONE on an MQ channel
exit, an API Exit, or a Callback function. The reason code occurs only if a shared hConn is bound to
the application thread.
A WebSphere MQ Object is unable to connect fastpath.
A WebSphere MQ classes for Java application has created an MQQueueManager object that uses the
CLIENT transport, and then called MQQueueManager.begin(). This method can only be called on
MQQueueManager objects that use the BINDINGS transport.
v On Windows, when using the managed .NET client, an attempt was made to use one of the
unsupported features:
Unmanaged channel exits
Secure Sockets Layer (SSL)
XA Transactions
Communications other than TCP/IP
Channel compression
v On Solaris, if you install WebSphere MQ V7.5 to a non-default location and then make it a primary
installation, an error message is displayed. The error message shows that linking with libraries,
libmqmcs, and libmqmzse has been deprecated, and that you must re-link your applications to avoid
using the libmqmcs and libmqmzse libraries. You can set the environment variable
AMQ_NO_MQMCS_MSG to ensure that WebSphere MQ does not display this error message in the
error logs.
The MQCONN or MQCONNX call can succeed only if connecting to a queue manager associated with
the same installation owning the library that contains the MQCONN or MQCONNX call.
Completion Code
MQCC_FAILED
Programmer response
Perform one of the following actions (as appropriate):
v On z/OS:
Link the application with the correct adapter.
Modify the application to use the SRRCMIT and SRRBACK calls in place of the MQCMIT and
MQBACK calls. Alternatively, link the application with the RRS batch adapter CSQBRRSI. This
adapter supports MQCMIT and MQBACK in addition to SRRCMIT and SRRBACK.
For a CICS or IMS application, issue the appropriate CICS or IMS call to commit or back out the
unit of work.
Start the RRS subsystem on the z/OS system that is running the application.
If your application uses Language Environment (LE), ensure that it uses the DLL interface and that
it runs with POSIX(ON).
Ensure that your application has access to use Unix System Services (USS).
Ensure that your Connection Factory definitions for local z/OS applications and WebSphere
Application Server applications use Transport Type with bindings mode connections.
v In other environments:
Link the application with the correct libraries (threaded or nonthreaded).
876
Remove from the application the call or feature that is not supported.
Change your application to run setuid, if you want to run fastpath.
2013 (07DD) (RC2013): MQRC_EXPIRY_ERROR:
Explanation
On an MQPUT or MQPUT1 call, the value specified for the Expiry field in the message descriptor
MQMD is not valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a value that is greater than zero, or the special value MQEI_UNLIMITED.
2014 (07DE) (RC2014): MQRC_FEEDBACK_ERROR:
Explanation
On an MQPUT or MQPUT1 call, the value specified for the Feedback field in the message descriptor
MQMD is not valid. The value is not MQFB_NONE, and is outside both the range defined for system
feedback codes and the range defined for application feedback codes.
Completion Code
MQCC_FAILED
Programmer response
Specify MQFB_NONE, or a value in the range MQFB_SYSTEM_FIRST through MQFB_SYSTEM_LAST, or
MQFB_APPL_FIRST through MQFB_APPL_LAST.
2016 (07E0) (RC2016): MQRC_GET_INHIBITED:
Explanation
MQGET calls are currently inhibited for the queue, or for the queue to which this queue resolves.
Completion Code
MQCC_FAILED
Programmer response
If the system design allows get requests to be inhibited for short periods, retry the operation later.
2017 (07E1) (RC2017): MQRC_HANDLE_NOT_AVAILABLE:
Explanation
An MQOPEN, MQPUT1 or MQSUB call was issued, but the maximum number of open handles allowed
for the current task has already been reached. Be aware that when a distribution list is specified on the
MQOPEN or MQPUT1 call, each queue in the distribution list uses one handle.
Troubleshooting and support
877
878
Ensure the character conversion exit program run by your CICS TS 3.2 or higher application, which
invokes the MQXCNVC call, is defined as OPENAPI. This definition prevents the 2018
MQRC_HCONN_ERROR error caused by from an incorrect connection, and allows the MQGET to
complete.
2019 (07E3) (RC2019): MQRC_HOBJ_ERROR:
Explanation
The object handle Hobj is not valid, for one of the following reasons:
v The parameter pointer is not valid, or (for the MQOPEN call) points to read-only storage. (It is not
always possible to detect parameter pointers that are not valid; if not detected, unpredictable results
occur.)
v The value specified was not returned by a preceding MQOPEN call.
v The value specified has been made invalid by a preceding MQCLOSE call.
v The handle is a shared handle that has been made invalid by another thread issuing the MQCLOSE
call.
v The handle is a nonshared handle that is being used by a thread that did not create the handle.
v The call is MQGET or MQPUT, but the object represented by the handle is not a queue.
Completion Code
MQCC_FAILED
Programmer response
Ensure that a successful MQOPEN call is performed for this object, and that an MQCLOSE call has not
already been performed for it. Ensure that the handle is being used within its valid scope (see the
description of MQOPEN in MQOPEN for more information).
2020 (07E4) (RC2020): MQRC_INHIBIT_VALUE_ERROR:
Explanation
On an MQSET call, the value specified for either the MQIA_INHIBIT_GET attribute or the
MQIA_INHIBIT_PUT attribute is not valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value for the InhibitGet or InhibitPut queu attribute.
2021 (07E5) (RC2021): MQRC_INT_ATTR_COUNT_ERROR:
Explanation
On an MQINQ or MQSET call, the IntAttrCount parameter is negative (MQINQ or MQSET), or smaller
than the number of integer attribute selectors (MQIA_*) specified in the Selectors parameter (MQSET
only). This reason also occurs if the parameter pointer is not valid. (It is not always possible to detect
parameter pointers that are not valid; if not detected, unpredictable results occur.)
879
Completion Code
MQCC_FAILED
Programmer response
Specify a value large enough for all selected integer attributes.
2022 (07E6) (RC2022): MQRC_INT_ATTR_COUNT_TOO_SMALL:
Explanation
On an MQINQ call, the IntAttrCount parameter is smaller than the number of integer attribute selectors
(MQIA_*) specified in the Selectors parameter.
The call completes with MQCC_WARNING, with the IntAttrs array filled in with as many integer
attributes as there is room for.
Completion Code
MQCC_WARNING
Programmer response
Specify a large enough value, unless only a subset of the values is needed.
2023 (07E7) (RC2023): MQRC_INT_ATTRS_ARRAY_ERROR:
Explanation
On an MQINQ or MQSET call, the IntAttrs parameter is not valid. The parameter pointer is not valid
(MQINQ and MQSET), or points to read-only storage or to storage that is not as long as indicated by the
IntAttrCount parameter (MQINQ only). (It is not always possible to detect parameter pointers that are
not valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2024 (07E8) (RC2024): MQRC_SYNCPOINT_LIMIT_REACHED:
Explanation
An MQGET, MQPUT, or MQPUT1 call failed because it would have caused the number of uncommitted
messages in the current unit of work to exceed the limit defined for the queue manager (see the
MaxUncommittedMsgs queue-manager attribute). The number of uncommitted messages is the sum of the
following since the start of the current unit of work:
v Messages put by the application with the MQPMO_SYNCPOINT option
v Messages retrieved by the application with the MQGMO_SYNCPOINT option
v Trigger messages and COA report messages generated by the queue manager for messages put with
the MQPMO_SYNCPOINT option
880
v COD report messages generated by the queue manager for messages retrieved with the
MQGMO_SYNCPOINT option
v On HP Integrity NonStop Server, this reason code occurs when the maximum number of I/O
operations in a single TM/MP transaction has been exceeded.
When publishing messages out of syncpoint to topics it is possible to receive this reason code; see
Publications under syncpoint for more information.
Completion Code
MQCC_FAILED
Programmer response
Check whether the application is looping. If it is not, consider reducing the complexity of the application.
Alternatively, increase the queue-manager limit for the maximum number of uncommitted messages
within a unit of work.
v On z/OS, the limit for the maximum number of uncommitted messages can be changed by using the
ALTER QMGR command.
v On IBM i, the limit for the maximum number of uncommitted messages can be changed by using the
CHGMQM command.
v On HP Integrity NonStop Server, the application should cancel the transaction and retry with a smaller
number of operations in the unit of work. See the MQSeries for Tandem NonStop Kernel System
Management Guide for more details.
2025 (07E9) (RC2025): MQRC_MAX_CONNS_LIMIT_REACHED:
Explanation
The MQCONN or MQCONNX call was rejected because the maximum number of concurrent connections
has been exceeded.
v On z/OS, the connection limits are 32767 for both TSO and Batch.
v On IBM i, HP Integrity NonStop Server, UNIX systems, and Windows, this reason code can also occur
on the MQOPEN call.
v When using Java applications, the connection manager might define a limit to the number of
concurrent connections.
Completion Code
MQCC_FAILED
Programmer response
Either increase the size of the appropriate parameter value, or reduce the number of concurrent
connections.
2026 (07EA) (RC2026): MQRC_MD_ERROR:
Explanation
The MQMD structure is not valid, for one of the following reasons:
v The StrucId field is not MQMD_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
881
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer response
Ensure that input fields in the MQMD structure are set correctly.
2027 (07EB) (RC2027): MQRC_MISSING_REPLY_TO_Q:
Explanation
On an MQPUT or MQPUT1 call, the ReplyToQ field in the message descriptor MQMD is blank, but one or
both of the following is true:
v A reply was requested (that is, MQMT_REQUEST was specified in the MsgType field of the message
descriptor).
v A report message was requested in the Report field of the message descriptor.
Completion Code
MQCC_FAILED
Programmer response
Specify the name of the queue to which the reply message or report message is to be sent.
2029 (07ED) (RC2029): MQRC_MSG_TYPE_ERROR:
Explanation
Either:
v On an MQPUT or MQPUT1 call, the value specified for the MsgType field in the message descriptor
(MQMD) is not valid.
v A message processing program received a message that does not have the expected message type. For
example, if the WebSphere MQ command server receives a message which is not a request message
(MQMT_REQUEST) then it rejects the request with this reason code.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value for the MsgType field. In the case where a request is rejected by a message
processing program, refer to the documentation for that program for details of the message types that it
supports.
882
883
MQRC_MSG_TOO_BIG_FOR_Q_MGR can also occur in the Feedback field in the message descriptor of a
report message; in this case it indicates that the error was encountered by a message channel agent when
it attempted to put the message on a remote queue.
This reason also occurs if a channel, through which the message is to pass, has restricted the maximum
message length to a value that is actually less than that supported by the queue manager, and the
message length is greater than this value.
v On z/OS, this return code is issued only if you are using CICS for distributed queuing. Otherwise,
MQRC_MSG_TOO_BIG_FOR_CHANNEL is issued.
Completion Code
MQCC_FAILED
Programmer response
Check whether the BufferLength parameter is specified correctly; if it is, do one of the following:
v Increase the value of the queue-manager's MaxMsgLength attribute; the queue's MaxMsgLength attribute
may also need increasing.
v Break the message into several smaller messages.
v Specify MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in MQMD; this will allow the
queue manager to break the message into segments.
v Check the channel definitions.
2033 (07F1) (RC2033): MQRC_NO_MSG_AVAILABLE:
Explanation
An MQGET call was issued, but there is no message on the queue satisfying the selection criteria
specified in MQMD (the MsgId and CorrelId fields), and in MQGMO (the Options and MatchOptions
fields). Either the MQGMO_WAIT option was not specified, or the time interval specified by the
WaitInterval field in MQGMO has expired. This reason is also returned for an MQGET call for browse,
when the end of the queue has been reached.
This reason code can also be returned by the mqGetBag and mqExecute calls. mqGetBag is similar to
MQGET. For the mqExecute call, the completion code can be either MQCC_WARNING or
MQCC_FAILED:
v If the completion code is MQCC_WARNING, some response messages were received during the
specified wait interval, but not all. The response bag contains system-generated nested bags for the
messages that were received.
v If the completion code is MQCC_FAILED, no response messages were received during the specified
wait interval.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
If this is an expected condition, no corrective action is required.
If this is an unexpected condition, check that:
v The message was put on the queue successfully.
v The unit of work (if any) used for the MQPUT or MQPUT1 call was committed successfully.
884
v The options controlling the selection criteria are specified correctly. All of the following can affect the
eligibility of a message for return on the MQGET call:
MQGMO_LOGICAL_ORDER
MQGMO_ALL_MSGS_AVAILABLE
MQGMO_ALL_SEGMENTS_AVAILABLE
MQGMO_COMPLETE_MSG
MQMO_MATCH_MSG_ID
MQMO_MATCH_CORREL_ID
MQMO_MATCH_GROUP_ID
MQMO_MATCH_MSG_SEQ_NUMBER
MQMO_MATCH_OFFSET
Value of MsgId field in MQMD
Value of CorrelId field in MQMD
885
v On an MQCLOSE call, the user is not authorized to delete the object, which is a permanent dynamic
queue, and the Hobj parameter specified on the MQCLOSE call is not the handle returned by the
MQOPEN call that created the queue.
v On a command, the user is not authorized to issue the command, or to access the object it specifies.
This reason code can also occur in the Feedback field in the message descriptor of a report message; in
this case it indicates that the error was encountered by a message channel agent when it attempted to put
the message on a remote queue.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct queue manager or object was specified, and that appropriate authority exists.
Specific problems generating RC2035
JMSWMQ2013 invalid security authentication
See Invalid security authentication for information your WebSphere MQ JMS application fails with
security authentication errors
MQRC_NOT_AUTHORIZED on a queue or channel
See MQRC_NOT_AUTHORIZED on a queue for information when MQRC 2035
(MQRC_NOT_AUTHORIZED) is returned where a user is not authorized to perform the function.
Determine which object the user cannot access and provide the user access to the object.
MQRC_NOT_AUTHORIZED (AMQ4036 on a client) as an administrator
See MQRC_NOT_AUTHORIZED as an administrator for information when MQRC 2035
(MQRC_NOT_AUTHORIZED) is returned where you try to use a user ID that is a WebSphere MQ
Administrator, to remotely access the queue manager through a client connection.
MQS_REPORT_NOAUTH
See MQS_REPORT_NOAUTH for information on using this environment variable to better diagnose
return code 2035 (MQRC_NOT_AUTHORIZED). The use of this environment variable generates errors in
the queue manager error log, but does not generate a Failure Data Capture (FDC).
MQSAUTHERRORS
See MQSAUTHERRORS for information on using this environment variable to generate FDC files related
to return code 2035 (MQRC_NOT_AUTHORIZED). The use of this environment variable generates an
FDC, but does not generate errors in the queue manager error log.
2036 (07F4) (RC2036): MQRC_NOT_OPEN_FOR_BROWSE:
Explanation
An MQGET call was issued with one of the following options:
v MQGMO_BROWSE_FIRST
v MQGMO_BROWSE_NEXT
886
v MQGMO_BROWSE_MSG_UNDER_CURSOR
v MQGMO_MSG_UNDER_CURSOR
but either the queue had not been opened for browse, or you are using WebSphere MQ Multicast
messaging.
Completion Code
MQCC_FAILED
Programmer response
Specify MQOO_BROWSE when the queue is opened.
If you are using WebSphere MQ Multicast messaging, you cannot specify browse options with an
MQGET call.
2037 (07F5) (RC2037): MQRC_NOT_OPEN_FOR_INPUT:
Explanation
An MQGET call was issued to retrieve a message from a queue, but the queue had not been opened for
input.
Completion Code
MQCC_FAILED
Programmer response
Specify one of the following when the queue is opened:
v MQOO_INPUT_SHARED
v MQOO_INPUT_EXCLUSIVE
v MQOO_INPUT_AS_Q_DEF
2038 (07F6) (RC2038): MQRC_NOT_OPEN_FOR_INQUIRE:
Explanation
An MQINQ call was issued to inquire object attributes, but the object had not been opened for inquire.
An MQINQ call was issued for a topic handle in WebSphere MQ Multicast.
Completion Code
MQCC_FAILED
Programmer response
Specify MQOO_INQUIRE when the object is opened.
MQINQ is not supported for topic handles in WebSphere MQ Multicast.
887
888
889
Programmer response
Ensure that input fields in the MQOD structure are set correctly.
2045 (07FD) (RC2045): MQRC_OPTION_NOT_VALID_FOR_TYPE:
Explanation
On an MQOPEN or MQCLOSE call, an option is specified that is not valid for the type of object or queue
being opened or closed.
For the MQOPEN call, this includes the following cases:
v An option that is inappropriate for the object type (for example, MQOO_OUTPUT for an
MQOT_PROCESS object).
v An option that is unsupported for the queue type (for example, MQOO_INQUIRE for a remote queue
that has no local definition).
v One or more of the following options:
MQOO_INPUT_AS_Q_DEF
MQOO_INPUT_SHARED
MQOO_INPUT_EXCLUSIVE
MQOO_BROWSE
MQOO_INQUIRE
MQOO_SET
when either:
the queue name is resolved through a cell directory, or
ObjectQMgrName in the object descriptor specifies the name of a local definition of a remote queue (to
specify a queue-manager alias), and the queue named in the RemoteQMgrName attribute of the
definition is the name of the local queue manager.
For the MQCLOSE call, this includes the following case:
v The MQCO_DELETE or MQCO_DELETE_PURGE option when the queue is not a dynamic queue.
This reason code can also occur on the MQOPEN call when the object being opened is of type
MQOT_NAMELIST, MQOT_PROCESS, or MQOT_Q_MGR, but the ObjectQMgrName field in MQOD is
neither blank nor the name of the local queue manager.
Completion Code
MQCC_FAILED
Programmer response
Specify the correct option. For the MQOPEN call, ensure that the ObjectQMgrName field is set correctly. For
the MQCLOSE call, either correct the option or change the definition type of the model queue that is
used to create the new queue.
2046 (07FE) (RC2046): MQRC_OPTIONS_ERROR:
Explanation
The Options parameter or field contains options that are not valid, or a combination of options that is not
valid.
890
891
Programmer response
Specify MQPER_NOT_PERSISTENT if the message is to be placed on a temporary dynamic queue. If
persistence is required, use a permanent dynamic queue or predefined queue in place of a temporary
dynamic queue.
Be aware that server applications are recommended to send reply messages (message type
MQMT_REPLY) with the same persistence as the original request message (message type
MQMT_REQUEST). If the request message is persistent, the reply queue specified in the ReplyToQ field in
the message descriptor MQMD cannot be a temporary dynamic queue. Use a permanent dynamic queue
or predefined queue as the reply queue in this situation.
On z/OS, you cannot put persistent messages to a shared queue if the CFSTRUCT that the queue uses is
defined with RECOVER(NO). Either put only non-persistent messages to this queue or change the queue
definition to RECOVER(YES). If you put a persistent message to a queue that uses a CFSTRUCT with
RECOVER(NO) the put will fail with MQRC_PERSISTENT_NOT_ALLOWED.
2049 (0801) (RC2049): MQRC_PRIORITY_EXCEEDS_MAXIMUM:
Explanation
An MQPUT or MQPUT1 call was issued, but the value of the Priority field in the message descriptor
MQMD exceeds the maximum priority supported by the local queue manager, as shown by the
MaxPriority queue-manager attribute. The message is accepted by the queue manager, but is placed on
the queue at the queue manager's maximum priority. The Priority field in the message descriptor retains
the value specified by the application that put the message.
Completion Code
MQCC_WARNING
Programmer response
None required, unless this reason code was not expected by the application that put the message.
2050 (0802) (RC2050): MQRC_PRIORITY_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the value of the Priority field in the message descriptor
MQMD is not valid. The maximum priority supported by the queue manager is given by the MaxPriority
queue-manager attribute.
Completion Code
MQCC_FAILED
Programmer response
Specify a value in the range zero through MaxPriority, or the special value
MQPRI_PRIORITY_AS_Q_DEF.
892
893
Programmer response
Retry the operation later. Consider increasing the maximum depth for this queue, or arranging for more
instances of the application to service the queue.
2055 (0807) (RC2055): MQRC_Q_NOT_EMPTY:
Explanation
An MQCLOSE call was issued for a permanent dynamic queue, but the call failed because the queue is
not empty or still in use. One of the following applies:
v The MQCO_DELETE option was specified, but there are messages on the queue.
v The MQCO_DELETE or MQCO_DELETE_PURGE option was specified, but there are uncommitted get
or put calls outstanding against the queue.
See the usage notes pertaining to dynamic queues for the MQCLOSE call for more information.
This reason code is also returned from a command to clear or delete or move a queue, if the queue
contains uncommitted messages (or committed messages in the case of delete queue without the purge
option).
Completion Code
MQCC_FAILED
Programmer response
Check why there might be messages on the queue. Be aware that the CurrentQDepth queue attribute
might be zero even though there are one or more messages on the queue; this can happen if the messages
have been retrieved as part of a unit of work that has not yet been committed. If the messages can be
discarded, try using the MQCLOSE call with the MQCO_DELETE_PURGE option. Consider retrying the
call later.
2056 (0808) (RC2056): MQRC_Q_SPACE_NOT_AVAILABLE:
Explanation
An MQPUT or MQPUT1 call was issued, but there is no space available for the queue on disk or other
storage device.
This reason code can also occur in the Feedback field in the message descriptor of a report message; in
this case it indicates that the error was encountered by a message channel agent when it attempted to put
the message on a remote queue.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
Check whether an application is putting messages in an infinite loop. If not, make more disk space
available for the queue.
894
895
1. On an MQCONN or MQCONNX call, the queue manager identified by the QMgrName parameter is not
available for connection.
v On z/OS:
For batch applications, this reason can be returned to applications running in LPARs that do not
have a queue manager installed.
For CICS applications, this reason can occur on any call if the original connect specified a queue
manager with a name that was recognized, but which is not available.
v On IBM i, this reason can also be returned by the MQOPEN and MQPUT1 calls, when
MQHC_DEF_HCONN is specified for the Hconn parameter by an application running in
compatibility mode.
2. On an MQCONN or MQCONNX call from a WebSphere MQ MQI client application:
v Attempting to connect to a queue manager within an MQ-client queue-manager group when none
of the queue managers in the group is available for connection (see the QMgrName parameter of the
MQCONN call).
v If the client channel fails to connect, perhaps because of an error with the client-connection or the
corresponding server-connection channel definitions.
v The z/OS Client Attachment feature has not been installed.
3. If a command uses the CommandScope parameter specifying a queue manager that is not active in the
queue-sharing group.
4. In a multiple installation environment, where an application attempts to connect to a queue manager
associated with an installation of WebSphere MQ version 7.1, or later, but has loaded libraries from
WebSphere MQ version 7.0.1. WebSphere MQ version 7.0.1 cannot load libraries from other versions
of WebSphere MQ.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the queue manager has been started. If the connection is from a client application, check the
channel definitions, channel status, and error logs.
In a multiple installation environment, ensure that WebSphere MQ version 7.1, or later, libraries are
loaded by the operating system. For more information, see Connecting applications in a multiple
installation environment.
2061 (080D) (RC2061): MQRC_REPORT_OPTIONS_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the Report field in the message descriptor MQMD contains
one or more options that are not recognized by the local queue manager. The options that cause this
reason code to be returned depend on the destination of the message; see the description of REPORT in
Report options and message flags for more details.
This reason code can also occur in the Feedback field in the MQMD of a report message, or in the Reason
field in the MQDLH structure of a message on the dead-letter queue; in both cases it indicates that the
destination queue manager does not support one or more of the report options specified by the sender of
the message.
Completion Code
MQCC_FAILED
896
Programmer response
Do the following:
v Ensure that the Report field in the message descriptor is initialized with a value when the message
descriptor is declared, or is assigned a value prior to the MQPUT or MQPUT1 call. Specify
MQRO_NONE if no report options are required.
v Ensure that the report options specified are valid; see the Report field described in the description of
MQMD in Report options and message flags for valid report options.
v If multiple report options are being set by adding the individual report options together, ensure that
the same report option is not added twice.
v Check that conflicting report options are not specified. For example, do not add both
MQRO_EXCEPTION and MQRO_EXCEPTION_WITH_DATA to the Report field; only one of these can
be specified.
2062 (080E) (RC2062): MQRC_SECOND_MARK_NOT_ALLOWED:
Explanation
An MQGET call was issued specifying the MQGMO_MARK_SKIP_BACKOUT option in the Options field
of MQGMO, but a message has already been marked within the current unit of work. Only one marked
message is allowed within each unit of work.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Modify the application so that no more than one message is marked within each unit of work.
2063 (080F) (RC2063): MQRC_SECURITY_ERROR:
Explanation
An MQCONN, MQCONNX, MQOPEN, MQPUT1, or MQCLOSE call was issued, but it failed because a
security error occurred.
v On z/OS, the security error was returned by the External Security Manager.
v If you are using AMS, you should check the queue manager error logs.
Completion Code
MQCC_FAILED
Programmer response
Note the error from the security manager, and contact your system programmer or security administrator.
v On IBM i, the FFST log will contain the error information.
897
898
MQINQ for managed handles in WebSphere MQ Multicast can only inquire on Current Depth.
2068 (0814) (RC2068): MQRC_SELECTOR_NOT_FOR_TYPE:
Explanation
On the MQINQ call, one or more selectors in the Selectors array is not applicable to the type of the
queue with attributes that are being inquired upon.
This reason also occurs when the queue is a cluster queue that resolved to a remote instance of the
queue. In this case only a subset of the attributes that are valid for local queues can be inquired. See the
usage notes in the description of MQINQ in MQINQ - Inquire object attributes for more information
about MQINQ.
The call completes with MQCC_WARNING, with the attribute values for the inapplicable selectors set as
follows:
v For integer attributes, the corresponding elements of IntAttrs are set to MQIAV_NOT_APPLICABLE.
v For character attributes, the appropriate parts of the CharAttrs string are set to a character string
consisting entirely of asterisks (*).
Completion Code
MQCC_WARNING
Programmer response
Verify that the selector specified is the one that was intended.
If the queue is a cluster queue, specifying one of the MQOO_BROWSE, MQOO_INPUT_*, or MQOO_SET
options in addition to MQOO_INQUIRE forces the queue to resolve to the local instance of the queue.
However, if there is no local instance of the queue the MQOPEN call fails.
2069 (0815) (RC2069): MQRC_SIGNAL_OUTSTANDING:
Explanation
An MQGET call was issued with either the MQGMO_SET_SIGNAL or MQGMO_WAIT option, but there
is already a signal outstanding for the queue handle Hobj.
This reason code occurs only in the following environments: z/OS, Windows 95, Windows 98.
Completion Code
MQCC_FAILED
Programmer response
Check the application logic. If it is necessary to set a signal or wait when there is a signal outstanding for
the same queue, a different object handle must be used.
899
900
v On HP Integrity NonStop Server, this reason code means that the client has detected that the
application has an active transaction that is being coordinated by the Transaction Management Facility
(TMF), but that a z/OS queue manager is unable to be coordinated by TMF.
This reason code can also be returned if the MQGMO_SYNCPOINT or the MQPMO_SYNCPOINT option
was used for WebSphere MQ Multicast messaging. Transactions are not supported for multicast.
Completion Code
MQCC_FAILED
Programmer response
Remove the specification of MQGMO_SYNCPOINT or MQPMO_SYNCPOINT, as appropriate.
v On HP Integrity NonStop Server, ensure that your z/OS queue manager has the relevant APAR
applied. Check with the IBM support center for APAR details.
2075 (081B) (RC2075): MQRC_TRIGGER_CONTROL_ERROR:
Explanation
On an MQSET call, the value specified for the MQIA_TRIGGER_CONTROL attribute selector is not valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value.
2076 (081C) (RC2076): MQRC_TRIGGER_DEPTH_ERROR:
Explanation
On an MQSET call, the value specified for the MQIA_TRIGGER_DEPTH attribute selector is not valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a value that is greater than zero.
2077 (081D) (RC2077): MQRC_TRIGGER_MSG_PRIORITY_ERR:
Explanation
On an MQSET call, the value specified for the MQIA_TRIGGER_MSG_PRIORITY attribute selector is not
valid.
Completion Code
MQCC_FAILED
901
Programmer response
Specify a value in the range zero through the value of MaxPriority queue-manager attribute.
2078 (081E) (RC2078): MQRC_TRIGGER_TYPE_ERROR:
Explanation
On an MQSET call, the value specified for the MQIA_TRIGGER_TYPE attribute selector is not valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value.
2079 (081F) (RC2079): MQRC_TRUNCATED_MSG_ACCEPTED:
Explanation
On an MQGET call, the message length was too large to fit into the supplied buffer. The
MQGMO_ACCEPT_TRUNCATED_MSG option was specified, so the call completes. The message is
removed from the queue (subject to unit-of-work considerations), or, if this was a browse operation, the
browse cursor is advanced to this message.
The DataLength parameter is set to the length of the message before truncation, the Buffer parameter
contains as much of the message as fits, and the MQMD structure is filled in.
Completion Code
MQCC_WARNING
Programmer response
None, because the application expected this situation.
2080 (0820) (RC2080): MQRC_TRUNCATED_MSG_FAILED:
Explanation
On an MQGET call, the message length was too large to fit into the supplied buffer. The
MQGMO_ACCEPT_TRUNCATED_MSG option was not specified, so the message has not been removed
from the queue. If this was a browse operation, the browse cursor remains where it was before this call,
but if MQGMO_BROWSE_FIRST was specified, the browse cursor is positioned logically before the
highest-priority message on the queue.
The DataLength field is set to the length of the message before truncation, the Buffer parameter contains
as much of the message as fits, and the MQMD structure is filled in.
Completion Code
MQCC_WARNING
902
Programmer response
Supply a buffer that is at least as large as DataLength, or specify MQGMO_ACCEPT_TRUNCATED_MSG
if not all of the message data is required.
2082 (0822) (RC2082): MQRC_UNKNOWN_ALIAS_BASE_Q:
Explanation
An MQOPEN or MQPUT1 call was issued specifying an alias queue as the target, but the BaseQName in
the alias queue attributes is not recognized as a queue name.
This reason code can also occur when BaseQName is the name of a cluster queue that cannot be resolved
successfully.
MQRC_UNKNOWN_ALIAS_BASE_Q might indicate that the application is specifying the
ObjectQmgrName of the queue manager that it is connecting to, and the queue manager that is hosting the
alias queue. This means that the queue manager looks for the alias target queue on the specified queue
manager and fails because the alias target queue is not on the local queue manager. Leave the
ObjectQmgrName parameter blank so that the clustering decides which queue manager to route to.
Completion Code
MQCC_FAILED
Programmer response
Correct the queue definitions.
2085 (0825) (RC2085): MQRC_UNKNOWN_OBJECT_NAME:
Explanation
An MQOPEN, MQPUT1, or MQSUB call was issued, but the object identified by the ObjectName and
ObjectQMgrName fields in the object descriptor MQOD cannot be found. One of the following applies:
v The ObjectQMgrName field is one of the following:
Blank
The name of the local queue manager
The name of a local definition of a remote queue (a queue-manager alias) in which the
RemoteQMgrName attribute is the name of the local queue manager
but no object with the specified ObjectName and ObjectType exists on the local queue manager.
v The object being opened is a cluster queue that is hosted on a remote queue manager, but the local
queue manager does not have a defined route to the remote queue manager.
v The object being opened is a queue definition that has QSGDISP(GROUP). Such definitions cannot be
used with the MQOPEN, MQPUT1, or MQSUB calls.
This can also occur in response to a command that specifies the name of an object or other item that does
not exist.
Completion Code
MQCC_FAILED
903
Programmer response
Specify a valid object name. Ensure that the name is padded with blanks at the end, if necessary. If this is
correct, check the object definitions.
2086 (0826) (RC2086): MQRC_UNKNOWN_OBJECT_Q_MGR:
Explanation
On an MQOPEN or MQPUT1 call, the ObjectQMgrName field in the object descriptor MQOD does not
satisfy the naming rules for objects. For more information, see ObjectQMgrName (MQCHAR48).
This reason also occurs if the ObjectType field in the object descriptor has the value MQOT_Q_MGR, and
the ObjectQMgrName field is not blank, but the name specified is not the name of the local queue manager.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid queue manager name. To refer to the local queue manager, a name consisting entirely of
blanks or beginning with a null character can be used. Ensure that the name is padded with blanks at the
end, or terminated with a null character if necessary.
2087 (0827) (RC2087): MQRC_UNKNOWN_REMOTE_Q_MGR:
Explanation
On an MQOPEN or MQPUT1 call, an error occurred with the queue-name resolution, for one of the
following reasons:
v ObjectQMgrName is blank or the name of the local queue manager, ObjectName is the name of a local
definition of a remote queue (or an alias to one), and one of the following is true:
RemoteQMgrName is blank or the name of the local queue manager. Note that this error occurs even if
XmitQName is not blank.
XmitQName is blank, but there is no transmission queue defined with the name of RemoteQMgrName,
and the DefXmitQName queue-manager attribute is blank.
RemoteQMgrName and RemoteQName specify a cluster queue that cannot be resolved successfully, and
the DefXmitQName queue-manager attribute is blank.
On z/OS only, the RemoteQMgrName is the name of a queue manager in the Queue Sharing group but
intra-group queuing is disabled.
v ObjectQMgrName is the name of a local definition of a remote queue (containing a queue-manager alias
definition), and one of the following is true:
RemoteQName is not blank.
XmitQName is blank, but there is no transmission queue defined with the name of RemoteQMgrName,
and the DefXmitQName queue-manager attribute is blank.
v ObjectQMgrName is not:
Blank
The name of the local queue manager
The name of a transmission queue
The name of a queue-manager alias definition (that is, a local definition of a remote queue with a
blank RemoteQName)
904
but the DefXmitQName queue-manager attribute is blank and the queue manager is not part of a
queue-sharing group with intra-group queuing enabled.
v ObjectQMgrName is the name of a model queue.
v The queue name is resolved through a cell directory. However, there is no queue defined with the
same name as the remote queue manager name obtained from the cell directory, and the DefXmitQName
queue-manager attribute is blank.
Completion Code
MQCC_FAILED
Programmer response
Check the values specified for ObjectQMgrName and ObjectName. If these are correct, check the queue
definitions.
2090 (082A) (RC2090): MQRC_WAIT_INTERVAL_ERROR:
Explanation
On the MQGET call, the value specified for the WaitInterval field in the GetMsgOpts parameter is not
valid.
Completion Code
MQCC_FAILED
Programmer response
Specify a value greater than or equal to zero, or the special value MQWI_UNLIMITED if an indefinite
wait is required.
2091 (082B) (RC2091): MQRC_XMIT_Q_TYPE_ERROR:
Explanation
On an MQOPEN or MQPUT1 call, a message is to be sent to a remote queue manager. The ObjectName or
ObjectQMgrName field in the object descriptor specifies the name of a local definition of a remote queue
but one of the following applies to the XmitQName attribute of the definition:
v XmitQName is not blank, but specifies a queue that is not a local queue
v XmitQName is blank, but RemoteQMgrName specifies a queue that is not a local queue
This reason also occurs if the queue name is resolved through a cell directory, and the remote queue
manager name obtained from the cell directory is the name of a queue, but this is not a local queue.
Completion Code
MQCC_FAILED
Programmer response
Check the values specified for ObjectName and ObjectQMgrName. If these are correct, check the queue
definitions.
905
906
Programmer response
Specify MQOO_PASS_IDENTITY_CONTEXT (or another option that implies it) when the queue is
opened.
2095 (082F) (RC2095): MQRC_NOT_OPEN_FOR_SET_ALL:
Explanation
An MQPUT call was issued with the MQPMO_SET_ALL_CONTEXT option specified in the PutMsgOpts
parameter, but the queue had not been opened with the MQOO_SET_ALL_CONTEXT option.
Completion Code
MQCC_FAILED
Programmer response
Specify MQOO_SET_ALL_CONTEXT when the queue is opened.
2096 (0830) (RC2096): MQRC_NOT_OPEN_FOR_SET_IDENT:
Explanation
An MQPUT call was issued with the MQPMO_SET_IDENTITY_CONTEXT option specified in the
PutMsgOpts parameter, but the queue had not been opened with the MQOO_SET_IDENTITY_CONTEXT
option.
Completion Code
MQCC_FAILED
Programmer response
Specify MQOO_SET_IDENTITY_CONTEXT (or another option that implies it) when the queue is opened.
2097 (0831) (RC2097): MQRC_CONTEXT_HANDLE_ERROR:
Explanation
On an MQPUT or MQPUT1 call, MQPMO_PASS_IDENTITY_CONTEXT or
MQPMO_PASS_ALL_CONTEXT was specified, but the handle specified in the Context field of the
PutMsgOpts parameter is either not a valid queue handle, or it is a valid queue handle but the queue was
not opened with MQOO_SAVE_ALL_CONTEXT.
Completion Code
MQCC_FAILED
Programmer response
Specify MQOO_SAVE_ALL_CONTEXT when the queue referred to is opened.
907
908
Completion Code
MQCC_FAILED
Programmer response
If supplying a dynamic queue name in full, ensure that it obeys the naming conventions for dynamic
queues; if it does, either supply a different name, or delete the existing queue if it is no longer required.
Alternatively, allow the queue manager to generate the name.
If the queue manager is generating the name (either in part or in full), reissue the MQOPEN call.
2101 (0835) (RC2101): MQRC_OBJECT_DAMAGED:
Explanation
The object accessed by the call is damaged and cannot be used. For example, this might be because the
definition of the object in main storage is not consistent, or because it differs from the definition of the
object on disk, or because the definition on disk cannot be read. The object can be deleted, although it
might not be possible to delete the associated user space.
v On z/OS, this reason occurs when the DB2 list header or structure number associated with a shared
queue is zero. This situation arises as a result of using the MQSC command DELETE CFSTRUCT to
delete the DB2 structure definition. The command resets the list header and structure number to zero
for each of the shared queues that references the deleted CF structure.
Completion Code
MQCC_FAILED
Programmer response
It might be necessary to stop and restart the queue manager, or to restore the queue-manager data from
backup storage.
v On IBM i, HP Integrity NonStop Server, and UNIX systems, consult the FFST record to obtain more
detail about the problem.
v On z/OS, delete the shared queue and redefine it using the MQSC command DEFINE QLOCAL. This
automatically defines a CF structure and allocates list headers for it.
2102 (0836) (RC2102): MQRC_RESOURCE_PROBLEM:
Explanation
There are insufficient system resources to complete the call successfully. On z/OS this can indicate that
DB2 errors occurred when using shared queues, or that the maximum number of shared queues that can
be defined in a single coupling facility list structure has been reached.
Completion Code
MQCC_FAILED
Programmer response
Run the application when the machine is less heavily loaded.
v On z/OS, check the operator console for messages that might provide additional information.
909
v On IBM i, HP Integrity NonStop Server, and UNIX systems, consult the FFST record to obtain more
detail about the problem.
2103 (0837) (RC2103): MQRC_ANOTHER_Q_MGR_CONNECTED:
Explanation
An MQCONN or MQCONNX call was issued, but the thread or process is already connected to a
different queue manager. The thread or process can connect to only one queue manager at a time.
v On z/OS, this reason code does not occur.
v On Windows, MTS objects do not receive this reason code, as connections to other queue managers are
allowed.
Completion Code
MQCC_FAILED
Programmer response
Use the MQDISC call to disconnect from the queue manager that is already connected, and then issue the
MQCONN or MQCONNX call to connect to the new queue manager.
Disconnecting from the existing queue manager closes any queues that are currently open; it is suggested
that any uncommitted units of work are committed or backed out before the MQDISC call is issued.
2104 (0838) (RC2104): MQRC_UNKNOWN_REPORT_OPTION:
Explanation
An MQPUT or MQPUT1 call was issued, but the Report field in the message descriptor MQMD contains
one or more options that are not recognized by the local queue manager. The options are accepted.
The options that cause this reason code to be returned depend on the destination of the message; see the
description of REPORT in Report options and message flags for more information.
Completion Code
MQCC_WARNING
Programmer response
If this reason code is expected, no corrective action is required. If this reason code is not expected, do the
following:
v Ensure that the Report field in the message descriptor is initialized with a value when the message
descriptor is declared, or is assigned a value prior to the MQPUT or MQPUT1 call.
v Ensure that the report options specified are valid; see the Report field described in the description of
MQMD in MQMD - Message descriptor for valid report options.
v If multiple report options are being set by adding the individual report options together, ensure that
the same report option is not added twice.
v Check that conflicting report options are not specified. For example, do not add both
MQRO_EXCEPTION and MQRO_EXCEPTION_WITH_DATA to the Report field; only one of these can
be specified.
910
911
912
Completion Code
MQCC_WARNING
Programmer response
Check the format name that was specified when the message was put. If this is not one of the built-in
formats, check that a suitable exit with the same name as the format is available for the queue manager
to load. Verify that the data in the message corresponds to the format expected by the exit.
2111 (083F) (RC2111): MQRC_SOURCE_CCSID_ERROR:
Explanation
The coded character-set identifier from which character data is to be converted is not valid or not
supported.
This can occur on the MQGET call when the MQGMO_CONVERT option is included in the GetMsgOpts
parameter; the coded character-set identifier in error is the CodedCharSetId field in the message being
retrieved. In this case, the message data is returned unconverted, the values of the CodedCharSetId and
Encoding fields in the MsgDesc parameter are set to those of the message returned, and the call completes
with MQCC_WARNING.
This reason can also occur on the MQGET call when the message contains one or more MQ header
structures (MQCIH, MQDLH, MQIIH, MQRMH), and the CodedCharSetId field in the message specifies a
character set that does not have SBCS characters for the characters that are valid in queue names. MQ
header structures containing such characters are not valid, and so the message is returned unconverted.
The Unicode character set UCS-2 is an example of such a character set.
If the message consists of several parts, each of which is described by its own CodedCharSetId and
Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some
parts may be converted and other parts not converted. However, the values returned in the various
CodedCharSetId and Encoding fields always correctly describe the relevant message data.
This reason can also occur on the MQXCNVC call; the coded character-set identifier in error is the
SourceCCSID parameter. Either the SourceCCSID parameter specifies a value that is not valid or not
supported, or the SourceCCSID parameter pointer is not valid. (It is not always possible to detect
parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Check the character-set identifier that was specified when the message was put, or that was specified for
the SourceCCSID parameter on the MQXCNVC call. If this is correct, check that it is one for which
queue-manager conversion is supported. If queue-manager conversion is not supported for the specified
character set, conversion must be carried out by the application.
2112 (0840) (RC2112): MQRC_SOURCE_INTEGER_ENC_ERROR:
Explanation
On an MQGET call, with the MQGMO_CONVERT option included in the GetMsgOpts parameter, the
Encoding value in the message being retrieved specifies an integer encoding that is not recognized. The
Troubleshooting and support
913
message data is returned unconverted, the values of the CodedCharSetId and Encoding fields in the
MsgDesc parameter are set to those of the message returned, and the call completes with
MQCC_WARNING.
If the message consists of several parts, each of which is described by its own CodedCharSetId and
Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some
parts may be converted and other parts not converted. However, the values returned in the various
CodedCharSetId and Encoding fields always correctly describe the relevant message data.
This reason code can also occur on the MQXCNVC call, when the Options parameter contains an
unsupported MQDCC_SOURCE_* value, or when MQDCC_SOURCE_ENC_UNDEFINED is specified for
a UCS-2 code page.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Check the integer encoding that was specified when the message was put. If this is correct, check that it
is one for which queue-manager conversion is supported. If queue-manager conversion is not supported
for the required integer encoding, conversion must be carried out by the application.
2113 (0841) (RC2113): MQRC_SOURCE_DECIMAL_ENC_ERROR:
Explanation
On an MQGET call with the MQGMO_CONVERT option included in the GetMsgOpts parameter, the
Encoding value in the message being retrieved specifies a decimal encoding that is not recognized. The
message data is returned unconverted, the values of the CodedCharSetId and Encoding fields in the
MsgDesc parameter are set to those of the message returned, and the call completes with
MQCC_WARNING.
If the message consists of several parts, each of which is described by its own CodedCharSetId and
Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some
parts may be converted and other parts not converted. However, the values returned in the various
CodedCharSetId and Encoding fields always correctly describe the relevant message data.
Completion Code
MQCC_WARNING
Programmer response
Check the decimal encoding that was specified when the message was put. If this is correct, check that it
is one for which queue-manager conversion is supported. If queue-manager conversion is not supported
for the required decimal encoding, conversion must be carried out by the application.
2114 (0842) (RC2114): MQRC_SOURCE_FLOAT_ENC_ERROR:
Explanation
On an MQGET call, with the MQGMO_CONVERT option included in the GetMsgOpts parameter, the
Encoding value in the message being retrieved specifies a floating-point encoding that is not recognized.
914
The message data is returned unconverted, the values of the CodedCharSetId and Encoding fields in the
MsgDesc parameter are set to those of the message returned, and the call completes with
MQCC_WARNING.
If the message consists of several parts, each of which is described by its own CodedCharSetId and
Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some
parts may be converted and other parts not converted. However, the values returned in the various
CodedCharSetId and Encoding fields always correctly describe the relevant message data.
Completion Code
MQCC_WARNING
Programmer response
Check the floating-point encoding that was specified when the message was put. If this is correct, check
that it is one for which queue-manager conversion is supported. If queue-manager conversion is not
supported for the required floating-point encoding, conversion must be carried out by the application.
2115 (0843) (RC2115): MQRC_TARGET_CCSID_ERROR:
Explanation
The coded character-set identifier to which character data is to be converted is not valid or not
supported.
This can occur on the MQGET call when the MQGMO_CONVERT option is included in the GetMsgOpts
parameter; the coded character-set identifier in error is the CodedCharSetId field in the MsgDesc parameter.
In this case, the message data is returned unconverted, the values of the CodedCharSetId and Encoding
fields in the MsgDesc parameter are set to those of the message returned, and the call completes with
MQCC_WARNING.
This reason can also occur on the MQGET call when the message contains one or more MQ header
structures (MQCIH, MQDLH, MQIIH, MQRMH), and the CodedCharSetId field in the MsgDesc parameter
specifies a character set that does not have SBCS characters for the characters that are valid in queue
names. The Unicode character set UCS-2 is an example of such a character set.
This reason can also occur on the MQXCNVC call; the coded character-set identifier in error is the
TargetCCSID parameter. Either the TargetCCSID parameter specifies a value that is not valid or not
supported, or the TargetCCSID parameter pointer is not valid. (It is not always possible to detect
parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Check the character-set identifier that was specified for the CodedCharSetId field in the MsgDesc parameter
on the MQGET call, or that was specified for the SourceCCSID parameter on the MQXCNVC call. If this is
correct, check that it is one for which queue-manager conversion is supported. If queue-manager
conversion is not supported for the specified character set, conversion must be carried out by the
application.
915
916
Completion Code
MQCC_WARNING
Programmer response
Check the floating-point encoding that was specified. If this is correct, check that it is one for which
queue-manager conversion is supported. If queue-manager conversion is not supported for the required
floating-point encoding, conversion must be carried out by the application.
2119 (0847) (RC2119): MQRC_NOT_CONVERTED:
Explanation
An MQGET call was issued with the MQGMO_CONVERT option specified in the GetMsgOpts parameter,
but an error occurred during conversion of the data in the message. The message data is returned
unconverted, the values of the CodedCharSetId and Encoding fields in the MsgDesc parameter are set to
those of the message returned, and the call completes with MQCC_WARNING.
If the message consists of several parts, each of which is described by its own CodedCharSetId and
Encoding fields (for example, a message with format name MQFMT_DEAD_LETTER_HEADER), some
parts may be converted and other parts not converted. However, the values returned in the various
CodedCharSetId and Encoding fields always correctly describe the relevant message data.
This error may also indicate that a parameter to the data-conversion service is not supported.
Completion Code
MQCC_WARNING
Programmer response
Check that the message data is correctly described by the Format, CodedCharSetId and Encoding
parameters that were specified when the message was put. Also check that these values, and the
CodedCharSetId and Encoding specified in the MsgDesc parameter on the MQGET call, are supported for
queue-manager conversion. If the required conversion is not supported, conversion must be carried out
by the application.
2120 (0848) (RC2120): MQRC_CONVERTED_MSG_TOO_BIG:
Explanation
On an MQGET call with the MQGMO_CONVERT option included in the GetMsgOpts parameter, the
message data expanded during data conversion and exceeded the size of the buffer provided by the
application. However, the message had already been removed from the queue because prior to
conversion the message data could be accommodated in the application buffer without truncation.
The message is returned unconverted, with the CompCode parameter of the MQGET call set to
MQCC_WARNING. If the message consists of several parts, each of which is described by its own
character-set and encoding fields (for example, a message with format name
MQFMT_DEAD_LETTER_HEADER), some parts may be converted and other parts not converted.
However, the values returned in the various character-set and encoding fields always correctly describe
the relevant message data.
This reason can also occur on the MQXCNVC call, when the TargetBuffer parameter is too small too
accommodate the converted string, and the string has been truncated to fit in the buffer. The length of
Troubleshooting and support
917
valid data returned is given by the DataLength parameter; in the case of a DBCS string or mixed
SBCS/DBCS string, this length may be less than the length of TargetBuffer.
Completion Code
MQCC_WARNING
Programmer response
For the MQGET call, check that the exit is converting the message data correctly and setting the output
length DataLength to the appropriate value. If it is, the application issuing the MQGET call must provide
a larger buffer for the Buffer parameter.
For the MQXCNVC call, if the string must be converted without truncation, provide a larger output
buffer.
2121 (0849) (RC2121): MQRC_NO_EXTERNAL_PARTICIPANTS:
Explanation
An MQBEGIN call was issued to start a unit of work coordinated by the queue manager, but no
participating resource managers have been registered with the queue manager. As a result, only changes
to MQ resources can be coordinated by the queue manager in the unit of work.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows.
Completion Code
MQCC_WARNING
Programmer response
If the application does not require non-MQ resources to participate in the unit of work, this reason code
can be ignored or the MQBEGIN call removed. Otherwise consult your system programmer to determine
why the required resource managers have not been registered with the queue manager; the queue
manager's configuration file might be in error.
2122 (084A) (RC2122): MQRC_PARTICIPANT_NOT_AVAILABLE:
Explanation
An MQBEGIN call was issued to start a unit of work coordinated by the queue manager, but one or more
of the participating resource managers that had been registered with the queue manager is not available.
As a result, changes to those resources cannot be coordinated by the queue manager in the unit of work.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows.
Completion Code
MQCC_WARNING
Programmer response
If the application does not require non-MQ resources to participate in the unit of work, this reason code
can be ignored. Otherwise consult your system programmer to determine why the required resource
918
managers are not available. The resource manager might have been halted temporarily, or there might be
an error in the queue manager's configuration file.
2123 (084B) (RC2123): MQRC_OUTCOME_MIXED:
Explanation
The queue manager is acting as the unit-of-work coordinator for a unit of work that involves other
resource managers, but one of the following occurred:
v An MQCMIT or MQDISC call was issued to commit the unit of work, but one or more of the
participating resource managers backed-out the unit of work instead of committing it. As a result, the
outcome of the unit of work is mixed.
v An MQBACK call was issued to back out a unit of work, but one or more of the participating resource
managers had already committed the unit of work.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Examine the queue-manager error logs for messages relating to the mixed outcome; these messages
identify the resource managers that are affected. Use procedures local to the affected resource managers
to resynchronize the resources.
This reason code does not prevent the application initiating further units of work.
2124 (084C) (RC2124): MQRC_OUTCOME_PENDING:
Explanation
The queue manager is acting as the unit-of-work coordinator for a unit of work that involves other
resource managers, and an MQCMIT or MQDISC call was issued to commit the unit of work, but one or
more of the participating resource managers has not confirmed that the unit of work was committed
successfully.
The completion of the commit operation will happen at some point in the future, but there remains the
possibility that the outcome will be mixed.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_WARNING
Programmer response
Use the normal error-reporting mechanisms to determine whether the outcome was mixed. If it was, take
appropriate action to resynchronize the resources.
This reason code does not prevent the application initiating further units of work.
919
920
Completion Code
MQCC_FAILED
Programmer response
Review the application logic to determine why there is a unit of work already in existence. Move the
MQBEGIN call to the appropriate place in the application.
2129 (0851) (RC2129): MQRC_ADAPTER_CONN_LOAD_ERROR:
Explanation
On an MQCONN call, the connection handling module could not be loaded, so the adapter could not
link to it. The connection handling module name is:
v CSQBCON for batch applications
v CSQQCONN or CSQQCON2 for IMS applications
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct library concatenation has been specified in the batch application program
execution JCL, and in the queue-manager startup JCL.
2130 (0852) (RC2130): MQRC_ADAPTER_SERV_LOAD_ERROR:
Explanation
On an MQI call, the batch adapter could not load one of the following API service module, and so could
not link to it:
v CSQBSRV
v CSQAPEPL
v CSQBCRMH
v CSQBAPPL
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct library concatenation has been specified in the batch application program
execution JCL, and in the queue-manager startup JCL.
921
922
923
924
v If the error occurred on the MQPUT call, examine the MQRR response records specified on the
MQOPEN call to determine the reason that the queue failed to open. Ensure that sufficient response
records are provided by the application on the call to enable the error(s) to be determined.
2138 (085A) (RC2138): MQRC_ADAPTER_DISC_LOAD_ERROR:
Explanation
On an MQDISC call, the disconnect handling module (CSQBDSC for batch and CSQQDISC for IMS)
could not be loaded, so the adapter could not link to it.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct library concatenation has been specified in the application program execution JCL,
and in the queue-manager startup JCL. Any uncommitted changes in a unit of work should be backed
out. A unit of work that is coordinated by the queue manager is backed out automatically.
2139 (085B) (RC2139): MQRC_CNO_ERROR:
Explanation
On an MQCONNX call, the connect-options structure MQCNO is not valid, for one of the following
reasons:
v The StrucId field is not MQCNO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the parameter pointer points to read-only storage.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Ensure that input fields in the MQCNO structure are set correctly.
2140 (085C) (RC2140): MQRC_CICS_WAIT_FAILED:
Explanation
On any MQI call, the CICS adapter issued an EXEC CICS WAIT request, but the request was rejected by
CICS.
This reason code occurs only on z/OS.
Troubleshooting and support
925
Completion Code
MQCC_FAILED
Programmer response
Examine the CICS trace data for actual response codes. The most likely cause is that the task has been
canceled by the operator or by the system.
2141 (085D) (RC2141): MQRC_DLH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQDLH structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQDLH_STRUC_ID.
v The Version field is not MQDLH_VERSION_1.
v The CodedCharSetId field is zero, or a negative value that is not valid.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value (note: MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field).
2142 (085E) (RC2142): MQRC_HEADER_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQ header structure that is
not valid. Possible errors include the following:
v The StrucId field is not valid.
v The Version field is not valid.
v The StrucLength field specifies a value that is too small.
v The CodedCharSetId field is zero, or a negative value that is not valid.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
926
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value (note: MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field).
2143 (085F) (RC2143): MQRC_SOURCE_LENGTH_ERROR:
Explanation
On the MQXCNVC call, the SourceLength parameter specifies a length that is less than zero or not
consistent with the string's character set or content (for example, the character set is a double-byte
character set, but the length is not a multiple of two). This reason also occurs if the SourceLength
parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not valid; if
not detected, unpredictable results occur.)
This reason code can also occur on the MQGET call when the MQGMO_CONVERT option is specified. In
this case it indicates that the MQRC_SOURCE_LENGTH_ERROR reason was returned by an MQXCNVC
call issued by the data conversion exit.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Specify a length that is zero or greater. If the reason code occurs on the MQGET call, check that the logic
in the data-conversion exit is correct.
2144 (0860) (RC2144): MQRC_TARGET_LENGTH_ERROR:
Explanation
On the MQXCNVC call, the TargetLength parameter is not valid for one of the following reasons:
v TargetLength is less than zero.
v The TargetLength parameter pointer is not valid. (It is not always possible to detect parameter pointers
that are not valid; if not detected, unpredictable results occur.)
v The MQDCC_FILL_TARGET_BUFFER option is specified, but the value of TargetLength is such that
the target buffer cannot be filled completely with valid characters. This can occur when TargetCCSID is
a pure DBCS character set (such as UCS-2), but TargetLength specifies a length that is an odd number
of bytes.
This reason code can also occur on the MQGET call when the MQGMO_CONVERT option is specified. In
this case it indicates that the MQRC_TARGET_LENGTH_ERROR reason was returned by an MQXCNVC
call issued by the data conversion exit.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Specify a length that is zero or greater. If the MQDCC_FILL_TARGET_BUFFER option is specified, and
TargetCCSID is a pure DBCS character set, ensure that TargetLength specifies a length that is a multiple of
two.
Troubleshooting and support
927
If the reason code occurs on the MQGET call, check that the logic in the data-conversion exit is correct.
2145 (0861) (RC2145): MQRC_SOURCE_BUFFER_ERROR:
Explanation
On the MQXCNVC call, the SourceBuffer parameter pointer is not valid, or points to storage that cannot
be accessed for the entire length specified by SourceLength. (It is not always possible to detect parameter
pointers that are not valid; if not detected, unpredictable results occur.)
This reason code can also occur on the MQGET call when the MQGMO_CONVERT option is specified. In
this case it indicates that the MQRC_SOURCE_BUFFER_ERROR reason was returned by an MQXCNVC
call issued by the data conversion exit.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Specify a valid buffer. If the reason code occurs on the MQGET call, check that the logic in the
data-conversion exit is correct.
2146 (0862) (RC2146): MQRC_TARGET_BUFFER_ERROR:
Explanation
On the MQXCNVC call, the TargetBuffer parameter pointer is not valid, or points to read-only storage,
or to storage that cannot be accessed for the entire length specified by TargetLength. (It is not always
possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
This reason code can also occur on the MQGET call when the MQGMO_CONVERT option is specified. In
this case it indicates that the MQRC_TARGET_BUFFER_ERROR reason was returned by an MQXCNVC
call issued by the data conversion exit.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Specify a valid buffer. If the reason code occurs on the MQGET call, check that the logic in the
data-conversion exit is correct.
2148 (0864) (RC2148): MQRC_IIH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQIIH structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQIIH_STRUC_ID.
v The Version field is not MQIIH_VERSION_1.
v The StrucLength field is not MQIIH_LENGTH_1.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
928
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2149 (0865) (RC2149): MQRC_PCF_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued to put a message containing PCF data, but the length of the
message does not equal the sum of the lengths of the PCF structures present in the message. This can
occur for messages with the following format names:
v MQFMT_ADMIN
v MQFMT_EVENT
v MQFMT_PCF
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the length of the message specified on the MQPUT or MQPUT1 call equals the sum of the
lengths of the PCF structures contained within the message data.
2150 (0866) (RC2150): MQRC_DBCS_ERROR:
Explanation
An error was encountered attempting to convert a double-byte character set (DBCS) string. This can occur
in the following cases:
v On the MQXCNVC call, when the SourceCCSID parameter specifies the coded character-set identifier of
a double-byte character set, but the SourceBuffer parameter does not contain a valid DBCS string. This
may be because the string contains characters that are not valid DBCS characters, or because the string
is a mixed SBCS/DBCS string and the shift-out/shift-in characters are not correctly paired. The
completion code is MQCC_FAILED in this case.
v On the MQGET call, when the MQGMO_CONVERT option is specified. In this case it indicates that
the MQRC_DBCS_ERROR reason code was returned by an MQXCNVC call issued by the data
conversion exit. The completion code is MQCC_WARNING in this case.
Completion Code
MQCC_WARNING or MQCC_FAILED
929
Programmer response
Specify a valid string.
If the reason code occurs on the MQGET call, check that the data in the message is valid, and that the
logic in the data-conversion exit is correct.
2152 (0868) (RC2152): MQRC_OBJECT_NAME_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued to open a distribution list (that is, the RecsPresent field in
MQOD is greater than zero), but the ObjectName field is neither blank nor the null string.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
If it is intended to open a distribution list, set the ObjectName field to blanks or the null string. If it is not
intended to open a distribution list, set the RecsPresent field to zero.
2153 (0869) (RC2153): MQRC_OBJECT_Q_MGR_NAME_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued to open a distribution list (that is, the RecsPresent field in
MQOD is greater than zero), but the ObjectQMgrName field is neither blank nor the null string.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
If it is intended to open a distribution list, set the ObjectQMgrName field to blanks or the null string. If it is
not intended to open a distribution list, set the RecsPresent field to zero.
2154 (086A) (RC2154): MQRC_RECS_PRESENT_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued, but the call failed for one of the following reasons:
v RecsPresent in MQOD is less than zero.
v ObjectType in MQOD is not MQOT_Q, and RecsPresent is not zero. RecsPresent must be zero if the
object being opened is not a queue.
v WebSphere MQ Multicast is being used and RecsPresent in MQOD is not set to zero. WebSphere MQ
Multicast does not use distribution lists.
930
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
If it is intended to open a distribution list, set the ObjectType field to MQOT_Q and RecsPresent to the
number of destinations in the list. If it is not intended to open a distribution list, set the RecsPresent field
to zero.
2155 (086B) (RC2155): MQRC_OBJECT_RECORDS_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued to open a distribution list (that is, the RecsPresent field in
MQOD is greater than zero), but the MQOR object records are not specified correctly. One of the
following applies:
v ObjectRecOffset is zero and ObjectRecPtr is zero or the null pointer.
v ObjectRecOffset is not zero and ObjectRecPtr is not zero and not the null pointer.
v ObjectRecPtr is not a valid pointer.
v ObjectRecPtr or ObjectRecOffset points to storage that is not accessible.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Ensure that one of ObjectRecOffset and ObjectRecPtr is zero and the other nonzero. Ensure that the field
used points to accessible storage.
2156 (086C) (RC2156): MQRC_RESPONSE_RECORDS_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued to open a distribution list (that is, the RecsPresent field in
MQOD is greater than zero), but the MQRR response records are not specified correctly. One of the
following applies:
v ResponseRecOffset is not zero and ResponseRecPtr is not zero and not the null pointer.
v ResponseRecPtr is not a valid pointer.
v ResponseRecPtr or ResponseRecOffset points to storage that is not accessible.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Troubleshooting and support
931
Programmer response
Ensure that at least one of ResponseRecOffset and ResponseRecPtr is zero. Ensure that the field used
points to accessible storage.
2157 (086D) (RC2157): MQRC_ASID_MISMATCH:
Explanation
On any MQI call, the caller's primary ASID was found to be different from the home ASID.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Correct the application (MQI calls cannot be issued in cross-memory mode). Any uncommitted changes
in a unit of work should be backed out. A unit of work that is coordinated by the queue manager is
backed out automatically.
2158 (086E) (RC2158): MQRC_PMO_RECORD_FLAGS_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued to put a message, but the PutMsgRecFields field in the MQPMO
structure is not valid, for one of the following reasons:
v The field contains flags that are not valid.
v The message is being put to a distribution list, and put message records have been provided (that is,
RecsPresent is greater than zero, and one of PutMsgRecOffset or PutMsgRecPtr is nonzero), but
PutMsgRecFields has the value MQPMRF_NONE.
v MQPMRF_ACCOUNTING_TOKEN is specified without either MQPMO_SET_IDENTITY_CONTEXT or
MQPMO_SET_ALL_CONTEXT.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Ensure that PutMsgRecFields is set with the appropriate MQPMRF_* flags to indicate which fields are
present in the put message records. If MQPMRF_ACCOUNTING_TOKEN is specified, ensure that either
MQPMO_SET_IDENTITY_CONTEXT or MQPMO_SET_ALL_CONTEXT is also specified. Alternatively,
set both PutMsgRecOffset and PutMsgRecPtr to zero.
932
933
934
Programmer response
The application should tidy up and end. If the application is in the middle of a unit of work coordinated
by an external unit-of-work coordinator, the application should issue the appropriate call to back out the
unit of work. Any unit of work that is coordinated by the queue manager is backed out automatically.
2163 (0873) (RC2163): MQRC_DUPLICATE_RECOV_COORD:
Explanation
On an MQCONN or MQCONNX call, a recovery coordinator already exists for the connection name
specified on the connection call issued by the adapter.
A conflict arises only if there are two CICS systems, two IMS systems, or one each of CICS and IMS,
having the same connection identifiers. Batch and TSO connections need not have unique identifiers.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the naming conventions used in different systems that might connect to the queue manager
do not conflict.
2173 (087D) (RC2173): MQRC_PMO_ERROR:
Explanation
On an MQPUT or MQPUT1 call, the MQPMO structure is not valid, for one of the following reasons:
v The StrucId field is not MQPMO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer response
Ensure that input fields in the MQPMO structure are set correctly.
2182 (0886) (RC2182): MQRC_API_EXIT_NOT_FOUND:
Explanation
The API crossing exit entry point could not be found.
935
Completion Code
MQCC_FAILED
Programmer response
Check the entry point name is valid for the library module.
2183 (0887) (RC2183): MQRC_API_EXIT_LOAD_ERROR:
Explanation
The API crossing exit module could not be linked. If this reason is returned when the API crossing exit is
invoked after the call has been executed, the call itself might have executed correctly.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct library concatenation has been specified, and that the API crossing exit module is
executable and correctly named. Any uncommitted changes in a unit of work should be backed out. A
unit of work that is coordinated by the queue manager is backed out automatically.
2184 (0888) (RC2184): MQRC_REMOTE_Q_NAME_ERROR:
Explanation
On an MQOPEN or MQPUT1 call, one of the following occurred:
v A local definition of a remote queue (or an alias to one) was specified, but the RemoteQName attribute in
the remote queue definition is entirely blank. Note that this error occurs even if the XmitQName in the
definition is not blank.
v The ObjectQMgrName field in the object descriptor is not blank and not the name of the local queue
manager, but the ObjectName field is blank.
Completion Code
MQCC_FAILED
Programmer response
Alter the local definition of the remote queue and supply a valid remote queue name, or supply a
nonblank ObjectName in the object descriptor, as appropriate.
2185 (0889) (RC2185): MQRC_INCONSISTENT_PERSISTENCE:
Explanation
An MQPUT call was issued to put a message in a group or a segment of a logical message, but the value
specified or defaulted for the Persistence field in MQMD is not consistent with the current group and
segment information retained by the queue manager for the queue handle. All messages in a group and
all segments in a logical message must have the same value for persistence, that is, all must be persistent,
or all must be nonpersistent.
936
If the current call specifies MQPMO_LOGICAL_ORDER, the call fails. If the current call does not specify
MQPMO_LOGICAL_ORDER, but the previous MQPUT call for the queue handle did, the call succeeds
with completion code MQCC_WARNING.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Modify the application to ensure that the same value of persistence is used for all messages in the group,
or all segments of the logical message.
2186 (088A) (RC2186): MQRC_GMO_ERROR:
Explanation
On an MQGET call, the MQGMO structure is not valid, for one of the following reasons:
v The StrucId field is not MQGMO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer response
Ensure that input fields in the MQGMO structure are set correctly.
2187 (088B) (RC2187): MQRC_CICS_BRIDGE_RESTRICTION:
Explanation
It is not permitted to issue MQI calls from user transactions that are run in an MQ/CICS-bridge
environment where the bridge exit also issues MQI calls. The MQI call fails. If it occurs in the bridge exit,
it results in a transaction abend. If it occurs in the user transaction, it can result in a transaction abend.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
The transaction cannot be run using the MQ/CICS bridge. Refer to the appropriate CICS manual for
information about restrictions in the MQ/CICS bridge environment.
937
938
MQFMT_DEAD_LETTER_HEADER), some parts might be converted and other parts not converted.
However, the values returned in the various character-set and encoding fields always correctly describe
the relevant message data.
This reason code does not occur if the string can be made to fit by discarding trailing blank characters.
Completion Code
MQCC_WARNING
Programmer response
Check that the fields in the message contain the correct values, and that the character-set identifiers
specified by the sender and receiver of the message are correct. If they are, the layout of the data in the
message must be modified to increase the lengths of the field, or fields so that there is sufficient space to
permit the string, or strings to expand when converted.
2191 (088F) (RC2191): MQRC_TMC_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQTMC2 structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQTMC_STRUC_ID.
v The Version field is not MQTMC_VERSION_2.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2192 (0890) (RC2192): MQRC_PAGESET_FULL:
Explanation
Former name for MQRC_STORAGE_MEDIUM_FULL.
2192 (0890) (RC2192): MQRC_STORAGE_MEDIUM_FULL:
Explanation
An MQI call or command was issued to operate on an object, but the call failed because the external
storage medium is full. One of the following applies:
v A page-set data set is full (nonshared queues only).
v A coupling-facility structure is full (shared queues only).
This reason code occurs only on z/OS.
Troubleshooting and support
939
Completion Code
MQCC_FAILED
Programmer response
Check which queues contain messages and look for applications that might be filling the queues
unintentionally. Be aware that the queue that has caused the page set or coupling-facility structure to
become full is not necessarily the queue referenced by the MQI call that returned
MQRC_STORAGE_MEDIUM_FULL.
Check that all of the usual server applications are operating correctly and processing the messages on the
queues.
If the applications and servers are operating correctly, increase the number of server applications to cope
with the message load, or request the system programmer to increase the size of the page-set data sets.
2193 (0891) (RC2193): MQRC_PAGESET_ERROR:
Explanation
An error was encountered with the page set while attempting to access it for a locally defined queue.
This could be because the queue is on a page set that does not exist. A console message is issued that
tells you the number of the page set in error. For example if the error occurred in the TEST job, and your
user identifier is ABCDEFG, the message is:
CSQI041I CSQIALLC JOB TEST USER ABCDEFG HAD ERROR ACCESSING PAGE SET 27
If this reason code occurs while attempting to delete a dynamic queue with MQCLOSE, the dynamic
queue has not been deleted.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Check that the storage class for the queue maps to a valid page set using the DISPLAY Q(xx) STGCLASS,
DISPLAY STGCLASS(xx), and DISPLAY USAGE PSID commands. If you are unable to resolve the
problem, notify the system programmer who should:
v Collect the following diagnostic information:
A description of the actions that led to the error
A listing of the application program being run at the time of the error
Details of the page sets defined for use by the queue manager
v Attempt to re-create the problem, and take a system dump immediately after the error occurs
v Contact your IBM Support Center
2194 (0892) (RC2194): MQRC_NAME_NOT_VALID_FOR_TYPE:
Explanation
An MQOPEN call was issued to open the queue manager definition, but the ObjectName field in the
ObjDesc parameter is not blank.
940
Completion Code
MQCC_FAILED
Programmer response
Ensure that the ObjectName field is set to blanks.
2195 (0893) (RC2195): MQRC_UNEXPECTED_ERROR:
Explanation
The call was rejected because an unexpected error occurred.
Completion Code
MQCC_FAILED
Programmer response
Check the application's parameter list to ensure, for example, that the correct number of parameters was
passed, and that data pointers and storage keys are valid. If the problem cannot be resolved, contact your
system programmer.
v On z/OS, check the joblog and logrec, and whether any information has been displayed on the
console. If this error occurs on an MQCONN or MQCONNX call, check that the subsystem named is
an active MQ subsystem. In particular, check that it is not a DB2 subsystem. If the problem cannot be
resolved, rerun the application with a CSQSNAP DD card (if you have not already got a dump) and
send the resulting dump to IBM.
v On IBM i, consult the FFST record to obtain more detail about the problem.
v On HP Integrity NonStop Server, and UNIX systems, consult the FDC file to obtain more detail about
the problem.
2196 (0894) (RC2196): MQRC_UNKNOWN_XMIT_Q:
Explanation
On an MQOPEN or MQPUT1 call, a message is to be sent to a remote queue manager. The ObjectName or
the ObjectQMgrName in the object descriptor specifies the name of a local definition of a remote queue (in
the latter case queue-manager aliasing is being used), but the XmitQName attribute of the definition is not
blank and not the name of a locally-defined queue.
Completion Code
MQCC_FAILED
Programmer response
Check the values specified for ObjectName and ObjectQMgrName. If these are correct, check the queue
definitions.
941
942
Because there is no transmission queue defined with the same name as the destination queue manager,
the local queue manager has attempted to use the default transmission queue. However, the queue
defined by the DefXmitQName queue-manager attribute does not have a Usage attribute of
MQUS_TRANSMISSION.
This reason code is returned from MQOPEN or MQPUT1, if the queue manager's Default Transmission
Queue is about to be used, but the name of this queue is SYSTEM.CLUSTER.TRANSMIT.QUEUE. This
queue is reserved for clustering, so it is not valid to set the queue manager's Default Transmission Queue
to this name.
Completion Code
MQCC_FAILED
Programmer response
Do one of the following:
v Specify a local transmission queue as the value of the XmitQName attribute in the local definition of the
remote queue.
v Define a local transmission queue with a name that is the same as that of the remote queue manager.
v Specify a different local transmission queue as the value of the DefXmitQName queue-manager attribute.
v Change the Usage attribute of the DefXmitQName queue to MQUS_TRANSMISSION.
See XmitQName for more information about transmission queue names.
2201 (0899) (RC2201): MQRC_NAME_IN_USE:
Explanation
An MQOPEN call was issued to create a dynamic queue, but a queue with the same name as the
dynamic queue already exists. The existing queue is one that is logically deleted, but for which there are
still one or more open handles. For more information, see MQOPEN.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Either ensure that all handles for the previous dynamic queue are closed, or ensure that the name of the
new queue is unique; see the description for reason code MQRC_OBJECT_ALREADY_EXISTS.
2202 (089A) (RC2202): MQRC_CONNECTION_QUIESCING:
Explanation
This reason code is issued when the connection to the queue manager is in quiescing state, and an
application issues one of the following calls:
v MQCONN or MQCONNX
v MQOPEN, with no connection established, or with MQOO_FAIL_IF_QUIESCING included in the
Options parameter
943
944
Programmer response
The application should tidy up and terminate. Any uncommitted changes in a unit of work should be
backed out. A unit of work that is coordinated by the queue manager is backed out automatically.
2206 (089E) (RC2206): MQRC_MSG_ID_ERROR:
Explanation
An MQGET call was issued to retrieve a message using the message identifier as a selection criterion, but
the call failed because selection by message identifier is not supported on this queue.
v On z/OS, the queue is a shared queue, but the IndexType queue attribute does not have an
appropriate value:
If selection is by message identifier alone, IndexType must have the value MQIT_MSG_ID.
If selection is by message identifier and correlation identifier combined, IndexType must have the
value MQIT_MSG_ID or MQIT_CORREL_ID. However, the match-any values of MQCI_NONE and
MQMI_NONE respectively are exceptions to this rule, and result in the 2206
MQRC_MSG_ID_ERROR reason code.
v On HP Integrity NonStop Server, a key file is required but has not been defined.
Completion Code
MQCC_FAILED
Programmer response
Do one of the following:
v Modify the application so that it does not use selection by message identifier: set the MsgId field to
MQMI_NONE and do not specify MQMO_MATCH_MSG_ID in MQGMO.
v On z/OS, change the IndexType queue attribute to MQIT_MSG_ID.
v On HP Integrity NonStop Server, define a key file.
2207 (089F) (RC2207): MQRC_CORREL_ID_ERROR:
Explanation
An MQGET call was issued to retrieve a message using the correlation identifier as a selection criterion,
but the call failed because selection by correlation identifier is not supported on this queue.
v On z/OS, the queue is a shared queue, but the IndexType queue attribute does not have an appropriate
value:
If selection is by correlation identifier alone, IndexType must have the value MQIT_CORREL_ID.
If selection is by correlation identifier and message identifier combined, IndexType must have the
value MQIT_CORREL_ID or MQIT_MSG_ID.
v On HP Integrity NonStop Server, a key file is required but has not been defined.
Completion Code
MQCC_FAILED
Programmer response
Do one of the following:
v On z/OS, change the IndexType queue attribute to MQIT_CORREL_ID.
Troubleshooting and support
945
946
947
v On z/OS, this return code is issued only if you are not using CICS for distributed queuing. Otherwise,
MQRC_MSG_TOO_BIG_FOR_Q_MGR is issued.
Completion Code
MQCC_FAILED
Programmer response
Check the channel definitions. Increase the maximum message length that the channel can accept, or
break the message into several smaller messages.
2219 (08AB) (RC2219): MQRC_CALL_IN_PROGRESS:
Explanation
The application issued an MQI call whilst another MQI call was already being processed for that
connection. Only one call per application connection can be processed at a time.
Concurrent calls can arise when an application uses multiple threads, or when an exit is invoked as part
of the processing of an MQI call. For example, a data-conversion exit invoked as part of the processing of
the MQGET call may try to issue an MQI call.
v On z/OS, concurrent calls can arise only with batch or IMS applications; an example is when a subtask
ends while an MQI call is in progress (for example, an MQGET that is waiting), and there is an
end-of-task exit routine that issues another MQI call.
v On Windows, concurrent calls can also arise if an MQI call is issued in response to a user message
while another MQI call is in progress.
v If the application is using multiple threads with shared handles, MQRC_CALL_IN_PROGRESS occurs
when the handle specified on the call is already in use by another thread and
MQCNO_HANDLE_SHARE_NO_BLOCK was specified on the MQCONNX call.
Completion Code
MQCC_FAILED
Programmer response
Ensure that an MQI call cannot be issued while another one is active. Do not issue MQI calls from within
a data-conversion exit.
v On z/OS, if you want to provide a subtask to allow an application that is waiting for a message to
arrive to be canceled, wait for the message by using MQGET with MQGMO_SET_SIGNAL, rather than
MQGMO_WAIT.
2220 (08AC) (RC2220): MQRC_RMH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQRMH structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQRMH_STRUC_ID.
v The Version field is not MQRMH_VERSION_1.
v The StrucLength field specifies a value that is too small to include the structure plus the
variable-length data at the end of the structure.
v The CodedCharSetId field is zero, or a negative value that is not valid.
948
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value (note: MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field).
2222 (08AE) (RC2222): MQRC_Q_MGR_ACTIVE:
Explanation
This condition is detected when a queue manager becomes active.
v On z/OS, this event is not generated for the first start of a queue manager, only on subsequent restarts.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2223 (08AF) (RC2223): MQRC_Q_MGR_NOT_ACTIVE:
Explanation
This condition is detected when a queue manager is requested to stop or quiesce.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2224 (08B0) (RC2224): MQRC_Q_DEPTH_HIGH:
Explanation
An MQPUT or MQPUT1 call has caused the queue depth to be incremented to, or greater than, the limit
specified in the QDepthHighLimit attribute.
Completion Code
MQCC_WARNING
949
Programmer response
None. This reason code is only used to identify the corresponding event message.
2225 (08B1) (RC2225): MQRC_Q_DEPTH_LOW:
Explanation
An MQGET call has caused the queue depth to be decremented to, or less than, the limit specified in the
QDepthLowLimit attribute.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2226 (08B2) (RC2226): MQRC_Q_SERVICE_INTERVAL_HIGH:
Explanation
No successful gets or puts have been detected within an interval that is greater than the limit specified in
the QServiceInterval attribute.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2227 (08B3) (RC2227): MQRC_Q_SERVICE_INTERVAL_OK:
Explanation
A successful get has been detected within an interval that is less than or equal to the limit specified in the
QServiceInterval attribute.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2228 (08B4) (RC2228): MQRC_RFH_HEADER_FIELD_ERROR:
Explanation
An expected RFH header field was not found or had an invalid value. If this error occurs in a WebSphere
MQ SOAP listener, the missing or erroneous field is either the contentType field or the transportVersion
field or both.
950
Completion Code
MQCC_FAILED
Programmer response
If this error occurs in a WebSphere MQ SOAP listener, and you are using the IBM-supplied sender,
contact your IBM Support Center. If you are using a bespoke sender, check the associated error message,
and that the RFH2 section of the SOAP/MQ request message contains all the mandatory fields, and that
these fields have valid values.
2229 (08B5) (RC2229): MQRC_RAS_PROPERTY_ERROR:
Explanation
There is an error related to the RAS property file. The file might be missing, it might be not accessible, or
the commands in the file might be incorrect.
Completion Code
MQCC_FAILED
Programmer response
Look at the associated error message, which explains the error in detail. Correct the error and try again.
2232 (08B8) (RC2232): MQRC_UNIT_OF_WORK_NOT_STARTED:
Explanation
An MQGET, MQPUT or MQPUT1 call was issued to get or put a message within a unit of work, but no
TM/MP transaction had been started. If MQGMO_NO_SYNCPOINT is not specified on MQGET, or
MQPMO_NO_SYNCPOINT is not specified on MQPUT or MQPUT1 (the default), the call requires a unit
of work.
Completion Code
MQCC_FAILED
Programmer response
Ensure a TM/MP transaction is available, or issue the MQGET call with the MQGMO_NO_SYNCPOINT
option, or the MQPUT or MQPUT1 call with the MQPMO_NO_SYNCPOINT option, which will cause a
transaction to be started automatically.
2233 (08B9) (RC2233): MQRC_CHANNEL_AUTO_DEF_OK:
Explanation
This condition is detected when the automatic definition of a channel is successful. The channel is
defined by the MCA.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
951
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2234 (08BA) (RC2234): MQRC_CHANNEL_AUTO_DEF_ERROR:
Explanation
This condition is detected when the automatic definition of a channel fails; this might be because an error
occurred during the definition process, or because the channel automatic-definition exit inhibited the
definition. Additional information is returned in the event message indicating the reason for the failure.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING
Programmer response
Examine the additional information returned in the event message to determine the reason for the failure.
2235 (08BB) (RC2235): MQRC_CFH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFH structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2236 (08BC) (RC2236): MQRC_CFIL_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFIL or MQRCFIL64
structure that is not valid.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
952
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2237 (08BD) (RC2237): MQRC_CFIN_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFIN or MQCFIN64
structure that is not valid.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2238 (08BE) (RC2238): MQRC_CFSL_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFSL structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2239 (08BF) (RC2239): MQRC_CFST_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFST structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
953
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2241 (08C1) (RC2241): MQRC_INCOMPLETE_GROUP:
Explanation
An operation was attempted on a queue using a queue handle that had an incomplete message group.
This reason code can arise in the following situations:
v On the MQPUT call, when the application specifies MQPMO_LOGICAL_ORDER and attempts to put a
message that is not in a group. The completion code is MQCC_FAILED in this case.
v On the MQPUT call, when the application does not specify MQPMO_LOGICAL_ORDER, but the
previous MQPUT call for the queue handle did specify MQPMO_LOGICAL_ORDER. The completion
code is MQCC_WARNING in this case.
v On the MQGET call, when the application does not specify MQGMO_LOGICAL_ORDER, but the
previous MQGET call for the queue handle did specify MQGMO_LOGICAL_ORDER. The completion
code is MQCC_WARNING in this case.
v On the MQCLOSE call, when the application attempts to close the queue that has the incomplete
message group. The completion code is MQCC_WARNING in this case.
If there is an incomplete logical message as well as an incomplete message group, reason code
MQRC_INCOMPLETE_MSG is returned in preference to MQRC_INCOMPLETE_GROUP.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
If this reason code is expected, no corrective action is required. Otherwise, ensure that the MQPUT call
for the last message in the group specifies MQMF_LAST_MSG_IN_GROUP.
2242 (08C2) (RC2242): MQRC_INCOMPLETE_MSG:
Explanation
An operation was attempted on a queue using a queue handle that had an incomplete logical message.
This reason code can arise in the following situations:
v On the MQPUT call, when the application specifies MQPMO_LOGICAL_ORDER and attempts to put a
message that is not a segment, or that has a setting for the MQMF_LAST_MSG_IN_GROUP flag that is
different from the previous message. The completion code is MQCC_FAILED in this case.
v On the MQPUT call, when the application does not specify MQPMO_LOGICAL_ORDER, but the
previous MQPUT call for the queue handle did specify MQPMO_LOGICAL_ORDER. The completion
code is MQCC_WARNING in this case.
954
v On the MQGET call, when the application does not specify MQGMO_LOGICAL_ORDER, but the
previous MQGET call for the queue handle did specify MQGMO_LOGICAL_ORDER. The completion
code is MQCC_WARNING in this case.
v On the MQCLOSE call, when the application attempts to close the queue that has the incomplete
logical message. The completion code is MQCC_WARNING in this case.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
If this reason code is expected, no corrective action is required. Otherwise, ensure that the MQPUT call
for the last segment specifies MQMF_LAST_SEGMENT.
2243 (08C3) (RC2243): MQRC_INCONSISTENT_CCSIDS:
Explanation
An MQGET call was issued specifying the MQGMO_COMPLETE_MSG option, but the message to be
retrieved consists of two or more segments that have differing values for the CodedCharSetId field in
MQMD. This can arise when the segments take different paths through the network, and some of those
paths have MCA sender conversion enabled. The call succeeds with a completion code of
MQCC_WARNING, but only the first few segments that have identical character-set identifiers are
returned.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING
Programmer response
Remove the MQGMO_COMPLETE_MSG option from the MQGET call and retrieve the remaining
message segments one by one.
2244 (08C4) (RC2244): MQRC_INCONSISTENT_ENCODINGS:
Explanation
An MQGET call was issued specifying the MQGMO_COMPLETE_MSG option, but the message to be
retrieved consists of two or more segments that have differing values for the Encoding field in MQMD.
This can arise when the segments take different paths through the network, and some of those paths
have MCA sender conversion enabled. The call succeeds with a completion code of MQCC_WARNING,
but only the first few segments that have identical encodings are returned.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
955
Completion Code
MQCC_WARNING
Programmer response
Remove the MQGMO_COMPLETE_MSG option from the MQGET call and retrieve the remaining
message segments one by one.
2245 (08C5) (RC2245): MQRC_INCONSISTENT_UOW:
Explanation
One of the following applies:
v An MQPUT call was issued to put a message in a group or a segment of a logical message, but the
value specified or defaulted for the MQPMO_SYNCPOINT option is not consistent with the current
group and segment information retained by the queue manager for the queue handle.
If the current call specifies MQPMO_LOGICAL_ORDER, the call fails. If the current call does not
specify MQPMO_LOGICAL_ORDER, but the previous MQPUT call for the queue handle did, the call
succeeds with completion code MQCC_WARNING.
v An MQGET call was issued to remove from the queue a message in a group or a segment of a logical
message, but the value specified or defaulted for the MQGMO_SYNCPOINT option is not consistent
with the current group and segment information retained by the queue manager for the queue handle.
If the current call specifies MQGMO_LOGICAL_ORDER, the call fails. If the current call does not
specify MQGMO_LOGICAL_ORDER, but the previous MQGET call for the queue handle did, the call
succeeds with completion code MQCC_WARNING.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
Modify the application to ensure that the same unit-of-work specification is used for all messages in the
group, or all segments of the logical message.
2246 (08C6) (RC2246): MQRC_INVALID_MSG_UNDER_CURSOR:
Explanation
An MQGET call was issued specifying the MQGMO_COMPLETE_MSG option with either
MQGMO_MSG_UNDER_CURSOR or MQGMO_BROWSE_MSG_UNDER_CURSOR, but the message that
is under the cursor has an MQMD with an Offset field that is greater than zero. Because
MQGMO_COMPLETE_MSG was specified, the message is not valid for retrieval.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
956
Programmer response
Reposition the browse cursor so that it is located on a message with an Offset field in MQMD that is
zero. Alternatively, remove the MQGMO_COMPLETE_MSG option.
2247 (08C7) (RC2247): MQRC_MATCH_OPTIONS_ERROR:
Explanation
An MQGET call was issued, but the value of the MatchOptions field in the GetMsgOpts parameter is not
valid, for one of the following reasons:
v An undefined option is specified.
v All of the following are true:
MQGMO_LOGICAL_ORDER is specified.
There is a current message group or logical message for the queue handle.
Neither MQGMO_BROWSE_MSG_UNDER_CURSOR nor MQGMO_MSG_UNDER_CURSOR is
specified.
One or more of the MQMO_* options is specified.
The values of the fields in the MsgDesc parameter corresponding to the MQMO_* options specified,
differ from the values of those fields in the MQMD for the message to be returned next.
v On z/OS, one or more of the options specified is not valid for the index type of the queue.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Ensure that only valid options are specified for the field.
2248 (08C8) (RC2248): MQRC_MDE_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQMDE structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQMDE_STRUC_ID.
v The Version field is not MQMDE_VERSION_2.
v The StrucLength field is not MQMDE_LENGTH_2.
v The CodedCharSetId field is zero, or a negative value that is not valid.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
957
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value (note: MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field).
2249 (08C9) (RC2249): MQRC_MSG_FLAGS_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the MsgFlags field in the message descriptor MQMD
contains one or more message flags that are not recognized by the local queue manager. The message
flags that cause this reason code to be returned depend on the destination of the message; see the
description of REPORT in Report options and message flags for more information.
This reason code can also occur in the Feedback field in the MQMD of a report message, or in the Reason
field in the MQDLH structure of a message on the dead-letter queue; in both cases it indicates that the
destination queue manager does not support one or more of the message flags specified by the sender of
the message.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Do the following:
v Ensure that the MsgFlags field in the message descriptor is initialized with a value when the message
descriptor is declared, or is assigned a value prior to the MQPUT or MQPUT1 call. Specify
MQMF_NONE if no message flags are needed.
v Ensure that the message flags specified are valid; see the MsgFlags field described in the description of
MQMD in MsgFlags (MQLONG) for valid message flags.
v If multiple message flags are being set by adding the individual message flags together, ensure that the
same message flag is not added twice.
v On z/OS, ensure that the message flags specified are valid for the index type of the queue; see the
description of the MsgFlags field in MQMD for further details.
2250 (08CA) (RC2250): MQRC_MSG_SEQ_NUMBER_ERROR:
Explanation
An MQGET, MQPUT, or MQPUT1 call was issued, but the value of the MsgSeqNumber field in the MQMD
or MQMDE structure is less than one or greater than 999 999 999.
This error can also occur on the MQPUT call if the MsgSeqNumber field would have become greater than
999 999 999 as a result of the call.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
958
Completion Code
MQCC_FAILED
Programmer response
Specify a value in the range 1 through 999 999 999. Do not attempt to create a message group containing
more than 999 999 999 messages.
2251 (08CB) (RC2251): MQRC_OFFSET_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the value of the Offset field in the MQMD or MQMDE
structure is less than zero or greater than 999 999 999.
This error can also occur on the MQPUT call if the Offset field would have become greater than
999 999 999 as a result of the call.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Specify a value in the range 0 through 999 999 999. Do not attempt to create a message segment that
would extend beyond an offset of 999 999 999.
2252 (08CC) (RC2252): MQRC_ORIGINAL_LENGTH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued to put a report message that is a segment, but the
OriginalLength field in the MQMD or MQMDE structure is either:
v Less than the length of data in the message, or
v Less than one (for a segment that is not the last segment), or
v Less than zero (for a segment that is the last segment)
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Specify a value that is greater than zero. Zero is valid only for the last segment.
959
960
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Modify the application to pass a version-2 MQGMO. Check the application logic to ensure that the
Version field in MQGMO has been set to MQGMO_VERSION_2. Alternatively, remove the option that
requires the version-2 MQGMO.
2257 (08D1) (RC2257): MQRC_WRONG_MD_VERSION:
Explanation
An MQGET, MQPUT, or MQPUT1 call was issued specifying options that required an MQMD with a
version number not less than MQMD_VERSION_2, but the MQMD supplied did not satisfy this
condition.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Modify the application to pass a version-2 MQMD. Check the application logic to ensure that the Version
field in MQMD has been set to MQMD_VERSION_2. Alternatively, remove the option that requires the
version-2 MQMD.
2258 (08D2) (RC2258): MQRC_GROUP_ID_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued to put a distribution-list message that is also a message in a
group, a message segment, or has segmentation allowed, but an invalid combination of options and
values was specified. All of the following are true:
v MQPMO_LOGICAL_ORDER is not specified in the Options field in MQPMO.
v Either there are too few MQPMR records provided by MQPMO, or the GroupId field is not present in
the MQPMR records.
v One or more of the following flags is specified in the MsgFlags field in MQMD or MQMDE:
MQMF_SEGMENTATION_ALLOWED
MQMF_*_MSG_IN_GROUP
MQMF_*_SEGMENT
v The GroupId field in MQMD or MQMDE is not MQGI_NONE.
This combination of options and values would result in the same group identifier being used for all of
the destinations in the distribution list; this is not permitted by the queue manager.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Troubleshooting and support
961
Completion Code
MQCC_FAILED
Programmer response
Specify MQGI_NONE for the GroupId field in MQMD or MQMDE. Alternatively, if the call is MQPUT
specify MQPMO_LOGICAL_ORDER in the Options field in MQPMO.
2259 (08D3) (RC2259): MQRC_INCONSISTENT_BROWSE:
Explanation
An MQGET call was issued with the MQGMO_BROWSE_NEXT option specified, but the specification of
the MQGMO_LOGICAL_ORDER option for the call is different from the specification of that option for
the previous call for the queue handle. Either both calls must specify MQGMO_LOGICAL_ORDER, or
neither call must specify MQGMO_LOGICAL_ORDER.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Add or remove the MQGMO_LOGICAL_ORDER option as appropriate. Alternatively, to switch between
logical order and physical order, specify the MQGMO_BROWSE_FIRST option to restart the scan from
the beginning of the queue, omitting or specifying MQGMO_LOGICAL_ORDER as required.
2260 (08D4) (RC2260): MQRC_XQH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQXQH structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQXQH_STRUC_ID.
v The Version field is not MQXQH_VERSION_1.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure (the
structure extends beyond the end of the message).
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
962
963
964
965
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_WARNING
Programmer response
Ensure that the queue-manager's ClusterWorkloadExit attribute has the correct value, and that the exit
has been installed into the correct location.
2268 (08DC) (RC2268): MQRC_CLUSTER_PUT_INHIBITED:
Explanation
An MQOPEN call with the MQOO_OUTPUT and MQOO_BIND_ON_OPEN options in effect was issued
for a cluster queue, but the call failed because all of the following are true:
v All instances of the cluster queue are currently put-inhibited (that is, all of the queue instances have
the InhibitPut attribute set to MQQA_PUT_INHIBITED).
v There is no local instance of the queue. (If there is a local instance, the MQOPEN call succeeds, even if
the local instance is put-inhibited.)
v There is no cluster workload exit for the queue, or there is a cluster workload exit but it did not choose
a queue instance. (If the cluster workload exit does choose a queue instance, the MQOPEN call
succeeds, even if that instance is put-inhibited.)
If the MQOO_BIND_NOT_FIXED option is specified on the MQOPEN call, the call can succeed even if
all of the queues in the cluster are put-inhibited. However, a subsequent MQPUT call may fail if all of the
queues are still put-inhibited at the time of the MQPUT call.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
If the system design allows put requests to be inhibited for short periods, retry the operation later. If the
problem persists, determine why all of the queues in the cluster are put-inhibited.
2269 (08DD) (RC2269): MQRC_CLUSTER_RESOURCE_ERROR:
Explanation
An MQOPEN, MQPUT, or MQPUT1 call was issued for a cluster queue, but an error occurred whilst
trying to use a resource required for clustering.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
966
Programmer response
Do the following:
v Check that the SYSTEM.CLUSTER.* queues are not put inhibited or full.
v Check the event queues for any events relating to the SYSTEM.CLUSTER.* queues, as these may give
guidance as to the nature of the failure.
v Check that the repository queue manager is available.
v On z/OS, check the console for signs of the failure, such as full page sets.
2270 (08DE) (RC2270): MQRC_NO_DESTINATIONS_AVAILABLE:
Explanation
An MQPUT or MQPUT1 call was issued to put a message on a cluster queue, but at the time of the call
there were no longer any instances of the queue in the cluster. The message therefore could not be sent.
This situation can occur when MQOO_BIND_NOT_FIXED is specified on the MQOPEN call that opens
the queue, or MQPUT1 is used to put the message.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check the queue definition and queue status to determine why all instances of the queue were removed
from the cluster. Correct the problem and rerun the application.
2271 (08DF) (RC2271): MQRC_CONN_TAG_IN_USE:
Explanation
An MQCONNX call was issued specifying one of the MQCNO_*_CONN_TAG_* options, but the call
failed because the connection tag specified by ConnTag in MQCNO is in use by an active process or
thread, or there is an unresolved unit of work that references this connection tag.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
The problem is likely to be transitory. The application should wait a short while and then retry the
operation.
967
968
969
Programmer response
Ensure that at least one of ClientConnOffset and ClientConnPtr is zero. Ensure that the field used points
to accessible storage. Ensure that the URL of the client channel definition table is correct.
2279 (08E7) (RC2279): MQRC_CHANNEL_STOPPED_BY_USER:
Explanation
This condition is detected when the channel has been stopped by an operator. The reason qualifier
identifies the reasons for stopping.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2280 (08E8) (RC2280): MQRC_HCONFIG_ERROR:
Explanation
The configuration handle Hconfig specified on the MQXEP call or MQZEP call is not valid. The MQXEP
call is issued by an API exit function; the MQZEP call is issued by an installable service.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
Specify the configuration handle that was provided by the queue manager:
v On the MQXEP call, use the handle passed in the Hconfig field of the MQAXP structure.
v On the MQZEP call, use the handle passed to the installable service's configuration function on the
component initialization call. For more information about installable services, see Installable services
and components for UNIX, Linux and Windows.
2281 (08E9) (RC2281): MQRC_FUNCTION_ERROR:
Explanation
An MQXEP or MQZEP call was issued, but the function identifier Function specified on the call is not
valid, or not supported by the installable service being configured.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
970
Programmer response
Do the following:
v For the MQXEP call, specify one of the MQXF_* values.
v For the MQZEP call, specify an MQZID_* value that is valid for the installable service being
configured. See MQZEP to determine which values are valid.
2282 (08EA) (RC2282): MQRC_CHANNEL_STARTED:
Explanation
One of the following has occurred:
v An operator has issued a Start Channel command.
v An instance of a channel has been successfully established. This condition is detected when Initial Data
negotiation is complete and resynchronization has been performed where necessary such that message
transfer can proceed.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2283 (08EB) (RC2283): MQRC_CHANNEL_STOPPED:
Explanation
This condition is detected when the channel has been stopped. The reason qualifier identifies the reasons
for stopping.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2284 (08EC) (RC2284): MQRC_CHANNEL_CONV_ERROR:
Explanation
This condition is detected when a channel is unable to do data conversion and the MQGET call to get a
message from the transmission queue resulted in a data conversion error. The conversion reason code
identifies the reason for the failure.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
Troubleshooting and support
971
972
Completion Code
MQCC_FAILED
Programmer response
None. See Installable services and components for UNIX, Linux and Windows for more information
about installable services.
2289 (08F1) (RC2289): MQRC_SERVICE_ERROR:
Explanation
This reason should be returned by an installable service component when the component encounters an
unexpected error.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
Correct the error and retry the operation.
2290 (08F2) (RC2290): MQRC_Q_ALREADY_EXISTS:
Explanation
This reason should be returned by the MQZ_INSERT_NAME installable service component when the
queue specified by the QName parameter is already defined to the name service.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
None. See Installable services and components for UNIX, Linux and Windows for more information
about installable services.
2291 (08F3) (RC2291): MQRC_USER_ID_NOT_AVAILABLE:
Explanation
This reason should be returned by the MQZ_FIND_USERID installable service component when the user
ID cannot be determined.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
973
Programmer response
None. See Installable services and components for UNIX, Linux and Windows for more information
about installable services.
2292 (08F4) (RC2292): MQRC_UNKNOWN_ENTITY:
Explanation
This reason should be returned by the authority installable service component when the name specified
by the EntityName parameter is not recognized.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the entity is defined.
2294 (08F6) (RC2294): MQRC_UNKNOWN_REF_OBJECT:
Explanation
This reason should be returned by the MQZ_COPY_ALL_AUTHORITY installable service component
when the name specified by the RefObjectName parameter is not recognized.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the reference object is defined. See Installable services and components for UNIX, Linux and
Windows for more information about installable services.
2295 (08F7) (RC2295): MQRC_CHANNEL_ACTIVATED:
Explanation
This condition is detected when a channel that has been waiting to become active, and for which a
Channel Not Activated event has been generated, is now able to become active because an active slot has
been released by another channel.
This event is not generated for a channel that is able to become active without waiting for an active slot
to be released.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
974
975
If you get this reason code with CICS group connect, check that the queue manager attribute GROUPUR
is enabled.
2299 (08FB) (RC2299): MQRC_SELECTOR_TYPE_ERROR:
Explanation
The Selector parameter has the wrong data type; it must be of type Long.
Completion Code
MQCC_FAILED
Programmer response
Declare the Selector parameter as Long.
2300 (08FC) (RC2300): MQRC_COMMAND_TYPE_ERROR:
Explanation
The mqExecute call was issued, but the value of the MQIASY_TYPE data item in the administration bag
is not MQCFT_COMMAND.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the MQIASY_TYPE data item in the administration bag has the value MQCFT_COMMAND.
2301 (08FD) (RC2301): MQRC_MULTIPLE_INSTANCE_ERROR:
Explanation
The Selector parameter specifies a system selector (one of the MQIASY_* values), but the value of the
ItemIndex parameter is not MQIND_NONE. Only one instance of each system selector can exist in the
bag.
Completion Code
MQCC_FAILED
Programmer response
Specify MQIND_NONE for the ItemIndex parameter.
2302 (08FE) (RC2302): MQRC_SYSTEM_ITEM_NOT_ALTERABLE:
Explanation
A call was issued to modify the value of a system data item in a bag (a data item with one of the
MQIASY_* selectors), but the call failed because the data item is one that cannot be altered by the
application.
976
Completion Code
MQCC_FAILED
Programmer response
Specify the selector of a user-defined data item, or remove the call.
2303 (08FF) (RC2303): MQRC_BAG_CONVERSION_ERROR:
Explanation
The mqBufferToBag or mqGetBag call was issued, but the data in the buffer or message could not be
converted into a bag. This occurs when the data to be converted is not valid PCF.
Completion Code
MQCC_FAILED
Programmer response
Check the logic of the application that created the buffer or message to ensure that the buffer or message
contains valid PCF.
If the message contains PCF that is not valid, the message cannot be retrieved using the mqGetBag call:
v If one of the MQGMO_BROWSE_* options was specified, the message remains on the queue and can
be retrieved using the MQGET call.
v In other cases, the message has already been removed from the queue and discarded. If the message
was retrieved within a unit of work, the unit of work can be backed out and the message retrieved
using the MQGET call.
2304 (0900) (RC2304): MQRC_SELECTOR_OUT_OF_RANGE:
Explanation
The Selector parameter has a value that is outside the valid range for the call. If the bag was created
with the MQCBO_CHECK_SELECTORS option:
v For the mqAddInteger call, the value must be within the range MQIA_FIRST through MQIA_LAST.
v For the mqAddString call, the value must be within the range MQCA_FIRST through MQCA_LAST.
If the bag was not created with the MQCBO_CHECK_SELECTORS option:
v The value must be zero or greater.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value.
977
978
Programmer response
Correct the parameter.
2308 (0904) (RC2308): MQRC_ENCODING_NOT_SUPPORTED:
Explanation
The Encoding field in the message descriptor MQMD contains a value that is not supported:
v For the mqPutBag call, the field in error resides in the MsgDesc parameter of the call.
v For the mqGetBag call, the field in error resides in:
The MsgDesc parameter of the call if the MQGMO_CONVERT option was specified.
The message descriptor of the message about to be retrieved if MQGMO_CONVERT was not
specified.
Completion Code
MQCC_FAILED
Programmer response
The value must be MQENC_NATIVE.
If the value of the Encoding field in the message is not valid, the message cannot be retrieved using the
mqGetBag call:
v If one of the MQGMO_BROWSE_* options was specified, the message remains on the queue and can
be retrieved using the MQGET call.
v In other cases, the message has already been removed from the queue and discarded. If the message
was retrieved within a unit of work, the unit of work can be backed out and the message retrieved
using the MQGET call.
2309 (0905) (RC2309): MQRC_SELECTOR_NOT_PRESENT:
Explanation
The Selector parameter specifies a selector that does not exist in the bag.
Completion Code
MQCC_FAILED
Programmer response
Specify a selector that does exist in the bag.
2310 (0906) (RC2310): MQRC_OUT_SELECTOR_ERROR:
Explanation
The OutSelector parameter is not valid. Either the parameter pointer is not valid, or it points to
read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not
detected, unpredictable results occur.)
979
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2311 (0907) (RC2311): MQRC_STRING_TRUNCATED:
Explanation
The string returned by the call is too long to fit in the buffer provided. The string has been truncated to
fit in the buffer.
Completion Code
MQCC_FAILED
Programmer response
If the entire string is required, provide a larger buffer. On the mqInquireString call, the StringLength
parameter is set by the call to indicate the size of the buffer required to accommodate the string without
truncation.
2312 (0908) (RC2312): MQRC_SELECTOR_WRONG_TYPE:
Explanation
A data item with the specified selector exists in the bag, but has a data type that conflicts with the data
type implied by the call being used. For example, the data item might have an integer data type, but the
call being used might be mqSetString, which implies a character data type.
This reason code also occurs on the mqBagToBuffer, mqExecute, and mqPutBag calls when mqAddString
or mqSetString was used to add the MQIACF_INQUIRY data item to the bag.
Completion Code
MQCC_FAILED
Programmer response
For the mqSetInteger and mqSetString calls, specify MQIND_ALL for the ItemIndex parameter to delete
from the bag all existing occurrences of the specified selector before creating the new occurrence with the
required data type.
For the mqInquireBag, mqInquireInteger, and mqInquireString calls, use the mqInquireItemInfo call to
determine the data type of the item with the specified selector, and then use the appropriate call to
determine the value of the data item.
For the mqBagToBuffer, mqExecute, and mqPutBag calls, ensure that the MQIACF_INQUIRY data item is
added to the bag using the mqAddInteger or mqSetInteger calls.
980
981
Completion Code
MQCC_FAILED
Programmer response
Specify the handle of a bag created by the application, or remove the call.
2316 (090C) (RC2316): MQRC_ITEM_COUNT_ERROR:
Explanation
The mqTruncateBag call was issued, but the ItemCount parameter specifies a value that is not valid. The
value is either less than zero, or greater than the number of user-defined data items in the bag.
This reason also occurs on the mqCountItems call if the parameter pointer is not valid, or points to
read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not
detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value. Use the mqCountItems call to determine the number of user-defined data items in
the bag.
2317 (090D) (RC2317): MQRC_FORMAT_NOT_SUPPORTED:
Explanation
The Format field in the message descriptor MQMD contains a value that is not supported:
v In an administration message, the format value must be one of the following: MQFMT_ADMIN,
MQFMT_EVENT, MQFMT_PCF. For the mqPutBag call, the field in error resides in the MsgDesc
parameter of the call. For the mqGetBag call, the field in error resides in the message descriptor of the
message about to be retrieved.
v On z/OS, the message was put to the command input queue with a format value of MQFMT_ADMIN,
but the version of MQ being used does not support that format for commands.
Completion Code
MQCC_FAILED
Programmer response
If the error occurred when putting a message, correct the format value.
If the error occurred when getting a message, the message cannot be retrieved using the mqGetBag call:
v If one of the MQGMO_BROWSE_* options was specified, the message remains on the queue and can
be retrieved using the MQGET call.
v In other cases, the message has already been removed from the queue and discarded. If the message
was retrieved within a unit of work, the unit of work can be backed out and the message retrieved
using the MQGET call.
982
983
Completion Code
MQCC_FAILED
Programmer response
Review the description of the administration command being issued, and ensure that all required
parameters are present in the bag.
2322 (0912) (RC2322): MQRC_CMD_SERVER_NOT_AVAILABLE:
Explanation
The command server that processes administration commands is not available.
Completion Code
MQCC_FAILED
Programmer response
Start the command server.
2323 (0913) (RC2323): MQRC_STRING_LENGTH_ERROR:
Explanation
The StringLength parameter is not valid. Either the parameter pointer is not valid, or it points to
read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not
detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2324 (0914) (RC2324): MQRC_INQUIRY_COMMAND_ERROR:
Explanation
The mqAddInquiry call was used previously to add attribute selectors to the bag, but the command code
to be used for the mqBagToBuffer, mqExecute, or mqPutBag call is not recognized. As a result, the correct
PCF message cannot be generated.
Completion Code
MQCC_FAILED
Programmer response
Remove the mqAddInquiry calls and use instead the mqAddInteger call with the appropriate
MQIACF_*_ATTRS or MQIACH_*_ATTRS selectors.
984
985
Completion Code
MQCC_FAILED
Programmer response
Specify the handle of a bag created by the application, or remove the call.
2329 (0919) (RC2329): MQRC_SYSTEM_ITEM_NOT_DELETABLE:
Explanation
A call was issued to delete a system data item from a bag (a data item with one of the MQIASY_*
selectors), but the call failed because the data item is one that cannot be deleted by the application.
Completion Code
MQCC_FAILED
Programmer response
Specify the selector of a user-defined data item, or remove the call.
2330 (091A) (RC2330): MQRC_CODED_CHAR_SET_ID_ERROR:
Explanation
The CodedCharSetId parameter is not valid. Either the parameter pointer is not valid, or it points to
read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not
detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2331 (091B) (RC2331): MQRC_MSG_TOKEN_ERROR:
Explanation
An MQGET call was issued to retrieve a message using the message token as a selection criterion, but the
options specified are not valid, because MQMO_MATCH_MSG_TOKEN was specified with either
MQGMO_WAIT or MQGMO_SET_SIGNAL.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Remove the MQMO_MATCH_MSG_TOKEN option from the MQGET call.
986
v On z/OS, this error also occurs when the IndexType attribute of the queue is MQIT_MSG_TOKEN, but
the message data does not begin with an MQWIH structure.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value (note: MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field).
v On z/OS, if the queue has an IndexType of MQIT_MSG_TOKEN, ensure that the message data begins
with an MQWIH structure.
987
Completion Code
MQCC_FAILED
Programmer response
Modify the application that generated the message to ensure that it places in the NameValueString field
data that adheres to the rules. Check that the StrucLength field is set to the correct value.
988
989
Completion Code
MQCC_FAILED
Programmer response
Modify the application that generated the message to ensure that it places in the NameValueString field all
parameters that are required for the specified command.
2340 (0924) (RC2340): MQRC_CHAR_CONVERSION_ERROR:
Explanation
This reason code is returned by the Java MQQueueManager constructor when a required character-set
conversion is not available. The conversion required is between two nonUnicode character sets.
This reason code occurs in the following environment: MQ Classes for Java on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the National Language Resources component of the z/OS Language Environment is installed,
and that conversion between the IBM-1047 and ISO8859-1 character sets is available.
2341 (0925) (RC2341): MQRC_UCS2_CONVERSION_ERROR:
Explanation
This reason code is returned by the Java MQQueueManager constructor when a required character set
conversion is not available. The conversion required is between the UCS-2 Unicode character set and the
character set of the queue manager which defaults to IBM-500 if no specific value is available.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the relevant Unicode conversion tables are available for the JVM. For z/OS ensure that the
Unicode conversion tables are available to the z/OS Language Environment. The conversion tables
should be installed as part of the z/OS C/C++ optional feature. Refer to the z/OS C/C++ Programming
Guide for more information about enabling UCS-2 conversions.
2342 (0926) (RC2342): MQRC_DB2_NOT_AVAILABLE:
Explanation
An MQOPEN, MQPUT1, or MQSET call, or a command, was issued to access a shared queue, but it
failed because the queue manager is not connected to a DB2 subsystem. As a result, the queue manager is
unable to access the object definition relating to the shared queue.
This reason code occurs only on z/OS.
990
Completion Code
MQCC_FAILED
Programmer response
Configure the DB2 subsystem so that the queue manager can connect to it.
2343 (0927) (RC2343): MQRC_OBJECT_NOT_UNIQUE:
Explanation
An MQOPEN or MQPUT1 call, or a command, was issued to access a queue, but the call failed because
the queue specified cannot be resolved unambiguously. There exists a shared queue with the specified
name, and a nonshared queue with the same name.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
One of the queues must be deleted. If the queue to be deleted contains messages, use the MQSC
command MOVE QLOCAL to move the messages to a different queue, and then use the command
DELETE QLOCAL to delete the queue.
2344 (0928) (RC2344): MQRC_CONN_TAG_NOT_RELEASED:
Explanation
An MQDISC call was issued when there was a unit of work outstanding for the connection handle. For
CICS, IMS, and RRS connections, the MQDISC call does not commit or back out the unit of work. As a
result, the connection tag associated with the unit of work is not yet available for reuse. The tag becomes
available for reuse only when processing of the unit of work has been completed.
This reason code occurs only on z/OS.
Completion Code
MQCC_WARNING
Programmer response
Do not try to reuse the connection tag immediately. If the MQCONNX call is issued with the same
connection tag, and that tag is still in use, the call fails with reason code MQRC_CONN_TAG_IN_USE.
2345 (0929) (RC2345): MQRC_CF_NOT_AVAILABLE:
Explanation
An MQOPEN or MQPUT1 call was issued to access a shared queue, but the allocation of the
coupling-facility structure specified in the queue definition failed because there is no suitable coupling
facility to hold the structure, based on the preference list in the active CFRM policy.
991
This reason code can also occur when the API call requires a capability that is not supported by the CF
level defined in the coupling-facility structure object. For example, this reason code is returned by an
attempt to open a shared queue that has a index type of MQIT_GROUP_ID, but the coupling-facility
structure for the queue has a CF level lower than three.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Make available a coupling facility with one of the names specified in the CFRM policy, or modify the
CFRM policy to specify the names of coupling facilities that are available.
2346 (092A) (RC2346): MQRC_CF_STRUC_IN_USE:
Explanation
An MQI call or command was issued to operate on a shared queue, but the call failed because the
coupling-facility structure specified in the queue definition is unavailable. The coupling-facility structure
can be unavailable because a structure dump is in progress, or new connectors to the structure are
currently inhibited, or an existing connector to the structure failed or disconnected abnormally and
clean-up is not yet complete.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Typically, this is a temporary problem: wait for a while then retry the operation.
If the problem does not resolve itself, then connectivity problems experienced during the recovery of
structures in the coupling facility could have occurred. In this case, restart the queue manager which
reported the error. Resolve all the connectivity problems concerning the coupling facility before restarting
the queue manager.
2347 (092B) (RC2347): MQRC_CF_STRUC_LIST_HDR_IN_USE:
Explanation
An MQGET, MQOPEN, MQPUT1, or MQSET call was issued to access a shared queue, but the call failed
because the list header associated with the coupling-facility structure specified in the queue definition is
temporarily unavailable. The list header is unavailable because it is undergoing recovery processing.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
992
Programmer response
The problem is temporary; wait a short while and then retry the operation.
2348 (092C) (RC2348): MQRC_CF_STRUC_AUTH_FAILED:
Explanation
An MQOPEN or MQPUT1 call was issued to access a shared queue, but the call failed because the user is
not authorized to access the coupling-facility structure specified in the queue definition.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Modify the security profile for the user identifier used by the application so that the application can
access the coupling-facility structure specified in the queue definition.
2349 (092D) (RC2349): MQRC_CF_STRUC_ERROR:
Explanation
An MQOPEN or MQPUT1 call was issued to access a shared queue, but the call failed because the
coupling-facility structure name specified in the queue definition is not defined in the CFRM data set, or
is not the name of a list structure.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Modify the queue definition to specify the name of a coupling-facility list structure that is defined in the
CFRM data set.
2350 (092E) (RC2350): MQRC_CONN_TAG_NOT_USABLE:
Explanation
An MQCONNX call was issued specifying one of the MQCNO_*_CONN_TAG_* options, but the call
failed because the connection tag specified by ConnTag in MQCNO is being used by the queue manager
for recovery processing, and this processing is delayed pending recovery of the coupling facility.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
993
Programmer response
The problem is likely to persist. Consult the system programmer to ascertain the cause of the problem.
2351 (092F) (RC2351): MQRC_GLOBAL_UOW_CONFLICT:
Explanation
An attempt was made to use inside a global unit of work a connection handle that is participating in
another global unit of work. This can occur when an application passes connection handles between
objects where the objects are involved in different DTC transactions. Because transaction completion is
asynchronous, it is possible for this error to occur after the application has finalized the first object and
committed its transaction.
This error does not occur for nontransactional MQI calls.
This reason code occurs only on Windows and z/OS.
Completion Code
MQCC_FAILED
Programmer response
Check that the "MTS Transaction Support attribute defined for the object's class is set correctly. If
necessary, modify the application so that the connection handle is not used by objects participating in
different units of work.
2352 (0930) (RC2352): MQRC_LOCAL_UOW_CONFLICT:
Explanation
An attempt was made to use inside a global unit of work a connection handle that is participating in a
queue-manager coordinated local unit of work. This can occur when an application passes connection
handles between objects where one object is involved in a DTC transaction and the other is not.
This error does not occur for nontransactional MQI calls.
This reason code occurs only on Windows and z/OS.
Completion Code
MQCC_FAILED
Programmer response
Check that the "MTS Transaction Support attribute defined for the object's class is set correctly. If
necessary, modify the application so that the connection handle is not used by objects participating in
different units of work.
2353 (0931) (RC2353): MQRC_HANDLE_IN_USE_FOR_UOW:
Explanation
An attempt was made to use outside a unit of work a connection handle that is participating in a global
unit of work.
994
This error can occur when an application passes connection handles between objects where one object is
involved in a DTC transaction and the other is not. Because transaction completion is asynchronous, it is
possible for this error to occur after the application has finalized the first object and committed its
transaction.
This error can also occur when a single object that was created and associated with the transaction loses
that association whilst the object is running. The association is lost when DTC terminates the transaction
independently of MTS. This might be because the transaction timed out, or because DTC shut down.
This error does not occur for nontransactional MQI calls.
This reason code occurs only on Windows.
Completion Code
MQCC_FAILED
Programmer response
Check that the "MTS Transaction Support" attribute defined for the object's class is set correctly. If
necessary, modify the application so that objects executing within different units of work do not try to
use the same connection handle.
2354 (0932) (RC2354): MQRC_UOW_ENLISTMENT_ERROR:
Explanation
This reason code can occur for various reasons and occurs only on Windows, and HP Integrity NonStop
Server.
On Windows, the most likely reason is that an object created by a DTC transaction does not issue a
transactional MQI call until after the DTC transaction timed out. (If the DTC transaction times out after a
transactional MQI call has been issued, reason code MQRC_HANDLE_IN_USE_FOR_UOW is returned
by the failing MQI call.)
On HP Integrity NonStop Server, this reason occurs:
v On a transactional MQI call when the client encounters a configuration error preventing it from
enlisting with the TMF/Gateway, therefore preventing participation within a global unit of work that is
coordinated by the Transaction Management Facility (TMF).
v If a client application makes an enlistment request before the TMF/Gateway completes recovery of
in-doubt transactions, the request is held for up to 1 second. If recovery does not complete within that
time, the enlistment is rejected.
Another cause of MQRC_UOW_ENLISTMENT_ERROR is incorrect installation; On Windows, for
example, the Windows NT Service pack must be installed after the Windows NT Option pack.
Completion Code
MQCC_FAILED
Programmer response
On Windows, check the DTC Transaction timeout value. If necessary, verify the Windows NT
installation order.
995
On HP Integrity NonStop Server this might be a configuration error. The client issues a message to the
client error log providing extra information about the configuration error. Contact your system
administrator to resolve the indicated error.
2355 (0933) (RC2355): MQRC_UOW_MIX_NOT_SUPPORTED:
Explanation
This reason code occurs only on Windows when you are running a version of the queue manager before
version 5.2., and on HP Integrity NonStop Server.
On Windows, the following explanations might apply:
v The mixture of calls that is used by the application to perform operations within a unit of work is not
supported. In particular, it is not possible to mix within the same process a local unit of work that is
coordinated by the queue manager with a global unit of work that is coordinated by DTC (Distributed
Transaction Coordinator).
v An application might cause this mixture to arise if some objects in a package are coordinated by DTC
and others are not. It can also occur if transactional MQI calls from an MTS client are mixed with
transactional MQI calls from a library package transactional MTS object.
v No problem arises if all transactional MQI calls originate from transactional MTS objects, or all
transactional MQI calls originate from non-transactional MTS objects. But when a mixture of styles is
used, the first style that is used fixes the style for the unit of work, and subsequent attempts to use the
other style within the process fail with reason code MQRC_UOW_MIX_NOT_SUPPORTED.
v When an application is run twice, scheduling factors in the operating system mean that it is possible
for the queue-manager-coordinated transactional calls to fail in one run, and for the DTC-coordinated
transactional calls to fail in the other run.
On HP Integrity NonStop Server it is not possible, within a single WebSphere MQ connection, to issue
transactional MQI calls under the coordination of the Transaction Management Facility (TMF) if
transactional MQI calls have already been made within a local unit of work that is coordinated by the
queue manager until the local unit of work is completed by issuing either MQCMIT or MQBACK.
Completion Code
MQCC_FAILED
Programmer response
On Windows, check that the MTS Transaction Support attribute defined for the objects class is set
correctly. If necessary, modify the application so that objects that run within different units of work do
not try to use the same connection handle.
On HP Integrity NonStop Server, if a local unit of work that is coordinated by the queue manager is in
progress, it must either be completed by issuing MQCMIT, or rolled back by issuing MQBACK before
issuing any transactional MQI calls under the coordination of TMF.
2356 (0934) (RC2356): MQRC_WXP_ERROR:
Explanation
An MQXCLWLN call was issued from a cluster workload exit to obtain the address of the next record in
the chain, but the workload exit parameter structure ExitParms is not valid, for one of the following
reasons:
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
996
997
998
999
1000
Completion Code
MQCC_FAILED
Programmer response
Ensure that the coupling-facility structure used for the queue is at the level required to support the
capabilities that the queue provides.
You can use the DISPLAY CFSTRUCT command to display the level, and ALTER CFSTRUCT()
CFLEVEL() command to modify the level; see The MQSC commands.
2367 (093F) (RC2367): MQRC_CONFIG_CREATE_OBJECT:
Explanation
This condition is detected when an object is created.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2368 (0940) (RC2368): MQRC_CONFIG_CHANGE_OBJECT:
Explanation
This condition is detected when an object is changed.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2369 (0941) (RC2369): MQRC_CONFIG_DELETE_OBJECT:
Explanation
This condition is detected when an object is deleted.
Completion Code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
1001
1002
Completion Code
MQCC_FAILED
Programmer response
Check the exit logic to ensure that the exit is returning valid values in the ExitResponse and
ExitResponse2 fields of the MQAXP structure. Consult the FFST record to see if it contains more detail
about the problem.
2375 (0947) (RC2375): MQRC_API_EXIT_INIT_ERROR:
Explanation
The queue manager encountered an error while attempting to initialize the execution environment for an
API exit function.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Consult the FFST record to obtain more detail about the problem.
2376 (0948) (RC2376): MQRC_API_EXIT_TERM_ERROR:
Explanation
The queue manager encountered an error while attempting to terminate the execution environment for an
API exit function.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Consult the FFST record to obtain more detail about the problem.
2377 (0949) (RC2377): MQRC_EXIT_REASON_ERROR:
Explanation
An MQXEP call was issued by an API exit function, but the value specified for the ExitReason parameter
is either not valid, or not supported for the specified function identifier Function.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Troubleshooting and support
1003
Programmer response
Modify the exit function to specify a value for ExitReason that is valid for the specified value of
Function.
2378 (094A) (RC2378): MQRC_RESERVED_VALUE_ERROR:
Explanation
An MQXEP call was issued by an API exit function, but the value specified for the Reserved parameter is
not valid. The value must be the null pointer.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Modify the exit to specify the null pointer as the value of the Reserved parameter.
2379 (094B) (RC2379): MQRC_NO_DATA_AVAILABLE:
Explanation
This reason should be returned by the MQZ_ENUMERATE_AUTHORITY_DATA installable service
component when there is no more authority data to return to the invoker of the service component.
v On z/OS, this reason code does not occur.
Completion Code
MQCC_FAILED
Programmer response
None.
2380 (094C) (RC2380): MQRC_SCO_ERROR:
Explanation
On an MQCONNX call, the MQSCO structure is not valid for one of the following reasons:
v The StrucId field is not MQSCO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Correct the definition of the MQSCO structure.
1004
1005
Completion Code
MQCC_FAILED
Programmer response
Specify a value for AuthInfoRecCount that is zero or greater.
2384 (0950) (RC2384): MQRC_AUTH_INFO_REC_ERROR:
Explanation
On an MQCONNX call, the MQSCO structure does not specify the address of the MQAIR records
correctly. One of the following applies:
v AuthInfoRecCount is greater than zero, but AuthInfoRecOffset is zero and AuthInfoRecPtr is the null
pointer.
v AuthInfoRecOffset is not zero and AuthInfoRecPtr is not the null pointer.
v AuthInfoRecPtr is not a valid pointer.
v AuthInfoRecOffset or AuthInfoRecPtr points to storage that is not accessible.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Ensure that one of AuthInfoRecOffset or AuthInfoRecPtr is zero and the other nonzero. Ensure that the
field used points to accessible storage.
2385 (0951) (RC2385): MQRC_AIR_ERROR:
Explanation
On an MQCONNX call, an MQAIR record is not valid for one of the following reasons:
v The StrucId field is not MQAIR_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Correct the definition of the MQAIR record.
1006
1007
1008
Programmer response
If the application must be run with the SSL configuration options defined on the MQCONN or
MQCONNX call, use the MQDISC call to sever the connection to the queue manager and then stop the
application. Alternatively run the application later when the SSL environment has not been initialized.
2392 (0958) (RC2392): MQRC_SSL_CONFIG_ERROR:
Explanation
On an MQCONNX call, the MQCNO structure does not specify the MQSCO structure correctly. One of
the following applies:
v SSLConfigOffset is nonzero and SSLConfigPtr is not the null pointer.
v SSLConfigPtr is not a valid pointer.
v SSLConfigOffset or SSLConfigPtr points to storage that is not accessible.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Ensure that one of SSLConfigOffset or SSLConfigPtr is zero and the other nonzero. Ensure that the field
used points to accessible storage.
2393 (0959) (RC2393): MQRC_SSL_INITIALIZATION_ERROR:
Explanation
An MQCONN or MQCONNX call was issued with SSL configuration options specified, but an error
occurred during the initialization of the SSL environment.
This reason code occurs in the following environments: AIX, HP-UX, Solaris, Windows.
Completion Code
MQCC_FAILED
Programmer response
Check that the SSL installation is correct.
2394 (095A) (RC2394): MQRC_Q_INDEX_TYPE_ERROR:
Explanation
An MQGET call was issued specifying one or more of the following options:
v MQGMO_ALL_MSGS_AVAILABLE
v MQGMO_ALL_SEGMENTS_AVAILABLE
v MQGMO_COMPLETE_MSG
v MQGMO_LOGICAL_ORDER
1009
but the call failed because the queue is not indexed by group identifier. These options require the queue
to have an IndexType of MQIT_GROUP_ID.
This reason code occurs only on z/OS.
Completion Code
MQCC_FAILED
Programmer response
Redefine the queue to have an IndexType of MQIT_GROUP_ID. Alternatively, modify the application to
avoid using the options listed.
2395 (095B) (RC2395): MQRC_CFBS_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFBS structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2396 (095C) (RC2396): MQRC_SSL_NOT_ALLOWED:
Explanation
A connection to a queue manager was requested, specifying SSL encryption. However, the connection
mode requested is one that does not support SSL (for example, bindings connect).
Completion Code
MQCC_FAILED
Programmer response
Modify the application to request client connection mode, or to disable SSL encryption.
2397 (095D) (RC2397): MQRC_JSSE_ERROR:
Explanation
JSSE reported an error (for example, while connecting to a queue manager using SSL encryption). The
MQException object containing this reason code references the Exception thrown by JSSE; this can be
obtained by using the MQException.getCause() method. From JMS, the MQException is linked to the
thrown JMSException.
1010
1011
Programmer response
Check the CipherSuite specified by the application. Note that the names of JSSE CipherSuites differ from
their equivalent CipherSpecs used by the queue manager.
Also, check that JSSE is correctly installed.
2401 (0961) (RC2401): MQRC_SSL_CERTIFICATE_REVOKED:
Explanation
A connection to a queue manager was requested, specifying SSL encryption. However, the certificate
presented by the queue manager was found to be revoked by one of the specified CertStores.
This reason code occurs only with Java applications.
Completion Code
MQCC_FAILED
Programmer response
Check the certificates used to identify the queue manager.
2402 (0962) (RC2402): MQRC_SSL_CERT_STORE_ERROR:
Explanation
A connection to a queue manager was requested, specifying SSL encryption. However, none of the
CertStore objects provided by the application could be searched for the certificate presented by the queue
manager. The MQException object containing this reason code references the Exception encountered when
searching the first CertStore; this can be obtained using the MQException.getCause() method. From JMS,
the MQException is linked to the thrown JMSException.
This reason code occurs only with Java applications.
Completion Code
MQCC_FAILED
Programmer response
Inspect the causal exception to determine the underlying error. Check the CertStore objects provided by
your application. If the causal exception is a java.lang.NoSuchElementException, ensure that your
application is not specifying an empty collection of CertStore objects.
2406 (0966) (RC2406): MQRC_CLIENT_EXIT_LOAD_ERROR:
Explanation
The external user exit required for a client connection could not be loaded because the shared library
specified for it cannot be found, or the entry point specified for it cannot be found.
This reason code occurs only with Java applications.
1012
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct library has been specified, and that the path variable for the machine environment
includes the relevant directory. Ensure also that the entry point has been named properly and that the
named library does export it.
2407 (0967) (RC2407): MQRC_CLIENT_EXIT_ERROR:
Explanation
A failure occurred while executing a non-Java user exit for a client connection.
This reason code occurs only with Java applications.
Completion Code
MQCC_FAILED
Programmer response
Check that the non-Java user exit can accept the parameters and message being passed to it and that it
can handle error conditions, and that any information that the exit requires, such as user data, is correct
and available.
2409 (0969) (RC2409): MQRC_SSL_KEY_RESET_ERROR:
Explanation
On an MQCONN or MQCONNX call, the value of the SSL key reset count is not in the valid range of 0
through 999 999 999.
The value of the SSL key reset count is specified by either the value of the MQSSLRESET environment
variable (MQCONN or MQCONNX call), or the value of the KeyResetCount field in the MQSCO structure
(MQCONNX call only). For the MQCONNX call, if both MQSSLRESET and KeyResetCount are specified,
the latter is used. MQCONN or MQCONNX
If you specify an SSL/TLS secret key reset count in the range 1 byte through 32Kb, SSL/TLS channels
will use a secret key reset count of 32Kb. This is to avoid the overhead of excessive key resets which
would occur for small SSL/TLS secret key reset values.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure and the MQSSLRESET environment variable are set correctly.
1013
1014
Programmer response
Check that the fields in the structure are set correctly.
2415 (096F) (RC2415): MQRC_CFSF_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFSF structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2416 (0970) (RC2416): MQRC_CFGR_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFGR structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, z/OS, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2417 (0971) (RC2417): MQRC_MSG_NOT_ALLOWED_IN_GROUP:
An explanation of the error, completion code, and programmer response.
Explanation
An MQPUT or MQPUT1 call was issued to put a message in a group but it is not valid to put such a
message in a group. An example of an invalid message is a PCF message where the Type is
MQCFT_TRACE_ROUTE.
You cannot use grouped or segmented messages with Publish/Subscribe.
Completion Code
MQCC_FAILED
1015
Programmer response
Remove the invalid message from the group.
2418 (0972) (RC2418): MQRC_FILTER_OPERATOR_ERROR:
Explanation
The Operator parameter supplied is not valid.
If it is an input variable then the value is not one of the MQCFOP_* constant values. If it is an output
variable then the parameter pointer is not valid, or it points to read-only storage. (It is not always
possible to detect parameter pointers that are not valid; if not detected, unpredicatable results occur.)
Completion Code
MQCC_FAILED
Programmer response
Correct the parameter.
2419 (0973) (RC2419): MQRC_NESTED_SELECTOR_ERROR:
Explanation
An mqAddBag call was issued, but the bag to be nested contained a data item with an inconsistent
selector. This reason only occurs if the bag into which the nested bag was to be added was created with
the MQCBO_CHECK_SELECTORS option.
Completion Code
MQCC_FAILED
Programmer response
Ensure that all data items within the bag to be nested have selectors that are consistent with the data
type implied by the item.
2420 (0974) (RC2420): MQRC_EPH_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQEPH structure that is not
valid. Possible errors include the following:
v The StrucId field is not MQEPH_STRUC_ID.
v The Version field is not MQEPH_VERSION_1.
v The StrucLength field specifies a value that is too small to include the structure plus the
variable-length data at the end of the structure.
v The CodedCharSetId field is zero, or a negative value that is not valid.
v The Flags field contains an invalid combination of MQEPH_* values.
v The BufferLength parameter of the call has a value that is too small to accommodate the structure, so
the structure extends beyond the end of the message.
1016
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly. Ensure that the application sets the CodedCharSetId
field to a valid value; note that MQCCSI_DEFAULT, MQCCSI_EMBEDDED, MQCCSI_Q_MGR, and
MQCCSI_UNDEFINED are not valid in this field.
2421 (0975) (RC2421): MQRC_RFH_FORMAT_ERROR:
Explanation
The message contains an MQRFH structure, but its format is incorrect. If you are using WebSphere MQ
SOAP, the error is in an incoming SOAP/MQ request message.
Completion Code
MQCC_FAILED
Programmer response
If you are using WebSphere MQ SOAP with the IBM-supplied sender, contact your IBM support center. If
you are using WebSphere MQ SOAP with a bespoke sender, check that the RFH2 section of the
SOAP/MQ request message is in valid RFH2 format.
2422 (0976) (RC2422): MQRC_CFBF_ERROR:
Explanation
An MQPUT or MQPUT1 call was issued, but the message data contains an MQCFBF structure that is not
valid.
This reason code occurs in the following environments: AIX, HP-UX, IBM i, Solaris, Windows, plus
WebSphere MQ clients connected to these systems.
Completion Code
MQCC_FAILED
Programmer response
Check that the fields in the structure are set correctly.
2423 (0977) (RC2423): MQRC_CLIENT_CHANNEL_CONFLICT:
Explanation
A client channel definition table (CCDT) was specified for determining the name of the channel, but the
name has already been defined.
This reason code occurs only with Java applications.
1017
Completion Code
MQCC_FAILED
Programmer response
Change the channel name to blank and try again.
2424 (0978) (RC2424): MQRC_SD_ERROR:
Explanation
On the MQSUB call, the Subscription Descriptor MQSD is not valid, for one of the following reasons:
v The StrucId field is not MQSD_SCTRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid (it is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results can occur).
v The queue manager cannot copy the changes structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQSD structure are set correctly.
2425 (0979) (RC2425): MQRC_TOPIC_STRING_ERROR:
Explanation
On the MQOPEN or MQPUT1 call in the Object Descriptor MQOD, or on the MQSUB call in the
Subscription Descriptor MQSD the resultant full topic string is not valid.
One of the following applies:
v ObjectName contains the name of a TOPIC object with a TOPICSTR attribute that contains an empty
topic string.
v The fully resolved topic string contains the escape character % and it is not followed by one of the
characters, *, ? or %, and the MQSO_WILDCARD_CHAR option has been used on an MQSUB
call.
v On an MQOPEN, conversion cannot be performed using the CCSID specified in the MQOD structure.
v The topic string is greater than 255 characters when using WebSphere MQ Multicast messaging.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that there are no invalid topic string characters in either ObjectString or ObjectName.
If using WebSphere MQ Multicast messaging, ensure that the topic string is less than 255 characters.
1018
1019
1020
1021
If the topic subscribed to is defined as MCAST(ONLY) when using WebSphere MQ Multicast messaging,
alter the topic to use DURSUB(NO).
2437 (0985) (RC2437): MQRC_NO_RETAINED_MSG:
Explanation
An MQSUBRQ call was made to a topic to request that any retained publications for this topic are sent to
the subscriber. However, there are no retained publications currently stored for this topic.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that publishers to the topic are marking their publication to be retained and that publications are
being made to this topic.
2438 (0986) (RC2438): MQRC_SRO_ERROR:
Explanation
On the MQSUBRQ call, the Subscription Request Options MQSRO is not valid, for one of the following
reasons:
v The StrucId field is not MQSRO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQSRO structure are set correctly.
2440 (0988) (RC2440): MQRC_SUB_NAME_ERROR:
Explanation
On the MQSUB call in the Subscription Descriptor MQSD the SubName field is not valid or has been
omitted. This is required if the MQSD option MQSO_DURABLE is specified, but may also be used if
MQSO_DURABLE is not specified.
One of the following applies:
v SubName.VSLength is greater than zero, but SubName.VSOffset is zero and SubName.VSPtr is the null
pointer.
v SubName.VSOffset is nonzero and SubName.VSPtr is not the null pointer (that is, it appears both fields
are being used where only one is allowed).
v SubName.VSPtr is not a valid pointer.
1022
1023
v The name begins "mq" in any mixture of lowercase or uppercase and is not "mq_usr" and contains
more than one "." character (U+002E). Multiple "." characters are not allowed in properties with those
prefixes.
v The name is "NULL", "TRUE", "FALSE", "NOT", "AND", "OR", "BETWEEN", "LIKE", "IN", "IS" and
"ESCAPE" or is one of these keywords prefixed by "usr.".
v The name begins with "Body" or "Root" (except for names beginning "Root.MQMD.").
v A "." character must not be followed immediately by another "." character.
v The "." character cannot be the last character in a property name.
Completion Code
MQCC_FAILED
Programmer Response
Valid property names are described in the WebSphere MQ documentation. Ensure that all properties in
the message have valid names before reissuing the call.
2443 (098B) (RC2443): MQRC_SEGMENTATION_NOT_ALLOWED:
Explanation
An MQPUT or MQPUT1 call was issued to put a segmented message or a message that may be broken
up into smaller segments (MQMF_SEGMENTATION_ALLOWED). The message was found to contain
one or more MQ-defined properties in the message data; MQ-defined properties are not valid in the
message data of a segmented message.
WebSphere MQ Multicast cannot use segmented messages.
Completion Code
MQCC_FAILED
Programmer Response
Remove the invalid properties from the message data or prevent the message from being segmented.
2444 (098C) (RC2444): MQRC_CBD_ERROR:
Explanation
a
v
v
v
MQCB call the MQCBD structure is not valid for one of the following reasons:
The StrucId field is not MQCBD_STRUC_ID
The Version field is specifies a value that is not valid or is not supported
The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQCBD structure are set correctly.
1024
1025
If Operation was MQOP_RESUME, the operation is not allowed because the state of asynchronous
consumption on the hConn is STOPPED. Re-issue MQCTL with the MQOP_START Operation.
If Operation was MQOP_SUSPEND, the operation is not allowed because the state of asynchronous
consumption on the hConn is STOPPED. If you need to get your hConn into a SUSPENDED state, issue
MQCTL with the MQOP_START Operation followed by MQCTL with MQOP_SUSPEND.
If Operation was MQOP_START, the operation is not allowed because the state of asynchronous
consumption on the hConn is SUSPENDED. Re-issue MQCTL with the MQOP_RESUME Operation.
If Operation was MQOP_START_WAIT, the operation is not allowed because either
v The state of asynchronous consumption on the hConn is SUSPENDED. Re-issue MQCTL with the
MQOP_RESUME Operation.
v The state of asynchronous consumption on the hConn is already STARTED. Do not mix the use of
MQOP_START and MQOP_START_WAIT within one application.
Completion Code
MQCC_FAILED
Programmer Response
Re-issue the MQCTL call with the correct Operation.
2457 (0999) (RC2457): MQRC_OPTIONS_CHANGED:
Explanation
An MQGET call on a queue handle opened using MQOO_READ_AHEAD (or resolved to that value
through the queue's default value) has altered an option that is required to be consistent between
MQGET calls.
Completion Code
MQCC_FAILED
Programmer Response
Keep all required MQGET options the same between invocations of MQGET, or use
MQOO_NO_READ_AHEAD when opening the queue.
2458 (099A) (RC2458): MQRC_READ_AHEAD_MSGS:
Explanation
On an MQCLOSE call, the option MQCO_QUIESCE was used and there are still messages stored in client
read ahead buffer that were sent to the client ahead of an application requesting them and have not yet
been consumed by the application.
Completion Code
MQCC_WARNING
1026
Programmer Response
Continue to consume messages using the queue handle until there are no more available and then issue
the MQCLOSE again, or choose to discard these messages by issuing the MQCLOSE call with the
MQCO_IMMEDIATE option instead.
2459 (099B) (RC2459): MQRC_SELECTOR_SYNTAX_ERROR:
Explanation
An MQOPEN, MQPUT1 or MQSUB call was issued but a selection string was specified which contained
a syntax error.
Completion Code
MQCC_FAILED
Programmer Response
See Message selector syntax and ensure that you have correctly followed the rules for specifying selection
strings. Correct any syntax errors and resubmit the MQ API call for which the error occurred.
2460 (099C) (RC2460): MQRC_HMSG_ERROR:
Explanation
On an MQCRTMH, MQDLTMH, MQSETMP, MQINQMP or MQDLT call, a message handle supplied is
not valid, for one of the following reasons:
v The parameter pointer is not valid, or (for the MQCRTMH call) points to read-only storage. (It is not
always possible to detect parameter pointers that are not valid; if not detected, unpredictable results
occur.)
v The value specified was not returned by a preceding MQCRTMH call.
v The value specified has been made invalid by a preceding MQDLTMH call.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that a successful MQCRTMH call is performed for the connection, and that an MQDLTMH call
has not already been performed for it. Ensure that the handle is being used within its valid scope (see the
description of MQCRTMH in the WebSphere MQ documentation).
2461 (099D) (RC2461): MQRC_CMHO_ERROR:
Explanation
On an MQCRTMH call, the create message handle options structure MQCMHO is not valid, for one of
the following reasons:
v The StrucId field is not MQCMHO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
Troubleshooting and support
1027
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQCMHO structure are set correctly.
2462 (099E) (RC2462): MQRC_DMHO_ERROR:
Explanation
On an MQDLTMH call, the delete message handle options structure MQDMHO is not valid, for one of
the following reasons:
v The StrucId field is not MQCMHO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQDMHO structure are set correctly.
2463 (099F) (RC2463): MQRC_SMPO_ERROR:
Explanation
On an MQSETMP call, the set message property options structure MQSMPO is not valid, for one of the
following reasons:
v The StrucId field is not MQSMPO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQSMPO structure are set correctly.
2464 (09A0) (RC2464): MQRC_IMPO_ERROR:
Explanation
On an MQINQMP call, the inquire message property options structure MQIMPO is not valid, for one of
the following reasons:
v The StrucId field is not MQIMPO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
1028
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The queue manager cannot copy the changed structure to application storage, even though the call is
successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQIMPO structure are set correctly.
2465 (09A1) (RC2465): MQRC_PROPERTY_NAME_TOO_BIG:
Explanation
On an MQINQMP call, WebSphere MQ attempted to copy the name of the inquired property into the
location indicated by the ReturnedName field of the InqPropOpts parameter but the buffer was too small
to contain the full property name. The call failed but the VSLength field of the ReturnedName of the
InqPropOpts parameter indicates how large the ReturnedName buffer needs to be.
Completion Code
MQCC_FAILED
Programmer response
The full property name can be retrieved by calling MQINQMP again with a larger buffer for the returned
name, also specifying the MQIMPO_INQ_PROP_UNDER_CURSOR option. This will inquire on the same
property.
2466 (09A2) (RC2466): MQRC_PROP_VALUE_NOT_CONVERTED:
Explanation
An MQINQMP call was issued with the MQIMPO_CONVERT_VALUE option specified in the
InqPropOpts parameter, but an error occurred during conversion of the value of the property. The
property value is returned unconverted, the values of the ReturnedCCSID and ReturnedEncoding fields
in the InqPropOpts parameter are set to those of the value returned.
Completion Code
MQCC_FAILED
Programmer Response
Check that the property value is correctly described by the ValueCCSID and ValueEncoding parameters
that were specified when the property was set. Also check that these values, and the RequestedCCSID
and RequestedEncoding specified in the InqPropOpts parameter of the MQINQMP call, are supported for
MQ conversion. If the required conversion is not supported, conversion must be carried out by the
application.
1029
1030
Programmer Response
Either call MQINQMP again without MQIMPO_CONVERT_TYPE specified, or request a data type for
which conversion is supported.
2471 (09A7) (RC2471): MQRC_PROPERTY_NOT_AVAILABLE:
Explanation
On an MQINQMP call, no property could be found that matched the specified name. When iterating
through multiple properties, possibly using a name containing a wildcard character, this indicates that all
properties matching the name have now been returned.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the correct property name was specified. If the name contains a wildcard character specify
option MQIMPO_INQ_FIRST to begin iterating over the properties again.
2472 (09A8) (RC2472): MQRC_PROP_NUMBER_FORMAT_ERROR:
Explanation
On an MQINQMP call, conversion of the property value was requested. The format of the property is
invalid for conversion to the requested data type.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the correct property name and data type were specified. Ensure that the application setting
the property gave it the correct format. See the documentation for the MQINQMP call for details on the
formats required for data conversion of property values.
2473 (09A9) (RC2473): MQRC_PROPERTY_TYPE_ERROR:
Explanation
On an MQSETMP call, the Type parameter does not specify a valid MQTYPE_* value. For properties
beginning "Root.MQMD." or "JMS" the specified Type must correspond to the data type of the matching
MQMD or JMS header field:
v For MQCHARn or Java String fields use MQTYPE_STRING.
v For MQLONG or Java int fields use MQTYPE_INT32.
v For MQBYTEn fields use MQTYPE_BYTE_STRING.
v For Java long fields use MQTYPE_INT64.
On an MQINQMP call, the Type parameter is not valid. Either the parameter pointer is not valid, the
value is invalid, or it points to read-only storage. (It is not always possible to detect parameter pointers
that are not valid; if not detected, unpredictable results occur.)
1031
Completion Code
MQCC_FAILED
Programmer Response
Correct the parameter.
2478 (09AE) (RC2478): MQRC_PROPERTIES_TOO_BIG:
Explanation
An MQPUT or MQPUT1 call was issued to put a message on a queue, but the properties of the message
were too large. The length of the properties cannot exceed the value of the MaxPropertiesLength queue
manager attribute.
Completion Code
MQCC_FAILED
Programmer Response
Consider one of the following actions:
v Reduce the number or the size of the properties associated with the message. This could include
moving some of the properties into the application data.
v Increase the value of the MaxPropertiesLength queue manager attribute.
2479 (09AF) (RC2479): MQRC_PUT_NOT_RETAINED:
Explanation
An MQPUT or MQPUT1 call was issued to publish a message on a topic, using the MQPMO_RETAIN
option, but the publication was unable to be retained. The publication is not published to any matching
subscribers.
Completion Code
MQCC_FAILED
Programmer Response
Retained publications are stored on the SYSTEM.RETAINED.PUB.QUEUE. Ensure that this queue is
available for use by the application. Possible reasons for failure include the queue being full, the queue
being put inhibited, or the queue not existing.
2480 (09B0) (RC2480): MQRC_ALIAS_TARGTYPE_CHANGED:
Explanation
An MQPUT or MQPUT1 call was issed to publish a message on a topic. One of the subscriptions
matching this topic was made with a destination queue that was an alias queue which originally
referenced a queue, but now references a topic object, which is not allowed. In this situation the reason
code MQRC_ALIAS_TARGTYPE_CHANGED is returned in the Feedback field in the MQMD of a report
message, or in the Reason field in the MQDLH structure of a message on the dead-letter queue.
1032
Completion Code
MQCC_FAILED
Programmer Response
Find the subscriber that is using an alias queue which references a topic object and change it to reference
a queue again, or change the subscription to reference a different queue.
2481 (09B1) (RC2481): MQRC_DMPO_ERROR:
Explanation
On an MQDLTMP call, the delete message property options structure MQDMPO is not valid, for one of
the following reasons:
v The StrucId field is not MQDMPO_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQDMPO structure are set correctly.
2482 (09B2) (RC2482): MQRC_PD_ERROR:
Explanation
On an MQSETMP or MQINQMP call, the property descriptor structure MQPD is not valid, for one of the
following reasons:
v The StrucId field is not MQPD_STRUC_ID.
v The Version field specifies a value that is not valid or not supported.
v The parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not
valid; if not detected, unpredictable results occur.)
v The Context field contains an unrecognized value.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQPD structure are set correctly.
2483 (09B3) (RC2483): MQRC_CALLBACK_TYPE_ERROR:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER with an incorrect value for
CallbackType
Troubleshooting and support
1033
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the CallbackType field of the MQCBDO is specified correctly.
2484 (09B4) (RC2484): MQRC_CBD_OPTIONS_ERROR:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER with an incorrect value for the
Options field of the MQCBD.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the Options are specified correctly.
2485 (09B5) (RC2485): MQRC_MAX_MSG_LENGTH_ERROR:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER with an incorrect value for the
MaxMsgLength field of the MQCBD.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the MaxMsgLength are specified correctly.
2486 (09B6) (RC2486): MQRC_CALLBACK_ROUTINE_ERROR:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER failed for one of the following reasons:
v Both CallbackName and CallbackFunction are specified. Only one must be specified on the call.
v The call was made from an environment not supporting function pointers.
v A programming language that does not support Function pointer references.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the CallbackName value is specified correctly.
1034
1035
Completion Code
MQCC_FAILED
Programmer Response
Ensure that input fields in the MQBMHO structure are set correctly.
2490 (09BA) (RC2490): MQRC_UNSUPPORTED_PROPERTY:
Explanation
A message was found to contain a property that the queue manager does not support. The operation that
failed required all the properties to be supported by the queue manager. This can occur on the
MQPUT/MQPUT1 call or when a message is about to be sent down a channel to a queue manager than
does not support message properties.
Completion Code
MQCC_FAILED
Programmer Response
Determine which property of the message is not supported by the queue manager and decide whether to
remove the property from the message or connect to a queue manager which does support the property.
2492 (09BC) (RC2492): MQRC_PROP_NAME_NOT_CONVERTED:
Explanation
An MQINQMP call was issued with the MQIMPO_CONVERT_VALUE option specified in the
InqPropOpts parameter, but an error occurred during conversion of the returned name of the property.
The returned name is unconverted
Completion Code
MQCC_WARNING
Programmer Response
Check that the character set of the returned name was correctly described when the property was set.
Also check that these values, and the RequestedCCSID and RequestedEncoding specified in the
InqPropOpts parameter of the MQINQMP call, are supported for MQ conversion. If the required
conversion is not supported, conversion must be carried out by the application.
2494 (09BE) (RC2494): MQRC_GET_ENABLED:
Explanation
This reason code is returned to an asynchronous consumer at the time a queue that was previously
inhibited for get has been re-enabled for get.
Completion Code
MQCC_WARNING
1036
Programmer Response
None. This reason code is used to inform the application of the change in state of the queue.
2495 (09BF) (RC2495): MQRC_MODULE_NOT_FOUND:
Explanation
A native shared library could not be loaded.
Completion Code
MQCC_FAILED
Programmer Response
This problem could be caused by either of the two following reasons:
v A MQCB call was made with an Operation of MQOP_REGISTER specifying a CallbackName which
could not be found. Ensure that the CallbackName value is specified correctly.
v The Java MQ code could not load a Java native shared library. Check the associated Exception stack
and FFST. Ensure that the JNI shared library is specified correctly. Check also that you have specified
-Djava.library.path=/opt/mqm/java/lib, or equivalent, when invoking the Java program
2496 (09C0) (RC2496): MQRC_MODULE_INVALID:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER, specifying a CallbackName which is
not a valid load module.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the CallbackName value is specified correctly.
2497 (09C1) (RC2497): MQRC_MODULE_ENTRY_NOT_FOUND:
Explanation
An MQCB call was made with an Operation of MQOP_REGISTER and the CallbackName identifies a
function name which can't be found in the specified library.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the CallbackName value is specified correctly.
1037
1038
1039
1040
1041
Completion Code
MQCC_FAILED
Programmer Response
Correct the Full topic name used so that it does not match any existing subscription in the group, or
correct the grouping attributes if, either a different group was intended or the subscription was not
intended to be grouped at all.
2515 (09D3) (RC2515): MQRC_GROUPING_NOT_ALTERABLE:
Explanation
An MQSUB call was made using option MQSO_ALTER on a grouped subscription, that is one made with
the option MQSO_GROUP_SUB. Grouping of subscriptions is not alterable.
Completion Code
MQCC_FAILED
Programmer response
Remove the subscription using MQCLOSE and re-create it with MQSUB with the attributes set correctly,
or change the various grouping fields used on the MQSUB call so that it matches the existing
subscription.
2516 (09D4) (RC2516): MQRC_SELECTOR_INVALID_FOR_TYPE:
Explanation
A SelectionString may only be specified in the MQOD for an MQOPEN/MQPUT1 if the following is true:
v ObjectType is MQOT_Q
v The queue is being opened using one of the MQOO_INPUT_* open options.
Completion Code
MQCC_FAILED
Programmer Response
Modify the value of ObjectType to be MQOT_Q and ensure that the queue is being opened using one of
the MQOO_INPUT_* options.
2517 (09D5) (RC2517): MQRC_HOBJ_QUIESCED:
Explanation
The HOBJ has been quiesced but there are no messages in the read ahead buffer which match the current
selection criteria. This reason code indicates that the read ahead buffer is not empty.
Completion Code
MQCC_FAILED
1042
Programmer Response
This reason code indicates that all messages with the current selection criteria have been processed. Do
one of the following:
v If no further messages need to be processed issue an MQCLOSE without the MQCO_QUIESCE option.
Any messages in the read ahead buffer will be discarded.
v Relax the current selection criteria by modifying the values in the MQGMO and reissue the call. Once
all messages have been consumed the call will return MQRC_HOBJ_QUIESCED_NO_MSGS.
2518 (09D6) (RC2518): MQRC_HOBJ_QUIESCED_NO_MSGS:
Explanation
The HOBJ has been quiesced and the read ahead buffer is now empty. No further messages will be
delivered to this HOBJ
Completion Code
MQCC_FAILED
Programmer Response
Issue MQCLOSE against the HOBJ.
2519 (09D7) (RC2519): MQRC_SELECTION_STRING_ERROR:
Explanation
The SelectionString must be specified according to the description of how to use an MQCHARV
structure. Examples of why this error was returned:
v SelectionString.VSLength is greater than zero, but SelectionString.VSOffset is zero and
SelectionString.VSPtr is a null pointer.
v SelectionString.VSOffset is nonzero and SelectionString.VSPtr is not the null pointer (that is, it appears
both fields are being used where only one is allowed).
v SelectionString.VSPtr is not a valid pointer.
v SelectionString.VSOffset or SelectionString.VSPtr points to storage that is not accessible.
v SelectionString.VSLength exceeds the maximum length allowed for this field. The maximum length is
determined by MQ_SELECTOR_LENGTH.
Completion Code
MQCC_FAILED
Programmer Response
Modify the fields of the MQCHARV so that it follows the rules for a valid MQCHARV structure.
2520 (09D8) (RC2520): MQRC_RES_OBJECT_STRING_ERROR:
Explanation
On the MQOPEN or MQPUT1 call in the Object Descriptor MQOD, or on the MQSUB call in the
Subscription Descriptor MQSD the ResObjectString field is not valid.
One of the following applies:
Troubleshooting and support
1043
1044
v The MQSUB call used MQSO_CREATE or MQSO_ALTER on a durable subscription and the object
handle provided referred to a temporary dynamic queue. This is not an appropriate destination for a
durable subscription.
v The MQSUB call used MQSO_RESUME and a Hobj of MQHO_NONE, to resume an administratively
created subscription, but the queue name provided in the DEST parameter of the subscription does not
exist.
v The MQSUB call used MQSO_RESUME and a Hobj of MQHO_NONE, to resume a previously created
API subscription, but the queue previously used no longer exists.
Completion Code
MQCC_FAILED
Programmer Response
Ensure that the model queues referred to by MNDURMDL and MDURMDL exist and have an
appropriate DEFTYPE. Create the queue referred to by the DEST parameter in an administrative
subscription if one is being used. Alter the subscription to use an existing queue if the previously used
one does not exist.
2523 (09DB) (RC2523): MQRC_INVALID_SUBSCRIPTION:
Explanation
An MQSUB call using MQSO_RESUME or MQSO_ALTER failed because the subscription named is not
valid for use by applications. This can be for one of the following reasons:
v The subscription is the SYSTEM.DEFAULT.SUB subscription which is not a valid subscription and
should only be used to fill in the default values on DEFINE SUB commands.
v The subscription is a proxy type subscription which is not a valid subscription for an application to
resume and is only used to enable publications to be forwarded between queue managers.
v The subscription has expired and is no longer valid for use.
Completion Code
MQCC_FAILED
Programmer Response
Ensure the subscription named in SubName field is not one of the invalid ones listed. If you have a
handle open to the subscription already it must have expired. Use MQCLOSE to close the handle and
then if necessary create a new subscription.
2524 (09DC) (RC2524): MQRC_SELECTOR_NOT_ALTERABLE:
Explanation
An MQSUB call was issued with the MQSO_ALTER option and the MQSD contained a SelectionString. It
is not valid to alter the SelectionString of a subscription.
Completion Code
MQCC_FAILED
1045
Programmer response
Ensure that the SelectionString field of the MQSD does not contain a valid VSPtr and that the VSLength
is set to zero when making a call to MQSUB.
2525 (09DD) (RC2525): MQRC_RETAINED_MSG_Q_ERROR:
Explanation
An MQSUB call which did not use the MQSO_NEW_PUBLICATIONS_ONLY option, or an MQSUBRQ
call, failed because the retained publications which exist for the topic string subscribed to cannot be
retrieved from the SYSTEM.RETAINED.PUB.QUEUE. This can be for one of the following reasons:
v The queue has become damaged or has been deleted.
v The queue has been set to GET(DISABLED).
v Messages have been removed from this queue directly.
An error message will be written to the log giving more details about the problem with the
SYSTEM.RETAINED.PUB.QUEUE.
When this return code occurs on an MQSUB call, it can only occur using the MQSO_CREATE option, and
in this case the subscription is not created.
Completion Code
MQCC_FAILED
Programmer Response
If this occurs on an MQSUB call, re-issue the MQSUB call using the option
MQSO_NEW_PUBLICATIONS_ONLY, which will mean no previously retained publications are sent to
this subscription, or fix the SYSTEM.RETAINED.PUB.QUEUE so that messages can be retrieved from it
and re-issue the MQSUB call.
If this occurs on an MQSUBRQ call, fix the SYSTEM.RETAINED.PUB.QUEUE so that messages can be
retrieved from it and re-issue the MQSUBRQ call.
2526 (09DE) (RC2526): MQRC_RETAINED_NOT_DELIVERED:
Explanation
An MQSUB call which did not use the MQSO_NEW_PUBLICATIONS_ONLY option or an MQSUBRQ
call, failed because the retained publications which exist for the topic string subscribed to cannot be
delivered to the subscription destination queue and have subsequently failed to be delivered to the
dead-letter queue.
When this return code occurs on an MQSUB call, it can only occur using the MQSO_CREATE option, and
in this case the subscription is not created.
Completion Code
MQCC_FAILED
Programmer response
Fix the problems with the destination queue and the dead-letter queue and re-issue the MQSUB or
MQSUBRQ call.
1046
The values of properties may not contain any characters that require escaping.
Only Unicode character U+0020 will be treated as white space within the folder.
The folder tag does not contain the content attribute.
The folder must not contain a property with a null value.
1047
Programmer Response
Issue an MQCMIT on the connection handle to commit the unit of work and then reissue the MQCTL
call, or issue an MQCTL call using Operation MQOP_START_WAIT to use the unit of work from within
the asynchronous consumption callback functions.
2530 (09E2) (RC2530): MQRC_ASYNC_XA_CONFLICT:
Explanation
An MQCTL call with Operation MQOP_START was issued to start the asynchronous consumption of
messages, but an external XA syncpoint coordinator has already issued an xa_open call for this
connection handle. XA transactions must be done using the MQOP_START_WAIT Operation.
Completion Code
MQCC_FAILED
Programmer Response
Reissue the MQCTL call using Operation MQOP_START_WAIT.
2531 (09E3) (RC2531): MQRC_PUBSUB_INHIBITED:
Explanation
MQSUB, MQOPEN, MQPUT, and MQPUT1 calls are currently inhibited for all publish/subscribe topics,
either with the queue manager attribute PSMODE or because processing of publish/subscribe state at
queue manager start-up has failed, or has not yet completed.
Completion Code
MQCC_FAILED
Programmer Response
If this queue manager does not intentionally inhibit publish/subscribe, investigate any error messages
that describe the failure at queue manager start-up, or wait until start-up processing completes. If the
queue manager is a member of cluster, then start-up is not complete until the channel initiator has also
started. On z/OS, if you get this return code from the Chinit for the
SYSTEM.BROKER.DEFAULT.STREAM queue or topic, then the Chinit is busy processing work, and the
pubsub task starts later. Use the DISPLAY PUBSUB command to check the status of the
publish/subscribe engine to ensure that it is ready for use. Additionally, on z/OS you might receive an
information message CSQM076I.
2532 (09E4) (RC2532): MQRC_MSG_HANDLE_COPY_FAILURE:
Explanation
An MQGET call was issued specifying a valid MsgHandle in which to retrieve any properties of the
message. After the message had been removed from the queue the application could not allocate enough
storage for the properties of the message. The message data is available to the application but the
properties are not. Check the queue manager error logs for more information about how much storage
was required.
1048
Completion Code
MQCC_WARNING
Programmer response
Raise the memory limit of the application to allow it store the properties.
2533 (09E5) (RC2533): MQRC_DEST_CLASS_NOT_ALTERABLE:
Explanation
An MQSUB call using option MQSO_ALTER was made changing the use of the MQSO_MANAGED
option on the subscription. The destination class of a subscription cannot be changed. When the
MQSO_MANAGED option is not used, the queue provided can be changed, but the class of destination
(managed or not) cannot be changed.
Completion Code
MQCC_FAILED
Programmer Response
Remove the subscription using MQCLOSE and re-create it with MQSUB with the attributes set correctly,
or change the use of the MQSO_MANAGED option used on the MQSUB call so that it matches the
existing subscription.
2534 (09E6) (RC2534): MQRC_OPERATION_NOT_ALLOWED:
Explanation
An MQCTL call was made with an Operation that is not allowed because of the state of asynchronous
consumption on the hConn is currently in.
If Operation was MQOP_RESUME, the operation is not allowed because the state of asynchronous
consumption on the hConn is STOPPED. Re-issue MQCTL with the MQOP_START Operation.
If Operation was MQOP_SUSPEND, the operation is not allowed because the state of asynchronous
consumption on the hConn is STOPPED. If you need to get your hConn into a SUSPENDED state, issue
MQCTL with the MQOP_START Operation followed by MQCTL with MQOP_SUSPEND.
If Operation was MQOP_START, the operation is not allowed because the state of asynchronous
consumption on the hConn is SUSPENDED. Re-issue MQCTL with the MQOP_RESUME Operation.
If Operation was MQOP_START_WAIT, the operation is not allowed because either:
v The state of asynchronous consumption on the hConn is SUSPENDED. Re-issue MQCTL with the
MQOP_RESUME Operation.
v The state of asynchronous consumption on the hConn is already STARTED. Do not mix the use of
MQOP_START and MQOP_START_WAIT within one application.
Completion Code
MQCC_FAILED
1049
Programmer Response
Re-issue the MQCTL call with the correct Operation.
2535 (09E7): MQRC_ACTION_ERROR:
Explanation
An MQPUT call was issued, but the value of the Action field in the PutMsgOpts parameter is not a valid
MQACTP_* value.
Completion Code
MQCC_FAILED
Programmer response
Specify a valid value for the field.
2537 (09E9) (RC2537): MQRC_CHANNEL_NOT_AVAILABLE:
Explanation
An MQCONN call was issued from a client to connect to a queue manager but the channel is not
currently available. Common causes of this reason code are:
v The channel is currently in stopped state.
v The channel has been stopped by a channel exit.
v The queue manager has reached its maximum allowable limit for this channel from this client.
v The queue manager has reached its maximum allowable limit for this channel.
v The queue manager has reached its maximum allowable limit for all channels.
Completion Code
MQCC_FAILED
Programmer Response
Examine the queue manager and client error logs for messages explaining the cause of the problem.
2538 (09EA) (RC2538): MQRC_HOST_NOT_AVAILABLE:
Explanation
An MQCONN call was issued from a client to connect to a queue manager but the attempt to allocate a
conversation to the remote system failed. Common causes of this reason code are:
v The listener has not been started on the remote system.
v The connection name in the client channel definition is incorrect.
v The network is currently unavailable.
v A firewall blocking the port, or protocol-specific traffic.
Completion Code
MQCC_FAILED
1050
Programmer Response
Examine the client error log for messages explaining the cause of the problem.
2539 (09EB) (RC2539): MQRC_CHANNEL_CONFIG_ERROR:
Explanation
An MQCONN call was issued from a client to connect to a queue manager but the attempt to establish
communication failed. Common causes of this reason code are:
v The server and client cannot agree on the channel attributes to use.
v There are errors in one or both of the QM.INI or MQCLIENT.INI configuration files.
v The server machine does not support the code page used by the client.
Completion Code
MQCC_FAILED
Programmer Response
Examine the queue manager and client error logs for messages explaining the cause of the problem.
2540 (09EC) (RC2540): MQRC_UNKNOWN_CHANNEL_NAME:
Explanation
An MQCONN call was issued from a client to connect to a queue manager but the attempt to establish
communication failed because the queue manager did not recognize the channel name.
Completion Code
MQCC_FAILED
Programmer response
Ensure that the client is configured to use the correct channel name.
2541 (09ED) (RC2541): MQRC_LOOPING_PUBLICATION:
Explanation
A Distributed Pub/Sub topology has been configured with a combination of Pub/Sub clusters and
Pub/Sub Hierarchies such that some, or all, of the queue managers have been connected in a loop. A
looping publication has been detected and put onto the dead-letter queue.
Completion Code
MQCC_FAILED
Programmer response
Examine the hierarchy and correct the loop.
1051
1052
1053
1054
An MQPUT or MQPUT1 call published a message and at least one subscriber had a content filter but
WebSphere MQ could not determine whether the publication should be delivered to the subscriber (for
example, because no extended message selection provider was available to validate the selection string).
The MQPUT or MQPUT1 call will fail with MQRC_SELECTION_NOT_AVAILABLE and no subscribers
will receive the publication.
Completion Code
MQCC_WARNING or MQCC_FAILED
Programmer response
If it was intended that the selection string should be handled by the extended message selection provider,
ensure that the extended message selection provider is correctly configured and running. If extended
message selection was not intended, see Message selector syntax and ensure that you have correctly
followed the rules for specifying selection strings.
If a subscription is being resumed, the subscription will not be delivered any messages until a extended
message selection provider is available and a message matches the SelectionString of the resumed
subscription.
2552 (09F8) (RC2552): MQRC_CHANNEL_SSL_WARNING:
Explanation
An SSL security event has occurred. This is not fatal to an SSL connection but is likely to be of interest to
an administrator.
Completion code
MQCC_WARNING
Programmer response
None. This reason code is only used to identify the corresponding event message.
2553 (09F9) (RC2553): MQRC_OCSP_URL_ERROR:
Explanation
The OCSPResponderURL field does not contain a correctly formatted HTTP URL.
Completion code
MQCC_FAILED
Programmer response
Check and correct the OCSPResponderURL. If you do not intend to access an OCSP responder, set the
AuthInfoType of the authentication information object to MQAIT_CRL_LDAP.
2554 (09FA) (RC2554): MQRC_CONTENT_ERROR:
Explanation
There are 2 explanations for reason code 2554:
1055
1. An MQPUT call was issued with a message where the content could not be parsed to determine
whether the message should be delivered to a subscriber with an extended message selector. No
subscribers will receive the publication.
2. MQRC_CONTENT_ERROR can be returned from MQSUB and MQSUBRQ if a selection string
selecting on the content of the message was specified.
Completion Code
MQCC_FAILED
Programmer response
There are 2 programmer responses for reason code 2554 because there are two causes:
1. If reason code 2554 was issued because of reason 1 then check for error messages from the extended
message selection provider and ensure that the message content is well formed before retrying the
operation.
2. If reason code 2554 was issued because of reason 2 then because the error occurred at the time that
the retained message was published, either a system administrator must clear the retained queue, or
you cannot specify a selection string selecting on the content.
2555 (09FB) (RC2555): MQRC_RECONNECT_Q_MGR_REQD:
Explanation
The MQCNO_RECONNECT_Q_MGR option is required.
An option, such MQMO_MATCH_MSG_TOKEN in an MQGET call or opening a durable subscription, was
specified in the client program that requires re-connection to the same queue manager.
Completion Code
MQCC_FAILED
Programmer response
Change the MQCONNX call to use MQCNO_RECONNECT_Q_MGR, or modify the client program not to use the
conflicting option.
2556 (09FC) (RC2556): MQRC_RECONNECT_TIMED_OUT:
Explanation
A reconnection attempt timed out.
The failure might occur in any MQI verb if a connection is configured to reconnect. You can customize
the timeout in the MQClient.ini file
Completion Code
MQCC_FAILED
Programmer response
Look at the error logs to find out why reconnection did not complete within the time limit.
1056
1057
1058
Programmer response
Correct the group address field in the COMMINFO definition linked to the TOPIC object.
2564 (0A04) (RC2564): MQRC_MULTICAST_CONFIG_ERROR:
Explanation
An MQOPEN, MQSUB or MQPUT call was issued which invoked the multicast component. The call
failed because the multicast configuration is incorrect.
Completion Code
MQCC_FAILED
Programmer response
Check the multicast configuration and error logs and retry the operation.
2565 (0A05) (RC2565): MQRC_MULTICAST_INTERFACE_ERROR:
Explanation
An MQOPEN, MQSUB or MQPUT call was made which attempted to a network interface for multicast.
The interface returned an error. Possible causes for the error are:
1. The required network interface does not exist.
2. The interface is not active.
3. The interface does not support the required IP version.
Completion Code
MQCC_FAILED
Programmer response
Verify that the IP address and the system network configuration are valid. Check the multicast
configuration and error logs and retry the operation.
2566 (0A06) (RC2566): MQRC_MULTICAST_SEND_ERROR:
Explanation
An MQPUT call was made which attempted to send multicast traffic over the network. The system failed
to send one or more network packets.
Completion Code
MQCC_FAILED
Programmer response
Verify that the IP address and the system network configuration are valid. Check the multicast
configuration and error logs and retry the operation.
1059
1060
1061
1062
1063
1064
Completion Code
MQCC_FAILED
Programmer response
Include MQOO_INQUIRE in the ImqObject open options and set them earlier.
6105 (17D9) (RC6105): MQRC_CURSOR_NOT_VALID:
Explanation
The browse cursor for an open queue has been invalidated since it was last used by an implicit reopen.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
Programmer response
Set the ImqObject open options explicitly to cover all eventualities so that implicit reopening is not
required.
6106 (17DA) (RC6106): MQRC_ENCODING_ERROR:
Explanation
The encoding of the (next) message item needs to be MQENC_NATIVE for pasting.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6107 (17DB) (RC6107): MQRC_STRUC_ID_ERROR:
Explanation
The structure id for the (next) message item, which is derived from the 4 characters beginning at the data
pointer, is either missing or is inconsistent with the class of object into which the item is being pasted.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
1065
The
The
The
The
The
The
The
correct
correct
correct
correct
correct
correct
correct
length
length
length
length
length
length
length
for
for
for
for
for
for
for
a correlation id is MQ_CORREL_ID_LENGTH.
a facility token is MQ_FACILITY_LENGTH.
a group id is MQ_GROUP_ID_LENGTH.
a message id is MQ_MSG_ID_LENGTH.
an instance id is MQ_OBJECT_INSTANCE_ID_LENGTH.
a transaction instance id is MQ_TRAN_INSTANCE_ID_LENGTH.
a message token is MQ_MSG_TOKEN_LENGTH.
1066
Completion Code
MQCC_FAILED
6112 (17E0) (RC6112): MQRC_BUFFER_NOT_AUTOMATIC:
Explanation
A user-defined (and managed) buffer cannot be resized. A user-defined buffer can only be replaced or
withdrawn. A buffer must be automatic (system-managed) before it can be resized.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
Programmer response
6113 (17E1) (RC6113): MQRC_INSUFFICIENT_BUFFER:
Explanation
There is insufficient buffer space available after the data pointer to accommodate the request. This might
be because the buffer cannot be resized.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6114 (17E2) (RC6114): MQRC_INSUFFICIENT_DATA:
Explanation
There is insufficient data after the data pointer to accommodate the request.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6115 (17E3) (RC6115): MQRC_DATA_TRUNCATED:
Explanation
Data has been truncated when copying from one buffer to another. This might be because the target
buffer cannot be resized, or because there is a problem addressing one or other buffer, or because a buffer
is being downsized with a smaller replacement.
This reason code occurs in the WebSphere MQ C++ environment.
1067
Completion Code
MQCC_FAILED
6116 (17E4) (RC6116): MQRC_ZERO_LENGTH:
Explanation
A zero length has been supplied where a positive length is either required or implied.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6117 (17E5) (RC6117): MQRC_NEGATIVE_LENGTH:
Explanation
A negative length has been supplied where a zero or positive length is required.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6118 (17E6) (RC6118): MQRC_NEGATIVE_OFFSET:
Explanation
A negative offset has been supplied where a zero or positive offset is required.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
6119 (17E7) (RC6119): MQRC_INCONSISTENT_FORMAT:
Explanation
The format of the (next) message item is inconsistent with the class of object into which the item is being
pasted.
This reason code occurs in the WebSphere MQ C++ environment.
Completion Code
MQCC_FAILED
1068
1069
1070
1071
Programmer response
Check that the referenced object is neither deleted nor out of scope, or remove the reference by supplying
a null address value.
(0BC4)
(0BC5)
(0BC6)
(0BC7)
(0BC8)
(0BC9)
(RC3012):
(RC3013):
(RC3014):
(RC3015):
(RC3016):
(RC3017):
1072
(0BD3)
(0BD4)
(0BD5)
(0BD5)
(0BD6)
(RC3027):
(RC3028):
(RC3029):
(RC3029):
(RC3030):
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
(0BE3)
(0BE4)
(0BE5)
(0BE6)
(0BE7)
(0BE8)
(RC3043):
(RC3044):
(RC3045):
(RC3046):
(RC3047):
(RC3048):
(0C02)
(0C03)
(0C04)
(0C05)
(0C06)
(0C07)
(0C08)
(RC3074):
(RC3075):
(RC3076):
(RC3077):
(RC3078):
(RC3079):
(RC3080):
1073
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3150
3151
3152
(0C54)
(0C55)
(0C58)
(0C59)
(RC3156):
(RC3157):
(RC3160):
(RC3161):
(0C64)
(0C65)
(0C66)
(0C67)
(0C68)
(0C69)
(0C80)
(RC3172):
(RC3173):
(RC3174):
(RC3175):
(RC3176):
(RC3177):
(RC3200):
1074
3204
3205
3207
3208
3209
(0C84)
(0C85)
(0C87)
(0C88)
(0C89)
(RC3204):
(RC3205):
(RC3207):
(RC3208):
(RC3209):
1075
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3300
3301
3302
1076
3353
3364
4001
4002
4003
(0D19)
(0D24)
(0FA1)
(0FA2)
(0FA3)
(RC3353):
(RC3364):
(RC4001):
(RC4002):
(RC4003):
4004
4005
4006
4007
4008
4009
4010
1077
4048
4049
4050
4051
4052
(0FD0)
(0FD1)
(0FD2)
(0FD3)
(0FD4)
(RC4048):
(RC4049):
(RC4050):
(RC4051):
(RC4052):
4053
4054
4055
4056
4057
4058
4059
4061
4062
4063
4064
4065
4067
1078
Related reference:
API completion and reason codes on page 856
For each call, a completion code and a reason code are returned by the queue manager or by an exit
routine, to indicate the success or failure of the call.
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) return codes on page 1149
WebSphere MQ can use Secure Sockets Layer (SSL) with the various communication protocols. Use this
topic to identify the error codes that can be returned by SSL.
WCF custom channel exceptions on page 1153
Diagnostic messages are listed in this topic in numeric order, grouped according to the part of the WCF
custom channel from which they originate.
Related information:
Diagnostic messages: AMQ4000-9999
Programmer response
Specify a valid type.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid structure version number.
1079
Programmer response
Specify a valid message sequence number.
Programmer response
Specify a valid control option.
Programmer response
Specify a valid parameter count.
Programmer response
Specify a valid command identifier.
1080
Programmer response
Refer to the previous error messages for this command.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid string length for the parameter.
Programmer response
Specify a valid force value.
1081
Programmer response
Specify a valid structure type.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid message length, and check that positional parameters are in the correct sequence.
1082
Programmer response
Check for and remove duplicate parameters.
Programmer response
Check for and remove duplicate parameters.
Programmer response
Specify a parameter count that is valid for the command.
Programmer response
Specify a parameter count that is valid for the command.
Programmer response
Do one of the following:
v Delete the existing queue and retry the operation.
v Change the scope of the existing queue from cell to queue-manager and retry the operation.
v Create the new queue with a different name.
Troubleshooting and support
1083
Programmer response
Specify a valid queue type.
Programmer response
Specify the valid format.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid replace value.
1084
Programmer response
Check for and remove duplicate parameter values.
Programmer response
Specify a valid count for the parameter.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid mode value.
1085
Programmer response
Specify a valid message sequence number.
Programmer response
Specify a valid data count value.
Programmer response
Consult your systems administrator.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid channel name, type, or disposition.
1086
Programmer response
Specify the positional parameters in a valid sequence for the command.
Programmer response
Specify a valid transmission protocol type.
Programmer response
Specify a valid batch size value.
Programmer response
Specify a valid disconnection interval.
1087
Programmer response
Specify a valid short retry count value.
Programmer response
Specify a valid short timer value.
Programmer response
Specify a valid long retry count value.
Programmer response
Specify a valid long timer value.
Programmer response
Specify a valid sequence wrap number.
1088
Programmer response
Specify a valid maximum message length.
Programmer response
Specify a valid authority value.
Programmer response
Specify a valid purge value.
Programmer response
Specify a valid parameter identifier.
1089
Programmer response
Check the message contents are correct.
Programmer response
Construct the command with the correct coded character-set identifier, and specify this in the message
descriptor when sending the command. For ping, use a suitable coded character-set identifier.
Programmer response
Construct the command with the correct encoding, and specify this in the message descriptor when
sending the command.
Programmer response
Specify a valid value.
1090
Programmer response
Specify a valid value.
Programmer response
Specify a valid value.
Programmer response
Specify a valid channel table value.
Programmer response
Specify a valid value.
1091
Programmer response
Specify a valid channel instance type.
Programmer response
None, unless this is unexpected, in which case consult your systems administrator.
Programmer response
Check for and remove duplicate parameters.
Programmer response
Check that the structure has been specified correctly, and if so reduce the number of strings.
Programmer response
Specify a valid count for the parameter.
1092
Programmer response
Specify a valid string length for the parameter.
Programmer response
Process the command messages that were placed on the dead-letter queue.
Programmer response
Retry the command with a valid stream name parameter.
Programmer response
Retry the command with a valid topic name parameter. Up to 256 characters of the topic name in
question are returned with the error response message. If the topic name contains a null character, this is
assumed to terminate the string and is not considered to be part of it. A zero length topic name is not
valid, as is one that contains an escape sequence that is not valid.
1093
Programmer response
Investigate why the publisher or subscriber is not registered. In the case of a subscriber, the subscriptions
might have expired, or been removed automatically by the broker if the subscriber is no longer
authorized.
Programmer response
Retry the command with a valid queue manager name. If appropriate, the broker includes a further error
reason code within the error response message. If one is supplied, follow the guidance for that reason
code in Reason codes on page 856 to resolve the problem.
Programmer response
Retry the command either by sending it to the correct stream queue or by modifying the command so
that the stream name parameter matches.
1094
Either the queue name is not valid, or in the case of a subscriber identity, the broker has failed to open
the queue.
Programmer response
Retry the command with a valid queue name. If appropriate, the broker includes a further error reason
code within the error response message. If one is supplied, follow the guidance for that reason code in
Reason codes on page 856 to resolve the problem.
Programmer response
If the topic or topics in question should have retained messages, the publishers of these topics might not
be publishing with the correct publication options to cause their publications to be retained.
Programmer response
Either retry the command using a different identity or remove all registrations associated with the
identity so that it can be used by a different user ID. The user ID to which the identity is currently
assigned is returned within the error response message. A Deregister command could be issued to
remove these registrations. If the user ID in question cannot be used to execute such a command, you
need to have the necessary authority to open the SYSTEM.BROKER.CONTROL.QUEUE using the
MQOO_ALTERNATE_USER_AUTHORITY option.
1095
Programmer response
Retry the command by sending it to the correct queue.
Programmer response
Change the program to retry the command ensuring that the correlation identifier supplied in the
message descriptor of the command message is not all binary zeros.
Programmer response
Ensure that the subscriber has the necessary authorities and reissue the request. The problem might occur
because the subscriber's user ID is not known to the broker. This can be identified if a further error
reason code of MQRC_UNKNOWN_ENTITY is returned within the error response message.
Programmer response
Retry the command for a stream that the broker supports. If the broker should support the stream, either
define the stream queue manually, or correct the problem that prevented the broker from creating the
stream queue itself.
1096
Programmer response
Retry the command with a valid combination of options.
Programmer response
Retry the command with a valid combination of options.
Programmer response
This situation can occur if the broker network is not quiesced while topology changes are made to the
network.
If you are removing a broker from the topology when the queue manager is inactive, your changes are
propagated at queue manager restart.
If you are removing a broker from the topology when the queue manager is active, make sure the
channels are also active, so that your changes are immediately propagated.
Programmer response
Specify a valid value.
Troubleshooting and support
1097
Programmer response
Retry the command with a valid combination of options.
Programmer response
If the command specified one of these attributes only, you must also specify the other one, but with a
value of blanks. If the command specified both attributes, ensure that one of them has a value of blanks.
Programmer response
Reissue the command with the correct values or on the correct queue manager.
1098
Programmer response
Ensure that the command specifies either:
v The Usage parameter with a value of MQUS_NORMAL, or
v The ClusterName and ClusterNamelist parameters with values of blanks.
v A QName parameter with a value that is not one of these reserved queues:
SYSTEM.CHANNEL.INITQ
SYSTEM.CHANNEL.SYNCQ
SYSTEM.CLUSTER.COMMAND.QUEUE
SYSTEM.CLUSTER.REPOSITORY.QUEUE
SYSTEM.COMMAND.INPUT
SYSTEM.QSG.CHANNEL.SYNCQ
SYSTEM.QSG.TRANSMIT.QUEUE
Programmer response
Specify MQACT_FORCE_REMOVE as the value of the Action parameter.
Programmer response
Install the library for the required communications protocol, or specify a communications protocol that
has already been installed.
Programmer response
Add a local name to the configuration file and retry the operation.
1099
Programmer response
Diagnose the problem using the provided information and issue a corrected command.
For more information, look at the WebSphere MQ error logs.
Programmer response
Consult the description of the parameter identified to ascertain the nature of the conflict, and the correct
command.
Programmer response
Specify a valid path.
Programmer response
Check the syntax for this parameter.
1100
The password string length is rounded up by to the nearest eight bytes. This rounding causes the total
length of the SSLCryptoHardware string to exceed its maximum.
Programmer response
Decrease the size of the password, or of earlier fields in the SSLCryptoHardware string.
Programmer response
1. Correct the specification of the filter parameter structure in the inquire command message.
2. Correct the syntax of the filter expression in the publish/subscribe command message. The filter
expression is the value of the Filter tag in the psc folder in the MQRFH2 structure. See the Websphere
MQ Integrator V2 Programming Guidefor details of valid syntax.
Programmer response
Ensure that applications that need to issue commands against existing subscriptions are running under
the user identifier that originally registered the subscription. Alternatively, use different subscriptions for
different users.
Programmer response
Either modify the new subscription properties to distinguish it from the existing subscription or
deregister the existing subscription. Then reissue the command.
1101
Either the subscription name is of an invalid format or a matching subscription already exists with no
subscription name.
Programmer response
Either correct the subscription name or remove it from the command and reissue the command.
Programmer response
Either correct the identity value or specify a Join registration option to add this identity to the identity set
for this subscription.
Programmer response
Reissue the command when you are the only member of the identity set. To avoid the identity set check
and force the modification or deregistration remove the subscription identity from the command message
and reissue the command.
Programmer response
Wait for this identity to release the exclusive lock.
1102
Programmer response
None. The command completed, this reason code is a warning.
Programmer response
Retry the command.
Programmer response
Provide a valid file name or create a CSD definition for the required file.
Programmer response
Check that the CSD definition for the file is correct and enabled.
Programmer response
Specify a valid count.
1103
Programmer response
Specify a valid count.
Programmer response
Specify a valid timer value.
Programmer response
Specify a valid value.
Programmer response
Specify a valid port number value.
1104
Programmer response
Activate the channel system before starting a channel.
Programmer response
Specify the required parameter.
Programmer response
Specify a valid name.
Programmer response
Specify a valid value.
Programmer response
Specify the required parameter.
1105
Programmer response
Specify the required parameter.
Programmer response
Specify a valid connection id.
Programmer response
Specify a valid log type value.
Programmer response
Check that the correct name is specified in the definition of the service, and that the program is in the
appropriate libraries, before retrying the request.
1106
A request to start or stop a service failed because the user does not have sufficient access authority to
start the program at the specified location.
Programmer response
Correct the progam name and location, and the user's authority, before retrying the request.
Programmer response
For information about resolving the problem, see the explanations of messages CSQH003I and CSQH004I.
1107
Programmer response
Reissue the command with correct parameters and values.
Programmer response
Remove the messages from the queue, or wait until any other threads have closed the queue.
1108
The command used a reserved object name with an incorrect object type or subtype. The object is only
allowed to be of a predetermined type, as listed in the explanation of message CSQM108I.
Programmer response
Delete any existing queues that are no longer required.
Programmer response
Wait until the object is not in use. Alternatively specify Force as MQFC_YES for a change command.
Programmer response
Reissue the command with correct parameters and values.
1109
Programmer response
Reissue the command correctly.
Programmer response
To change the parameter, the object must be deleted and then created again with the new value.
Programmer response
Reissue the command specifying a namelist that is not empty and has a suitable type.
1110
It is already active.
There are insufficient system resources.
The queue manager was shutting down.
v The shared channel cannot be started because there was no suitable channel initiator available for any
active queue manager in the queue-sharing group. This could be because:
No channel initiators are running.
The channel initiators that are running are too busy to allow any channel, or a channel of the
particular type, to be started.
Programmer response
Use the Change Queue manager command to enable the events if required.
Programmer response
Notify your system programmer.
1111
Programmer response
The most likely cause is insufficient storage. If the problem persists, you may need to restart the queue
manager after making more storage available.
A parameter
A parameter
A parameter
A parameter
that
that
that
that
is
is
is
is
always required.
one of a set of two or more alternative required parameters.
required because some other parameter was specified.
a list of values which has too few values.
The parameter in question might be returned in the message (with parameter identifier
MQIACF_PARAMETER_ID).
Programmer response
Reissue the command with correct parameters and values.
1112
Programmer response
Reissue the command with correct parameters and values.
Programmer response
Notify your system programmer.
Programmer response
Reissue the command with correct values, if required.
1113
Programmer response
For information about the error, see the explanation of the corresponding error message. Error nnn
generally corresponds to message CSQXnnn, although there are some exceptions.
Programmer response
In the case of a Backup CF Structure or Recover CF Structure command, take action appropriate to the
CF structure status reported.
In other cases, check for error messages on the console log that might relate to the problem. Check
whether the coupling facility structure has failed and check that DB2 is available.
1114
A user identifier specified in a Reverify Security command was not valid because there was no entry
found for it in the internal control table. This could be because the identifier was entered incorrectly in
the command, or because it was not in the table (for example, because it had timed-out). The user
identifier in question might be returned in the message (with parameter identifier
MQCACF_USER_IDENTIFIER).
Programmer response
Notify your system programmer.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid structure length.
1115
Programmer response
Specify a valid operator value.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid length.
Programmer response
Specify a valid structure length.
1116
Programmer response
Specify a valid operator value.
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify the command correctly.
Programmer response
Stop the listener if required.
Programmer response
None, unless this is unexpected, in which case consult your systems administrator.
1117
Programmer response
Stop the service if required.
Programmer response
None, unless this is unexpected, in which case consult your systems administrator.
Programmer response
Check for and remove duplicate parameters.
Programmer response
Specify a valid structure length.
1118
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid string length for the parameter.
Programmer response
Specify a valid structure length.
Programmer response
Specify a valid count for the parameter.
1119
Programmer response
Wait until the current request completes, then reissue the command if necessary.
Programmer response
Correct the definition of the service.
Programmer response
Correct the definition of the service.
Programmer response
Specify a valid structure length.
1120
Programmer response
Specify a valid parameter identifier.
Programmer response
Specify a valid length.
Programmer response
Specify a valid operator value.
Programmer response
Wait for the active connections to the listener to complete before trying the request again.
Programmer response
Change the value of the Default Transmission Queue, and try the command again.
1121
Programmer response
Verify that the topic string used is correct.
Programmer response
Correct the value used in the PCF SharingConversations (MQCFIN) parameter; see Change, Copy, and
Create Channel for more information.
Programmer response
See Change, Copy, and Create Channel to ensure that the channel type is compatible with the
SharingConversations parameter.
Programmer response
Check that the class used is set up correctly and that the system setting is correct. If a change in case
setting is required, issue the REFRESH SECURITY(*) command to change all classes.
Programmer response
Correct the TopicType parameter and reissue the command. For more details on the TopicType, see
Change, Copy, and Create Topic.
Programmer response
See Change, Copy, and Create Channel for more information and correct the PCF application.
1122
Programmer response
See Change, Copy, and Create Channel for the range of values and correct the application.
Programmer response
Verify the topic string is correct.
Programmer response
Use a subscription point that matches the topic string of a topic object listed in the
SYSTEM.QPUBSUB.SUBPOINT.NAMELIST (or remove the subscription point parameter and this uses the
default subscription point)
Programmer response
If you are trying to copy an existing subscription, ensure that the ToSubscriptionName parameter contains
a unique value. If you are trying to create a Subscription ensure that the combination of the SubName
parameter, and TopicObject parameter or TopicString parameter are unique.
Completion Code
MQCC_FAILED
Troubleshooting and support
1123
Programmer Response
Durable subscriptions are stored on the SYSTEM.DURABLE.SUBSCRIBER.QUEUE. Ensure that this queue
is available for use. Possible reasons for failure include the queue being full, the queue being put
inhibited, the queue not existing, or (on z/OS) the pageset the queue is defined to use doesn't exist.
If the topic subscribed to is defined as DURSUB(NO) either alter the administrative topic node to use
DURSUB(YES) or use the MQSO_NON_DURABLE option instead.
If the topic subscribed to is defined as MCAST(ONLY) when using WebSphere MQ Multicast messaging,
alter the topic to use DURSUB(NO).
Programmer response
Investigate and correct the required parameters for the specific command you are using. For more details,
see Change, Copy, and Create Subscription.
Completion Code
MQCC_FAILED
Programmer response
If this queue manager does not intentionally inhibit publish/subscribe, investigate any error messages
that describe the failure at queue manager start-up, or wait until start-up processing completes. You can
use the DISPLAY PUBSUB command to check the status of the publish/subscribe engine to ensure it is
ready for use, and additionally on z/OS you will receive an information message CSQM076I.
Programmer response
Specify a valid type.
1124
Programmer response
Specify a valid action.
Programmer response
Specify a valid user source.
Programmer response
Remove the parameter.
Programmer response
Specify action as MQACT_REPLACE.
Programmer response
Specify a channel authentication record that exists.
1125
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Specify a valid value for warn.
Programmer response
Remove the parameter.
1126
Programmer response
Specify a range that is a superset or subset of an existing range, or is completely separate to all existing
ranges.
Programmer response
Remove some channel authentication records to make room.
Programmer response
Specify a valid IP address or pattern.
Related information:
Generic IP addresses
Programmer response
Specify a valid range in the IP address.
Programmer response
Specify a valid profile name.
1127
Programmer response
Specify a valid value for the client user field.
Programmer response
Enter a single asterisk in the channel name.
Explanation
An Inquire Channel Authentication Record command using MQMATCH_RUNCHECK was issued, but
one or more of the input fields on the command were provided with generic values, which is not
allowed.
Programmer response
Enter non-generic values for channel name, address, one of the client user ID or remote queue manager
and SSL Peer Name if used.
Explanation
An invalid combination of values has been specified for the MQIA_SUITE_B_STRENGTH parameter.
Programmer response
Review the combination entered and retry with appropriate values.
Programmer response
Modify the application to set the CLCHNAME to blanks, or not set the CLCHNAME attribute at all, on queues
other than transmission queues.
1128
Explanation
An invalid certificate validation policy value was specified for the MQIA_CERT_VAL_POLICY attribute. The
specified value is unknown or is not supported on the current platform.
Programmer response
Review the value specified and try again with an appropriate certificate validation policy.
Programmer response
Specify Replace as MQRP_YES, or use a different name for the object to be created.
Programmer response
Ensure that the specified object is the same subtype and disposition.
Programmer response
Ensure that the new object has the same subtype as the one on which it is based.
1129
Programmer response
Wait until the object is not in use, and then retry the operation. Alternatively specify Force as MQFC_YES
for a change command.
Programmer response
Specify the attribute values correctly.
Programmer response
Specify the name of the queue manager to which the command is sent, or blank.
Programmer response
Specify a queue of the correct type.
Programmer response
Specify only valid characters for the name.
1130
Programmer response
Ensure that the channel definition is correct, and start the listening program if necessary. If the error
persists, consult your systems administrator.
Programmer response
Ensure that the listening program is running, and retry the operation.
Programmer response
Identify the error and take appropriate action.
1131
The attempt to establish a connection to a remote system was rejected. The remote system might not be
configured to allow a connection from this system.
v For LU 6.2 either the user ID or the password supplied to the remote system is incorrect.
v For TCP the remote system might not recognize the local system as valid, or the TCP listener program
might not be started.
Programmer response
Correct the error or restart the listener program.
Programmer response
Ensure that the connection name is correctly specified and that the name server is available.
Programmer response
Consult your systems administrator.
Programmer response
Consult your systems administrator.
1132
Programmer response
Correct the error and retry the operation.
Programmer response
Contact your systems administrator.
Programmer response
Consult your systems administrator.
Programmer response
Ensure that the communications subsystem has been started.
Programmer response
Ensure the communications subsystem is started or retry the operation later. Increase the number of
current channels allowed, if appropriate.
1133
Programmer response
Consult your systems administrator.
Programmer response
Examine the status of the channel, and either restart a channel to resolve the in-doubt state, or resolve the
channel.
Programmer response
Check whether the queue manager is active.
Programmer response
Check whether the queue manager is active, and the queues involved are correctly set up.
Programmer response
Check whether the queue manager is active, and the queues involved are correctly set up, and enabled
for MQGET.
1134
Programmer response
Check whether the queue manager is active, and the queues involved are correctly set up, and not
inhibited for puts.
Programmer response
Reissue the ping request for a different channel of the correct type, or for a receiver channel from a
different queue manager.
Programmer response
Stop the channel or wait for it to terminate.
Programmer response
Specify the name of a channel which exists.
1135
Programmer response
Ensure that the local channel is correctly defined. If it is, add an appropriate channel definition at the
remote system.
Programmer response
Start the remote queue manager.
Programmer response
Restart the remote queue manager.
Programmer response
Check whether the queue manager is active.
Programmer response
Ensure that the queue is specified correctly in the channel definition, and that it is correctly defined to the
queue manager.
1136
Programmer response
Start the channel.
Programmer response
Ensure that the user exit is correctly specified and the program is available.
Programmer response
Consult your systems administrator.
Programmer response
Remove the parameter.
1137
Programmer response
Specify Replace as MQRP_YES or use a different name for the channel to be created.
Programmer response
Reduce the size of the data.
Programmer response
Specify a valid name.
Programmer response
Specify a valid name, or add the parameter.
Programmer response
Specify a valid name.
1138
Programmer response
Specify a valid name.
Programmer response
Specify a valid name.
Programmer response
Specify a valid name.
Programmer response
Specify a valid name.
1139
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
1140
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Remove the parameter.
Programmer response
Add the parameter.
1141
Programmer response
Specify a valid connection name.
Programmer response
Check whether the queue manager is active.
Programmer response
No action is required.
Programmer response
Check that the channel is attempting to connect to the correct queue manager, and if so that the security
exit is specified correctly, and is working correctly, at both ends.
1142
Programmer response
Predefine the queue if it is to have cell scope.
Programmer response
Configure the queue manager with a suitable name service.
Programmer response
Specify a value in the range 0-999 999 999.
Programmer response
Remove the parameter.
Programmer response
Specify a valid name.
1143
Programmer response
Remove the parameter.
Programmer response
Specify a value in the range 0-999 999 999.
Programmer response
Remove the parameter.
Programmer response
Specify MQNPMS_NORMAL or MQNPMS_FAST.
1144
Programmer response
Remove the parameter.
Programmer response
Specify a value in the range 0-999 999.
Programmer response
Remove the parameter.
Programmer response
Specify MQCHAD_ENABLED or MQCHAD_DISABLED.
Programmer response
Remove the parameter.
1145
Programmer response
Specify MQEVR_ENABLED or MQEVR_DISABLED.
Programmer response
Remove the parameter.
Programmer response
Specify a valid name.
Programmer response
Remove the parameter.
1146
An attempt was made to define a channel automatically, but this was inhibited by the channel automatic
definition exit. The AuxErrorDataInt1 parameter contains the feedback code from the exit indicating why
it inhibited the channel definition.
Programmer response
Examine the value of the AuxErrorDataInt1 parameter, and take any action that is appropriate.
Programmer response
Specify a valid batch interval value.
Programmer response
Remove the parameter.
Programmer response
Specify a valid value.
Programmer response
Remove the parameter.
1147
Programmer response
Determine the reason that the channel was closed prematurely. Restart the channel if required.
Programmer response
Specify a valid cipher specification.
Programmer response
Specify a valid peer name.
Programmer response
Specify a valid client authentication.
1148
An attempt has been made to use retained messages on a publish/subscribe stream defined to be
restricted to JMS usage. JMS does not support the concept of retained messages and the request is
rejected.
Programmer response
Either modify the application not to use retained messages, or modify the broker JmsStreamPrefix
configuration parameter so that this stream is not treated as a JMS stream.
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) return
codes
WebSphere MQ can use Secure Sockets Layer (SSL) with the various communication protocols. Use this
topic to identify the error codes that can be returned by SSL.
The table in this appendix documents the return codes, in decimal form, from the Secure Sockets Layer
(SSL) that can be returned in messages from the distributed queuing component.
If the return code is not listed, or if you want more information, see the IBM Global Security Kit return
codes here: http://publib.boulder.ibm.com/infocenter/tivihelp/v2r1/topic/com.ibm.itame.doc_6.1/
am61_messages25.htm?.
Table 72. SSL return codes
Return code
(decimal)
Explanation
No certificates available.
10
11
12
102
103
106
109
201
202
203
204
302
Connection is active.
401
402
403
1149
Explanation
405
406
407
408
410
411
412
413
414
415
416
Permission denied.
417
420
421
422
427
428
429
431
Certificate is revoked.
432
433
434
435
436
437
Connection closed.
438
439
501
502
503
504
505
Record overflow.
601
602
701
702
703
704
705
1150
Explanation
706
707
708
1501
GSK_SC_OK
1502
GSK_SC_CANCEL
1601
1602
1603
1604
1605
Trace file cannot be opened. The first parameter of gsk_start_trace() must be a valid full path
filename.
In some cases, the secure sockets library reports a certificate validation error in an AMQ9633 error
message. Table 2 lists the certificate validation errors that can be returned in messages from the
distributed queuing component.
Table 73. Certificate validation errors.
A table listing return codes and explanations for certificate validation errors that can be returned in messages from
the distributed queuing component.
Return code
(decimal)
Explanation
575001
Internal error
575002
575003
Cryptographic error
575004
575005
Directory error
575006
575008
No appropriate validator
575009
575010
575011
575012
575013
575014
575015
575016
575017
575018
575019
575020
575021
The issuers directory name does not match the issuer's issuer
Troubleshooting and support
1151
Explanation
575022
The Authority Key ID serial number value does not match the serial number of the issuer
575023
575024
575025
575026
The certificate has a non-zero Basic Constraints path length but is not a CA
575027
575028
575029
575030
575031
575032
575033
575034
575035
575036
575037
575038
575039
575040
575041
575042
575043
575044
575045
575046
575047
575048
Unique ID mismatch
575049
575050
Name excluded
575051
575052
575053
575054
575055
575056
575057
575058
1152
Explanation
575059
575060
575061
575062
575063
575064
575065
575066
575067
575068
Related reference:
API completion and reason codes on page 856
For each call, a completion code and a reason code are returned by the queue manager or by an exit
routine, to indicate the success or failure of the call.
PCF reason codes on page 1072
Reason codes might be returned by a broker in response to a command message in PCF format,
depending on the parameters used in that message.
WCF custom channel exceptions
Diagnostic messages are listed in this topic in numeric order, grouped according to the part of the WCF
custom channel from which they originate.
Related information:
Diagnostic messages: AMQ4000-9999
Reading a message
For each message, this information is provided:
v The message identifier, in two parts:
1. The characters "WCFCH" which identify the message as being from the WCF custom channel for
WebSphere MQ
2. A four-digit decimal code followed by the character 'E'
v The text of the message.
v An explanation of the message giving further information.
v The response required from the user. In some cases, particularly for information messages, the response
required might be "none".
1153
Message variables
Some messages display text or numbers that vary according to the circumstances causing the message to
occur; these circumstances are known as message variables. The message variables are indicated as {0}, {1},
and so on.
In some cases a message might have variables in the Explanation or Response. Find the values of the
message variables by looking in the error log. The complete message, including the Explanation and the
Response, is recorded there.
The following message types are described:
WCFCH0001E-0100E: General/State messages
WCFCH0101E-0200E: URI Properties messages on page 1155
WCFCH0201E-0300E: Factory/Listener messages on page 1157
WCFCH0301E-0400E: Channel messages on page 1158
WCFCH0401E-0500E: Binding messages on page 1160
WCFCH0501E-0600E: Binding properties messages on page 1161
WCFCH0601E-0700E: Async operations messages on page 1161
Related reference:
API completion and reason codes on page 856
For each call, a completion code and a reason code are returned by the queue manager or by an exit
routine, to indicate the success or failure of the call.
PCF reason codes on page 1072
Reason codes might be returned by a broker in response to a command message in PCF format,
depending on the parameters used in that message.
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) return codes on page 1149
WebSphere MQ can use Secure Sockets Layer (SSL) with the various communication protocols. Use this
topic to identify the error codes that can be returned by SSL.
WCF custom channel exceptions on page 1153
Diagnostic messages are listed in this topic in numeric order, grouped according to the part of the WCF
custom channel from which they originate.
Related information:
Diagnostic messages: AMQ4000-9999
1154
Response
Use the standard facilities supplied with your system to record the problem identifier and to save
any generated output files. Use either the WebSphere MQ support web page, or theIBM
SupportAssistant web page, to see if a solution is already available. If you cannot find a match,
contact your IBM support center. Do not discard these files until the problem has been resolved.
WCFCH0003E
An object cannot be used because its state is '{0}'.
Explanation
An internal error has occurred.
Response
Use the standard facilities supplied with your system to record the problem identifier and to save
any generated output files. Use either the WebSphere MQ support web page, or theIBM
SupportAssistant web page, to see if a solution is already available. If you cannot find a match,
contact your IBM support center. Do not discard these files until the problem has been resolved.
WCFCH0004E
The specified 'Timeout' value '{0}' is out of range.
Explanation
The value is out of range, it must be greater than or equal to 'TimeSpan.Zero'.
Response
Specify a value which is in range or, to disable Timeout, specify a 'TimeSpan.MaxValue' value.
WCFCH0005E
The operation did not complete within the specified time of '{0}' for endpoint address '{1}'.
Explanation
A timeout occurred.
Response
Investigate the cause for the timeout.
WCFCH0006E
The parameter '{0}' is not of the expected type '{1}'
Explanation
A parameter with an unexpected type has been passed to a method call.
Response
Review the exception stack trace for further information.
WCFCH0007E
The parameter '{0}' must not be null.
Explanation
A method has been called with a required parameter set to a null value.
Response
Modify the application to provide a value for this parameter.
WCFCH0008E
An error occurred while processing an operation for endpoint address '{0}'.
Explanation
The operation failed to complete.
Response
Review the linked exceptions and stack trace for further information.
1155
WCFCH0101E
The endpoint URI must start with the valid character string '{0}'.
Explanation
The endpoint URI is incorrect, it must start with a valid character string.
Response
Specify an endpoint URI which starts with a valid character string.
WCFCH0102E
The endpoint URI must contain a '{0}' parameter with a value.
Explanation
The endpoint URI is incorrect, a parameter and its value are missing.
Response
Specify an endpoint URI with a value for this parameter.
WCFCH0103E
The endpoint URI must contain a '{0}' parameter with a value of '{1}'.
Explanation
The endpoint URI is incorrect, the parameter must contain the correct value.
Response
Specify an endpoint URI with a correct parameter and value.
WCFCH0104E
The endpoint URI contains a '{0}' parameter with an invalid value of '{1}'.
Explanation
The endpoint URI is incorrect, a valid parameter value must be specified.
Response
Specify an endpoint URI with a correct value for this parameter.
WCFCH0105E
The endpoint URI contains a '{0}' parameter with an invalid queue or queue manager name.
Explanation
The endpoint URI is incorrect, a valid queue and queue manager name must be specified.
Response
Specify an endpoint URI with valid values for the queue and the queue manager.
WCFCH0106E
The '{0}' property is a required property and must appear as the first property in the endpoint
URI.
Explanation
The endpoint URI is incorrect, a parameter is either missing or in the wrong position.
Response
Specify an endpoint URI which contains this property as the first parameter.
WCFCH0107E
The property '{1}' cannot be used when the binding property is set to '{0}'.
Explanation
The endpoint URI connectionFactory parameter is incorrect, an invalid combination of properties
has been used.
Response
Specify an endpoint URI connectionFactory which contains a valid combination of properties or
binding.
1156
WCFCH0109E
Property '{1}' must also be specified when property '{0}' is specified.
Explanation
The endpoint URI connectionFactory parameter is incorrect, it contains an invalid combination of
properties.
Response
Specify an endpoint URI connectionFactory which contains a valid combination of properties.
WCFCH0110E
Property '{0}' has an invalid value '{1}'.
Explanation
The endpoint URI connectionFactory parameter is incorrect, the property does not contain a valid
value.
Response
Specify an endpoint URI connectionFactory which contains a valid value for the property.
WCFCH0111E
The value '{0}' is not supported for the binding mode property. XA operations are not supported.
Explanation
The endpoint URI connectionFactory parameter is incorrect, the binding mode is not supported.
Response
Specify an endpoint URI connectionFactory which contains a valid value for the binding mode.
WCFCH0112E
The endpoint URI '{0}' is badly formatted.
Explanation
The endpoint URI must follow the format described in the documentation.
Response
Review the endpoint URI to ensure that it contains a valid value.
1157
Response
Change the parameter value to 'Explicit'.
WCFCH0204E
SSL is not supported for managed client connections [endpoint URI: '{0}'].
Explanation
The endpoint URI specifies an SSL connection type which is only supported for unmanaged client
connections.
Response
Modify the channels binding properties to specify an unmanaged client connection mode.
1158
Explanation
The operation could not be completed.
Response
Review the linked exception for further details.
WCFCH0307E
An error occurred while attempting to send data for endpoint '{0}'
Explanation
The operation could not be completed.
Response
Review the linked exception for further details.
WCFCH0308E
An error occurred while attempting to close the channel for endpoint '{0}'
Explanation
The operation could not be completed.
Response
Review the linked exception for further details.
WCFCH0309E
An error occurred while attempting to open the channel for endpoint '{0}'
Explanation
The operation could not be completed.
Response
The endpoint might be down, unavailable, or unreachable, review the linked exception for further
details.
WCFCH0310E
The timeout '{0}' was exceeded while attempting to receive data from endpoint '{0}'
Explanation
The operation did not complete in the time allowed.
Response
Review the system status and configuration and increase the timeout if required.
WCFCH0311E
The timeout '{0}' was exceeded while attempting to send data for endpoint '{0}'
Explanation
The operation did not complete in the time allowed.
Response
Review the system status and configuration and increase the timeout if required.
WCFCH0312E
The timeout '{0}' was exceeded while attempting to close the channel for endpoint '{0}'
Explanation
The operation did not complete in the time allowed.
Response
Review the system status and configuration and increase the timeout if required.
WCFCH0313E
The timeout '{0}' was exceeded while attempting to open the channel for endpoint '{0}'
Explanation
The operation did not complete in the time allowed.
Troubleshooting and support
1159
Response
The endpoint might be down, unavailable, or unreachable, review the system status and
configuration and increase the timeout if required.
1160
1161
1162
Index
A
ABEND keyword 841
access control 215, 315, 355
API exit 361
authority to administer WebSphere
MQ 206
authority to work with WebSphere
MQ objects 207
introduction 162
user written message exit 360
user written security exit 359
access settings 317, 321, 322
accessing CRLs
Java client and JMS 314
queue manager 311
WebSphere MQ MQI client 313
Windows 312
accounting
message
format 618
accounting monitoring
MQI messages 621
queue messages 632
Active Directory
specifying that an MQI channel uses
SSL 187
activity report
activity report message data 574
format 565
message data, operation specific
content 585
message descriptor 567
activity reports
application control 529
controlling activity recording 528
queue manager control 528
requesting 528
use for 527
adding data items to bags 46
adding inquiry command 46
addresses
IP
blocking 338
administering 453
administration
authority 352
description of 1
local, definition of 3
MQAI, using 16
MQSC commands 69
remote administration, definition
of 4
remote objects 102
using the WebSphere MQ
Explorer 52
writing Eclipse plug-ins 64
administration bag 42
administrative topic
changing queue attributes, commands
to use 89
deleting 90
Copyright IBM Corp. 2007, 2014
administrative topics
copying an administrative topic
definition 89
Advanced Message Security 222
AIX operating system
creating and managing groups 244
MQAI support 15
tracing 813, 815
alert monitor application, using 64
algorithms for queue service interval
events 488
alias queues
DEFINE QALIAS command 85
defining alias queues 85
remote queues as queue manager
aliases 112
reply-to queues 112
working with alias queues 85
aliases
queue manager aliases 112
working with alias queues 85
alternate user authority
introduction 210
server application 360
alternate-user authority 358
amqsaicl.c, sample programs 30
amqsaicq.c, sample programs 17
amqsaiem.c, sample programs 22
amqsailq.c, sample programs 36
APAR 840
definition 851
number 853
raising 852
application level security
comparison with link level
security 217
introduction 221
providing your own 223
ARL 306
asymmetric cryptography algorithm 163
attributes 457
changing administrative topic
attributes 89
changing local queue attributes 82,
92
channel definition commands
PUTAUT 399
LIKE attribute, DEFINE
command 81, 89, 92
queue manager 77
authentication 266
API exit 305
application level security service,
example 222
digital signature 176
introduction 161
link level security service,
example 220
SNA LU 6.2
conversation level
authentication 234
authentication (continued)
SNA LU 6.2 (continued)
session level authentication 233
SSL 173
SSPI channel exit program 261
user written message exit 304
user written security exit 303
authentication information object
(AUTHINFO)
manipulating 315
authority
administration 352
alternate-user 358
context 358
authority checking (PCF) 12
HP Integrity NonStop Server 12
UNIX systems 12
Windows NT 12
z/OS systems 12
authority checks
alternate user authority 210
CL command in Group 2 208
message context 210
MQCLOSE call 208
MQCONN call 208
MQCONNX call 208
MQOPEN call 208
MQPUT1 call 208
PCF command 208
Authority Revocation List (ARL) 306
authority to administer WebSphere
MQ 206
authority to work with WebSphere MQ
objects 207
authorization service 211
authorizations
MQI 248
specification tables 247
automatic definition of channels 107
B
bags
adding data items to 46
adding inquiry command to 46
changing information within 48
changing integer items within 48
converting 49
creating 44
creating and deleting 44
deleting 44
inquiring within 47
putting 44
receiving 44
types of 42
using 42
block cipher algorithm 163
blocking
IP addresses 338
user IDs 339
1163
C
CA 166
CA certificate
adding, UNIX 276, 288
extracting 286
calls
mqAddInquiry 46
mqClearBag 49
mqCreateBag 44
mqDeleteBag 44
mqDeleteItem 50
mqExecute 51
mqPutBag 8, 9
mqSetInteger 48
mqTruncateBag 49
certificate
chain 169
untrustworthy
in CRL 306
when changes are effective
UNIX 279
Certificate Authority
digital certificates 166
introduction 167
public key infrastructure (PKI) 171
working with Certificate Revocation
Lists 306
certificate labels, understanding the
requirements of 381
certificate revocation list (CRL) 313
Certificate Revocation List (CRL)
accessing
Java client and JMS 314
queue manager 311
WebSphere MQ Explorer 312
WebSphere MQ MQI client 313
working with 306
certificate store
Windows key repository 181
certificates 447
expiry 170
untrustworthy
introduction 170
certification path 169
change team 851
changing
administrative topic attributes 89
local queue attributes 82, 92
queue manager attributes 77
changing information within data
bags 48
changing integer items within data
bags 48
changing key repository
UNIX 277
channel
events
controlling 481
1164
channel (continued)
refuses to run 824
startup negotiation errors 823
switching 827
channel control error messages 822
channel event
queue 477
channel exit programs
introduction 223
message exit
introduction 224
providing your own link level
security 221
receive exit
introduction 225
providing your own link level
security 221
security exit
introduction 224
providing your own link level
security 220
SSPI 261
send exit
introduction 225
providing your own link level
security 221
SSPI 261
channel exits
security 229
channel refuses to run 824
channel startup negotiation errors 823
channel statistics message data 660
channels
administering a remote queue
manager from a local one 104
auto-definition of 107
defining channels for remote
administration 106
description of 102
escape command authorizations 251
exits 229
granting administrative access 326,
331
preparing channels for remote
administration 105
remote queuing 102
security 228
starting 107
cipher algorithm
block 163
stream 163
cipher strength 163
CipherSpec
alternatives for specifying 376, 397
introduction 175
obtaining information using
WebSphere MQ Explorer 375, 396
specifying for WebSphere MQ MQI
client 376, 398
working with 187
CipherSuite
introduction 175
specifying for Java client and
JMS 377, 398
ciphertext 163
CL commands
accessing WebSphere MQ objects 207
CL commands (continued)
Group 2
authority checks 208
clearing a bag 49
clearing a local queue 82
client asserted user ID
blocking channel access 342
client channel definition table
specifying that an MQI channel uses
SSL 187
clients, problem determination 827
cluster
keeping secure 398
preventing queue managers
joining 400
clusters
cluster membership, the WebSphere
MQ Explorer 60
description of 103
remote queuing 102
security 236
showing and hiding, WebSphere MQ
Explorer 59
clusters, use of
security 398
collecting documentation 851
command
events
controlling 483
command bag 42
command events 506
command files 73
command queues
command server status 107
mandatory for remote
administration 105
command server
displaying status 107
remote administration 107
starting a command server 107
stopping a command server 107
command sets
MQSC commands 69
command string
entering quotes 70
preserving case 70
commands
dmpmqaut 317, 321
dspmqaut 322
issuing MQSC commands using an
ASCII file 69
rules for building 69
rules for using 69
runmqsc command, to issue MQSC
commands 69
setmqaut 316
synonym 70
verifying MQSC commands 73
component identifier
list of 844
concepts and terminology 16
confidentiality
application level security service,
example 222
cryptography 163
introduction 163
confidentiality (continued)
link level security service,
example 220
SNA LU 6.2 session level
cryptography 232
SSL 173
user written security exit 378
configuration
events
controlling 483
using distributed queuing on
WebSphere MQ
object security 213
object security UNIX systems 214
object security Windows
systems 214
user IDs across systems 214
configuration events 502
configuring
certificates 447
configuring LDAP servers 310
connecting applications
using distributed queuing on
distributed platforms
object security 213
object security UNIX systems 214
object security Windows
systems 214
user IDs across systems 214
connection
switching 827
connection security
setting up 344
connectivity
removing
queue manager 336
context authority 358
control commands 207
runmqsc, using interactively 71
control Language, IBM i 1
controlling
channel events 481
command events 483
configuration events 483
events 480
logger events 483
performance events 482
queue manager events 481
controlling activity recording 528
conversion failure, problem
determination 825
converting bags and buffers 49
counting data items 50
creating
a transmission queue 111
creating a local queue, sample
programs 17
creating data bags 44
CRL 306, 313
cryptographic hardware
configuring on UNIX 294
cryptographic protection 457
cryptography
algorithm 163
introduction 163
CSECT keyword 840
CSQUDLQH utility 207
D
data
response 10
data bags
adding data items to 46
adding inquiry command to 46
changing information within 48
changing integer items within 48
converting 49
creating 44
creating and deleting 44
deleting 44
inquiring within 47
putting 44
receiving 44
types of 42
using 42
data conversion
application level security 223
Data Encryption Standard (DES)
algorithm
SNA LU 6.2 security services 232
Message Authentication Code (MAC)
SNA LU 6.2 conversation level
authentication 236
SNA LU 6.2 session level
authentication 233
data integrity
application level security service,
example 222
cryptography 163
link level security service,
example 220
message digests 165
SSL 173
data items
counting 50
deleting 50
filtering 47
querying 47
types of 45
data types, detailed description
activity report
MQCFH 572
MQEPH 571
MQMD 567
trace-route message
MQCFH 597
MQEPH 596
MQMD 592
trace-route reply message
MQCFH 603
MQMD 602
DDNS
registration time for 825
dead letter queue handler utility
(CSQUDLQH) 207
dead-letter queue
problem determination 822
processing 822
dead-letter queues
defining a dead-letter queue 80
decipherment 163
decryption 163
default configuration, Windows
systems 1
default transmission queues 111
defining
a model queue 86
an alias queue 85
deleting
a local queue 82
a subscription 93
administrative topic 90
deleting data items 50
deletingdata bags 44
DES 232
determining current queue depth 81
diagnostics
Java 818
dial-up support 825
digital certificate
Certificate Authority 167
certificate chain 169
content 166
Distinguished Name (DN) 167
introduction 166
key repository 181
label on UNIX 273
label on Windows 273
public key infrastructure (PKI) 171
SSL authentication 173
SSL handshake 180
digital certificates
expiry 170
untrustworthy 170
digital signature
introduction 176
SSL integrity 173
disabling
channel events 481
command events 483
configuration events 483
events 480
logger events 483
performance events 482
queue manager events 481
disabling connectivity to queue
managers 336
disabling remote access to queue
managers 343
disaster recovery 826
display
attributes of subscriptions 91
default object attributes 80, 88
process definitions 100
queue manager attributes 77
status of command server 107
Distinguished Name
blocking channel access 342
Distinguished Name (DN)
introduction 167
distinguished names 455
distributed queuing, incorrect
output 757
dmpmqaut command 213
DN 167, 455
DOC keyword 840, 841
documentation
required for a PMR 851
Index
1165
documentation (continued)
sending PMR documentation 852
domain controller
security 263
dspmqaut command 213
dspmqspl 459, 460
dspmqtrc trace command 813
dynamic definition of channels 107
E
eavesdropping 163
embedded header
activity report 571
trace-route message 596
enabling
activity recording 528
applications for activity
recording 529
channel events 481
command events 483
configuration events 483
events 480
logger events 483
performance events 482
Queue Depth events 496
queue manager events 481
queue managers for activity
recording 528
queue managers for trace-route
messaging 535
queue service interval events 489
encipherment 163
encryption
algorithm, configuration 454
CipherSpecs 187
introduction 163
SSL confidentiality 173
end-to-end security 221
ending
interactive MQSC commands 71
endmqtrc trace command 812, 813
environment variables
MQ_USER_ID 216
MQS_TRACE_OPTIONS 813
error
at remote sites 822
logs 828
message from channel control 822
on channels 477
on event queues 478
recovery 821
response 10
error logs
description of 809
error messages, MQSC commands 71
Escape PCF commands 207
event 474
attribute setting 480
channel 477
command 479
configuration 478
controlling 480
controlling channel 481
controlling command 483
controlling configuration 483
controlling logger 483
1166
event (continued)
controlling performance 482
controlling queue manager 481
data 485
enabling and disabling 480
instrumentation example 515
logger 479
message
data summary 479
messages
event queues 474
format 484
lost 483
unit of work 478
queue depth
Queue Depth High 495
Queue Depth Low 495
Queue Full 495
queue manager 475
queues
errors 478
names for 474
transmission 483
triggered 483
unavailable 483
use of 474
reporting 474
service interval 486
shared queues (WebSphere MQ for
z/OS) 478
statistics
example 1 summary 492
example 2 summary 493
resetting 486
timer 488
transmission queues, as event
queues 483
use for 472
event monitor, sample programs 22
events
command 506
logger 508
examples
creating a transmission queue 111
instrumentation event 515
queue depth events 498
queue service interval events 490
exits
security 205
expiry of digital certificates 170
F
failure keywords 841
feedback, MQSC commands 71
FFST (first-failure support technology)
UNIX systems 832
Windows NT 829
filtering data items 47
FIPS 183
format of accounting and statistics
messages 618
format of event messages 484
free keyword format 841
full administrative access
to queue manager 335
functions of MQ AMS 423
G
generic profile 213
generic profiles, OAM 317
group bag 42
groups
security 356
gsk7ikm on UNIX 272
gsk7ikm on Windows 272
GSKit 8 267
H
HALT keyword 841
handshake, SSL 172
hash function
CipherSpecs 187
overview 165
header
activity report 572
trace-route message 597
trace-route reply message 603
WebSphere MQ messages 619
High
events rules 489
HP-UX
MQAI support for 15
trace 813
HP-UX client
trace 813
HP-UXcrating and managing groups
security 242
I
IBM
software support database,
searching 839
support center 839
change team 851
dealing with 848
Development Support Group 851
ordering a specific PTF 853
what they need to know 850
IBM i
levels supported by the WebSphere
MQ Explorer 54
IBM i Control Language 1
identification
API exit 305
application level security service,
example 222
introduction 161
link level security service,
example 220
SSPI channel exit program 261
user written message exit 304
user written security exit 303
identifier
component 844
resource manager 844
identity context 210
iKeyman
UNIX 272
Windows 272
impersonation 173
incident number 850
J
Java 207
Java diagnostics 818
Java Message Service (JMS) 207
Java tracing 818
JAVA_HOME on UNIX 272
JMS 207
K
Kerberos 261
key 163
key database file
setting up 273
UNIX key repository 181
key distribution problem
a solution 378
symmetric cryptography 163
key repository
adding personal certificate
UNIX 285
changing
queue manager on UNIX 277
defining 180
introduction 181
locating
queue manager on UNIX 277
WebSphere MQ MQI client on
UNIX 278
setting up
UNIX 273
Windows 273
specifying
WebSphere MQ MQI client on
UNIX 278
KeyRepository field 180
keyring
z/OS key repository 181
keystorelocation 445
keystorestructure 445
keyword
prefix 841
symptom-to-keyword
cross-reference 843
keyword format
free 841
structured database 841
z/OS 841
L
LDAP server 313
configuring and updating 311
setting up 310
working with Certificate Revocation
Lists 306
LDIF (LDAP Data Interchange
Format) 310
Lightweight Directory Access Protocol
(LDAP) server 313
LIKE attribute, DEFINE command 81,
89, 92
limits, queue depth 499
link level security
channel exit programs
introduction 223
writing your own 220
comparison with application level
security 217
introduction 220
providing your own 220
SNA LU 6.2 security services 232
SSL 180
SSPI channel exit program 261
Linux
security 246
listener
starting 107
listeners
defining listeners for remote
administration 106
Load Module modifier keyword 840
local administration
definition of 3
issuing MQSC commands using an
ASCII file 69
runmqsc command, to issue MQSC
commands 69
using the WebSphere MQ
Explorer 52
writing Eclipse plug-ins 64
local queues 79, 87
changing queue attributes, commands
to use 82, 92
clearing 82
copying a local queue definition 81
defining 79
deleting 82
working with local queues 79, 87
local subscription
copying a local subscription
definition 92
deleting 93
local subscriptions
defining 90
local topic
defining 88
locating key repository
UNIX
queue manager 277
WebSphere MQ MQI client
log
error 828
file, @SYSTEM 828
logger
events
controlling 483
logger events 508
logs
error logs 809
LOOP keyword 841
278
M
MAC 165
man in the middle attack
introduction 166
SNA LU 6.2 session level
authentication 233
managing objects for triggering 100
manually stopping a queue manager 67
mapping
IP address to MCAUSER 343
MCAUSER to MCAUSER 340
queue manager to MCAUSER 340
SSL DN to MCAUSER 341
maximum depth reached 495
maximum line length, MQSC
commands 73
MCAUSER 216
setting
by IP address 343
by MCAUSER 340
by queue manager 340
by SSL DN 341
MCAUSER parameter
initial value of MCAUserIdentifier
field 359
MCAUserIdentifier 216
MCAUserIdentifier field 359
MCPROP parameter
DEFINE COMMINFO 152
media images
automatic media recovery failure,
scenario 856
message
error 822
Message Authentication Code (MAC)
Data Encryption Standard (DES)
SNA LU 6.2 conversation level
authentication 236
SNA LU 6.2 session level
authentication 233
introduction 165
part of CipherSuite 175
message channel agent (MCA)
channel exit programs 223
default user ID
role in access control 359
user ID in an SNA LU 6.2 attach
request 236
use in SSL 180
Index
1167
message context
introduction 161
role in access control 210
message descriptor
accounting and statistics
messages 620
activity report 567
trace-route message 592
trace-route reply message 602
message digest 165, 176
message exit
introduction 224
providing your own link level
security 221
Message Format 152
message length, decreasing 82
message level security 221
message monitoring 829
messages
containing unexpected
information 757
context
granting authority to pass 346
granting authority to set 345
granting authority to pass
context 346
granting authority to set context 345
not appearing on queues 757
model queues
DEFINE QMODEL command 86
defining 86
working with 86
monitoring
message 829
queue managers 472, 527
trace-route messaging 532
monitoring performance of WebSphere
MQ for Windows queues 750
MQ Services
changing the password 62
MQ_USER_ID 216
mqAddInquiry 46
MQAI
concepts and terminology 16
examples 17
introduction 16
sample programs
creating a local queue 17
displaying events 22
inquire channel objects 30
inquiring queues 36
printing information 36
MQAI (WebSphere MQ Administration
Interface) 17
MQAI (WebSphere MQ administrative
interface)
description of 15
MQCD structure
specifying that an MQI channel uses
SSL 187
MQCFH structure
activity report 572
trace-route message 597
trace-route reply message 603
mqClearBag 49
1168
MQCNO structure
specifying that an MQI channel uses
SSL 187
MQCONNX call
specifying that an MQI channel uses
SSL 187
mqCreateBag 44
mqCreateBag options 44
MQCSP 211
mqDeleteBag 44
mqDeleteBag options 44
mqDeleteItem 50
MQEPH structure
activity report 571
trace-route message 596
mqExecute 51
MQI (message-queuing interface)
authorization specification tables 247
authorizations 248
MQI accounting message data 621
MQI authorizations 248
MQI channel
comparing link level security and
application level security 217
MQI statistics message data 642
mqm group 207, 353
MQOPEN authorizations 248
MQPUT authorizations 248
mqPutBag 8, 9
MQS_TRACE_OPTIONS, environment
variable 813
mqs.ini configuration file
path to 76
MQSC commands
encapsulated within Escape PCF
commands 207
runmqsc command 207
MQSCO structure 180
MQSERVER
specifying that an MQI channel uses
SSL 187
mqSetInteger 48
MQSSLKEYR
environment variable 180
mqTruncateBag 49
MQXQH structure 217
MQZ_AUTHENTICATE_USER 211
MQZAO, constants and authority 248
MSCS (Microsoft Cluster Server)
introduction 1
MSGHIST parameter
DEFINE COMMINFO 155
Multicast 152
Multicast Message Format 152
MUSR_MQADMIN 63
changing the password 62
mutual authentication
comparing link level security and
application level security 217
definition 161
SSPI channel exit program 261
N
namelists
granting administrative access
333
328,
namelists (continued)
granting authority to access
names, of event queues 474
negotiations on startup 823
nested groups 264
non-repudiation
digital signature 176
NSUBHIST parameter
DEFINE COMMINFO 155
NTLM 261
351
O
OAM 315
OAM Authenticate User 211
OAM generic profiles 317
object authority manager (OAM) 211,
315
objects
access to 239
administration of 3
default configuration, Windows
systems 1
default object attributes,
displaying 80, 88
description of 103
managing objects for triggering 100
remote administration 102
remote queue objects 112
security 213
OCSP, enabling 448, 449
OK
events rules 489
OK response 10
operations and control panels
accessing WebSphere MQ objects 207
operator
commands, no response from 759
ordering a specific PTF 853
origin context 210
output, standard 71
P
password 206
PASSWORD parameter
SNA LU 6.2 conversation level
authentication
IBM i, UNIX, Windows 236
passwords in Java 453
PCF (programmable command format)
authorization specification tables 247
MQAI, using to simplify use of 16
PCF (Programmable Command Format)
responses 9
PCF commands 207
PCF messages
converting from bag 8, 9
sending 8, 9
peer recovery
with queue-sharing 823
Peer recovery 823
PERFM keyword 841
performance
events
controlling 482
performance (continued)
trace 813, 815
tracing Windows, performance
considerations 812
performance event
control attribute 486
event data 485
event statistics 485
queue 474
types of 478, 486
performance monitor 750
personal certificate
adding to key repository
UNIX 285
creating self-signed
UNIX 279
exporting, UNIX 289
importing, UNIX 290
introduction 166
renewing
UNIX 284
requesting
UNIX 281
ping
problem determination 822
PKCS #11
cryptographic hardware cards on
UNIX 181
PKCS #11 hardware
managing certificates on 295
personal certificate
importing 299
requesting 297
PKI 423
plaintext 163
policy
name, configuration 454
prefix keyword 841
primary keywords 850
principals 356
printing information, sample
programs 36
privacy
SSL 173
private key
digital certificate 166
introduction 163
problem
management record 850
reporting sheet 848
tracking 848
problem determination 821
applications or systems running
slowly 761
channel refuses to run 824
channel startup negotiation
errors 823
channel switching 827
clients 827
connection switching 827
conversion failure 825
data structures 826
dead-letter queue 822
error messages 822
incorrect output, definition of 757
incorrect output, distributed
queuing 757
Q
querying data items 47
queue 750
depth events 495
examples 498
depth limits 499
queue accounting message data 632
queue browser, sample 82
queue depth, current 81
queue manager
controlling activity recording 528
controlling trace-route messaging 535
event queue 474
events
controlling 481
failure, handling 774
monitoring 472, 527
restricting access to 398
queue manager clusters
security 236
queue managers
attributes, changing 77
attributes, displaying 77
command server 107
default configuration, Windows
systems 1
disabling remote access 343
granting administrative access 327,
332
granting authority to inquire 350
granting full administrative
access 335
granting read-only access 334
preparing for remote
administration 104
queue manager aliases 112
remote administration 102
removing connectivity 336
securing remote connectivity 337
showing and hiding, using the
WebSphere MQ Explorer 59
stopping a queue manager
manually 67
queue service interval events
algorithm for 488
enabling 489
examples 490
high 486
OK 486
queue statistics message data 653
queues
alias 85
browsing 82
changing queue attributes 82, 89, 92
clearing local queues 82
current queue depth, determining 81
dead-letter, defining 80
deleting a local queue 82
deleting a subscription 93
distributed, incorrect output
from 757
granting administrative access 325,
330
granting authority to get
messages 345
granting authority to put
messages 347
Index
1169
queues (continued)
local definition of a remote
queue 110
local, working with 79, 87
model queues 86
preparing transmission queues for
remote administration 105
queue manager aliases 112
remote queue objects 112
reply-to queues 112
restricting access to 399
working with 90
R
raising an APAR 852
read-only access
to queue manager 334
real-time monitoring
controlling 739
reason codes
alphabetic list 857
receive exit
introduction 225
providing your own link level
security 221
receiver channel, automatic definition
of 107
receiving data bags 44
recipient distinguished names,
configuration 456
recovery
automatic media recovery failure,
scenario 856
disk drive failure, scenario 855
recovering a damaged queue manager
object, scenario 856
recovering a damaged single object,
scenario 856
recovery routine modifier keyword 840
recovery with queue-sharing
peer 823
redirecting input and output, MQSC
commands 73, 75
Registration Authority 171
Registration time for DDNS 825
release-level keyword 840
remote access
disabling
queue manager 343
remote administration
administering a remote queue
manager from a local one 104
command server 107
defining channels, listeners, and
transmission queues 106
definition of remote administration 4
initial problems 108
of objects 102
preparing channels for 105
preparing queue managers for 104
preparing transmission queues
for 105
security, connecting remote queue
managers, the WebSphere MQ
Explorer 56
1170
S
sample problem reporting sheet 848
sample programs
creating a local queue 17
displaying events 22
inquire channel objects 30
inquiring queues 36
printing information 36
scenarios, problem determination 821
SDB (structured database) keyword
format 841
SDB format keywords 843
search argument
process 839
varying 840
secret key 163
secret keys 190, 377
secure sockets layer (SSL)
channel parameters 229
MQSC commands 229
protecting channels 229
queue manager parameters 229
securing remote connectivity to queue
managers 337
security 398
access control 215, 315, 355
access settings 317, 321, 322
administration authority 352
alternate-user authority 358
authentication 266
authority, alternate-user 358
authority, context 358
authorizations to use the WebSphere
MQ Explorer 55
channel exits 229
channels 228
checks 354
checks, preventing 323
connecting to remote queue managers,
the WebSphere MQ Explorer 56
context authority 358
dmpmqaut command 317, 321
domain controller 263
dspmqaut command 322
exit 205
groups 356
identifiers 357
Linux 246
MQI authorizations 248
mqm group 353
nested groups 264
OAM 315
object authority manager (OAM) 315
objects
UNIX systems 213
Windows systems 213
on a WebSphere MQ MQI client 266
password 206
principals 356
security for the WebSphere MQ
Explorer 55, 61
setmqaut command 316
Solaris 245
tasks 324
template files 264
transmission queues 229
user ID 206, 356
security (continued)
WebSphere MQ objects
UNIX systems 354
Windows 354
WebSphere MQ Services 264
Windows 261
Windows 2003 241
Windows systems 357
Windows XP 241
security exit
introduction 224
providing your own link level
security 220
SSPI channel exit program 261
security exits
WebSphere MQ Explorer 57
security mechanisms 161
security messages 224
security policies 458
changing 459
creating 458
displaying 460
removing 458
security services
access control
API exit 361
authority to administer WebSphere
MQ 206
authority to work with WebSphere
MQ objects 207
introduction 162
user written message exit 360
user written security exit 359
application level
introduction 221
providing your own 223
authentication
API exit 305
introduction 161
SNA LU 6.2 conversation level
authentication 234
SNA LU 6.2 session level
authentication 233
SSPI channel exit program 261
user written message exit 304
user written security exit 303
confidentiality
introduction 163
SNA LU 6.2 session level
cryptography 232
user written security exit 378
identification
API exit 305
introduction 161
SSPI channel exit program 261
user written message exit 304
user written security exit 303
introduction 161
link level
introduction 220
providing your own 220
SNA LU 6.2 232
Security Support Provider Interface (SSPI)
channel exit program 261
self-signed certificate
creating
UNIX 279
SSL (continued)
platforms 180
protocol 180
setting up
introduction 361, 367, 381, 389
UNIX systems 272
WebSphere MQ MQI client 186
Windows systems 272
SSL Distinguished Name
blocking channel access 342
SSLCIPH parameter 187
specifying CipherSpecs 373, 394
SSLCipherSpec field 187
SSLKeyRepository field 180
SSPI 261
starting
a channel 107
a command server 107
a listener 107
queue manager 65
statistics
message
format 618
statistics monitoring
channel messages 660
MQI messages 642
queue messages 653
statistics, events 485
stdin, on runmqsc 73
stdout, on runmqsc 73
stopping
a queue manager manually 67
command server 107
stream cipher algorithm 163
strength of encryption 163
strmqtrc trace command 812, 813
structure of accounting and statistics
messages 619
structured database (SDB) keyword
format 841
structures
MQCFH
activity report 572
trace-route message 597
trace-route reply message 603
MQEPH
activity report 571
trace-route message 596
MQMD
activity report 567
trace-route message 592
trace-route reply message 602
subscriptions 90
attributes of subscriptions,
displaying 91
working with subscriptions 90
Suite B 177, 188, 192
supported technology 425
switching channels 827
symmetric cryptography algorithm 163
symptom-to-keyword
cross-reference 843
system bag 42
SYSTEM.CLUSTER.COMMAND
.QUEUE 774
Index
1171
T
tampering 165
template files, security 264
thresholds for queue depth 495
time since reset 486
timed out responses from MQSC
commands 109
timer
service 488
TLS
platforms 180
toleration, configuration 455
topics
deleting an administrative topic 90
granting administrative access 326,
330
granting authority to publish
messages 349
granting authority to subscribe 350
trace
AIX 813
HP-UX 813
performance considerations 813, 815
Solaris 813
Windows 812
Windows, performance
considerations 812
trace command
dspmqtrc 813
endmqtrc 812, 813
strmqtrc 812, 813
trace-route message
format 591
message descriptor 592
trace-route message data 598
trace-route messages
generating 536
queue manager control 535
TraceRoute PCF group 538
trace-route messaging 532
trace-route reply message
format 601
message descriptor 602
trace-route reply message data 603
TraceRoute PCF group 538
tracing
Java 818
transmission queue
overflow 822
transmission queue header structure
(MQXQH)
comparing link level security and
application level security 217
message exit 225
transmission queues
creating 111
default transmission queues 111
defining transmission queues remote
administration 106
preparing transmission queues for
remote administration 105
security 229
transmission segment
introduction 225
user written send and receive
exits 221
trigger messages, from event queues 483
1172
100
U
unavailable event queues 483
unit of work, and events 478
UNIX operating system
levels supported by the WebSphere
MQ Explorer 54
UNIX systems
using distributed queuing
object security 214
use of the MQAI 16
user bag 42
user certificate
introduction 166
User context 210
user ID 206, 214, 356
user ID, client asserted
blocking channel access 342
user IDs
blocking 339
user-exit
programs 826
user-exit programs
problem determination 826
USERID parameter
SNA LU 6.2 conversation level
authentication
IBM i, UNIX, Windows 236
UserIdentifier field
authentication in a user written
message exit 304
authentication in an API exit 302,
305
message context 210
use by a server application 360
using activity reports 527
using commands, rules for 69
using events 472
using trace-route messaging 532
V
validation
checks 823
verifying MQSC commands
73
W
WAIT keyword 841
WebSphere MQ
commands 69
Commands (MQSC) 1
issuing MQSC commands using an
ASCII file 69
WebSphere MQ (continued)
runmqsc command, to issue MQSC
commands 69
WebSphere MQ Administration Interface
concepts and terminology 16
creating a local queue 17
displaying events 22
examples 17
inquiring queues 36
introduction 16
printing information 36
sample programs 17
use 16
WebSphere MQ Administration Interface
(MQAI) 17
WebSphere MQ Advanced Message
Security 222
WebSphere MQ alert monitor, using 64
WebSphere MQ channel protocol flows
comparing link level security and
application level security 217
send and receive exits 225
WebSphere MQ classes for Java 207
WebSphere MQ classes for Java Message
Service (JMS) 207
WebSphere MQ command files
input 73
output reports 73
running 73
WebSphere MQ commands
authorization 251
command files, input 73
command files, output reports 73
command files, running 73
ending interactive input 71
issuing interactively 71
issuing MQSC commands
remotely 108
maximum line length 73
overview 69
problems using MQSC commands
remotely 108
problems, list 76
problems, resolving 76
redirecting input and output 73, 75
runmqsc control command, modes 2,
69
syntax errors 71
timed out command responses 109
using 73, 75
verifying 73
WebSphere MQ display route
application 546
WebSphere MQ Explorer
alert monitor application 64
AMQ7604 63
authority to use 207
authorizations to use 55
cluster membership 60
connecting to remote queue managers,
security 56
description of 1
introduction 1
MQ Services
changing the password 62
MUSR_MQADMIN
changing the password 62
171
Z
z/OS
levels supported by the WebSphere
MQ Explorer 54
X
X.509 standard
digital certificates comply with
DN identifies entity 167
166
Index
1173
1174
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program,
or service that does not infringe any IBM intellectual property right may be used instead. However, it is
the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or
service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not grant you any license to these patents. You can send
license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:
Intellectual Property Licensing
Legal and Intellectual Property Law
IBM Japan, Ltd.
19-21, Nihonbashi-Hakozakicho, Chuo-ku
Tokyo 103-8510, Japan
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some
states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this
statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of
the materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
1175
Licensees of this program who wish to have information about it for the purpose of enabling: (i) the
exchange of information between independently created programs and other programs (including this
one) and (ii) the mutual use of the information which has been exchanged, should contact:
IBM Corporation
Software Interoperability Coordinator, Department 49XA
3605 Highway 52 N
Rochester, MN 55901
U.S.A.
Such information may be available, subject to appropriate terms and conditions, including in some cases,
payment of a fee.
The licensed program described in this information and all licensed material available for it are provided
by IBM under terms of the IBM Customer Agreement, IBM International Program License Agreement, or
any equivalent agreement between us.
Any performance data contained herein was determined in a controlled environment. Therefore, the
results obtained in other operating environments may vary significantly. Some measurements may have
been made on development-level systems and there is no guarantee that these measurements will be the
same on generally available systems. Furthermore, some measurements may have been estimated through
extrapolation. Actual results may vary. Users of this document should verify the applicable data for their
specific environment.
Information concerning non-IBM products was obtained from the suppliers of those products, their
published announcements or other publicly available sources. IBM has not tested those products and
cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM
products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of
those products.
All statements regarding IBM's future direction or intent are subject to change or withdrawal without
notice, and represent goals and objectives only.
This information contains examples of data and reports used in daily business operations. To illustrate
them as completely as possible, the examples include the names of individuals, companies, brands, and
products. All of these names are fictitious and any similarity to the names and addresses used by an
actual business enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs
in any form without payment to IBM, for the purposes of developing, using, marketing or distributing
application programs conforming to the application programming interface for the operating platform for
which the sample programs are written. These examples have not been thoroughly tested under all
conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these
programs.
If you are viewing this information softcopy, the photographs and color illustrations may not appear.
1176
This book contains information on intended programming interfaces that allow the customer to write
programs to obtain the services of WebSphere MQ.
However, this information may also contain diagnosis, modification, and tuning information. Diagnosis,
modification and tuning information is provided to help you debug your application software.
Important: Do not use this diagnosis, modification, and tuning information as a programming interface
because it is subject to change.
Trademarks
IBM, the IBM logo, ibm.com, are trademarks of IBM Corporation, registered in many jurisdictions
worldwide. A current list of IBM trademarks is available on the Web at Copyright and trademark
informationwww.ibm.com/legal/copytrade.shtml. Other product and service names might be
trademarks of IBM or other companies.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or
both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
This product includes software developed by the Eclipse Project (http://www.eclipse.org/).
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or
its affiliates.
Notices
1177
1178
1179
1180