Intercommunications 6
Intercommunications 6
Intercommunication
Version 6.0
SC34-6587-00
WebSphere MQ
Intercommunication
Version 6.0
SC34-6587-00
Note!
Before using this information and the product it supports, be sure to read the general information under Appendix D,
“Notices,” on page 531.
iv WebSphere MQ Intercommunication
Chapter 9. Preparing WebSphere MQ Automatic startup . . . . . . . . . . . 161
for distributed platforms . . . . . . 125 Running channels as processes or threads . . . 161
Transmission queues and triggering . . . . . . 125 Multiple thread support — pipelining . . . . 162
Creating a transmission queue . . . . . . . 125
Triggering channels . . . . . . . . . . 125 Chapter 12. Setting up communication
Channel programs . . . . . . . . . . . . 127 on UNIX systems . . . . . . . . . . 163
Other things to consider . . . . . . . . . . 127 Deciding on a connection . . . . . . . . . 163
Undelivered-message queue . . . . . . . 127 Defining a TCP connection . . . . . . . . . 163
Queues in use . . . . . . . . . . . . 127 Sending end . . . . . . . . . . . . . 163
Security of WebSphere MQ objects . . . . . 127 Receiving on TCP . . . . . . . . . . . 164
System extensions and user-exit programs . . . 129 Defining an LU 6.2 connection . . . . . . . 166
Running channels and listeners as trusted Sending end . . . . . . . . . . . . . 167
applications . . . . . . . . . . . . . 129 Receiving on LU 6.2 . . . . . . . . . . 167
What next? . . . . . . . . . . . . . . 130
Chapter 13. Example configuration -
Chapter 10. Setting up communication IBM WebSphere MQ for AIX . . . . . 169
for Windows . . . . . . . . . . . . 131 Configuration parameters for an LU 6.2 connection 169
Deciding on a connection . . . . . . . . . 131 Configuration worksheet . . . . . . . . 169
Defining a TCP connection . . . . . . . . . 132 Explanation of terms . . . . . . . . . . 173
Sending end . . . . . . . . . . . . . 132 Establishing a session using Communications
Receiving on TCP . . . . . . . . . . . 132 Server for AIX . . . . . . . . . . . . . 175
Defining an LU 6.2 connection . . . . . . . 133 Configuring your node . . . . . . . . . 175
Sending end . . . . . . . . . . . . . 134 Configuring connectivity to the network . . . 176
Receiving on LU 6.2 . . . . . . . . . . 134 Defining a local LU . . . . . . . . . . 178
Defining a NetBIOS connection . . . . . . . 135 Defining a transaction program . . . . . . 179
Defining the WebSphere MQ local NetBIOS Establishing a TCP connection . . . . . . . . 180
name . . . . . . . . . . . . . . . 135 What next? . . . . . . . . . . . . . 181
Establishing the queue manager NetBIOS WebSphere MQ for AIX configuration . . . . . 181
session, command, and name limits . . . . . 136 Basic configuration . . . . . . . . . . 181
Establishing the LAN adapter number . . . . 136 Channel configuration . . . . . . . . . 182
Initiating the connection . . . . . . . . . 136
Target listener . . . . . . . . . . . . 137 Chapter 14. Example configuration -
Defining an SPX connection . . . . . . . . 137
IBM WebSphere MQ for HP-UX . . . . 187
Sending end . . . . . . . . . . . . . 137
Configuration parameters for an LU 6.2 connection 187
Receiving on SPX . . . . . . . . . . . 138
Configuration worksheet . . . . . . . . 187
IPX/SPX parameters . . . . . . . . . . 139
Explanation of terms . . . . . . . . . . 190
Establishing a session using HP SNAplus2 . . . 191
Chapter 11. Example configuration - SNAplus2 configuration . . . . . . . . . 191
IBM WebSphere MQ for Windows . . . 141 APPC configuration . . . . . . . . . . 195
Configuration parameters for an LU 6.2 connection 141 HP-UX operation . . . . . . . . . . . 205
Configuration worksheet . . . . . . . . 141 What next? . . . . . . . . . . . . . 205
Explanation of terms . . . . . . . . . . 144 Establishing a TCP connection . . . . . . . . 205
Establishing an LU 6.2 connection . . . . . . 146 What next? . . . . . . . . . . . . . 206
Configuring the local node . . . . . . . . 146 WebSphere MQ for HP-UX configuration . . . . 206
Adding a connection . . . . . . . . . . 148 Basic configuration . . . . . . . . . . 206
Adding a partner . . . . . . . . . . . 150 Channel configuration . . . . . . . . . 206
Adding a CPI-C entry . . . . . . . . . 151
Configuring an invokable TP . . . . . . . 151 Chapter 15. Example configuration -
What next? . . . . . . . . . . . . . 153
IBM WebSphere MQ for Solaris . . . . 211
Establishing a TCP connection . . . . . . . . 154
Configuration parameters for an LU 6.2 connection
What next? . . . . . . . . . . . . . 154
using SNAP-IX . . . . . . . . . . . . . 211
Establishing a NetBIOS connection . . . . . . 154
Configuration worksheet . . . . . . . . 211
Establishing an SPX connection . . . . . . . 155
Explanation of terms . . . . . . . . . . 214
IPX/SPX parameters . . . . . . . . . . 155
Establishing a session using SNAP-IX . . . . . 215
SPX addressing . . . . . . . . . . . . 156
SNAP-IX configuration . . . . . . . . . 215
Receiving on SPX . . . . . . . . . . . 156
APPC configuration . . . . . . . . . . 219
WebSphere MQ for Windows configuration . . . 157
SNAP-IX operation . . . . . . . . . . 228
Default configuration . . . . . . . . . . 157
What next? . . . . . . . . . . . . . 228
Basic configuration . . . . . . . . . . 157
Establishing a TCP connection . . . . . . . . 228
Channel configuration . . . . . . . . . 158
Contents v
What next? . . . . . . . . . . . . . 228 Displaying cluster channels . . . . . . . . 279
WebSphere MQ for Solaris configuration . . . . 229
Basic configuration . . . . . . . . . . 229 Chapter 19. Preparing WebSphere MQ
Channel configuration . . . . . . . . . 229 for z/OS . . . . . . . . . . . . . . 281
Defining DQM requirements to WebSphere MQ 281
Chapter 16. Example configuration - Defining WebSphere MQ objects . . . . . . . 281
IBM WebSphere MQ for Linux . . . . 233 Transmission queues and triggering channels 281
Configuration parameters for an LU 6.2 connection 233 Synchronization queue . . . . . . . . . 282
Configuration worksheet . . . . . . . . 233 Channel command queues . . . . . . . . 282
Explanation of terms . . . . . . . . . . 236 Starting the channel initiator . . . . . . . 282
Establishing a session using Communications Stopping the channel initiator . . . . . . . 282
Server for Linux . . . . . . . . . . . . 237 Other things to consider . . . . . . . . . . 282
Communications Server for Linux configuration 237 Operator messages . . . . . . . . . . 282
APPC configuration . . . . . . . . . . 240 Channel operation commands . . . . . . . 282
Communications Server for Linux operation . . 249 Undelivered-message queue . . . . . . . 283
What next? . . . . . . . . . . . . . 249 Queues in use . . . . . . . . . . . . 283
Establishing a TCP connection . . . . . . . . 249 Security changes . . . . . . . . . . . 283
Using the inet daemon (INETD) . . . . . . 249 Communications stopped . . . . . . . . 283
Using the extended inet daemon (XINETD) . . 250 z/OS Automatic Restart Management (ARM). . . 284
What next? . . . . . . . . . . . . . 251
WebSphere MQ for Linux configuration . . . . 251 Chapter 20. Setting up communication
Basic configuration . . . . . . . . . . 251 for z/OS . . . . . . . . . . . . . . 285
Channel configuration . . . . . . . . . 251
Deciding on a connection . . . . . . . . . 285
Defining a TCP connection . . . . . . . . . 285
Chapter 17. Message channel Sending end . . . . . . . . . . . . . 286
planning example for distributed Receiving on TCP . . . . . . . . . . . 286
platforms . . . . . . . . . . . . . 255 Using the TCP listener backlog option . . . . 287
What the example shows . . . . . . . . . 255 Defining an LU6.2 connection . . . . . . . . 287
Queue manager QM1 example . . . . . . 257 APPC/MVS setup . . . . . . . . . . . 287
Queue manager QM2 example . . . . . . 257
Running the example . . . . . . . . . . . 258 Chapter 21. Example configuration -
Expanding this example . . . . . . . . . 258 IBM WebSphere MQ for z/OS . . . . . 289
Configuration parameters for an LU 6.2 connection 289
Part 4. DQM in WebSphere MQ for Configuration worksheet . . . . . . . . 290
Explanation of terms . . . . . . . . . . 291
z/OS . . . . . . . . . . . . . . . 261
Establishing an LU 6.2 connection . . . . . . 292
Defining yourself to the network . . . . . . 292
Chapter 18. Monitoring and Defining a connection to a partner . . . . . 294
controlling channels on z/OS . . . . 265 Establishing a TCP connection . . . . . . . . 294
The DQM channel control function . . . . . . 265 What next? . . . . . . . . . . . . . 294
Using the panels and the commands . . . . . 266 WebSphere MQ for z/OS configuration. . . . . 294
Using the initial panel . . . . . . . . . 266 Channel configuration . . . . . . . . . 295
Managing your channels . . . . . . . . . 268
Defining a channel . . . . . . . . . . 268 Chapter 22. Message channel
Altering a channel definition . . . . . . . 269 planning example for z/OS . . . . . . 299
Displaying a channel definition . . . . . . 269
What the example shows . . . . . . . . . 299
Deleting a channel definition . . . . . . . 269
Queue manager QM1 example . . . . . . 300
Displaying information about the channel
Queue manager QM2 example . . . . . . 301
initiator . . . . . . . . . . . . . . 270
Running the example . . . . . . . . . . . 302
Starting a channel initiator . . . . . . . . 270
Expanding this example . . . . . . . . . 302
Stopping a channel initiator . . . . . . . 271
Starting a channel listener . . . . . . . . 272
Stopping a channel listener . . . . . . . . 273 Chapter 23. Preparing WebSphere MQ
Starting a channel . . . . . . . . . . . 273 for z/OS for DQM with queue-sharing
Testing a channel . . . . . . . . . . . 275 groups . . . . . . . . . . . . . . 305
Resetting message sequence numbers for a Concepts . . . . . . . . . . . . . . . 305
channel . . . . . . . . . . . . . . 275 Class of service . . . . . . . . . . . . 305
Resolving in-doubt messages on a channel . . 276 Generic interface . . . . . . . . . . . 305
Stopping a channel . . . . . . . . . . 276 Components . . . . . . . . . . . . . . 305
Displaying channel status . . . . . . . . 278 Listeners . . . . . . . . . . . . . . 305
vi WebSphere MQ Intercommunication
Transmission queues and triggering . . . . . 306 Shared transmission queue for use by
Message channel agents . . . . . . . . . 306 intra-group queuing . . . . . . . . . . 329
Synchronization queue . . . . . . . . . 307 Intra-group queuing agent . . . . . . . . 329
Benefits . . . . . . . . . . . . . . . 307 Benefits . . . . . . . . . . . . . . . 329
Load-balanced channel start . . . . . . . 308 Reduced system definitions. . . . . . . . 329
Shared channel recovery . . . . . . . . . 308 Reduced system administration . . . . . . 329
Client channels . . . . . . . . . . . . 308 Improved performance . . . . . . . . . 329
Clusters and queue-sharing groups . . . . . . 308 Supports migration . . . . . . . . . . 329
Channels and serialization . . . . . . . . . 309 Transparent delivery of messages when
Intra-group queuing . . . . . . . . . . . 309 multi-hopping between queue managers in a
queue-sharing group . . . . . . . . . . 330
Chapter 24. Setting up communication Limitations . . . . . . . . . . . . . . 330
for WebSphere MQ for z/OS using Messages eligible for transfer using intra-group
queuing . . . . . . . . . . . . . . 330
queue-sharing groups . . . . . . . . 311 Number of intra-group queuing agents per
Deciding on a connection . . . . . . . . . 311 queue manager . . . . . . . . . . . . 331
Defining a TCP connection . . . . . . . . . 311 Starting and stopping the intra-group queuing
Sending end . . . . . . . . . . . . . 311 agent . . . . . . . . . . . . . . . 331
Receiving on TCP using a queue-sharing group 311 Getting started . . . . . . . . . . . . . 331
Defining an LU6.2 connection . . . . . . . . 311 Enabling intra-group queuing . . . . . . . 331
Connecting to APPC/MVS (LU 6.2) . . . . . 312 Disabling intra-group queuing . . . . . . . 331
Receiving on LU 6.2 using a generic interface 312 Using intra-group queuing . . . . . . . . 331
Configurations . . . . . . . . . . . . . 332
Chapter 25. Example configuration - Distributed queuing with intra-group queuing
IBM WebSphere MQ for z/OS using (multiple delivery paths) . . . . . . . . 332
queue-sharing groups . . . . . . . 313 Clustering with intra-group queuing (multiple
Configuration parameters for an LU 6.2 connection 313 delivery paths) . . . . . . . . . . . . 334
Configuration worksheet . . . . . . . . 314 Clustering, intra-group queuing and distributed
Explanation of terms . . . . . . . . . . 314 queuing . . . . . . . . . . . . . . 335
Establishing an LU 6.2 connection into a Messages . . . . . . . . . . . . . . . 336
queue-sharing group . . . . . . . . . . . 316 Message structure . . . . . . . . . . . 336
Defining yourself to the network using generic Message persistence . . . . . . . . . . 336
resources . . . . . . . . . . . . . . 316 Delivery of messages . . . . . . . . . . 336
Defining a connection to a partner . . . . . 317 Batching of messages . . . . . . . . . . 336
What next? . . . . . . . . . . . . . 317 Message size . . . . . . . . . . . . 336
Establishing a TCP connection into a queue-sharing Default message persistence and default
group . . . . . . . . . . . . . . . . 317 message priority . . . . . . . . . . . 336
Using WLM/DNS . . . . . . . . . . . 317 Undelivered/unprocessed messages . . . . . 337
Using Sysplex Distributor . . . . . . . . 318 Report messages . . . . . . . . . . . 337
What next? . . . . . . . . . . . . . 318 Security . . . . . . . . . . . . . . . 338
WebSphere MQ for z/OS shared channel Intra-group queuing authority (IGQAUT) . . . 338
configuration . . . . . . . . . . . . . 318 Intra-group queuing user indentifier (IGQUSER) 338
Shared channel configuration . . . . . . . 319 Specific properties . . . . . . . . . . . . 338
Queue name resolution . . . . . . . . . 338
Invalidation of object handles
Chapter 26. Message channel
(MQRC_OBJECT_CHANGED). . . . . . . 339
planning example for z/OS using Self recovery of the intra-group queuing agent 339
queue-sharing groups . . . . . . . 323 Retry capability of the intra-group queuing
What this example shows . . . . . . . . . 323 agent . . . . . . . . . . . . . . . 339
Queue-sharing group definitions . . . . . . 325 The intra-group queuing agent and Serialization 339
Queue manager QM3 example . . . . . . 325
Remaining definitions . . . . . . . . . 326 Chapter 28. Example configuration —
Running the example . . . . . . . . . . 326
WebSphere MQ for z/OS using
intra-group queuing . . . . . . . . 341
Chapter 27. Intra-group queuing . . . 327
Configuration 1 . . . . . . . . . . . . 341
Concepts . . . . . . . . . . . . . . . 327
Configuration 2 . . . . . . . . . . . . 342
Intra-group queuing and the intra-group
Configuration 3 . . . . . . . . . . . . 342
queuing agent . . . . . . . . . . . . 327
Configuration 1 definitions . . . . . . . . 343
Terminology . . . . . . . . . . . . . . 328
Configuration 2 definitions . . . . . . . . 345
Intra-group queuing . . . . . . . . . . 328
Configuration 3 definitions . . . . . . . . 346
Contents vii
Running the example . . . . . . . . . . . 347 Explanation of terms . . . . . . . . . . 390
Expanding the example . . . . . . . . . 347 Establishing an LU 6.2 connection . . . . . . 392
Local node configuration . . . . . . . . 392
Connection to partner node . . . . . . . 394
Part 5. DQM in WebSphere MQ for
What next? . . . . . . . . . . . . . 398
iSeries . . . . . . . . . . . . . . 349 Establishing a TCP connection . . . . . . . . 398
Adding a TCP/IP interface . . . . . . . . 398
Chapter 29. Monitoring and Adding a TCP/IP loopback interface . . . . 398
controlling channels on iSeries . . . 351 Adding a default route . . . . . . . . . 399
The DQM channel control function . . . . . . 351 What next? . . . . . . . . . . . . . 400
Operator commands . . . . . . . . . . . 352 WebSphere MQ for iSeries configuration . . . . 400
Getting started . . . . . . . . . . . . . 354 Basic configuration . . . . . . . . . . 400
Creating objects . . . . . . . . . . . . 354 Channel configuration . . . . . . . . . 401
Creating a channel . . . . . . . . . . . 354 Defining a queue . . . . . . . . . . . 404
Starting a channel . . . . . . . . . . . . 356 Defining a channel . . . . . . . . . . 405
Selecting a channel . . . . . . . . . . . 358
Browsing a channel . . . . . . . . . . . 358 Chapter 33. Message channel
Renaming a channel . . . . . . . . . . . 360 planning example for WebSphere MQ
Work with channel status . . . . . . . . . 360 for iSeries . . . . . . . . . . . . . 407
Work-with-channel choices . . . . . . . . . 362 What the example shows . . . . . . . . . 407
Panel choices . . . . . . . . . . . . . 363 Queue manager QM1 example . . . . . . 408
F6=Create . . . . . . . . . . . . . 363 Queue manager QM2 example . . . . . . 410
2=Change . . . . . . . . . . . . . 364 Running the example . . . . . . . . . . . 411
3=Copy . . . . . . . . . . . . . . 364 Expanding this example . . . . . . . . . 411
4=Delete . . . . . . . . . . . . . . 365
5=Display . . . . . . . . . . . . . 365
8=Work with Status . . . . . . . . . . 365 Part 6. Further intercommunication
13=Ping . . . . . . . . . . . . . . 365 considerations . . . . . . . . . . 413
14=Start . . . . . . . . . . . . . . 365
15=End . . . . . . . . . . . . . . 366 Chapter 34. Channel-exit programs 415
16=Reset . . . . . . . . . . . . . . 367
What are channel-exit programs? . . . . . . . 415
17=Resolve . . . . . . . . . . . . . 367
Processing overview . . . . . . . . . . 416
Channel security exit programs . . . . . . 417
Chapter 30. Preparing WebSphere MQ Channel send and receive exit programs . . . 423
for iSeries . . . . . . . . . . . . . 369 Channel send exit programs — reserving space 425
Creating a transmission queue . . . . . . . . 369 Channel message exit programs . . . . . . 426
Triggering channels . . . . . . . . . . . 371 Channel message retry exit program. . . . . 428
Channel programs . . . . . . . . . . . . 373 Channel auto-definition exit program . . . . 429
Channel states on i5/OS . . . . . . . . . . 374 Writing and compiling channel-exit programs . . 429
Other things to consider . . . . . . . . . . 375 WebSphere MQ for z/OS . . . . . . . . 431
Undelivered-message queue . . . . . . . 375 WebSphere MQ for iSeries . . . . . . . . 432
Queues in use . . . . . . . . . . . . 375 WebSphere MQ for Windows server, WebSphere
Maximum number of channels . . . . . . 375 MQ client for Windows . . . . . . . . . 433
Security of WebSphere MQ for iSeries objects 375 WebSphere MQ for AIX . . . . . . . . . 435
System extensions and user-exit programs . . . 376 WebSphere MQ for HP-UX . . . . . . . . 436
WebSphere MQ for Solaris . . . . . . . . 437
Chapter 31. Setting up communication WebSphere MQ for Linux . . . . . . . . 438
for WebSphere MQ for iSeries . . . . 377 SSPI security exit . . . . . . . . . . . . 439
Deciding on a connection . . . . . . . . . 377
Defining a TCP connection . . . . . . . . . 377 Chapter 35. Channel-exit calls and
Receiving on TCP . . . . . . . . . . . 378 data structures . . . . . . . . . . . 441
Defining an LU 6.2 connection . . . . . . . 379 Data definition files . . . . . . . . . . . 441
Initiating end (Sending) . . . . . . . . . 379 MQ_CHANNEL_EXIT – Channel exit . . . . . 441
Initiated end (Receiver) . . . . . . . . . 383 Syntax . . . . . . . . . . . . . . . 442
Parameters . . . . . . . . . . . . . 442
Chapter 32. Example configuration - Usage notes . . . . . . . . . . . . . 444
IBM WebSphere MQ for iSeries . . . . 387 C invocation . . . . . . . . . . . . . 444
COBOL invocation . . . . . . . . . . 445
Configuration parameters for an LU 6.2 connection 387
RPG invocation (ILE) . . . . . . . . . . 445
Configuration worksheet . . . . . . . . 387
RPG invocation (OPM) . . . . . . . . . 445
Contents ix
x WebSphere MQ Intercommunication
Figures
1. Overview of the components of distributed 44. Listing cluster channels . . . . . . . . 280
queuing . . . . . . . . . . . . . . 4 45. Channel Initiator APPL definition . . . . . 293
2. Sending messages . . . . . . . . . . . 5 46. The first example for WebSphere MQ for
3. Sending messages in both directions . . . . 6 z/OS . . . . . . . . . . . . . . 299
4. A cluster of queue managers . . . . . . . 7 47. Message channel planning example for
5. A sender-receiver channel . . . . . . . . 8 WebSphere MQ for z/OS using
6. A requester-server channel . . . . . . . . 9 queue-sharing groups . . . . . . . . . 324
7. A requester-sender channel . . . . . . . . 9 48. An example of intra-group queuing . . . . 328
8. A cluster-sender channel . . . . . . . . 10 49. An example of migration support . . . . . 330
9. Channel initiators and listeners . . . . . . 11 50. An example configuration . . . . . . . 332
10. Sequence in which channel exit programs are 51. An example of clustering with intra-group
called . . . . . . . . . . . . . . 13 queuing . . . . . . . . . . . . . 334
11. Passing through intermediate queue managers 14 52. Configuration 1: z/OS using intra-group
12. Sharing a transmission queue . . . . . . 15 queuing . . . . . . . . . . . . . 341
13. Using multiple channels . . . . . . . . 15 53. Configuration 2 . . . . . . . . . . . 342
14. The concepts of triggering . . . . . . . 20 54. Configuration 3 . . . . . . . . . . . 343
15. Queue manager alias . . . . . . . . . 25 55. Create channel (1) . . . . . . . . . . 355
16. Reply-to queue alias used for changing reply 56. Create channel (2) . . . . . . . . . . 355
location . . . . . . . . . . . . . . 26 57. Create channel (3) . . . . . . . . . . 356
17. Network diagram showing all channels 28 58. Create channel (4) . . . . . . . . . . 356
18. Network diagram showing QM-concentrators 30 59. Work with channels . . . . . . . . . 358
19. A remote queue definition is used to resolve a 60. Display a TCP/IP channel (1) . . . . . . 359
queue name to a transmission queue to an 61. Display a TCP/IP channel (2) . . . . . . 359
adjacent queue manager . . . . . . . . 36 62. Display a TCP/IP channel (3) . . . . . . 360
20. The remote queue definition allows a different 63. Channel status (1) . . . . . . . . . . 361
transmission queue to be used . . . . . . 37 64. Channel status (2) . . . . . . . . . . 361
21. Receiving messages directly, and resolving 65. Channel status (3) . . . . . . . . . . 362
alias queue manager name . . . . . . . 38 66. Create a queue (1) . . . . . . . . . . 369
22. Three methods of passing messages through 67. Create a queue (2) . . . . . . . . . . 370
your system . . . . . . . . . . . . 39 68. Create a queue (3) . . . . . . . . . . 370
23. Separating messages flows . . . . . . . 41 69. Create a queue (4) . . . . . . . . . . 371
24. Combining message flows on to a channel 42 70. Create process (1) . . . . . . . . . . 372
25. Diverting message streams to another 71. Create process (2) . . . . . . . . . . 373
destination . . . . . . . . . . . . . 43 72. LU 6.2 communication setup panel - initiating
26. Reply-to queue name substitution during PUT end . . . . . . . . . . . . . . . 380
call . . . . . . . . . . . . . . . 45 73. LU 6.2 communication setup panel - initiated
27. Reply-to queue alias example . . . . . . 47 end . . . . . . . . . . . . . . . 383
28. Distributed queue management model . . . 56 74. LU 6.2 communication setup panel - initiated
29. Channel states and substates . . . . . . . 60 end . . . . . . . . . . . . . . . 384
30. Flows between channel states . . . . . . 61 75. The message channel example for WebSphere
31. What happens when a message cannot be MQ for iSeries . . . . . . . . . . . 407
delivered . . . . . . . . . . . . . 70 76. Security exit loop . . . . . . . . . . 416
32. WebSphere MQ channel to be set up in the 77. Example of a send exit at the sender end of
example configuration chapters in this book . 105 message channel . . . . . . . . . . 416
33. Local LU window . . . . . . . . . . 178 78. Example of a receive exit at the receiver end
34. Mode window . . . . . . . . . . . 179 of message channel . . . . . . . . . 417
35. The message channel example for Windows, 79. Sender-initiated exchange with agreement 418
and UNIX systems . . . . . . . . . . 256 80. Sender-initiated exchange with no agreement 419
36. The operations and controls initial panel 266 81. Receiver-initiated exchange with agreement 420
37. Listing channels. . . . . . . . . . . 267 82. Receiver-initiated exchange with no
38. Starting a system function . . . . . . . 271 agreement . . . . . . . . . . . . 420
39. Stopping a function control . . . . . . . 272 83. Client connection-initiated exchange with
40. Starting a channel . . . . . . . . . . 274 agreement for client connection using security
41. Testing a channel . . . . . . . . . . 275 parameters . . . . . . . . . . . . 422
42. Stopping a channel . . . . . . . . . 277 84. Sample source code for a channel exit on
43. Listing channel connections . . . . . . . 279 Windows . . . . . . . . . . . . . 434
The term z/OS® means any release of z/OS or OS/390® supported by the current
version of WebSphere MQ for z/OS.
The term CICS® means CICS Transaction Server for z/OS (CICS/Enterprise
Systems Architecture). Note that, unlike other WebSphere MQ books, this book
does not use the term generically to include other CICS products such as CICS for
VSE/ESA™.
The variable mqmtop represents the name of the base directory where WebSphere
MQ is installed on UNIX and Windows systems.
v On AIX, the actual name of the directory is /usr/mqm
v On other UNIX systems, the actual name of the directory is /opt/mqm
v On Windows systems, the default directory is C:\Program
Files\IBM\WebSphere MQ but you might have chosen to install to a different
directory.
xx WebSphere MQ Intercommunication
Part 1. Introduction
Chapter 1. Concepts of intercommunication . . . 3 Channel and transmission queue names . . . . 27
What is intercommunication? . . . . . . . . . 3 Network planner . . . . . . . . . . . 29
How does distributed queuing work? . . . . . 3
What do we call the components? . . . . . 4
Components needed to send a message . . . 5
Components needed to return a message . . . 5
Cluster components . . . . . . . . . . 6
Distributed queuing components . . . . . . . 7
Message channels . . . . . . . . . . . . 8
Sender-receiver channels . . . . . . . . 8
Requester-server channel . . . . . . . . 8
Requester-sender channel . . . . . . . . 9
Server-receiver channel . . . . . . . . . 9
Cluster-sender channels. . . . . . . . . 9
Cluster-receiver channels . . . . . . . . 10
Message channel agents . . . . . . . . . 10
Transmission queues . . . . . . . . . . 10
Channel initiators and listeners . . . . . . . 10
Channel-exit programs . . . . . . . . . 12
Dead-letter queues . . . . . . . . . . . . 13
Remote queue definitions . . . . . . . . . . 14
How to get to the remote queue manager . . . . 14
Multi-hopping . . . . . . . . . . . . 14
Sharing channels . . . . . . . . . . . 14
Using different channels . . . . . . . . . 15
Using clustering . . . . . . . . . . . . 16
Security . . . . . . . . . . . . . . . 16
Security exits . . . . . . . . . . . . . 16
Secure sockets layer . . . . . . . . . . 16
2 WebSphere MQ Intercommunication
Chapter 1. Concepts of intercommunication
This chapter introduces the concepts of intercommunication in WebSphere MQ.
v The basic concepts of intercommunication are explained in “What is
intercommunication?”
v The objects that you need for intercommunication are described in “Distributed
queuing components” on page 7.
What is intercommunication?
In WebSphere MQ, intercommunication means sending messages from one queue
manager to another. The receiving queue manager could be on the same machine
or another; nearby or on the other side of the world. It could be running on the
same platform as the local queue manager, or could be on any of the platforms
supported by WebSphere MQ. This is called a distributed environment. WebSphere
MQ handles communication in a distributed environment such as this using
Distributed Queue Management (DQM).
The local queue manager is sometimes called the source queue manager and the
remote queue manager is sometimes called the target queue manager or the partner
queue manager.
Application
MQCONN
MQOPEN
QM1 QM2
Message
QUEUE Store
DEFNS
QUEUE
Message DEFNS
Store
Transport Service
Moving Moving
Service Service
4 WebSphere MQ Intercommunication
What is intercommunication?
4. The software that handles the sending and receiving of messages is called the
Message Channel Agent (MCA).
5. Messages are transmitted between queue managers on a channel. A channel is a
one-way communication link between two queue managers. It can carry
messages destined for any number of queues at the remote queue manager.
Each end of a channel has a separate definition, defining it, for example, as the
sending end or the receiving end. A simple channel consists of a sender channel
definition at the local queue manager and a receiver channel definition at the
remote queue manager. These two definitions must have the same name, and
together constitute one channel.
Each queue manager should have a dead-letter queue (also known as the undelivered
message queue). Messages are put on this queue if they cannot be delivered to their
destination.
QM1 QM2
Message Flow
MCA MCA
Transmission
Queue
Channel Application
Queues
QM1 QM2
Message Flow
MCA MCA
Transmission Application
Queue Queue
Channels
Message Flow
MCA MCA
Application Transmission
Queue Queue
Cluster components
An alternative to the traditional WebSphere MQ network is the use of clusters.
6 WebSphere MQ Intercommunication
What is intercommunication?
CLUSTER
TO.QM2
QM3
TO.QM3
As with distributed queuing, you use the MQPUT call to put a message to a queue
at any queue manager. You use the MQGET call to retrieve messages from a local
queue.
For further information about clusters, see the WebSphere MQ Queue Manager
Clusters book.
Message channels
Message channels are the channels that carry messages from one queue manager to
another.
Do not confuse message channels with MQI channels. There are two types of MQI
channel, server-connection and client-connection. These are discussed in WebSphere
MQ Clients.
The definition of each end of a message channel can be one of the following types:
v Sender
v Receiver
v Server
v Requester
v Cluster sender
v Cluster receiver
A message channel is defined using one of these types defined at one end, and a
compatible type at the other end. Possible combinations are:
v Sender-receiver
v Requester-server
v Requester-sender (callback)
v Server-receiver
v Cluster sender-cluster receiver
Sender-receiver channels
A sender in one system starts the channel so that it can send messages to the other
system. The sender requests the receiver at the other end of the channel to start.
The sender sends messages from its transmission queue to the receiver. The
receiver puts the messages on the destination queue. Figure 5 illustrates this.
QM1 QM2
Session Initiation
SENDER RECEIVER
Message Flow
MCA MCA
Transmission
Queue
Channel Application
Queues
Requester-server channel
A requester in one system starts the channel so that it can receive messages from
the other system. The requester requests the server at the other end of the channel
to start. The server sends messages to the requester from the transmission queue
defined in its channel definition.
8 WebSphere MQ Intercommunication
Distributed queuing components
A server channel can also initiate the communication and send messages to a
requester, but this applies only to fully qualified servers, that is server channels that
have the connection name of the partner specified in the channel definition. A fully
qualified server can either be started by a requester, or can initiate a
communication with a requester.
QM1 QM2
Message Flow
MCA MCA
Transmission
Queue
Channel Application
Queues
Requester-sender channel
The requester starts the channel and the sender terminates the call. The sender
then restarts the communication according to information in its channel definition
(this is known as callback). It sends messages from the transmission queue to the
requester.
QM1 QM2
Session Initiation
SENDER Callback REQUESTER
Message Flow
MCA MCA
Transmission
Queue
Channel Application
Queues
Server-receiver channel
This is similar to sender-receiver but applies only to fully qualified servers, that is
server channels that have the connection name of the partner specified in the
channel definition. Channel startup must be initiated at the server end of the link.
The illustration of this is similar to the illustration in Figure 5 on page 8.
Cluster-sender channels
In a cluster, each queue manager has a cluster-sender channel on which it can send
cluster information to one of the full repository queue managers. Queue managers
can also send messages to other queue managers on cluster-sender channels.
QM1 QM2
TO.QM2
SYSTEM.
CLUSTER. Application
TRANSMIT. Queues
QUEUE
Cluster-receiver channels
In a cluster, each queue manager has a cluster-receiver channel on which it can
receive messages and information about the cluster. The illustration of this is
similar to the illustration in Figure 8.
Transmission queues
A transmission queue is a special type of local queue used to store messages before
they are transmitted by the MCA to the remote queue manager. In a
distributed-queuing environment, you need to define one transmission queue for
each sending MCA, unless you are using WebSphere MQ Queue Manager clusters.
You specify the name of the transmission queue in a remote queue definition, (see
“Remote queue definitions” on page 14). If you do not specify the name, the queue
manager looks for a transmission queue with the same name as the remote queue
manager.
You can specify the name of a default transmission queue for the queue manager.
This is used if you do not specify the name of the transmission queue, and a
transmission queue with the same name as the remote queue manager does not
exist.
10 WebSphere MQ Intercommunication
Distributed queuing components
appropriate sender channel. You can also start server channels in this way if you
specified the connection name of the partner in the channel definition. This means
that channels can be started automatically, based upon messages arriving on the
appropriate transmission queue.
Figure 9 shows how channel initiators and channel listeners are used.
SESSION
REQUEST
CHANNEL
LISTENER QM2
QM1
START
MCA MCA
Transmission
Queue
Channel
Initiation CHANNEL
Queue INITIATOR
The channel initiator is also required for other functions. These are discussed later
in this book.
Note: On z/OS, The TCP/IP listener can be started many times with different
combinations of port number and address to listen on. For more
information, see “Listeners” on page 305.
Channel-exit programs
If you want to do some additional processing (for example, encryption or data
compression) you can write your own channel-exit programs, or sometimes use
SupportPacs. The Transaction Processing SupportPacs library for WebSphere MQ is
available on the Internet at URL:
http://www.software.ibm.com/mqseries/txppacs/txpsumm.html
12 WebSphere MQ Intercommunication
Distributed queuing components
3. The receiving MCA calls the receive exit when it receives each part of the
message, and then calls the message exit when the whole message has been
received.
QM1 QM2
MCA MCA
Transmission
Queue
SECURITY SECURITY Application
Queues
MESSAGE MESSAGE
SEND RECEIVE
The message-retry exit is used to determine how many times the receiving MCA will
attempt to put a message to the destination queue before taking alternative action.
For more information about channel exits, see Chapter 34, “Channel-exit
programs,” on page 415.
Dead-letter queues
The dead-letter queue (or undelivered-message queue) is the queue to which
messages are sent if they cannot be routed to their correct destination. Messages
are put on this queue when they cannot be put on the destination queue for some
reason (for example, because the queue does not exist, or because it is full).
Dead-letter queues are also used at the sending end of a channel, for
data-conversion errors.
We recommend that you define a dead-letter queue for each queue manager. If you
do not, and the MCA is unable to put a message, it is left on the transmission
queue and the channel is stopped.
However, using dead-letter queues can affect the sequence in which messages are
delivered, and so you may choose not to use them.
There are other uses for remote queue definitions, which will be described later.
Multi-hopping
If there is no direct communication link between the source queue manager and
the target queue manager, it is possible to pass through one or more intermediate
queue managers on the way to the target queue manager. This is known as a
multi-hop.
You need to define channels between all the queue managers, and transmission
queues on the intermediate queue managers. This is shown in Figure 11.
Sharing channels
As an application designer, you have the choice of forcing your applications to
specify the remote queue manager name along with the queue name, or creating a
remote queue definition for each remote queue. This definition holds the remote
queue manager name, the queue name, and the name of the transmission queue.
Either way, all messages from all applications addressing queues at the same
14 WebSphere MQ Intercommunication
Getting to remote queue manager
remote location have their messages sent through the same transmission queue.
This is shown in Figure 12.
QM1 QM2
Transmission
Queue
Channel Application
Queues
To set up a second channel you need to define another channel and another
transmission queue, and create a remote queue definition specifying the location
and the transmission queue name. Your applications can then use either channel
but the messages will still be delivered to the same target queues. This is shown in
Figure 13.
QM1 QM2
Message Flow
MCA MCA
Transmission Application
Queue Queue
Channels
Message Flow
MCA MCA
Transmission Application
Queue Queue
When you use remote queue definitions to specify a transmission queue, your
applications must not specify the location (that is, the destination queue manager)
themselves. If they do, the queue manager will not make use of the remote queue
definitions. Remote queue definitions make the location of queues and the
transmission queue transparent to applications. Applications can put messages to a
logical queue without knowing where the queue is located and you can alter the
physical queue without having to change your applications.
Using clustering
Every queue manager within a cluster defines a cluster-receiver channel. When
another queue manager wants to send a message to that queue manager, it defines
the corresponding cluster-sender channel automatically. For example, if there is
more than one instance of a queue in a cluster, the cluster-sender channel could be
defined to any of the queue managers that host the queue. WebSphere MQ uses a
workload management algorithm that uses a round-robin routine to select an
available queue manager to route a message to. For more information see
WebSphere MQ Queue Manager Clusters.
Security
Security exits
You can write channel exit programs to perform specific tasks at defined places in
the processing carried out by MCA programs. Security exits are a type of channel
exit used to verify that the partner at the other end of the channel is genuine.
See“Channel security exit programs” on page 417 for more information about
channel security exit programs.
16 WebSphere MQ Intercommunication
Chapter 2. Making your applications communicate
This chapter provides more detailed information about intercommunication
between WebSphere MQ installations. Before reading this chapter it is helpful to
have an understanding of channels, queues, and the other concepts introduced in
Chapter 1, “Concepts of intercommunication,” on page 3.
You also need to have the correct WebSphere MQ security authorization to create
the objects required.
You can use several different methods to define these objects, depending on your
WebSphere MQ platform:
v On all platforms, you can use the WebSphere MQ script commands (MQSC)
described in WebSphere MQ Script (MQSC) Command Reference, the programmable
command format (PCF) commands described in WebSphere MQ Programmable
Command Formats and Administration Interface, or the WebSphere MQ explorer.
v On z/OS you can also use the Operation and Control panels described in
WebSphere MQ for z/OS System Administration Guide.
v On i5/OS you can also use the panel interface.
The different methods are described in more detail in the platform-specific parts of
this book.
When you have defined the channel, you can test it using the PING CHANNEL
command. This command sends a special message from the sender channel to the
receiver channel and checks that it is returned.
18 WebSphere MQ Intercommunication
Sending messages
Because the two ends of the channel are on different queue managers, they could
have been defined with different attributes. To resolve any differences, there is an
initial data negotiation between the two ends when the channel starts. In general,
the two ends of the channel agree to operate with the attributes needing the fewer
resources, thus enabling larger systems to accommodate the lesser resources of
smaller systems at the other end of the message channel.
The sending MCA splits large messages before sending them across the channel.
They are reassembled at the remote queue manager. This is transparent to the user.
An MCA can transfer messages using multiple threads. This process, called
pipelining enables the MCA to transfer messages more efficiently, with fewer wait
states. This improves channel performance.
Triggering channels
This explanation is intended as an overview of triggering concepts. You can find a
complete description in the WebSphere MQ Application Programming Guide.
Local program
Local or 1. 5. started by
Transmission queue trigger monitor
MCA
puts message or
message retrieved MCA started by
on queue 2. trigger message channel initiator
Initiation queue
3.
trigger Program
message
retrieved
Channel
initiator
(Long 4. Queue server started
running)
The objects required for triggering are shown in Figure 14. It shows the following
sequence of events:
1. The local queue manager places a message from an application or from a
message channel agent (MCA) on the transmission queue.
2. When the triggering conditions are fulfilled, the local queue manager places a
trigger message on the initiation queue.
3. The long-running channel initiator program monitors the initiation queue, and
retrieves messages as they appear.
4. The channel initiator processes the trigger messages according to information
contained in them. This information may include the channel name, in which
case the corresponding MCA is started.
5. The local application or the MCA, having been triggered, retrieves the
messages from the transmission queue.
20 WebSphere MQ Intercommunication
Triggering channels
Safety of messages
In addition to the usual recovery features of WebSphere MQ, distributed queue
management ensures that messages are delivered properly by using a syncpoint
procedure coordinated between the two ends of the message channel. If this
procedure detects an error, it closes the channel to allow you to investigate the
problem, and keeps the messages safely in the transmission queue until the
channel is restarted.
The use of these functions occurs only in exceptional circumstances because the
channel recovers automatically in most cases.
If the receiving channel cannot put the message to its destination queue then it is
placed on the dead letter queue, if one has been defined. If not, the message is
discarded.
Note: If the other end of the channel does not support the option, the channel runs
at normal speed.
Undelivered messages
For information about what happens when a message cannot be delivered, see
“What happens when a message cannot be delivered?” on page 69.
22 WebSphere MQ Intercommunication
Chapter 3. More about intercommunication
This chapter mentions three aliases:
v Remote queue definition
v Queue manager alias definition
v Reply-to queue alias definition
These are all based on the remote queue definition object introduced in “Remote
queue definitions” on page 14.
This discussion does not apply to alias queues. These are described in the WebSphere
MQ Application Programming Guide.
Addressing information
In a single-queue-manager environment, the address of a destination queue is
established when an application opens a queue for putting messages to. Because
the destination queue is on the same queue manager, there is no need for any
addressing information.
In a distributed environment the queue manager needs to know not only the
destination queue name, but also the location of that queue (that is, the queue
manager name), and the route to that remote location (that is, the transmission
queue). When an application puts messages that are destined for a remote queue
manager, the local queue manager adds a transmission header to them before
placing them on the transmission queue. The transmission header contains the
name of the destination queue and queue manager, that is, the addressing
information. The receiving channel removes the transmission header and uses the
information in it to locate the destination queue.
You can avoid the need for your applications to specify the name of the destination
queue manager if you use a remote queue definition. This definition specifies the
name of the remote queue, the name of the remote queue manager to which
messages are destined, and the name of the transmission queue used to transport
the messages.
Queue manager aliases and reply-to queue aliases are created using a
remote-queue definition that has a blank RNAME. These definitions do not define
real queues; they are used by the queue manager to resolve physical queue names,
queue manager names, and transmission queues.
When a remote queue definition exists, no alias definitions are referenced. The
queue name supplied by the application is resolved to the name of the destination
queue, the remote queue manager, and the transmission queue specified in the
remote queue definition. For more detailed information about queue name
resolution, see Appendix B, “Queue name resolution,” on page 525.
If the resolved queue name is not a local queue, both the queue manager name
and the queue name are included in the transmission header of each message put
by the application to the transmission queue.
The transmission queue used usually has the same name as the resolved queue
manager, unless changed by a remote queue definition or a queue manager alias
definition. If you have not defined such a transmission queue but you have
defined a default transmission queue, then this is used.
Note: Names of queue managers running on z/OS are limited to four characters.
This shows that the real queue manager to be used, when an application puts
messages to queue manager YOURQM, is REALQM. If the local queue manager is
REALQM, it puts the messages to the queue THISQ, which is a local queue. If the
local queue manager is not called REALQM, it routes the message to a
transmission queue called REALQM. The queue manager changes the transmission
header to say REALQM instead of YOURQM.
24 WebSphere MQ Intercommunication
Queue manager alias definitions
QM1 QM2
All messages for ‘QM3’ are captured at ‘QM1’ with a queue manager alias. The
queue manager alias is named ‘QM3’ and contains the definition ‘QM3 via
transmission queue QM2’. The definition looks like this:
DEFINE QREMOTE (QM3) RNAME() RQMNAME(QM3) XMITQ(QM2)
The queue manager puts the messages on transmission queue ‘QM2’ but does not
make any alteration to the transmission queue header because the name of the
destination queue manager, ‘QM3’, does not alter.
Normally an application specifies a reply-to queue and leaves the reply-to queue
manager name blank. The queue manager fills in its own name at put time. This
works well except when you want an alternate channel to be used for replies, for
example, a channel that uses transmission queue ’QM1_relief’ instead of the
default return channel which uses transmission queue ’QM1’. In this situation, the
queue manager names specified in transmission-queue headers do not match
“real” queue manager names but are re-specified using queue manager alias
definitions. In order to return replies along alternate routes, it is necessary to map
reply-to queue data as well, using reply-to queue alias definitions.
Application
Queue 'Inquiry'
Queue 'Answer'
Figure 16. Reply-to queue alias used for changing reply location
26 WebSphere MQ Intercommunication
Reply-to queue alias definitions
Note that ReplyToQMgr must be blank in order for the reply-to queue alias to
be used.
2. You create a reply-to queue alias definition called ‘Reply_to’, which contains
the name ‘Answer’, and the queue manager name ‘QM1_relief’.
DEFINE QREMOTE (’Reply_to’) RNAME (’Answer’)
RQMNAME (’QM1_relief’)
3. The messages are sent with a message descriptor showing ReplyToQ=‘Answer’
and ReplyToQMgr=‘QM1_relief’.
4. The application specification must include the information that replies are to be
found in queue ‘Answer’ rather than ‘Reply_to’.
To prepare for the replies you have to create the parallel return channel. This
involves defining:
v At QM2, the transmission queue named ‘QM1_relief’
DEFINE QLOCAL (’QM1_relief’) USAGE(XMITQ)
v At QM1, the queue manager alias QM1_relief’
DEFINE QREMOTE (’QM1_relief’) RNAME() RQMNAME(QM1)
This queue manager alias terminates the chain of parallel return channels and
captures the messages for QM1.
If you think you might want to do this at sometime in the future, arrange for your
applications to use the alias name from the start. For now this is a normal queue
alias to the reply-to queue, but later it can be changed to a queue manager alias.
The applications now have to retrieve the messages from a different queue from
the one they named as the reply-to queue when they put the original message.
Networks
So far this book has covered creating channels between your system and any other
system with which you need to have communications, and creating multi-hop
channels to systems where you have no direct connections. The message channel
connections described in the scenarios are shown as a network diagram in
Figure 17 on page 28.
This is not quite so clear-cut for channel names. The channel names in Figure 17
for QM2, for example, must be different for incoming and outgoing channels. All
channel names may still contain their transmission queue names, but they must be
qualified to make them unique.
For example, at QM2, there is a QM3 channel coming from QM1, and a QM3
channel going to QM3. To make the names unique, the first one may be named
‘QM3_from_QM1’, and the second may be named ‘QM3_from_QM2’. In this way,
the channel names show the transmission queue name in the first part of the name,
and the direction and adjacent queue manager name in the second part of the
name.
QM2
QM2 fast
QM1 fast
QM3 QM3
Notes:
1. On WebSphere MQ for z/OS, queue manager names are limited to 4 characters.
28 WebSphere MQ Intercommunication
Networks
2. You are strongly recommended to name all the channels in your network
uniquely. As shown in Table 1 on page 28, including the source and target
queue manager names in the channel name is a good way to do this.
Network planner
This chapter has discussed application designer, systems administrator, and
channel planner functions. Creating a network assumes that there is another,
higher level function of network planner whose plans are implemented by the other
members of the team.
In this example there are two main systems and a number of satellite systems (The
actual configuration would depend on business considerations.) There are two
concentrator queue managers located at convenient centers. Each QM-concentrator
has message channels to the local queue managers:
v QM-concentrator 1 has message channels to each of the three local queue
managers, QM1, QM2, and QM3. The applications using these queue managers
can communicate with each other through the QM-concentrators.
v QM-concentrator 2 has message channels to each of the three local queue
managers, QM4, QM5, and QM6. The applications using these queue managers
can communicate with each other through the QM-concentrators.
v The QM-concentrators have message channels between themselves thus allowing
any application at a queue manager to exchange messages with any other
application at another queue manager.
'QM2'
'QM-
'QM1' Concentrator 'QM3'
1'
'QM-
'QM4' Concentrator 'QM6'
2'
'QM5'
30 WebSphere MQ Intercommunication
Part 2. How intercommunication works
Chapter 4. WebSphere MQ distributed- Checking that the other end of the channel is still
messaging techniques . . . . . . . . . . 33 available . . . . . . . . . . . . . . 64
Message flow control . . . . . . . . . . . 33 Heartbeats . . . . . . . . . . . . . 64
Queue names in transmission header . . . . . 34 Keep Alive . . . . . . . . . . . . 64
How to create queue manager and reply-to Receive Time Out . . . . . . . . . . 64
aliases . . . . . . . . . . . . . . . 34 Adopting an MCA . . . . . . . . . . . 65
Putting messages on remote queues . . . . . . 35 Stopping and quiescing channels . . . . . . 66
More about name resolution . . . . . . . . 36 Restarting stopped channels . . . . . . . . 67
Choosing the transmission queue . . . . . . . 37 In-doubt channels . . . . . . . . . . . 68
Receiving messages . . . . . . . . . . . . 38 Problem determination . . . . . . . . . 69
Receiving alias queue manager names . . . . 38 Command validation . . . . . . . . . 69
Passing messages through your system . . . . . 39 Processing problems . . . . . . . . . 69
Method 1: Using the incoming location name . . 39 Messages and codes . . . . . . . . . 69
Method 2: Using an alias for the queue manager 40 What happens when a message cannot be
Method 3: Selecting a transmission queue . . . 40 delivered? . . . . . . . . . . . . . . . 69
Using these methods . . . . . . . . . . 40 Initialization and configuration files . . . . . . 71
Separating message flows . . . . . . . . . 40 z/OS . . . . . . . . . . . . . . . 71
Concentrating messages to diverse locations . . . 42 Windows systems . . . . . . . . . . . 71
Diverting message flows to another destination . . 43 i5/OS and UNIX systems . . . . . . . . . 71
Sending messages to a distribution list . . . . . 44 WebSphere MQ configuration file . . . . . 72
Reply-to queue . . . . . . . . . . . . . 45 Queue manager configuration file . . . . . 72
Reply-to queue alias example . . . . . . . 46 Data conversion . . . . . . . . . . . . . 73
Definitions used in this example at QM1 . . 47 Writing your own message channel agents . . . . 73
Definitions used in this example at QM2 . . 48
Put definition at QM1 . . . . . . . . . 48 Chapter 6. Channel attributes. . . . . . . . 75
Put definition at QM2 . . . . . . . . . 48 Channel attributes and channel types . . . . . . 75
How the example works . . . . . . . . . 48 Channel attributes in alphabetical order . . . . . 77
How the queue manager makes use of the Alter date (ALTDATE) . . . . . . . . . . 78
reply-to queue alias. . . . . . . . . . . 49 Alter time (ALTTIME) . . . . . . . . . . 78
Reply-to queue alias walk-through . . . . . 49 Batch Heartbeat Interval (BATCHHB). . . . . 79
Networking considerations . . . . . . . . . 50 Batch interval (BATCHINT) . . . . . . . . 79
Return routing . . . . . . . . . . . . . 51 Batch size (BATCHSZ) . . . . . . . . . . 80
Managing queue name translations . . . . . . 51 Channel name (CHANNEL) . . . . . . . . 81
Channel message sequence numbering . . . . . 53 Channel statistics (STATCHL) . . . . . . . 81
Sequential retrieval of messages . . . . . . 53 Channel type (CHLTYPE) . . . . . . . . 82
Sequence of retrieval of fast, nonpersistent Cluster (CLUSTER) . . . . . . . . . . . 82
messages . . . . . . . . . . . . . . 53 Cluster namelist (CLUSNL) . . . . . . . . 82
Loopback testing . . . . . . . . . . . . 54 Cluster workload priority (CLWLPRTY) . . . . 83
Route tracing and activity recording . . . . . . 54 Cluster workload rank (CLWLRANK) . . . . 83
Cluster workload weight (CLWLWGHT). . . . 83
Chapter 5. DQM implementation . . . . . . . 55 Connection name (CONNAME) . . . . . . 83
Functions of DQM . . . . . . . . . . . . 55 Convert message (CONVERT) . . . . . . . 85
Message sending and receiving . . . . . . . . 56 Data compression (COMPMSG) . . . . . . 85
Channel parameters . . . . . . . . . . 57 Description (DESCR) . . . . . . . . . . 85
Channel status and sequence numbers . . . . 57 Disconnect interval (DISCINT) . . . . . . . 86
Channel control function . . . . . . . . . . 57 Disposition (QSGDISP) . . . . . . . . . 87
Preparing channels . . . . . . . . . . . 58 Header compression (COMPHDR) . . . . . . 87
Auto-definition of receiver and Heartbeat interval (HBINT) . . . . . . . . 87
server-connection channels . . . . . . . 58 KeepAlive Interval (KAINT) . . . . . . . . 88
Defining other objects . . . . . . . . . 58 Local Address (LOCLADDR) . . . . . . . 88
Multiple message channels per transmission Long retry count (LONGRTY) . . . . . . . 90
queue . . . . . . . . . . . . . . 59 Long retry interval (LONGTMR) . . . . . . 90
Starting a channel . . . . . . . . . . 59 LU 6.2 mode name (MODENAME) . . . . . 91
Channel states . . . . . . . . . . . . 59 LU 6.2 transaction program name (TPNAME) . . 91
Current and active . . . . . . . . . . 60 Maximum message length (MAXMSGL) . . . . 92
Channel errors . . . . . . . . . . . 63 Message channel agent name (MCANAME) . . 92
32 WebSphere MQ Intercommunication
Chapter 4. WebSphere MQ distributed-messaging techniques
This chapter describes techniques that are of use when planning channels. It
introduces the concept of message flow control and explains how this is arranged
in distributed queue management (DQM). It gives more detailed information about
the concepts introduced in the preceding chapters and starts to show how you
might use distributed queue management. This chapter covers the following topics:
v “Message flow control”
v “Putting messages on remote queues” on page 35
v “Choosing the transmission queue” on page 37
v “Receiving messages” on page 38
v “Passing messages through your system” on page 39
v “Separating message flows” on page 40
v “Concentrating messages to diverse locations” on page 42
v “Diverting message flows to another destination” on page 43
v “Sending messages to a distribution list” on page 44
v “Reply-to queue” on page 45
v “Networking considerations” on page 50
v “Return routing” on page 51
v “Managing queue name translations” on page 51
v “Channel message sequence numbering” on page 53
v “Loopback testing” on page 54
v “Route tracing and activity recording” on page 54
You control message flow using a number of techniques that were introduced in
Chapter 2, “Making your applications communicate,” on page 17. If your queue
manager is in a cluster, message flow is controlled using different techniques, as
described in the WebSphere MQ Queue Manager Clusters book. If your queue
managers are in a queue sharing group and intra-group queuing (IGQ) is enabled,
then the message flow can be controlled by IGQ agents, which are described in
Chapter 27, “Intra-group queuing,” on page 327.
This chapter describes how you use your system’s queues, alias queue definitions,
and message channels to achieve message flow control.
The queue manager and queue objects are described in the WebSphere MQ System
Administration Guide book for WebSphere MQ for UNIX systems, and Windows
systems, in the WebSphere MQ for iSeries V6 System Administration Guide book for
WebSphere MQ for iSeries, in the WebSphere MQ for z/OS Concepts and Planning
Guide for WebSphere MQ for z/OS, or in the MQSeries System Management Guide
for your platform. Message channels are described in “Message channels” on page
8. The following techniques use these objects to create message flows in your
system:
v Putting messages to remote queues
v Routing via particular transmission queues
v Receiving messages
v Passing messages through your system
v Separating message flows
v Switching a message flow to another destination
v Resolving the reply-to queue name to an alias name
Note
All the concepts described in this chapter are relevant for all nodes in a
network, and include sending and receiving ends of message channels. For
this reason, only one node is illustrated in most examples, except where the
example requires explicit cooperation by the administrator at the other end of
a message channel.
You will be changing the queue manager part of this queue name when you create
parallel classes of service. Remember to return the queue manager name to the
original name when the end of the class of service diversion has been reached.
34 WebSphere MQ Intercommunication
Message flow control
then the queue manager will substitute the queue manager name in the open
call with the queue manager name in the definition.
In addition, the definition can contain the name of the transmission queue to be
used. If no transmission queue name is provided, the queue manager takes the
queue manager name, taken from the remote queue definition, for the
transmission queue name. If a transmission queue of this name is not defined,
but a default transmission queue is defined, the default transmission queue is
used.
v Using a remote queue definition to redefine a reply-to queue name.
Each time an application puts a message to a queue, it may provide the name of
a reply-to queue for answer messages but with the queue manager name blank.
If you provide a remote queue definition with the same name as the reply-to
queue then the local queue manager replaces the reply-to queue name with the
queue name from your definition.
You may provide a queue manager name in the definition, but not a
transmission queue name.
Table 2. Three ways of using the remote queue definition object
Queue manager Transmission
Usage name Queue name queue name
1. Remote queue definition (on OPEN call)
Supplied in the call blank or local QM (*) required -
Supplied in the definition required required optional
2. Queue manager alias (on OPEN call)
Supplied in the call (*) required and required -
not local QM
Supplied in the definition required blank optional
3. Reply-to queue alias (on PUT call)
Supplied in the call blank (*) required -
Supplied in the definition optional optional blank
Note: (*) means that this name is the name of the definition object
For a formal description, see Appendix B, “Queue name resolution,” on page 525.
Figure 19. A remote queue definition is used to resolve a queue name to a transmission
queue to an adjacent queue manager. Note: The dashed outline represents a remote queue
definition. This is not a real queue, but a name alias that is controlled as though it were a
real queue.
Incoming messages from an adjacent system have already had this type of name
resolution carried out by the original queue manager, and have the transmission
header showing the physical destination queue name and queue manager name.
These messages are unaffected by remote queue definitions.
36 WebSphere MQ Intercommunication
Choosing the transmission queue
QA norm at
QMB priority via TXI
QA norm
Queue 'QA norm'
Figure 20. The remote queue definition allows a different transmission queue to be used
The channel_back has been left out of this illustration because it would need a
queue manager alias; this is discussed in the following example.
Receiving messages
QA norm
Queue 'QA norm'
Channel back
QA norm at QMB
Figure 21. Receiving messages directly, and resolving alias queue manager name
As well as arranging for messages to be sent, the system administrator must also
arrange for messages to be received from adjacent queue managers. Received
messages contain the physical name of the destination queue manager and queue
in the transmission header. They are treated exactly the same as messages from a
local application that specifies both queue manager name and queue name.
Because of this, you need to ensure that messages entering your system do not
have an unintentional name resolution carried out. See Figure 21 for this scenario.
38 WebSphere MQ Intercommunication
Passing messages through system
Following on from the technique shown in Figure 21 on page 38, where you saw
how an alias flow is captured, Figure 22 illustrates the ways networks are built up
by bringing together the techniques we have discussed.
You must pass the first message flow through your system unchanged; the second
message flow through a different transmission queue and channel, while reverting
the messages from the alias queue manager name ‘QMD_norm’ to the physical
location ‘QMD’; and the third message flow simply chooses a different
transmission queue without any other change.
with that name, ‘QMC’ in this example, as a part of a channel to an adjacent queue
manager. The messages are delivered unchanged.
Note
None of the message flows shown in the example changes the destination
queue. The queue manager name aliases simply provide separation of
message flows.
40 WebSphere MQ Intercommunication
Separating message flows
QB at QMC small
Channel back Queue 'QMC small'
Application
'QB small'
Queue 'QB small'
QB large
Queue 'QB large'
QB at QMC large
Channel back Queue 'QMC large'
In the example shown in Figure 23, the two incoming flows are to alias queue
manager names ‘QMC_small’ and ‘QMC_large’. You provide these flows with a
queue manager alias definition to capture these flows for the local queue manager.
You have an application addressing two remote queues and you need these
message flows to be kept separate. You provide two remote queue definitions that
specify the same location, ‘QMC’, but specify different transmission queues. This
keeps the flows separate, and nothing extra is needed at the far end as they have
the same destination queue manager name in the transmission headers. You
provide:
v The incoming channel definitions
v The two remote queue definitions QB_small and QB_large
v The two queue manager alias definitions QMC_small and QMC_large
v The three sending channel definitions
v Three transmission queues: TX_small, TX_large, and TX_external
'QMB'
QB at QME
Channel_back Queue 'QME'
Application
QA
Queue 'QA’
QB
Queue 'QB’
'QMC'
Local queue
Queue 'QA'
In this example, messages from different sources, local and adjacent, and having
different destination queues and queue managers, are flowed via transmission
queue ‘TX1’ to queue manager QMC. Queue manager QMC delivers the messages
according to the destinations, one set to a transmission queue ‘QMD’ for onward
42 WebSphere MQ Intercommunication
Concentrating messages
Figure 25 illustrates how you can redefine the destination of certain messages.
Incoming messages to QMA are destined for ‘QB at QMC’. They would normally
arrive at QMA and be placed on a transmission queue called QMC which would
have been part of a channel to QMC. QMA must divert the messages to QMD, but
is able to reach QMD only over QMB. This method is useful when you need to
move a service from one location to another, and allow subscribers to continue to
send messages on a temporary basis until they have adjusted to the new address.
The method of rerouting incoming messages destined for a certain queue manager
to a different queue manager uses:
v A queue manager alias to change the destination queue manager to another
queue manager, and to select a transmission queue to the adjacent system
v A transmission queue to serve the adjacent queue manager
v A transmission queue at the adjacent queue manager for onward routing to the
destination queue manager
v Queue manager alias object definition QMC with QB at QMD via QMB
v Channel_out definition
v The associated transmission queue QMB
You can use aliases within a clustering environment. For information about this,
see the WebSphere MQ Queue Manager Clusters book.
Not all queue managers support distribution lists. When an MCA establishes a
connection with a partner, it determines whether or not the partner supports
distribution lists and sets a flag on the transmission queue accordingly. If an
application tries to send a message that is destined for a distribution list but the
partner does not support distribution lists, the sending MCA intercepts the
message and puts it onto the transmission queue once for each intended
destination.
A receiving MCA ensures that messages sent to a distribution list are safely
received at all the intended destinations. If any destinations fail, the MCA
establishes which ones have failed so that it can generate exception reports for
them and can try to re-send the messages to them.
44 WebSphere MQ Intercommunication
Reply-to queue
Reply-to queue
Queue 'QRR'
The application opens QA at QMB and puts messages on that queue. The messages
are given a reply-to queue name of QR, without the queue manager name being
specified. Queue manager QMA finds the reply-to queue object QR and extracts
from it the alias name of QRR and the queue manager name QMA_class1. These
names are put into the reply-to fields of the messages.
This scenario depicts the way you give applications the facility to choose a class of
service for reply messages, the class being implemented by the transmission queue
QMA_class1 at QMB, together with the queue manager alias definition,
QMA_class1 at QMA. In this way, you can change an application’s reply-to queue
so that the flows are segregated without involving the application. That is, the
application always chooses QR for this particular class of service, and you have the
opportunity to change the class of service with the reply-to queue definition QR.
In this way, you may change the class of service as necessary, without involving
the application, by changing the reply-to alias ‘QR’, together with the transmission
queue ‘QMA_class1’ and queue manager alias ‘QMA_class1’.
If no reply-to alias object is found when the message is put on the queue, the local
queue manager name is inserted in the blank reply-to queue manager name field,
and the reply-to queue name remains unchanged.
Note that the applications must be aware of the naming convention that the name
they use for the reply-to queue is different from the name of the actual queue
where the return messages are to be found.
For example, when two classes of service are provided for the use of applications
with reply-to queue alias names of ‘C1_alias’, and ‘C2_alias’, the applications use
these names as reply-to queue names in the message put calls, but the applications
will actually expect messages to appear in queues ‘C1’ and ‘C2’, respectively.
However, an application is able to make an inquiry call on the reply-to alias queue
to check for itself the name of the real queue it must use to get the reply messages.
As shown in Figure 27 on page 47, the return route must be available for the reply
messages, including the transmission queue, channel, and queue manager alias.
46 WebSphere MQ Intercommunication
Reply-to queue
'QM1' 'QM2'
Queue 'Inquiry'
Q='Answer'
QM ='QM 1 r e lie f '
Queue 'Answer'
This example is for requester applications at ‘QM1’ that send messages to server
applications at ‘QM2’. The servers’ messages are to be returned through an
alternative channel using transmission queue ‘QM1_relief’ (the default return
channel would be served with a transmission queue ‘QM1’).
The reply-to queue alias is a particular use of the remote queue definition named
‘Answer_alias’. Applications at QM1 include this name, ‘Answer_alias’, in the
reply-to field of all messages that they put on queue ‘Inquiry’.
Server applications at QM2 use the reply-to field of received messages to obtain
the queue and queue manager names for the reply messages to the requester at
QM1.
Object Definition
Local transmission queue QM2
Remote queue definition Object name Inquiry
Remote queue manager name QM2
Remote queue name Inquiry
Transmission queue name QM2 (DEFAULT)
Queue manager alias Object name QM1_relief *
Queue manager name QM1
Queue name (blank)
Reply-to queue alias Object name Answer_alias
Remote queue manager name QM1_relief *
Remote queue name Answer
Object Definition
Local queue Inquiry
Transmission queue QM1_relief
Field Content
Queue name Inquiry
Queue manager name (blank)
Reply-to queue name Answer_alias
Reply-to queue manager (blank)
Field Content
Queue name Answer
Queue manager name QM1_relief
The reply-to queue alias definitions are available for use by the QM1 system
administrator to change the name of the reply-to queue ‘Answer’, and of the
return route ‘QM1_relief’.
Changing the queue name ‘Answer’ is normally not useful because the QM1
applications are expecting their answers in this queue. However, the QM1 system
administrator is able to change the return route (class of service), as necessary.
48 WebSphere MQ Intercommunication
Reply-to queue
How the queue manager makes use of the reply-to queue alias
Queue manager QM1 retrieves the definitions from the reply-to queue alias when
the reply-to queue name, included in the put call by the application, is the same as
the reply-to queue alias, and the queue manager part is blank.
The queue manager replaces the reply-to queue name in the put call with the
queue name from the definition. It replaces the blank queue manager name in the
put call with the queue manager name from the definition.
These names are carried with the message in the message descriptor.
Table 3. Reply-to queue alias
Field name Put call Transmission header
Reply-to queue name Answer_alias Answer
Reply-to queue manager (blank) QM1_relief
name
8. Queue manager ‘QM2’ carries out the put command, and finding that the
queue manager name, ‘QM1_relief’, is a remote queue manager, it places the
message on the transmission queue with the same name, ‘QM1_relief’. The
message is given a transmission header containing the name of the destination
queue, ‘Answer’, and the destination queue manager, ‘QM1_relief’.
9. The message is transferred to queue manager ‘QM1’ where the queue
manager, recognizing that the queue manager name ‘QM1_relief’ is an alias,
extracts from the alias definition ‘QM1_relief’ the physical queue manager
name ‘QM1’.
10. Queue manager ‘QM1’ then puts the message on the queue name contained in
the transmission header, ‘Answer’.
11. The application extracts its reply message from the queue ‘Answer’.
Networking considerations
In a distributed-queuing environment, because message destinations are addressed
with just a queue name and a queue manager name, the following rules apply:
1. Where the queue manager name is given, and the name is different from the
local queue manager’s name:
v A transmission queue must be available with the same name, and this
transmission queue must be part of a message channel moving messages to
another queue manager, or
v A queue manager alias definition must exist to resolve the queue manager
name to the same, or another queue manager name, and optional
transmission queue, or
v If the transmission queue name cannot be resolved, and a default
transmission queue has been defined, the default transmission queue is used.
2. Where only the queue name is supplied, a queue of any type but with the same
name must be available on the local queue manager. This queue may be a
remote queue definition which resolves to: a transmission queue to an adjacent
queue manager, a queue manager name, and an optional transmission queue.
To see how this works in a clustering environment, see the WebSphere MQ Queue
Manager Clusters book.
Consider the scenario of a message channel moving messages from one queue
manager to another in a distributed-queuing environment.
The messages being moved have originated from any other queue manager in the
network, and some messages may arrive that have an unknown queue manager
name as destination. This can occur when a queue manager name has changed or
has been removed from the system, for example.
The channel program recognizes this situation when it cannot find a transmission
queue for these messages, and places the messages on your undelivered-message
50 WebSphere MQ Intercommunication
Networking considerations
(dead-letter) queue. It is your responsibility to look for these messages and arrange
for them to be forwarded to the correct destination, or to return them to the
originator, where this can be ascertained.
Subsequent use of the various alias possibilities should be used only when
separating and combining message flows.
Return routing
Messages may contain a return address in the form of the name of a queue and
queue manager. This applies in both a distributed-queuing environment and a
clustering environment. This address is normally specified by the application that
creates the message, but may be modified by any application that subsequently
handles the message, including user exit applications.
Irrespective of the source of this address, any application handling the message
may choose to use this address for returning answer, status, or report messages to
the originating application.
The way these response messages are routed is not different from the way the
original message is routed. You need to be aware that the message flows you
create to other queue managers will need corresponding return flows.
This is a likely possibility for name conflict problems that can only be
prevented by a network-wide agreement on physical and logical queue
names.
When you create a queue manager alias definition or a remote queue definition,
the name resolution is carried out for every message carrying that name, regardless
of the source of the message. To oversee this situation, which may involve large
numbers of queues in a queue manager network, you keep tables of:
v The names of source queues and of source queue managers with respect to
resolved queue names, resolved queue manager names, and resolved
transmission queue names, with method of resolution
v The names of source queues with respect to:
– Resolved destination queue names
– Resolved destination queue manager names
– Transmission queues
– Message channel names
– Adjacent system names
– Reply-to queue names
Note: The use of the term source in this context refers to the queue name or the
queue manager name provided by the application, or a channel program
when opening a queue for putting messages.
The names in these tables are derived from the examples in this chapter, and this
table is not intended as a practical example of queue name resolution in one node.
Table 4. Queue name resolution at queue manager QMA
Source queue Source queue Resolved Resolved queue Resolved Resolution type
specified manager specified queue name manager name transmission
when queue when queue is queue name
is opened opened
QA_norm - QA_norm QMB QMB Remote queue
(any) QMB - - QMB (none)
QA_norm - QA_norm QMB TX1 Remote queue
QB QMC QB QMD QMB Queue manager alias
52 WebSphere MQ Intercommunication
Managing queue name translations
Local QMGR Queue name for messages Reply-to queue alias name Redefined to
QMA QRR QR QRR at QMA_class1
Note: Messages from other tasks and units of work may be interspersed with the
sequence, even where the sequence was put from within a single unit of
work.
If these conditions cannot be met, and the order of messages on the target queue is
important, then the application can be coded to use its own message sequence
number as part of the message to assure the order of the messages.
Loopback testing
Loopback testing is a technique on non-z/OS platforms that allows you to test a
communications link without actually linking to another machine. You set up a
connection between two queue managers as though they are on separate machines,
but you test the connection by looping back to another process on the same
machine. This means that you can test your communications code without
requiring an active network.
The way you do this depends on which products and protocols you are using.
Refer to the documentation for the products you are using for more information.
54 WebSphere MQ Intercommunication
Chapter 5. DQM implementation
This chapter describes the implementation of the concepts introduced in Chapter 2,
“Making your applications communicate,” on page 17.
Functions of DQM
Distributed queue management has these functions:
v Message sending and receiving
v Channel control
v Initialization file
v Data conversion
v Channel exits
The MCAs in turn are controlled by DQM itself. The structure is platform
dependent, but typically includes listeners and trigger monitors, together with
operator commands and panels.
A message channel is a one-way pipe for moving messages from one queue manager
to another. Thus a message channel has two end-points, represented by a pair of
MCAs. Each end-point has a definition of its end of the message channel. For
example, one end would define a sender, the other end a receiver.
For information about channel exits, see Chapter 34, “Channel-exit programs,” on
page 415.
Operator
Synchronization Channel
Information definitions
Status Commands
Channel Listener
SENDING Initiator RECEIVING
Messages Messages
Queue Local
Trigger Queue Initiation
message
Queue Local
Communications
Messages Network Messages
Messages
Notes:
1. There is one MCA per channel, depending on the platform. There may be one
or more channel control functions for a given queue manager.
2. The implementation of MCAs and channel control functions is highly platform
dependent; they may be programs or processes or threads, and they may be a
single entity or many comprising several independent or linked parts.
3. All components marked with a star can use the MQI.
56 WebSphere MQ Intercommunication
Message sending and receiving
Channel parameters
An MCA receives its parameters in one of several ways:
v If started by a command, the channel name is passed in a data area. The MCA
then reads the channel definition directly to obtain its attributes.
v For sender, and in some cases server channels, the MCA can be started
automatically by the queue manager trigger. The channel name is retrieved from
the trigger process definition, where applicable, and is passed to the MCA. The
remaining processing is the same as that described above. Server channels
should only be set up to trigger if they are fully qualified, that is, they specify a
CONNAME to connect to.
v If started remotely by a sender, server, requester, or client-connection, the
channel name is passed in the initial data from the partner message channel
agent. The MCA reads the channel definition directly to obtain its attributes.
Certain attributes not defined in the channel definition are also negotiable:
Split messages
If one end does not support this, split messages will not be sent.
Conversion capability
If one end cannot perform the necessary code page conversion or numeric
encoding conversion when needed, the other end must handle it. If neither
end supports it, when needed, the channel cannot start.
Distribution list support
If one end does not support distribution lists, the partner MCA sets a flag
in its transmission queue so that it will know to intercept messages
intended for multiple destinations.
Channel administration commands deal with the definitions of the channels. They
enable you to:
v Create a channel definition
v Copy a channel definition
v Alter a channel definition
v Delete a channel definition
Channel control commands manage the operation of the channels. They enable you
to:
v Start a channel
v Stop a channel
v Re-synchronize with partner (in some implementations)
v Reset message sequence numbers
v Resolve an in-doubt batch of messages
v Ping; send a test communication across the channel
Preparing channels
Before trying to start a message channel or MQI channel, you must make sure that
all the attributes of the local and remote channel definitions are correct and
compatible. Chapter 6, “Channel attributes,” on page 75 describes the channel
definitions and attributes.
Although you set up explicit channel definitions, the channel negotiations carried
out when a channel starts up may override one or other of the values defined. This
is quite normal, and transparent, and has been arranged like this so that otherwise
incompatible definitions can work together.
Once the definition has been created and stored the channel start proceeds as
though the definition had always existed. The batch size, transmission size, and
message size are negotiated with the partner.
58 WebSphere MQ Intercommunication
Channel control function
necessary for you to prepare other WebSphere MQ objects, such as remote queue
definitions, queue manager alias definitions, and reply-to queue alias definitions,
so as to implement the scenarios described in Chapter 2, “Making your
applications communicate,” on page 17.
For information about MQI channels, see the WebSphere MQ Clients book.
Starting a channel
A channel can be caused to start transmitting messages in one of four ways. It can
be:
v Started by an operator (not receiver, cluster-receiver or server-connection
channels).
v Triggered from the transmission queue. This applies to sender channels and fully
qualified server channels (those which specify a CONNAME) only. You will
need to prepare the necessary objects for triggering channels.
v Started from an application program (not receiver, cluster-receiver or
server-connection channels).
v Started remotely from the network by a sender, cluster-sender, requester, server,
or client-connection channel. Receiver, cluster-receiver and possibly server and
requester channel transmissions, are started this way; so are server-connection
channels. The channels themselves must already be started (that is, enabled).
Channel states
Figure 29 on page 60 shows the hierarchy of all possible channel states and the
substates that apply to each of the channel states. The substates are shown inside
boxes, below the states to which they apply. Figure 30 on page 61 shows the links
between channel states. These apply to all types of message channel and
server-connection channels.
Channel
Inactive Current
60 WebSphere MQ Intercommunication
Channel control function
INACTIVE
Start
channel
START command
or
TRIGGER
or
REMOTE INITIATION
STOPPED or
Disabled CHANNEL INITIATOR
INITIALIZING STARTING
RETRYING
Waiting until time
for next attempt One attempt to
establish session fails
BINDING
Establishing session and
initial data exchange
PAUSED Status
Waiting for OK REQUESTING
message-retry
interval
RUNNING
Transferring or ready
to transfer
STOPPING
Check limits if
retrying
STOP command, Disconnect interval expires
non-retryable error
or retry limit reached
Notes:
1. When a channel is in one of the six states highlighted in Figure 30 on page 61
(INITIALIZING, BINDING, REQUESTING, RUNNING, PAUSED, or
STOPPING), it is consuming resource and a process or thread is running; the
channel is active.
2. When a channel is in STOPPED state, the session may be active because the
next state is not yet known.
Specifying the maximum number of current channels: You can specify the
maximum number of channels that can be current at one time. This is the number
of channels that have entries in the channel status table, including channels that
are retrying and channels that are stopped. Specify this using ALTER QMGR
MAXCHL for z/OS, the queue manager initialization file for i5/OS, the queue
manager configuration file for UNIX systems, or the WebSphere MQ Explorer. For
more information about the values you set using the initialization or the
configuration file see Appendix C, “Configuration file stanzas for distributed
queuing,” on page 529. For more information about specifying the maximum
number of channels, see the WebSphere MQ System Administration Guide for
WebSphere MQ for UNIX systems, and Windows systems, the WebSphere MQ for
iSeries V6 System Administration Guide book for WebSphere MQ for iSeries, or the
WebSphere MQ Script (MQSC) Command Reference for WebSphere MQ for z/OS.
Notes:
1. Server-connection channels are included in this number.
2. A channel must be current before it can become active. If a channel is started,
but cannot become current, the start fails.
Specifying the maximum number of active channels: You can also specify the
maximum number of active channels. You can do this to prevent your system
being overloaded by a large number of starting channels. If you use this method,
you should set the disconnect interval attribute to a low value to allow waiting
channels to start as soon as other channels terminate.
Each time a channel that is retrying attempts to establish connection with its
partner, it must become an active channel. If the attempt fails, it remains a current
channel that is not active, until it is time for the next attempt. The number of times
that a channel will retry, and how often, is determined by the retry count and retry
interval channel attributes. There are short and long values for both these
attributes. See Chapter 6, “Channel attributes,” on page 75 for more information.
When a channel has to become an active channel (because a START command has
been issued, or because it has been triggered, or because it is time for another retry
attempt), but is unable to do so because the number of active channels is already
at the maximum value, the channel waits until one of the active slots is freed by
another channel instance ceasing to be active. If, however, a channel is starting
because it is being initiated remotely, and there are no active slots available for it at
that time, the remote initiation is rejected.
62 WebSphere MQ Intercommunication
Channel control function
Whenever a channel, other than a requester channel, is unable to get an active slot,
and so waits for one, a message is written to the log or the z/OS console, and an
event is generated. When a slot is subsequently freed and the channel is able to
acquire it, another message and event are generated. Neither of these events and
messages are generated if the channel is able to acquire a slot straightaway.
For more information about specifying the maximum number of active channels,
see the WebSphere MQ System Administration Guide for WebSphere MQ for UNIX
systems, and Windows systems, the WebSphere MQ for iSeries V6 System
Administration Guide for WebSphere MQ for iSeries, or WebSphere MQ Script
(MQSC) Command Reference for WebSphere MQ for z/OS.
Channel errors
Errors on channels cause the channel to stop further transmissions. If the channel
is a sender or server, it goes to RETRY state because it is possible that the problem
may clear itself. If it cannot go to RETRY state, the channel goes to STOPPED state.
For sending channels, the associated transmission queue is set to GET(DISABLED)
and triggering is turned off. (A STOP command with STATUS(STOPPED) takes the
side that issued it to STOPPED state; only expiry of the disconnect interval or a
STOP command with STATUS(INACTIVE) will make it end normally and become
inactive.) Channels that are in STOPPED state need operator intervention before
they will restart (see “Restarting stopped channels” on page 67).
Note: For i5/OS, UNIX systems, and Windows systems, a channel initiator must
be running for retry to be attempted. If the channel initiator is not available,
the channel becomes inactive and must be manually restarted. If you are
using a script to start the channel, ensure the channel initiator is running
before you try to run the script.
“Long retry count (LONGRTY)” on page 90 describes how retrying works. If the
error clears, the channel restarts automatically, and the transmission queue is
re-enabled. If the retry limit is reached without the error clearing, the channel goes
to STOPPED state. A stopped channel must be restarted manually by the operator.
If the error is still present, it does not retry again. When it does start successfully,
the transmission queue is re-enabled.
If the channel initiator (on z/OS) or queue manager (on platforms other than
z/OS) stops while a channel is in RETRYING or STOPPED status, the channel
status is remembered when the channel initiator or queue manager is restarted.
However, the channel status for the SVRCONN channel type is reset if the channel
initiator (on z/OS) or queue manager (on platforms other than z/OS) stops while
the channel is in STOPPED status.
If a channel is unable to put a message to the target queue because that queue is
full or put inhibited, the channel can retry the operation a number of times
See Chapter 6, “Channel attributes,” on page 75 for information about the channel
attributes, and Chapter 34, “Channel-exit programs,” on page 415 for information
about the message-retry exit.
Keep Alive
In WebSphere MQ for z/OS, if you are using TCP/IP as the transport protocol,
you can also specify a value for the KeepAlive Interval channel attribute (KAINT).
You are recommended to give the KeepAliveInterval a higher value than the
heartbeat interval, and a smaller value than the disconnect value. You can use this
attribute to specify a time-out value for each channel. This is described in
“KeepAlive Interval (KAINT)” on page 88.
In WebSphere MQ for iSeries, UNIX systems, and Windows systems, if you are
using TCP as your transport protocol, you can set keepalive=yes. If you specify
this option, TCP periodically checks that the other end of the connection is still
available, and if it is not, the channel is terminated. This is described in
“KeepAlive Interval (KAINT)” on page 88.
If you have unreliable channels that are suffering from TCP errors, use of
KEEPALIVE will mean that your channels are more likely to recover
You can specify time intervals to control the behavior of the KEEPALIVE option.
When you change the time interval, only TCP/IP channels started after the change
are affected. The value that you choose for the time interval should be less than
the value of the disconnect interval for the channel.
For more information about using the KEEPALIVE option on z/OS, see WebSphere
MQ for z/OS Concepts and Planning Guide . For other platforms, see the chapter
about setting up communications for your platform in this manual.
In WebSphere MQ for iSeries, UNIX systems, and Windows systems, the time-out
value is set as follows:
1. For an initial number of flows, before any negotiation has taken place, the
timeout is twice the HBINT value from the channel definition.
64 WebSphere MQ Intercommunication
Channel control function
2. When the channels have negotiated a HBINT value, if HBINT is set to less than
60 seconds, the timeout is set to twice this value. If HBINT is set to 60 seconds
or more, the timeout value is set to 60 seconds greater than the value of
HBINT.
Adopting an MCA
If a channel suffers a communications failure, the receiver channel could be left in
a ’communications receive’ state. When communications are re-established the
sender channel attempts to reconnect. If the remote queue manager finds that the
receiver channel is already running it does not allow another version of the same
receiver channel to be started. This problem requires user intervention to rectify
the problem or the use of system keepalive.
The Adopt MCA function solves the problem automatically. It enables WebSphere
MQ to cancel a receiver channel and to start a new one in its place.
The function can be set up with various options. For more information see
WebSphere MQ Script (MQSC) Command Reference for z/OS, WebSphere MQ for
iSeries V6 System Administration Guide for iSeries and WebSphere MQ System
Administration Guide for other platforms.
In this case, you can stop the channel. You can do this using:
v the STOP CHANNEL MQSC command
v the Stop Channel PCF command
v the WebSphere MQ Explorer
v other platform-specific mechanisms, as follows:
For z/OS:
The Stop a channel panel
For i5/OS:
The ENDMQMCHL CL command or the END option on the
WRKMQMCHL panel
There are three options for stopping channels using these commands:
QUIESCE
The QUIESCE option attempts to end the current batch of messages before
stopping the channel.
FORCE
The FORCE option attempts to stop the channel immediately and may
require the channel to resynchronize when it restarts because the channel
may be left in doubt.
TERMINATE
The TERMINATE option attempts to stop the channel immediately, and
terminates the channel’s thread or process.
Note that all of these options leave the channel in a STOPPED state, requiring
operator intervention to restart it.
Stopping the channel at the sending end is quite effective but does require operator
intervention to restart. At the receiving end of the channel, things are much more
difficult because the MCA is waiting for data from the sending side, and there is
no way to initiate an orderly termination of the channel from the receiving side; the
stop command is pending until the MCA returns from its wait for data.
66 WebSphere MQ Intercommunication
Channel control function
v If you want your channels to be long running, you should note that there can be
orderly termination only from the sending end. When channels are interrupted,
that is, stopped, operator intervention (a START CHANNEL command) is
required in order to restart them.
v If you want your channels to be active only when there are messages for them
to transmit, you should set the disconnect interval to a fairly low value. Note
that the default setting is quite high and so is not recommended for channels
where this level of control is required. Because it is difficult to interrupt the
receiving channel, the most economical option is to have the channel
automatically disconnect and reconnect as the workload demands. For most
channels, the appropriate setting of the disconnect interval can be established
heuristically.
v You can use the heartbeat-interval attribute to cause the sending MCA to send a
heartbeat flow to the receiving MCA during periods in which it has no messages
to send. This releases the receiving MCA from its wait state and gives it an
opportunity to quiesce the channel without waiting for the disconnect interval to
expire. Give the heartbeat interval a lower value than the value of the disconnect
interval.
Notes:
1. You are advised to set the disconnect interval to a low value, or to use
heartbeats, for server channels. This is to allow for the case where the
requester channel ends abnormally (for example, because the channel was
canceled) when there are no messages for the server channel to send. If the
disconnect interval is set high and heartbeats are not in use, the server does
not detect that the requester has ended (it will only do this the next time it
tries to send a message to the requester). While the server is still running, it
holds the transmission queue open for exclusive input in order to get any
more messages that arrive on the queue. If an attempt is made to restart the
channel from the requester, the start request receives an error because the
server still has the transmission queue open for exclusive input. It is
necessary to stop the server channel, and then restart the channel from the
requester again.
For sender or server channels, when the channel entered the STOPPED state, the
associated transmission queue was set to GET(DISABLED) and triggering was set
off. When the start request is received, these attributes are reset automatically.
If the channel initiator (on z/OS) or queue manager (on distributed platforms)
stops while a channel is in RETRYING or STOPPED status, the channel status is
remembered when the channel initiator or queue manager is restarted. However,
the channel status for the SVRCONN channel type is reset if the channel initiator
or queue manager stops while the channel is in STOPPED status.
In-doubt channels
An in-doubt channel is a channel that is in doubt with a remote channel about
which messages have been sent and received. Note the distinction between this
and a queue manager being in doubt about which messages should be committed
to a queue.
You can reduce the opportunity for a channel to be placed in doubt by using the
Batch Heartbeat channel parameter (BATCHHB). When a value for this parameter
is specified, a sender channel checks that the remote channel is still active before
taking any further action. If no response is received the receiver channel is
considered to be no longer active. The messages can be rolled-back, and re-routed,
and the sender-channel is not put in doubt. This reduces the time when the
channel could be placed in doubt to the period between the sender channel
verifying that the receiver channel is still active, and verifying that the receiver
channel has received the sent messages. See Chapter 6, “Channel attributes,” on
page 75 for more information on the batch heartbeat parameter.
You can, when necessary, resynchronize the channel manually. The term manual
includes use of operators or programs that contain WebSphere MQ system
management commands. The manual resynchronization process works as follows.
This description uses MQSC commands, but you can also use the PCF equivalents.
1. Use the DISPLAY CHSTATUS command to find the last-committed logical unit
of work ID (LUWID) for each side of the channel. Do this using the following
commands:
v For the in-doubt side of the channel:
DISPLAY CHSTATUS(name) SAVED CURLUWID
You can use the CONNAME and XMITQ parameters to further identify the
channel.
v For the receiving side of the channel:
DISPLAY CHSTATUS(name) SAVED LSTLUWID
You can use the CONNAME parameter to further identify the channel.
The commands are different because only the sending side of the channel can
be in doubt. The receiving side is never in doubt.
On WebSphere MQ for iSeries, the DISPLAY CHSTATUS command can be
executed from a file using the STRMQMMQSC command or the Work with
MQM Channel Status CL command, WRKMQMCHST
68 WebSphere MQ Intercommunication
Channel control function
2. If the two LUWIDs are the same, the receiving side has committed the unit of
work that the sender considers to be in doubt. The sending side can now
remove the in-doubt messages from the transmission queue and re-enable it.
This is done with the following channel RESOLVE command:
RESOLVE CHANNEL(name) ACTION(COMMIT)
3. If the two LUWIDs are different, the receiving side has not committed the unit
of work that the sender considers to be in doubt. The sending side needs to
retain the in-doubt messages on the transmission queue and re-send them. This
is done with the following channel RESOLVE command:
RESOLVE CHANNEL(name) ACTION(BACKOUT)
On WebSphere MQ for iSeries, you can use the Resolve MQM Channel
command, RSVMQMCHL.
Once this process is complete the channel is no longer in doubt. The transmission
queue can now be used by another channel, if required.
Problem determination
There are two distinct aspects to problem determination:
v Problems discovered when a command is being submitted
v Problems discovered during operation of the channels
Command validation
Commands and panel data must be free from errors before they are accepted for
processing. Any errors found by the validation are immediately notified to the user
by error messages.
Problem diagnosis begins with the interpretation of these error messages and
taking the recommended corrective action.
Processing problems
Problems found during normal operation of the channels are notified to the system
console or the system log. Problem diagnosis begins with the collection of all
relevant information from the log, and continues with analysis to identify the
problem.
Confirmation and error messages are returned to the terminal that initiated the
commands, when possible.
WebSphere MQ produces accounting and statistical data, which you can use to
identify trends in utilization and performance. On z/OS, this information is
produced in the form of SMF records, see WebSphere MQ for z/OS System Setup
Guide for details. The equivalent information on other platforms is produced as
PCF records, see Monitoring WebSphere MQ for details.
MQPUT
Application
Return to Queue
Sender
2 3
Transmission
Queue Dead Letter
Queue
DLQ Handler
As shown in the figure, the MCA can do several things with a message that it
cannot deliver. The action taken is determined by options specified when the
channel is defined and on the MQPUT report options for the message.
1. Message-retry
If the MCA is unable to put a message to the target queue for a reason that
could be transitory (for example, because the queue is full), the MCA has
the option to wait and retry the operation later. You can determine if the
MCA waits, for how long, and how many times it retries.
v You can specify a message-retry time and interval for MQPUT errors
when you define your channel. If the message cannot be put to the
destination queue because the queue is full, or is inhibited for puts, the
MCA retries the operation the number of times specified, at the time
interval specified.
v You can write your own message-retry exit. The exit enables you to
specify under what conditions you want the MCA to retry the MQPUT
or MQOPEN operation. Specify the name of the exit when you define
the channel.
2. Return-to-sender
If message-retry was unsuccessful, or a different type of error was
encountered, the MCA can send the message back to the originator.
To enable this, you need to specify the following options in the message
descriptor when you put the message to the original queue:
v The MQRO_EXCEPTION_WITH_FULL_DATA report option
v The MQRO_DISCARD_MSG report option
v The name of the reply-to queue and reply-to queue manager
70 WebSphere MQ Intercommunication
Undelivered messages
z/OS
In WebSphere MQ for z/OS, initialization and configuration information is
specified using the ALTER QMGR MQSC command. If you put ALTER QMGR
commands in the CSQINP2 initialization input data set, they are processed every
time the queue manager is started. To run MQSC commands such as START
LISTENER every time you start the channel initiator, put them in the CSQINPX
initialization input data set and specify the optional DD statement CSQINPX in the
channel initiator started task procedure. See WebSphere MQ for z/OS Concepts and
Planning Guide for information about CSQINP2 and CSQINPX, and WebSphere MQ
Script (MQSC) Command Reference for information about ALTER QMGR.
Windows systems
On WebSphere MQ for Windows systems, the registry file holds basic configuration
information about the WebSphere MQ. That is, information relevant to all of the
queue managers on the WebSphere MQ system and also information relating to
individual queue managers. You can examine or change this information using the
WebSphere MQ Explorer. Do not edit the registry directly.
There are two configuration files: one applies to the machine, the other applies to
an individual queue manager.
The queue manager configuration file is held in the root of the directory tree
occupied by the queue manager. On WebSphere MQ for Windows, the information
is held in the registry. For example, for the DefaultPath attributes, the queue
manager configuration files for a queue manager called QMNAME would be:
An excerpt of a qm.ini file follows. It specifies that the TCP/IP listener is to listen
on port 2500, the maximum number of current channels is to be 200 and the
maximum number of active channels is to be 100.
TCP:
Port=2500
CHANNELS:
MaxChannels=200
MaxActiveChannels=100
In MQSeries V5.2 and WebSphere MQ, you can specify a range of TCP/IP ports to
be used by an outbound channel. One method is to use the qm.ini file to specify
the start and end of a range of port values. The example below shows a qm.ini file
specifying a range of channels:
TCP:
StrPort=2500
EndPort=3000
CHANNELS:
MaxChannels=200
MaxActiveChannels=100
If you specify a value for StrPort or EndPort then you must specify a value for
both. The value of EndPort must always be greater than the value of StrPort.
The channel tries to use each of the port values in the range specified. When the
connection is successful, the port value is the port that the channel then uses.
For i5/OS:
/QIBM/UserData/mqm/qmgrs/QMNAME/qm.ini
For more information about qm.ini files see Appendix C, “Configuration file
stanzas for distributed queuing,” on page 529.
72 WebSphere MQ Intercommunication
Data conversion
Data conversion
A WebSphere MQ message consists of two parts:
v Control information in a message descriptor
v Application data
Either of the two parts may require data conversion when sent between queues on
different queue managers. For information about data conversion, see the
WebSphere MQ Application Programming Guide.
If you decide to use an MCA that was not supplied by WebSphere MQ, you need
to consider the following.
Message sending and receiving
You need to write a sending application that gets messages from wherever
your application puts them, for example from a transmission queue (see
the WebSphere MQ Application Programming Reference book), and sends them
out on a protocol with which you want to communicate. You also need to
write a receiving application that takes messages from this protocol and
puts them onto destination queues. The sending and receiving applications
use the message queue interface (MQI) calls, not any special interfaces.
You need to ensure that messages are delivered once and once only.
Syncpoint coordination can be used to help with this.
Channel control function
You need to provide your own administration functions to control
channels. You cannot use WebSphere MQ channel administration functions
either for configuring (for example, the DEFINE CHANNEL command) or
monitoring (for example, DISPLAY CHSTATUS) your channels.
Initialization file
You need to provide your own initialization file, if you require one.
Application data conversion
You will probably want to allow for data conversion for messages you
send to a different system. If so, use the MQGMO_CONVERT option on
the MQGET call when retrieving messages from wherever your application
puts them, for example the transmission queue.
User exits
Consider whether you need user exits. If so, you can use the same
interface definitions that WebSphere MQ uses.
Triggering
If your application puts messages to a transmission queue, you can set up
the transmission queue attributes so that your sending MCA is triggered
when messages arrive on the queue.
Channel initiator
You may need to provide your own channel initiator.
74 WebSphere MQ Intercommunication
Chapter 6. Channel attributes
The previous chapters have introduced the basic concepts of the product, the
business perspective basis of its design, its implementation, and the control
features.
This chapter describes the channel attributes held in the channel definitions. This is
product-sensitive programming interface information.
Many attributes have default values, and you can use these for most channels.
However, in those circumstances where the defaults are not optimal, refer to this
chapter for guidance in selecting the correct values.
76 WebSphere MQ Intercommunication
Channel attributes
Notes:
1. Valid on z/OS only.
The keyword that you can specify in MQSC is shown in brackets for each attribute.
78 WebSphere MQ Intercommunication
Batch Heartbeat Interval (BATCHHB)
If the sending channel has had a communication from the receiving channel within
the batch heartbeat interval, the receiving channel is assumed to be still active,
otherwise a ’heartbeat’ is sent to the receiving channel to check.
The value must be in the range zero through 999 999. A value of zero indicates that
batch heartbeating is not used.
If you do not specify a batch interval, the batch closes when the number of
messages specified in BATCHSZ has been sent or when the transmission queue
becomes empty. On lightly loaded channels, where the transmission queue
frequently becomes empty the effective batch size may be much smaller than
BATCHSZ.
You can use the BATCHINT attribute to make your channels more efficient by
reducing the number of short batches. Be aware, however, that you may slow
down the response time, because batches will last longer and messages will remain
uncommitted for longer.
If you specify a BATCHINT, batches close only when one of the following
conditions is met:
v The number of messages specified in BATCHSZ have been sent.
v There are no more messages on the transmission queue and a time interval of
BATCHINT has elapsed while waiting for messages (since the first message of
the batch was retrieved).
Note: BATCHINT specifies the total amount of time that is spent waiting for
messages. It does not include the time spent retrieving messages that are
already available on the transmission queue, or the time spent transferring
messages.
v Cluster sender
v Cluster receiver
To improve performance, you can set a batch size to define the maximum number
of messages to be transferred between two syncpoints. The batch size to be used is
negotiated when a channel starts up, and the lower of the two channel definitions
is taken. On some implementations, the batch size is calculated from the lowest of
the two channel definitions and the two queue manager MAXUMSGS values. The
actual size of a batch can be less than this; for example, a batch completes when
there are no messages left on the transmission queue or the batch interval expires.
A large value for the batch size increases throughput, but recovery times are
increased because there are more messages to back out and re-send. The default
BATCHSZ is 50, and you are advised to try that value first. You might choose a
lower value for BATCHSZ if your communications are unreliable, making the need
to recover more likely.
80 WebSphere MQ Intercommunication
Batch size (BATCHSZ)
v Receiver
v Requester
v Cluster sender
v Cluster receiver
Where possible, channel names should be unique to one channel between any two
queue managers in a network of interconnected queue managers.
Alphabetic (A-Z, a-z; note that uppercase and lowercase are significant)
Numerics (0-9)
Period (.)
Forward slash (/)
Underscore (_)
Percentage sign (%)
Notes:
1. Embedded blanks are not allowed, and leading blanks are ignored.
2. On systems using EBCDIC Katakana, you cannot use lowercase characters.
v Server
v Receiver
v Requester
v Cluster sender
v Cluster receiver
The two ends of a channel must have the same name and have compatible types:
v Sender with receiver
v Requester with server
v Requester with sender (for Callback)
v Server with receiver (server is used as a sender)
v Client-connection with server-connection
v Cluster-sender with cluster-receiver
Cluster (CLUSTER)
The name of the cluster to which the channel belongs. The maximum length is 48
characters conforming to the rules for naming WebSphere MQ objects.
82 WebSphere MQ Intercommunication
Cluster namelist (CLUSNL)
v Cluster sender
v Cluster receiver
It is optional for server channels, unless the server channel is triggered, in which
case it MUST specify a connection name.
The name is up to 48 characters for z/OS, 264 characters for other platforms, and:
If the transport type is TCP
This is either the hostname or the network address of the remote machine
(or the local machine for cluster-receiver channels). For example,
(MACH1.ABC.COM), (fe80:43e4:0204:acff:fe97:2c34:fde0:3485) or
(19.22.11.162). It may include the port number, for example
(MACHINE(123)). It can include the IP_name of a z/OS dynamic DNS group
or a network dispatcher input port.
If you use an IPV6 address in a network that only supports IPV4, the
connection name will not be resolved. In a network which uses both IPV4
and IPV6, Connection name interacts with Local Address to determine
which IP stack is used. See “Local Address (LOCLADDR)” on page 88 for
further information.
If the transport type is LU 6.2
For WebSphere MQ for iSeries, Windows systems, and UNIX systems, give
the fully-qualified name of the partner LU if the TPNAME and
It is optional for server channels, unless the server channel is triggered, in which
case it MUST specify a connection name.
84 WebSphere MQ Intercommunication
Connection name (CONNAME)
The possible values are ‘yes’ and ‘no’. If you specify ‘yes’, the application data in
the message is converted before sending if you have specified one of the built-in
format names, or a data conversion exit is available for a user-defined format (See
the WebSphere MQ Application Programming Guide). If you specify ‘no’, the
application data in the message is not converted before sending.
Description (DESCR)
This contains up to 64 bytes of text that describes the channel definition.
Use characters from the character set identified by the coded character set
identifier (CCSID) for the queue manager to ensure that the text is translated
correctly if it is sent to another queue manager.
The close-down exchange of control data between the two ends of the channel
includes an indication of the reason for closing. This ensures that the
corresponding end of the channel remains available to start up again.
You can specify any number of seconds from zero through 999 999 where a value
of zero means no disconnect; wait indefinitely.
For server-connection channels using the TCP protocol, the interval represents the
client inactivity disconnect value, specified in seconds. If a server-connection has
received no communication from its partner client for this duration, it will
terminate the connection. The server-connection inactivity interval only applies
between MQ API calls from a client, so no client will be disconnected during a
long-running MQGET with wait call.
This attribute is not applicable for server-connection channels using protocols other
than TCP.
Note: Performance is affected by the value specified for the disconnect interval.
86 WebSphere MQ Intercommunication
Disconnect interval (DISCINT)
For more information, see “Stopping and quiescing channels” on page 66.
Disposition (QSGDISP)
This attribute specifies the disposition of the channel in a queue-sharing group.
Values are:
QMGR
The channel is defined on the page set of the queue manager that executes
the command. This is the default.
GROUP
The channel is defined in the shared repository. This is allowed only if
there is a shared queue manager environment. When a channel is defined
with QSGDISP(GROUP), the command DEFINE CHANNEL(name)
NOREPLACE QSGDISP(COPY) is generated automatically and sent to all
active queue managers to cause them to make local copies on page set 0
COPY The channel is defined on the page set of the queue manager that executes
the command, copying its definition from the QSGDISP(GROUP) channel
of the same name. This is allowed only if there is a shared queue manager
environment.
The value is in seconds and must be in the range 0 through 999 999. A value of
zero means that no heartbeat flows are to be sent. The default value is 300. To be
most useful, the value should be significantly less than the disconnect interval
value.
For this attribute to have any effect, TCP/IP keepalive must be enabled. On z/OS,
you do this by issuing the ALTER QMGR TCPKEEP(YES) MQSC command. On
other platforms, it occurs when the KEEPALIVE=YES parameter is specified in the
TCP stanza in the distributed queuing configuration file, qm.ini, or through the
WebSphere MQ Explorer. Keepalive must also be switched on within TCP/IP itself,
using the TCP profile configuration data set.
The value indicates a time, in seconds, and must be in the range 0 to 99999. A
KeepAlive Interval value of 0 indicates that channel KeepAlive is not enabled for
the channel. However, when KeepAlive Interval is set to 0, KeepAlive still occurs if
TCP/IP KeepAlive has been enabled, as described above. You can also set KAINT
to a value of AUTO (this is the default). If KAINT is set to AUTO, the KeepAlive
value is based on the value of the negotiated heartbeat interval (HBINT) as
follows:
Table 8. Negotiated HBINT value and the corresponding KAINT value
Negotiated HBINT KAINT
>0 Negotiated HBINT + 60 seconds
0 0
The value is ignored for all channels that have a TransportType (TRPTYPE) other
than TCP or SPX
You can set the KeepAlive Interval (KAINT) attribute for channels on a
per-channel basis. On platforms other than z/OS, you can access and modify the
parameter, but it is only stored and forwarded; there is no functional
implementation of the parameter. If you need the functionality provided by the
KAINT parameter, use the Heartbeat Interval (HBINT) parameter, as described in
“Heartbeat interval (HBINT)” on page 87.
88 WebSphere MQ Intercommunication
Local Address (LOCLADDR)
This attribute specifies the local communications address for the channel. When a
LOCLADDR value is specified, a channel that is stopped and then restarted
continues to use the TCP/IP address specified in LOCLADDR. In recovery
scenarios, this could be useful when the channel is communicating through a
firewall, because it removes problems caused by the channel restarting with a
different IP address, specified by the TCP/IP stack to which it is connected. You
can also use this attribute to force a channel to use an IPV4 or an IPV6 stack on a
dual stack system or use a dual mode stack on a single stack system.
The value used is the optional IP address and optional port or port range to be
used for outbound TCP/IP communications. The format is as follows:
LOCLADDR([ip-addr][(low-port[,high-port])])
where ″ip-addr″ is specifed in IPV4 dotted decimal form (for example 9.20.9.30),
IPV6 hexadecimal form (for example fe80:43e4:0204:acff:fe97:2c34:fde0:3485), or
dotted alphanumeric form (for example MACH1.ABC.COM), and ″low-port″ and
″high-port″ are port numbers enclosed in parentheses. When two port values are
specified, the channel binds to the address specified, using an available port within
the range covered by the two port values. All values are optional.
When a channel is started the values specified for connection name (CONNAME)
and local address (LOCLADDR) determine which IP stack is used for
communication. The IP stack used is determined as follows:
v If the system has only an IPV4 stack configured, the IPV4 stack will always be
used. If a local address (LOCLADDR) or connection name (CONNAME) is
specified as an IPV6 network address, an error is generated and the channel will
fail to start.
v If the system has only an IPV6 stack configured, the IPV6 stack will always be
used. If a local address (LOCLADDR) is specified as an IPV4 network address,
an error is generated and the channel will fail to start. On platforms that support
IPV6 mapped addressing, if a connection name (CONNAME) is specified as an
IPV4 network address, the IPV4 address is mapped to an IPV6 address (for
example ″xxx.xxx.xxx.xxx″ is mapped to ″::ffff:xxx.xxx.xxx.xxx″). Note that the
use of mapped addresses may require protocol translators. Avoid the use of
mapped addresses where possible.
v If a local address (LOCLADDR) is specified as an IP address for a channel, the
stack for that IP address is used. If the local address (LOCLADDR) is specified
as a hostname that resolves to both IPV4 and IPV6 addresses, the connection
name (CONNAME) is used to determine which of the stacks is used. If both the
local address (LOCLADDR) and connection name (CONNAME) are specified as
hostnames that resolve to both IPV4 and IPV6 addresses, the stack used is
determined by the queue manager attribute IPADDRV.
v If the system has dual IPV4 and IPV6 stacks configured and a local address
(LOCLADDR) is not specified for a channel, the connection name (CONNAME)
specified for the channel determines which IP stack to use. If the connection
name (CONNAME) is specified as a hostname that resolves to both IPV4 and
IPV6 addresses, the stack used is determined by the queue manager attribute
IPADDRV.
Note: If the LOCLADDR port is in use, TCP/IP requires a time period to release
the previously used port. If enough time is not left, and if only 1
LOCLADDR port is specified, the previously used port will not be available
and so a random port will be chosen rather than the LOCLADDR port.
(Retry is not attempted if the cause of failure is such that a retry is not likely to be
successful.)
If the channel initiator (on z/OS) or queue manager (on distributed platforms)
stops while the channel is retrying, the short retry count and long retry count are
reset when the channel initiator or queue manager is restarted or when a message
is successfully put at the sender channel. However, if the if the channel initiator
(on z/OS) or queue manager (on distributed platforms) is shut down and restarted
immediately after either of those actions, the short retry count and long retry count
are not reset. The channel retains the retry count values it had before the channel
restart or the message being put.
The long retry count attribute can be set from zero through 999 999 999.
Note: For i5/OS, UNIX systems, and Windows systems, in order for retry to be
attempted a channel initiator must be running. The channel initiator must be
monitoring the initiation queue specified in the definition of the
transmission queue that the channel is using.
The interval between retries may be extended if the channel has to wait to become
active.
90 WebSphere MQ Intercommunication
Long retry interval (LONGTMR)
The channel tries to connect long retry count number of times at this long
interval, after trying the short retry count number of times at the short retry
interval.
When using side information for SNA communications, the mode name is defined
in the CPI-C Communications Side Object or APPC side information and this
attribute should be left blank; otherwise, it should be set to the SNA mode name.
When using side information for SNA communications, the transaction program
name is defined in the CPI-C Communications Side Object or APPC side
information and this attribute should be left blank. Otherwise, this name is
required by sender channels and requester channels.
The name should be set to the SNA transaction program name, unless the
CONNAME contains a side-object name in which case it should be set to blanks.
The actual name is taken instead from the CPI-C Communications Side Object, or
the APPC side information data set.
This information is set in different ways on different platforms; see the section in
this book about setting up communication for your platform.
92 WebSphere MQ Intercommunication
MCA type (MCATYPE)
For channel types of sender, server, and requester, the default is ‘process’. For
channel types of cluster-sender and cluster-receiver, the default is ‘thread’. These
defaults can change during your installation.
On WebSphere MQ for z/OS, this attribute is supported only for channels with a
channel type of cluster-receiver. On other platforms it is valid for channel types of:
v Sender
v Server
v Requester
v Cluster sender
v Cluster receiver
If this attribute is blank, the MCA uses its default user identifier.
The format and maximum length of this attribute depend on the platform, as for
“Receive exit name (RCVEXIT)” on page 98.
You can run a sequence of message exits. The limitations on the user data length
and an example of how to specify MSGDATA for more than one exit are as shown
for RCVDATA. See “Receive exit user data (RCVDATA)” on page 99.
The format and maximum length of the name depend on the platform, as for
“Receive exit name (RCVEXIT)” on page 98. However, there can only be one
message-retry exit specified
This attribute controls the action of the MCA only if the message-retry exit name is
blank. If the exit name is not blank, the value of MRRTY is passed to the exit for
the exit’s use, but the number of retries performed (if any) is controlled by the exit,
and not by this attribute.
The value must be in the range 0 to 999 999 999. A value of zero means that no
retries will be performed. The default is 10.
94 WebSphere MQ Intercommunication
Message retry interval (MRTMR)
This attribute controls the action of the MCA only if the message-retry exit name is
blank. If the exit name is not blank, the value of MRTMR is passed to the exit for
the exit’s use, but the retry interval is controlled by the exit, and not by this
attribute.
The value must be in the range 0 to 999 999 999. A value of zero means that the
retry will be performed as soon as possible (provided that the value of MRRTY is
greater than zero). The default is 100.
Monitoring (MONCHL)
This attribute controls the collection of online Monitoring data.
The default is FAST. The advantage of this is that nonpersistent messages become
available for retrieval far more quickly. The disadvantage is that because they are
not part of a transaction, messages may be lost if there is a transmission failure or
if the channel stops when the messages are in transit. See “Fast, nonpersistent
messages” on page 21.
Password (PASSWORD)
You can specify a password of maximum length 12 characters, although only the
first 10 characters are used.
The password may be used by the MCA when attempting to initiate a secure LU
6.2 session with a remote MCA. It is valid for channel types of sender, server,
requester, or client-connection.
On WebSphere MQ for z/OS, this attribute is valid only for client connection
channels. On other platforms, it is valid for channel types of:
v Sender
v Server
v Requester
v Client connection
v Cluster sender
96 WebSphere MQ Intercommunication
PUT authority (PUTAUT)
On platforms with Process security, you choose to have the queue security
based on the user ID that the process is running under. The user ID is that
of the process or user running the MCA at the receiving end of the
message channel.
The queues are opened with this user ID and the open option
MQOO_SET_ALL_CONTEXT.
Context security (CTX)
The alternate user ID is used from the context information associated with
the message.
The UserIdentifier in the message descriptor is moved into the
AlternateUserId field in the object descriptor. The queue is opened with
the open options MQOO_SET_ALL_CONTEXT and
MQOO_ALTERNATE_USER_AUTHORITY.
The user ID used to check open authority on the queue for
MQOO_SET_ALL_CONTEXT and
MQOO_ALTERNATE_USER_AUTHORITY is that of the process or user
running the MCA at the receiving end of the message channel. The user ID
used to check open authority on the queue for MQOO_OUTPUT is the
UserIdentifier in the message descriptor.
Only Message Channel Agent security (ONLYMCA)
The default user ID is used.
On platforms with ONLYMCA security, you choose to have the queue
security based on the user ID that the process is running under. The user
ID is that of the process or user running the MCA at the receiving end of
the message channel.
The queues are opened with this user ID and the open option
MQOO_SET_ALL_CONTEXT.
This value only applies to z/OS.
Alternate Message Channel Agent security (ALTMCA)
This is the same as for ONLYMCA security but allows you to use context.
This value only applies to z/OS.
Context security and alternate message channel agent security values are not
supported on server-connection channels.
Further details about context fields and open options can be found in the
WebSphere MQ Application Programming Guide.
The format and maximum length of this attribute depend on the platform:
v On z/OS it is a load module name, maximum length 8 characters, except for
client-connection channels where the maximum length is 128 characters.
v On i5/OS it is of the form:
libname/progname
where progname occupies the first 10 characters, and libname the second 10
characters (both blank-padded to the right if necessary). The maximum length of
the string is 20 characters.
v On Windows it is of the form:
dllname(functionname)
where dllname is specified without the suffix “.DLL”. The maximum length of
the string is 40 characters.
v On UNIX systems it is of the form:
libraryname(functionname)
You can specify a list of receive, send, or message exit program names. The names
should be separated by a comma, a space, or both. For example:
RCVEXIT(exit1 exit2)
MSGEXIT(exit1,exit2)
SENDEXIT(exit1, exit2)
The total length of the string of exit names and strings of user data for a particular
type of exit is limited to 500 characters. In WebSphere MQ for iSeries you can list
up to 10 exit names. In WebSphere MQ for z/OS you can list up to eight exit
names.
98 WebSphere MQ Intercommunication
Receive exit user data (RCVDATA)
You can run a sequence of receive exits. The string of user data for a series of exits
should be separated by a comma, spaces, or both. For example:
RCVDATA(exit1_data exit2_data)
MSGDATA(exit1_data,exit2_data)
SENDDATA(exit1_data, exit2_data)
In WebSphere MQ for UNIX systems, and Windows systems, the length of the
string of exit names and strings of user data is limited to 500 characters. In
WebSphere MQ for iSeries you can specify up to 10 exit names and the length of
user data for each is limited to 32 characters. In WebSphere MQ for z/OS you can
specify up to eight strings of user data each of length 32 characters.
The format and maximum length of the name depend on the platform, as for
“Receive exit name (RCVEXIT)” on page 98. However, you can only specify one
security exit.
The format and maximum length of this attribute depend on the platform, as for
“Receive exit name (RCVEXIT)” on page 98.
You can run a sequence of send exits. The limitations on the user data length and
an example of how to specify SENDDATA for more than one exit, are as shown for
RCVDATA. See “Receive exit user data (RCVDATA).”
The value of the number should be high enough to avoid a number being reissued
while it is still being used by an earlier message. The two ends of a channel must
have the same sequence number wrap value when a channel starts up; otherwise,
an error occurs.
The value may be set from 100 through 999 999 999.
(Retry is not attempted if the cause of failure is such that a retry is not likely to be
successful.)
If the channel initiator (on z/OS) or queue manager (on distributed platforms)
stops while the channel is retrying, the short retry count and long retry count are
reset when the channel initiator or queue manager is restarted or when a message
is successfully put at the sender channel. However, if the if the channel initiator
(on z/OS) or queue manager (on distributed platforms) is shut down and restarted
immediately after either of those actions, the short retry count and long retry count
are not reset. The channel retains the retry count values it had before the channel
restart or the message being put.
This attribute can be set from zero through 999 999 999.
Note: On i5/OS, UNIX systems, and Windows systems, in order for retry to be
attempted a channel initiator must be running. The channel initiator must be
monitoring the initiation queue specified in the definition of the
transmission queue that the channel is using.
The interval between retries may be extended if the channel has to wait to become
active.
It is valid only for channels with a transport type (TRPTYPE) of TCP. If the
TRPTYPE is not TCP, the data is ignored and no error message is issued.
You can specify a value for SSLCAUTH on a non-SSL channel definition, one on
which SSLCIPH is missing or blank. You can use this to temporarily disable SSL
for debugging without first having to clear and then reinput the SSL parameters.
This attribute is valid on all channel types that can ever receive a channel initiation
flow, except for sender channels.
v Server
v Receiver
v Requester
v Server connection
v Cluster receiver
On z/OS the maximum length of the attribute is 256 bytes. On all other platforms
it is 1024 bytes.
On z/OS the attribute values used are not checked. If you input incorrect values,
the channel fails at startup, and error messages are written to the error log at both
ends of the channel. A Channel SSL Error event is also generated at both ends of
the channel. On platforms that support SSLPEER, other than z/OS, the validity of
the string is checked when it is first input.
You can specify a value for SSLPEER on a non-SSL channel definition, one on
which SSLCIPH is missing or blank. You can use this to temporarily disable SSL
for debugging without having to clear and later reinput the SSL parameters.
Provide the name of the transmission queue to be associated with this sender or
server channel, that corresponds to the queue manager at the far side of the
channel. The transmission queue may be given the same name as the queue
manager at the remote end.
LU62 LU 6.2
TCP TCP/IP
NETBIOS NetBIOS (1)
SPX SPX (1)
Notes:
1. For use on Windows. Can also be used on z/OS for defining client-connection channels
for use on Windows.
User ID (USERID)
You can specify a task user identifier of 20 characters.
The user ID may be used by the MCA when attempting to initiate a secure SNA
session with a remote MCA. It is valid for channel types of sender, server,
requester, or client-connection.
This does not apply to WebSphere MQ for z/OS except for client-connection
channels.
On the receiving end, if passwords are kept in encrypted format and the LU 6.2
software is using a different encryption method, an attempt to start the channel
fails with invalid security details. You can avoid this by modifying the receiving
SNA configuration to either:
v Turn off password substitution, or
v Define a security user ID and password.
On WebSphere MQ for z/OS, this attribute is valid only for client connection
channels. On other platforms it is valid for channel types of:
v Sender
v Server
v Requester
v Client connection
v Cluster sender
To use channel types other than sender-receiver, see the DEFINE CHANNEL
command in WebSphere MQ Script (MQSC) Command Reference.
MQPUT MQGET
Appl1 Appl2
Sender Receiver
Channel
Remote
queue
Transmission Local
queue queue
Figure 32. WebSphere MQ channel to be set up in the example configuration chapters in this
book
This is a simple example, intended to introduce only the basic elements of the
WebSphere MQ network. It does not demonstrate the use of triggering which is
described in “Triggering channels” on page 19.
Appl1 and Appl2 are both application programs; Appl1 is putting messages and
Appl2 is receiving them.
Appl1 puts messages to a remote queue. The definition for this remote queue
specifies the name of a target queue manager, a local queue on that queue
manager, and a transmission queue on this the local queue manager.
When the queue manager receives the request from Appl1 to put a message to the
remote queue, it looks at the queue definition and sees that the destination is
remote. It therefore puts the message, along with a transmission header, straight
onto the transmission queue specified in the definition. The message remains on
the transmission queue until the channel becomes available, which may happen
immediately.
A sender channel has in its definition a reference to one, and one only,
transmission queue. When a channel is started, and at other times during its
normal operation, it will look at this transmission queue and send any messages
on it to the target system. The message has in its transmission header details of the
destination queue and queue manager.
On the target queue manager, definitions are required for the local queue and the
receiver side of the channel. These objects operate independently of each other and
so can be created in any sequence.
On the local queue manager, definitions are required for the remote queue, the
transmission queue, and the sender side of the channel. Since both the remote
queue definition and the channel definition refer to the transmission queue name,
it is advisable to create the transmission queue first.
Network infrastructure
The configuration examples assume that all the systems are connected to a Token
Ring network with the exception of z/OS which communicates via a 3745 (or
equivalent) that is attached to the Token Ring, and Solaris, which is on an adjacent
local area network (LAN) also attached to the 3745.
It is also assumed that, for SNA, all the required definitions in VTAM and network
control program (NCP) are in place and activated for the LAN-attached platforms
to communicate over the wide area network (WAN).
Similarly, for TCP, it is assumed that nameserver function is available, either via a
domain nameserver or via locally held tables (for example a host file).
Communications software
Working configurations are given in the following chapters for the following
network software products:
v SNA
– Communications Manager/2 Version 1.11
– Communications Server for Windows NT®, Version 5.0
– AIX Communications Server, V5.0
– Hewlett-Packard SNAplus2
– i5/OS
– Data Connection SNAP-IX Version 6.2 or later
– OS/390 Version 2 Release 4
v TCP
– Microsoft® Windows 2000, Windows NT Version 4, or Windows XP
– AIX Version 4 Release 1.4
– HP-UX Version 10.2 or later
– Sun Solaris Release 2.4 or later
– i5/OS
– TCP for z/OS
– Digital UNIX Version 4.0 or later
v NetBIOS
v SPX
The examples only cover how to set up communications where clustering is not
being used. For information about setting up communications while using
clustering, see the WebSphere MQ Queue Manager Clusters book. The
communications’ configuration values given here still apply.
Each chapter contains a worksheet in which you can find the parameters used in
the example configurations. There is a short description of each parameter and
some guidance on where to find the equivalent values in your system. When you
have a set of values of your own, record these in the spaces on the worksheet. As
you proceed through the chapter, you will find cross-references to these values as
you need them.
Notes:
1. Example queue manager names usually reflect the platform that the queue
manager runs on, but MVS™ is used for both z/OS and MVS/ESA, which are
essentially the same.
2. The sequence number wrap value for sender definitions defaults to 999999999
for Version 2 WebSphere MQ products.
IT responsibilities
Because the IT infrastructure can vary greatly between organizations, it is difficult
to indicate who, within an organization, controls and maintains the information
required to complete each parameter value. To understand the terminology used in
the following chapters, consider the following guidelines as a starting point.
v System administrator is used to describe the person (or group of people) who
installs and configures the software for a specific platform.
v Network administrator is used to describe the person who controls LAN
connectivity, LAN address assignments, network naming conventions, and so on.
This person may be in a separate group or may be part of the system
administration group.
In most z/OS installations, there is a group responsible for updating the
ACF/VTAM, ACF/NCP, and TCP/IP software to support the network
configuration. The people in this group should be the main source of
information needed when connecting any WebSphere MQ platform to
WebSphere MQ for z/OS. They may also influence or mandate network naming
conventions on LANs and you should verify their span of control before creating
your definitions.
v A specific type of administrator, for example CICS administrator is indicated in
cases where we can more clearly describe the responsibilities of the person.
For a list of the functions available to you when setting up and controlling
message channels, using the different types of command, see Table 9 on page 114.
It consists of commands, programs, files for the channel definitions, and a storage
area for synchronization information. The following is a brief description of the
components.
v The channel commands are a subset of the WebSphere MQ Commands (MQSC).
v You use MQSC and the control commands to:
– Create, copy, display, change, and delete channel definitions
– Start and stop channels, ping, reset channel sequence numbers, and resolve
in-doubt messages when links cannot be re-established
– Display status information about channels
v Channel definitions on UNIX platforms are held in the following subdirectories:
– /var/mqm/qmgrs/../auth/channels
– /var/mqm/qmgrs/../auth/channels/@MANGLED
– /var/mqm/qmgrs/../auth/clntconn
– /var/mqm/qmgrs/../auth/clntconn/@MANGLED
– /var/mqm/qmgrs/../channels
– /var/mqm/qmgrs/../clntconn
v Channel definitions on Windows platforms are held in the following
subdirectories:
– C:\Program Files\IBM\WebSphere MQ\qmgrs\..\channels
– C:\Program Files\IBM\WebSphere MQ\qmgrs\..\clntconn
assuming that the product is installed in the default location.
v Channel definitions on iSeries are held in the following subdirectories:
– /QIBM/UserData/mqm/qmgrs/../auth/channels
– /QIBM/UserData/mqm/qmgrs/../auth/channels/&mangled
– /QIBM/UserData/mqm/qmgrs/../auth/clntconn
– /QIBM/UserData/mqm/qmgrs/../auth/clntconn/&mangled
– /QIBM/UserData/mqm/qmgrs/../channels
– /QIBM/UserData/mqm/qmgrs/../clntconn
v A storage area holds sequence numbers and logical unit of work (LUW) identifiers.
These are used for channel synchronization purposes.
Functions available
Table 9 shows the full list of WebSphere MQ functions that you may need when
setting up and controlling channels. The channel functions are explained in this
chapter.
For more details of the control commands that you issue at the command line, see
the WebSphere MQ System Administration Guide.
Notes:
1. A listener may be started automatically when the queue manager starts. See the DEFINE LISTENER command
in WebSphere MQ Script (MQSC) Command Reference.
Channels must be completely defined, and their associated objects must exist and
be available for use, before a channel can be started. This chapter shows you how
to do this.
In addition, the particular communication link for each channel must be defined
and available before a channel can be run. For a description of how LU 6.2,
TCP/IP, NetBIOS, SPX, and DECnet links are defined, see the particular
communication guide for your installation. See also the example configuration
chapters in this book.
Also create the definitions of processes for triggering (MCAs) in a similar way.
For an example showing how to create all the required objects see Chapter 17,
“Message channel planning example for distributed platforms,” on page 255.
When the program has finished running, you can use the STRMQM command to
start the queue manager.
See the WebSphere MQ System Administration Guide book for information about the
CRTMQM and STRMQM commands and a list of default objects.
If you wish to make any changes to the default objects, you can create your own
version of the old amqscoma.tst file and edit it.
Creating a channel
To create a new channel you have to create two channel definitions, one at each
end of the connection. You create the first channel definition at the first queue
manager. Then you create the second channel definition at the second queue
manager, on the other end of the link.
Both ends must be defined using the same channel name. The two ends must have
compatible channel types, for example: Sender and Receiver.
To create a channel definition for one end of the link use the MQSC command
DEFINE CHANNEL. Include the name of the channel, the channel type for this
end of the connection, a connection name, a description (if required), the name of
the transmission queue (if required), and the transmission protocol. Also include
any other attributes that you want to be different from the system default values
for the required channel type, using the information you have gathered previously.
You are provided with help in deciding on the values of the channel attributes in
Chapter 6, “Channel attributes,” on page 75.
Note: You are very strongly recommended to name all the channels in your
network uniquely. Including the source and target queue manager names in
the channel name is a good way to do this.
In all the examples of MQSC the command is shown as it would appear in a file of
commands, and as it would be typed in Windows or UNIX systems. The two
methods look identical, except that to issue a command interactively, you must
first start an MQSC session. Type runmqsc, for the default queue manager, or
runmqsc qmname where qmname is the name of the required queue manager. Then
type any number of commands, as shown in the examples.
For portability, you should restrict the line length of your commands to 72
characters. Use the concatenation character, +, as shown to continue over more
than one line. On Windows use Ctrl-z to end the input at the command line. On
UNIX systems, use Ctrl-d. Alternatively, on UNIX or Windows, use the end
command.
Displaying a channel
Use the MQSC command DISPLAY CHANNEL, specifying the channel name, the
channel type (optional), and the attributes you want to see, or specifying that all
Note that the saved status does not apply until at least one batch of messages has
been transmitted on the channel. Status is also saved when a channel is stopped
(using the STOP CHL command) and when the queue manager is ended.
Starting a channel
For applications to be able to exchange messages you must start a listener program
for inbound connections (or, in the case of UNIX systems, create a listener
attachment). In Windows systems, use the runmqlsr command to start the
WebSphere MQ listener process. Any inbound requests for channel attachment
start MCAs as threads of this listener process.
runmqlsr -t tcp -m QM2
For outbound connections you must start the channel in one of the following three
ways:
1. Use the MQSC command START CHANNEL, specifying the channel name, to
start the channel as a process or a thread, depending on the MCATYPE
parameter. (If channels are started as threads, they are threads of a channel
initiator.)
START CHANNEL(QM1.TO.QM2)
2. Use the control command runmqchl to start the channel as a process.
runmqchl -c QM1.TO.QM2 -m QM1
3. Use the channel initiator to trigger the channel.
Renaming a channel
To rename a message channel, use MQSC to carry out the following steps:
1. Use STOP CHANNEL to stop the channel.
2. Use DEFINE CHANNEL to create a duplicate channel definition with the new
name.
3. Use DISPLAY CHANNEL to check that it has been created correctly.
If you decide to rename a message channel, remember that a channel has two
channel definitions, one at each end. Make sure you rename the channel at both
ends at the same time.
Channel functions
The channel functions available are shown in Table 9 on page 114. Here some more
detail is given about the channel functions.
Create
Use the MQSC command DEFINE CHANNEL to create a new channel definition.
You can create a new channel definition using the default values supplied by
WebSphere MQ, specifying the name of the channel, the type of channel you are
creating, the communication method to be used, the transmission queue name and
the connection name.
The channel name must be the same at both ends of the channel, and unique
within the network. However, you should restrict the characters used to those that
are valid for WebSphere MQ object names.
Change
Use the MQSC command ALTER CHANNEL to change an existing channel
definition, except for the channel name, or channel type.
Delete
Use the MQSC command DELETE CHANNEL to delete a named channel.
Display
Use the MQSC command DISPLAY CHANNEL to display the current definition
for the channel.
Display Status
The MQSC command DISPLAY CHSTATUS displays the status of a channel
whether the channel is active or inactive. It applies to all message channels. It does
not apply to MQI channels other than server-connection channels.. See “Displaying
channel status” on page 118.
Ping
Use the MQSC command PING CHANNEL to exchange a fixed data message with
the remote end. This gives some confidence to the system supervisor that the link
is available and functioning.
Ping does not involve the use of transmission queues and target queues. It uses
channel definitions, the related communication link, and the network setup. It can
only be used if the channel is not currently active.
It is available from sender and server channels only. The corresponding channel is
started at the far side of the link, and performs the startup parameter negotiation.
Errors are notified normally.
Start
Use the MQSC command START CHANNEL for sender, server, and requester
channels. It should not be necessary where a channel has been set up with queue
manager triggering.
Also use the START CHANNEL command for receiver and server-connection
channels that have a disabled status. Starting a receiver or server-connection
channel that is in disabled status resets the channel and allows it to be started from
the remote channel.
When started, the sending MCA reads the channel definition file and opens the
transmission queue. A channel start-up sequence is executed, which remotely starts
the corresponding MCA of the receiver or server channel. When they have been
started, the sender and server processes await messages arriving on the
transmission queue and transmit them as they arrive.
When you use triggering or run channels as threads, you will need to start the
channel initiator to monitor the initiation queue. Use the runmqchi command for
this.
v For LU 6.2 in Windows systems, using SNA Server you can use TpStart (a utility
provided with SNA Server) to start a channel. This will be started as a separate
process.
Use of the Start option always causes the channel to re-synchronize, where
necessary.
A message is returned to the screen confirming that the request to start a channel
has been accepted. For confirmation that the start command has succeeded, check
the error log, or use DISPLAY CHSTATUS. The error logs are:
Windows
mqmtop\qmgrs\qmname\errors\AMQERR01.LOG (for each queue manager called
qmname)
mqmtop\qmgrs\@SYSTEM\errors\AMQERR01.LOG (for general errors)
Note: On Windows systems, you still also get a message in the Windows
systems application event log.
UNIX systems
/var/mqm/qmgrs/qmname/errors/AMQERR01.LOG (for each queue manager
called qmname)
/var/mqm/qmgrs/@SYSTEM/errors/AMQERR01.LOG (for general errors)
Stop
Use the MQSC command STOP CHANNEL to request the channel to stop activity.
The channel will not start a new batch of messages until the operator starts the
channel again. (For information about restarting stopped channels, see “Restarting
stopped channels” on page 67.)
This command requests the channel to close down in an orderly way. The current
batch of messages is completed and the syncpoint procedure is carried out with
the other end of the channel.
Note: If the channel is idle this command will not terminate a receiving channel.
This option stops the channel immediately, but does not terminate the channel’s
thread or process. The channel does not complete processing the current batch of
messages, and can, therefore, leave the channel in doubt. In general, it is
recommended that operators use the quiesce stop option.
This option stops the channel immediately, and terminates the channel’s thread or
process.
Reset
Use the MQSC command RESET CHANNEL to change the message sequence
number. This command is available for any message channel, but not for MQI
channels (client-connection or server-connection). The first message starts the new
sequence the next time the channel is started.
If the command is issued on a sender or server channel, it informs the other side
of the change when the channel is restarted.
Resolve
Use the MQSC command RESOLVE CHANNEL when messages are held in-doubt
by a sender or server, for example because one end of the link has terminated, and
there is no prospect of it recovering. The RESOLVE CHANNEL command accepts
one of two parameters: BACKOUT or COMMIT. Backout restores messages to the
transmission queue, while Commit discards them.
The channel program does not try to establish a session with a partner. Instead, it
determines the logical unit of work identifier (LUWID) which represents the
in-doubt messages. It then issues, as requested, either:
v BACKOUT to restore the messages to the transmission queue; or
v COMMIT to delete the messages from the transmission queue.
In addition, where needed, the triggering arrangement must be prepared with the
definition of the necessary processes and queues.
The recommended name for the transmission queue is the queue manager name
on the remote system, as shown in the examples above.
Triggering channels
An overview of triggering is given in “Triggering channels” on page 19, while it is
described in depth in the WebSphere MQ Application Programming Guide. This
description provides you with information specific to WebSphere MQ for UNIX
and Windows systems.
Alternatively, for WebSphere MQ for UNIX systems and Windows, you can
eliminate the need for a process definition by specifying the channel name in the
TRIGDATA attribute of the transmission queue.
If you do not specify a channel name, the channel initiator searches the channel
definition files until it finds a channel that is associated with the named
transmission queue. `
See the WebSphere MQ System Administration Guide for details of the run channel
initiator command, and the other control commands.
However, if you need to stop a channel initiator but not the queue manager, you
should inhibit the queue that the initiator queue is reading from. To do this, you
disable the GET attribute of the initiation queue. To restart the channel initiator,
simply use the runmqchi command.
Channel programs
There are different types of channel programs (MCAs) available for use at the
channels. The names are shown in the following tables.
Table 10. Channel programs for Windows and UNIX systems
Program name Direction of connection Communication
runmqlsr Inbound Any
endmqlsr Any
amqcrs6a Inbound LU 6.2
amqcrsta Inbound TCP
runmqchl Outbound Any
runmqchi Outbound Any
amqcrsta is invoked for TCP channels using inetd, where no listener is started.
Examples of the use of these channel programs are given in the following chapters.
Undelivered-message queue
A DLQ handler is provided with WebSphere MQ on UNIX systems. See the
WebSphere MQ System Administration Guide book for WebSphere MQ for
information about this.
Queues in use
MCAs for receiver channels may keep the destination queues open even when
messages are not being transmitted; this results in the queues appearing to be “in
use”.
You need to provide users with authority to make use of the WebSphere MQ
facilities, and this is organized according to actions to be taken with respect to
objects and definitions. For example:
v Queue managers can be started and stopped by authorized users
v Applications need to connect to the queue manager, and have authority to make
use of queues
v Message channels need to be created and controlled by authorized users
v Objects are kept in libraries, and access to these libraries may be restricted
The message channel agent at a remote site needs to 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 may be necessary to verify that the
remote processes trying to start your MCAs are authorized to do so. There are
three possible ways for you to deal with this:
1. Specify PUTAUT=CTX in the channel definition to indicate that messages must
contain acceptable context authority, otherwise they will be discarded.
2. 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.
3. Implement user exit message processing to ensure that individual messages are
vetted for authorization.
On UNIX 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.
User IDs on UNIX systems: The queue manager converts all uppercase or mixed
case user identifiers into lowercase, before inserting them into the context part of a
message, or checking their authorization. All authorizations should therefore be
based only on lowercase identifiers.
To ensure that the MQMDE is honored (merged) the locale must be set correctly.
The locale set by INETD may not match that chosen for other locales used by
WebSphere MQ processes.
To set the locale, create a shell script which sets the locale environment variables
LANG, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME,
and LC_MESSAGES to the locale used for other WebSphere MQ processes. In the
same shell script call the listener program. Modify the inetd.conf file to call your
shell script in place of the listener program.
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.
Note that the automatic conversions are not carried out if you provide a message
exit on UNIX systems and Windows systems for any other reason.
In order to run, these user-exit programs must have predefined names and be
available on call to the channel programs. The names of the user-exit programs are
included in the message channel definitions.
There is a defined control block interface for handing over control to these
programs, and for handling the return of control from these programs.
The precise places where these programs are called, and details of control blocks
and names, are to be found in Part 6, “Further intercommunication considerations,”
on page 413.
You can use MQIBindType in association with the environment variable to achieve
the desired affect as follows:
In summary, there are only two ways of actually making channels and listeners
run as trusted:
1. By specifying MQIBindType=FASTPATH in qm.ini or registry and not
specifying the environment variable.
2. By specifying MQIBindType=FASTPATH in qm.ini or registry and setting the
environment variable to FASTPATH.
You are recommended to run channels and listeners as trusted only in a stable
environment in which you are not, for example, testing applications or user exits
that may abend or need to be cancelled. An errant application could compromise
the integrity of your queue manager. However, if your environment is stable and if
performance is an important issue, you may choose to run channels and listeners
as trusted.
What next?
When you have made the preparations described in this chapter you are ready to
set up communications. Proceed to one of the following chapters, depending on
what platform you are using:
v Chapter 10, “Setting up communication for Windows,” on page 131
v Chapter 12, “Setting up communication on UNIX systems,” on page 163
For UNIX systems see Chapter 12, “Setting up communication on UNIX systems,”
on page 163.
Deciding on a connection
There are four forms of communication for WebSphere MQ for Windows systems:
v TCP
v LU 6.2
v NetBIOS
v SPX
Each channel definition must specify only one protocol as the Transmission
protocol (Transport Type) attribute. One or more protocols may be used by a queue
manager.
Sending end
Specify the host name, or the TCP address of the target machine, in the Connection
name field of the channel definition. The port to connect to will default to 1414.
Port number 1414 is assigned by the Internet Assigned Numbers Authority to
WebSphere MQ.
To use a port number other than the default, change the connection name field
thus:
Connection Name OS2ROG3(1822)
where 1822 is the port required. (This must be the port that the listener at the
receiving end is listening on.)
You can change the default port number by specifying it in the registry for
WebSphere MQ for Windows:
TCP:
Port=1822
Note: To select which TCP/IP port number to use, WebSphere MQ uses the first
port number it finds in the following sequence:
1. The port number explicitly specified in the channel definition or
command line. This number allows the default port number to be
overriden for a channel.
2. The port attribute specified in the registry. This number allows the
default port number to be overriden for a queue manager.
3. The default value of 1414. This is the number assigned to WebSphere
MQ by the Internet Assigned Numbers Authority.
For more information about the values you set using qm.ini, see Appendix C,
“Configuration file stanzas for distributed queuing,” on page 529.
Receiving on TCP
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel. You should use the WebSphere
MQ listener.
The square brackets indicate optional parameters; QMNAME is not required for the
default queue manager, and the port number is not required if you are using the
default (1414).
For the best performance, run the WebSphere MQ listener as a trusted application
as described in “Running channels and listeners as trusted applications” on page
129. See the WebSphere MQ Application Programming Guide for information about
trusted applications.
You can stop all WebSphere MQ listeners running on a queue manager that is
inactive, using the command:
ENDMQLSR [-m QMNAME]
If you do not specify a queue manager name, the default queue manager is
assumed.
On Windows, the TCP configuration registry value for KeepAliveTime controls the
interval that elapses before the connection will be checked. The default is two
hours. For information about changing this value, see the Microsoft article TCP/IP
and NBT Configuration Parameters for Windows NT 3.5 (PSS ID number Q120642).
If you have more than one queue manager on the same machine, ensure that the
TPnames in the channel definitions are unique.
Sending end
Create a CPI-C side object (symbolic destination) from the administration
application of the LU 6.2 product you are using, and enter this name in the
Connection name field in the channel definition. Also create an LU 6.2 link to the
partner.
In the CPI-C side object enter the partner LU Name at the receiving machine, the
TP Name and the Mode Name. For example:
Partner LU Name OS2ROG2
Partner TP Name recv
Mode Name #INTER
Receiving on LU 6.2
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel. You start this listener program
with the RUNMQLSR command, giving the TpName to listen on. Alternatively,
you can use TpStart under SNA Server for Windows.
where RECV is the TpName that is specified at the other (sending) end as the
“TpName to start on the remote side”. The last part in square brackets is optional
and is not required for the default queue manager.
It is possible to have more than one queue manager running on one machine. You
must assign a different TpName to each queue manager, and then start a listener
program for each one. For example:
RUNMQLSR -t LU62 -m QM1 -n TpName1
RUNMQLSR -t LU62 -m QM2 -n TpName2
For the best performance, run the WebSphere MQ listener as a trusted application
as described in “Running channels and listeners as trusted applications” on page
129. See the WebSphere MQ Application Programming Guide for information about
trusted applications.
You can stop all WebSphere MQ listeners running on a queue manager that is
inactive, using the command:
ENDMQLSR [-m QMNAME]
If you do not specify a queue manager name, the default queue manager is
assumed.
where QM is the Queue Manager name and TpName is the TP Name. See the
Microsoft SNA Server APPC Programmers Guide or the Microsoft SNA Server CPI-C
Programmers Guide for more information.
Each running channel, regardless of type, uses one NetBIOS session and one
NetBIOS command. The IBM NetBIOS implementation allows multiple processes
to use the same local NetBIOS name. Therefore, only one NetBIOS name needs to
be available for use by WebSphere MQ. Other vendors’ implementations, for
example Novell’s NetBIOS emulation, require a different local name per process.
Verify your requirements from the documentation for the NetBIOS product you are
using.
In all cases, ensure that sufficient resources of each type are already available, or
increase the maximums specified in the configuration. Any changes to the values
will require a system restart.
During system startup, the NetBIOS device driver displays the number of sessions,
commands, and names available for use by applications. These resources are
available to any NetBIOS-based application that is running on the same system.
Therefore, it is possible for other applications to consume these resources before
WebSphere MQ needs to acquire them. Your LAN network administrator should be
able to clarify this for you.
LocalName=my_station
Notes:
1. Due to the variations in implementation of the NetBIOS products supported,
you are advised to make each NetBIOS name unique in the network. If you do
not, unpredictable results may occur. If you have problems establishing a
NetBIOS channel and there are error messages in the queue-manager error log
showing a NetBIOS return code of X'15', review your use of NetBIOS names.
2. On Windows you cannot use your machine name as the NetBIOS name
because Windows already uses it.
3. Sender channel initiation requires that a NetBIOS name be specified either via
the MQNAME environment variable or the LocalName in the qm.ini file or in
the Windows registry.
NumSess=Qmgr_max_sess
NumCmds=Qmgr_max_cmds
NumNames=Qmgr_max_names
Specify the correct value in the NETBIOS stanza of the queue manager
configuration file, qm.ini, or the Windows registry:
NETBIOS:
AdapterNum=n
1. Define the NetBIOS station name using the MQNAME or LocalName value as
described above.
2. Verify the LAN adapter number being used on your system and specify the
correct file using the AdapterNum as described above.
3. In the ConnectionName field of the channel definition, specify the NetBIOS
name being used by the target listener program. On Windows, NetBIOS
channels must be run as threads. Do this by specifying MCATYPE(THREAD) in
the channel definition.
DEFINE CHANNEL (chname) CHLTYPE(SDR) +
TRPTYPE(NETBIOS) +
CONNAME(your_station) +
XMITQ(xmitq) +
MCATYPE(THREAD) +
REPLACE
Target listener
At the receiving end, follow these steps:
1. Define the NetBIOS station name using the MQNAME or LocalName value as
described above.
2. Verify the LAN adapter number being used on your system and specify the
correct file using the AdapterNum as described above.
3. Define the receiver channel:
DEFINE CHANNEL (chname) CHLTYPE(RCVR) +
TRPTYPE(NETBIOS) +
REPLACE
4. Start the WebSphere MQ listener program to establish the station and make it
possible to contact it. For example:
RUNMQLSR -t NETBIOS -l your_station [-m qmgr]
This command establishes your_station as a NetBIOS station waiting to be
contacted. The NetBIOS station name must be unique throughout your
NetBIOS network.
For the best performance, run the WebSphere MQ listener as a trusted application
as described in “Running channels and listeners as trusted applications” on page
129. See the WebSphere MQ Application Programming Guide for information about
trusted applications.
You can stop all WebSphere MQ listeners running on a queue manager that is
inactive, using the command:
ENDMQLSR [-m QMNAME]
If you do not specify a queue manager name, the default queue manager is
assumed.
Sending end
If the target machine is remote, specify the SPX address of the target machine in
the Connection name field of the channel definition.
network.node(socket)
where:
network
Is the 4-byte network address of the network on which the remote machine
resides,
node Is the 6-byte node address, which is the LAN address of the LAN adapter
in the remote machine
socket Is the 2-byte socket number on which the remote machine will listen.
If the local and remote machines are on the same network then the network
address need not be specified. If the remote end is listening on the default socket
(5E86) then the socket need not be specified.
In the default case, where the machines are both on the same network, this
becomes:
CONNAME(08005A7161E5)
The default socket number may be changed by specifying it in the queue manager
configuration file (qm.ini) or the Windows registry:
SPX:
Socket=5E87
For more information about the values you set using qm.ini or the Windows
registry, see Appendix C, “Configuration file stanzas for distributed queuing,” on
page 529.
Receiving on SPX
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel.
If the backlog reaches the values in Table 12, the reason code,
MQRC_Q_MGR_NOT_AVAILABLE is received when trying to connect to the
queue manager using MQCONN or MQCONNX. If this happens, it is possible to
try to connect again.
However, to avoid this error, you can add an entry in the qm.ini file or in the
registry for Windows:
SPX:
ListenerBacklog = n
This overrides the default maximum number of outstanding requests (see Table 12
on page 138) for the SPX listener.
Note: Some operating systems support a larger value than the default. If necessary,
this can be used to avoid reaching the connection limit.
To run the listener with the backlog option switched on, use the RUNMQLSR -B
command. For information about the RUNMQLSR command, see the WebSphere MQ
System Administration Guide book.
The square brackets indicate optional parameters; QMNAME is not required for the
default queue manager, and the socket number is not required if you are using the
default (5E86).
For the best performance, run the WebSphere MQ listener as a trusted application
as described in “Running channels and listeners as trusted applications” on page
129. See the WebSphere MQ Application Programming Guide for information about
trusted applications.
You can stop all WebSphere MQ listeners running on a queue manager that is
inactive, using the command:
ENDMQLSR [-m QMNAME]
If you do not specify a queue manager name, the default queue manager is
assumed.
IPX/SPX parameters
In most cases the default settings for the IPX/SPX parameters will suit your needs.
However, you may need to modify some of them in your environment to tune its
use for WebSphere MQ. The actual parameters and the method of changing them
varies according to the platform and provider of SPX communications support. The
following sections describe some of these parameters, particularly those that may
influence the operation of WebSphere MQ channels and client connections.
Windows systems
Please refer to the Microsoft documentation for full details of the use and setting of
the NWLink IPX and SPX parameters. The IPX/SPX parameters are in the
following paths in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\NWLinkSPX\Parameters
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\NWLinkIPX\Parameters
This chapter first describes the parameters needed for an LU 6.2 connection, then it
guides you through the following tasks:
v “Establishing an LU 6.2 connection” on page 146
v “Establishing a TCP connection” on page 154
v “Establishing a NetBIOS connection” on page 154
v “Establishing an SPX connection” on page 155
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for Windows
configuration” on page 157.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
The steps required to set up an LU 6.2 connection are described, with numbered
cross references to the parameters on the worksheet. These steps are:
v “Configuring the local node” on page 146
v “Adding a connection” on page 148
v “Adding a partner” on page 150
v “Adding a CPI-C entry” on page 151
v “Configuring an invokable TP” on page 151
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer back to the values in the ID column. The entries in the
Parameter Name column are explained in “Explanation of terms” on page 144.
Table 13. Configuration worksheet for IBM Communications Server for Windows systems
ID Parameter Name Reference Example Used User Value
Definition for local node
1 Configuration name NTCONFIG
2 Network Name NETID
3 Control Point Name WINNTCP
4 Local Node ID (hex) 05D 30F65
5 LU Name (local) WINNTLU
6 LU Alias (local) NTQMGR
7 TP Name MQSERIES
8 Command line c:\Program
Files\IBM\WebSphere
MQ\bin\amqcrs6a.exe
9 LAN adapter address 08005AA5FAB9
Connection to an AIX system
The values in this section of the table must match those used in Table 17 on page 169, as indicated.
10 Connection AIX
11 Remote Network Address 8 123456789012
12 Network Name 1 NETID
13 Control Point Name 2 AIXPU
14 Remote Node ID 3 071 23456
15 LU Alias (remote) AIXQMGR
16 LU Name 4 AIXLU
17 Mode 14 #INTER
18 CPI-C Name AIXCPIC
19 Partner TP Name 6 MQSERIES
Connection to an HP-UX system
The values in this section of the table must match those used in Table 19 on page 187, as indicated.
10 Connection HPUX
11 Remote Network Address 8 100090DC2C7C
12 Network Name 4 NETID
13 Control Point Name 2 HPUXPU
14 Remote Node ID 3 05D 54321
15 LU Alias (remote) HPUXQMGR
16 LU Name 5 HPUXLU
17 Mode 17 #INTER
18 CPI-C Name HPUXCPIC
19 Partner TP Name 7 MQSERIES
Connection to a Solaris system
The values in this section of the table must match those used in Table 21 on page 211, as indicated.
Table 13. Configuration worksheet for IBM Communications Server for Windows systems (continued)
ID Parameter Name Reference Example Used User Value
10 Connection SOLARIS
11 Remote Network Address 5 08002071CC8A
12 Network Name 2 NETID
13 Control Point Name 3 SOLARPU
14 Remote Node ID 6 05D 310D6
15 LU Alias (remote) SOLARQMGR
16 LU Name 7 SOLARLU
17 Mode 17 #INTER
18 CPI-C Name SOLCPIC
19 Partner TP Name 8 MQSERIES
Connection to a Linux (x86 platform) system
The values in this section of the table must match those used in Table 23 on page 233, as indicated.
10 Connection LINUX
11 Remote Network Address 8 08005AC6DF33
12 Network Name 4 NETID
13 Control Point Name 2 LINUXPU
14 Remote Node ID 3 05D 30A55
15 LU Alias (remote) LXQMGR
16 LU Name 5 LINUXLU
17 Mode 6 #INTER
18 CPI-C Name LXCPIC
19 Partner TP Name 7 MQSERIES
Connection to an i5/OS system
The values in this section of the table must match those used in Table 35 on page 387, as indicated.
10 Connection AS400
11 Remote Network Address 4 10005A5962EF
12 Network Name 1 NETID
13 Control Point Name 2 AS400PU
14 Remote Node ID
15 LU Alias (remote) AS400QMGR
16 LU Name 3 AS400LU
17 Mode 17 #INTER
18 CPI-C Name AS4CPIC
19 Partner TP Name 8 MQSERIES
Connection to a z/OS system
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
10 Connection MVS
11 Remote Network Address 8 400074511092
12 Network Name 2 NETID
Table 13. Configuration worksheet for IBM Communications Server for Windows systems (continued)
ID Parameter Name Reference Example Used User Value
13 Control Point Name 3 MVSPU
14 Remote Node ID
15 LU Alias (remote) MVSQMGR
16 LU Name 4 MVSLU
17 Mode 10 #INTER
18 CPI-C Name MVSCPIC
19 Partner TP Name 7 MQSERIES
Connection to a z/OS system using a generic interface
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
10 Connection MVS
11 Remote Network Address 8 400074511092
12 Network Name 2 NETID
13 Control Point Name 3 MVSPU
14 Remote Node ID
15 LU Alias (remote) MVSQMGR
16 LU Name 10 MVSGR
17 Mode 6 #INTER
18 CPI-C Name MVSCPIC
19 Partner TP Name 7 MQSERIES
Connection to a VSE/ESA system
The values in this section of the table must match those used in your VSE/ESA system.
10 Connection MVS
11 Remote Network Address 5 400074511092
12 Network Name 1 NETID
13 Control Point Name 2 VSEPU
14 Remote Node ID
15 LU Alias (remote) VSEQMGR
16 LU Name 3 VSELU
17 Mode #INTER
18 CPI-C Name VSECPIC
19 Partner TP Name 4 MQ01 MQ01
Explanation of terms
1 Configuration Name
This is the name of the file in which the Communications Server
configuration is saved.
2 Network Name
This is the unique ID of the network to which you are connected. It is an
alphanumeric value and can be 1-8 characters long. The network name
works with the Control Point Name to uniquely identify a system. Your
network administrator will tell you the value.
3 Control Point Name
In Advanced Peer-to-Peer Networking® (APPN), a control point is
responsible for managing a node and its resources. A control point is also a
logical unit (LU). The Control Point Name is the name of the LU and is
assigned to your system by the network administrator.
4 Local Node ID (hex)
Some SNA products require partner systems to specify a node identifier
that uniquely identifies their workstation. The two systems exchange this
node identifier in a message unit called the exchange identifier (XID). Your
network administrator will assign this ID for you.
5 LU Name (local)
A logical unit (LU) is software that serves as an interface or translator
between a transaction program and the network. An LU manages the
exchange of data between transaction programs. The local LU Name is the
name of the LU on your workstation. Your network administrator will
assign this to you.
6 LU Alias (local)
The name by which your local LU will be known to your applications. You
choose this name yourself. It can be 1-8 characters long.
7 TP Name
WebSphere MQ applications trying to converse with your workstation
specify a symbolic name for the program that is to start running. This will
have been defined on the channel definition at the sender. For simplicity,
wherever possible use a transaction program name of MQSERIES, or in the
case of a connection to VSE/ESA, where the length is limited to 4 bytes,
use MQTP.
See Table 11 on page 133 for more information.
8 Command line
This is the path and name of the actual program to be run when a
conversation has been initiated with your workstation. The example shown
on the worksheet assumes that WebSphere MQ is installed in the default
directory, c:\Program Files\IBM\Websphere MQ. The configuration pairs
this name with the symbolic name 7 when you use TPSETUP (which is
part of the SNA Server software developers kit).
9 LAN adapter address
This is the address of your token-ring card. To discover this type net
config server at a command prompt. The address appears in the output.
For example:
Server is active on 08005AA5FAB9
10 Connection
This is a meaningful symbolic name by which the connection to a partner
node is known. It is used only within SNA Server administration and is
specified by you.
15 LU Alias (remote)
This is a value known only in this server and is used to represent the fully
qualified partner LU name. You supply the value.
17 Mode
This is the name given to the set of parameters that control the APPC
3. In the Fully qualified CP name field on the Basic page, enter the unique ID of
the network to which you are connected (2) and the control point name (3).
Click on OK to continue.
4. From the SNA Node Configuration window, click on Configure Local LU 6.2,
then click on New. The Define a Local LU 6.2 window is displayed.
5. In the Local LU name field on the Basic page, enter the name of the LU on
your workstation (5). In the Local LU alias field, enter the name by which
your local LU will be known to your applications (6). Click on OK to
continue.
Adding a connection
To add a connection, follow these steps:
1. From the SNA Node Configuration window, select Configure Devices, select
LAN as the DLC type, then click on New. The Define a LAN Device property
sheet is displayed.
2. If you have the LLC2 protocol installed with Communications Server for
Windows NT, the Adapter number list box lists the available LAN adapters.
See the help file INLLC40.HLP (Windows NT 4.0) or INLLC35.HLP (Windows
NT 3.51) in the Communications Server installation directory for LLC2
installation instructions.
3. The default values displayed on the Define a LAN Device Basic page may be
accepted. Click on OK to continue.
4. From the SNA Node Configuration window, select Configure Connections,
select LAN as the DLC type, then click on New. The Define a LAN Connection
property sheet is displayed.
5. In the Destination address field on the Basic page, enter the LAN address of
the system to which you are connecting (11). Select the Advanced page.
6. In the Block ID field on the Advanced page, enter the local node ID (hex)
(4). Select the Security page.
7. In the Adjacent CP name field on the Security page, enter the network name
and control point name of the remote node (12 and 13). In the Adjacent CP
type field, enter APPN Node. You do not need to complete the Adjacent node ID
field for a peer-to-peer connection. Click on OK to continue. Take note of the
default link name used to identify this new definition (for example, LINK0000).
Adding a partner
To add a partner LU definition, follow these steps:
1. From the SNA Node Configuration window, select Configure Partner LU 6.2,
then click on New. The Define a Partner LU 6.2 property sheet is displayed.
2. In the Partner LU name field on the Basic page, enter the network name (12)
and LU name of the remote system (16). In the Partner LU alias field, enter
the remote LU alias (15). In the Fully qualified CP name fields, enter the
network name and control point name of the remote system (12 and 13).
Click on OK to continue.
2. In the Symbolic destination name field of the Basic page, enter the CPI-C
name (18). In the Mode name field, enter the mode value (17). Enter either
a fully qualified partner LU name (12.16) or a partner LU alias (15)
depending on what you choose in the CPI-C Side Information property sheet.
In the TP name field, enter the partner TP name (19). Click on OK to
continue.
Configuring an invokable TP
To add a Transaction Program (TP) definition, follow these steps:
1. From the SNA Node Configuration window, select Configure Transaction
Programs, then click on New. The Define a Transaction Program property sheet
is displayed.
2. In the TP name field on the Basic page, enter the transaction program name
(7). In the Complete pathname field, enter the actual path and name of the
the program that will be run when a conversation is initiated with your
workstation (8). When you are happy with the settings, click on OK to
continue.
3. In order to be able to stop the WebSphere MQ Transaction Program, you need
to start it in one of the following ways:
a. Check Service TP on the Basic page. This starts the TP programs at
Windows startup and will run the programs under the system user ID.
b. Check Dynamically loaded on the Advanced page. This dynamically loads
and starts the programs as and when incoming SNA conversation requests
arrive. It will run the programs under the same user ID as the rest of
WebSphere MQ.
What next?
The SNA configuration task is complete. From the File pull-down, select Save and
specify a file name under which to save your SNA configuration information, for
example, NTCONFIG (1). When prompted, select this configuration as the
default.
From the SNA Node Operations application, start the node by clicking the Start
node button on the toolbar. Specify the file name of the configuration you just
saved. (It should appear in the file-name box by default, because you identified it
as your default configuration.) When the node startup is complete, ensure that
your link to the remote node has been established by selecting the Connections
button on the toolbar, then find the link name you configured (for example,
LINK0000). The link should be active if the remote node is active waiting for the
link to be established.
A complementary SNA setup process is required on the node to which you are
connecting before you can attempt WebSphere MQ server-to-server message
transmissions.
The LU 6.2 connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for Windows configuration” on page 157.
The listener must be started explicitly before any channels are started.
What next?
When the TCP/IP connection is established, you are ready to complete the
configuration. Go to “WebSphere MQ for Windows configuration” on page 157.
IPX/SPX parameters
Please refer to the Microsoft documentation for full details of the use and setting of
the NWLink IPX and SPX parameters. The IPX/SPX parameters are in the
following paths in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\NWLinkSPX\Parameters
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\NWLinkIPX\Parameters
SPX addressing
WebSphere MQ uses the SPX address of each machine to establish connectivity.
The SPX address is specified in the following form:
network.node(socket)
where
network
Is the 4-byte network address of the network on which the remote machine
resides,
node Is the 6-byte node address, which is the LAN address of the LAN adapter
in the remote machine
socket Is the 2-byte socket number on which the remote machine will listen.
The default socket number used by WebSphere MQ is 5E86. You can change the
default socket number by specifying it in the the Windows registry or in the queue
manager configuration file qm.ini. The lines in the Windows registry might read:
SPX:
SOCKET=n
For more information about values you can set in qm.ini, see Appendix C,
“Configuration file stanzas for distributed queuing,” on page 529.
The SPX address is later specified in the CONNAME parameter of the sender
channel definition. If the WebSphere MQ systems being connected reside on the
same network, the network address need not be specified. Similarly, if the remote
system is listening on the default socket number (5E86), it need not be specified. A
fully qualified SPX address in the CONNAME parameter would be:
CONNAME(’network.node(socket)’)
but if the systems reside on the same network and the default socket number is
used, the parameter would be:
CONNAME(node)
Receiving on SPX
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel.
Optionally you may specify the queue manager name or the socket number if you
are not using the defaults.
displays the contents of the queue q_name defined in queue manager qmgr_name.
Alternatively, you can use the message browser in the WebSphere MQ Explorer.
2. The WebSphere MQ command used to start the TCP/IP listener is:
runmqlsr -t tcp
The listener enables receiver channels to start automatically in response to a
start request from an inbound sender channel.
3. You can start any channel from the command prompt using the command
runmqchl -c channel.name
4. Error logs can be found in the directories mqmtop\qmgrs\qmgrname\errors and
mqmtop\qmgrs\@system\errors. In both cases, the most recent messages are at
the end of amqerr01.log.
5. When you are using the command interpreter runmqsc to enter administration
commands, a + at the end of a line indicates that the next line is a continuation.
Ensure that there is a space between the last parameter and the continuation
character.
Default configuration
You can create a default configuration by using either the First Steps application or
the WebSphere MQ Postcard application to guide you through the process. For
information about this, see the WebSphere MQ System Administration Guide book.
Basic configuration
You can create and start a queue manager from the WebSphere MQ Explorer or
from the command prompt.
where:
winnt Is the name of the queue manager
-q Indicates that this is to become the default queue manager
-u dlqname
Specifies the name of the undeliverable message queue
This command creates a queue manager and a set of default objects.
2. Start the queue manager using the command:
strmqm winnt
where winnt is the name given to the queue manager when it was created.
Channel configuration
The following sections detail the configuration to be performed on the Windows
queue manager to implement the channel described in Figure 32 on page 105.
In each case the MQSC command is shown. Either start runmqsc from a command
prompt and enter each command in turn, or build the commands into a command
file.
Examples are given for connecting WebSphere MQ for Windows. If you wish to
connect to WebSphere MQ on another platform use the appropriate set of values
from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
Table 14. Configuration worksheet for WebSphere MQ for Windows
Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name WINNT
B Local queue name WINNT.LOCALQ
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (SNA) channel name WINNT.AIX.SNA
H Sender (TCP) channel name WINNT.AIX.TCP
I Receiver (SNA) channel name G AIX.WINNT.SNA
J Receiver (TCP) channel name H AIX.WINNT.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.WINNT.TCP
J Receiver (TCP) channel name H WINNT.DECUX.TCP
Connection to WebSphere MQ for HP-UX
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name SOLARIS
G Sender (SNA) channel name WINNT.SOLARIS.SNA
H Sender (TCP) channel name WINNT.SOLARIS.TCP
I Receiver (SNA) channel name G SOLARIS.WINNT.SNA
J Receiver (TCP) channel name H SOLARIS.WINNT.TCP
Connection to WebSphere MQ for Linux
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (SNA) channel name WINNT.LINUX.SNA
H Sender (TCP) channel name WINNT.LINUX.TCP
I Receiver (SNA) channel name G LINUX.WINNT.SNA
J Receiver (TCP) channel name H LINUX.WINNT.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
G Sender (SNA) channel name WINNT.AS400.SNA
H Sender (TCP) channel name WINNT.AS400.TCP
I Receiver (SNA) channel name G AS400.WINNT.SNA
J Receiver (TCP) channel name H AS400.WINNT.TCP
Connection to WebSphere MQ for z/OS
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
The values in this section of the table must match those used in Table 30 on page 319, as indicated.
C Remote queue manager name A QSG
D Remote queue name QSG.REMOTEQ
E Queue name at remote system B QSG.SHAREDQ
F Transmission queue name QSG
G Sender (SNA) channel name WINNT.QSG.SNA
H Sender (TCP) channel name WINNT.QSG.TCP
I Receiver (SNA) channel name G QSG.WINNT.SNA
J Receiver (TCP/IP) channel name H QSG.WINNT.TCP
Connection to MQSeries for VSE/ESA
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name WINNT.VSE.SNA
I Receiver channel name G VSE.WINNT.SNA
Automatic startup
WebSphere MQ for Windows allows you to automate the startup of a queue
manager and its channel initiator, channels, listeners, and command servers. Use
the IBM WebSphere MQ Services snap-in to define the services for the queue
manager. When you have successfully completed testing of your communications
setup, set the relevant services to automatic within the snap-in. This file can be
read by the supplied WebSphere MQ service when the system is started.
For more information about this, see the WebSphere MQ System Administration Guide
book.
Most installations will select to run their sender channels as threads, because the
virtual and real memory required to support a large number of concurrent channel
connections will be reduced. When the WebSphere MQ listener process (started via
the RUNMQLSR command) exhausts the available private memory needed, an
additional listener process will need to be started to support more channel
connections. When each channel runs as a process, additional processes are
automatically started, avoiding the out-of-memory condition.
If all channels are run as threads under one WebSphere MQ listener, a failure of
the listener for any reason will cause all channel connections to be temporarily lost.
This can be prevented by balancing the threaded channel connections across two or
more listener processes, thus enabling other connections to keep running. If each
sender channel is run as a separate process, the failure of the listener for that
process will affect only that specific channel connection.
A NetBIOS connection needs a separate process for the Message Channel Agent.
Therefore, before you can issue a START CHANNEL command, you must start the
channel initiator, or you may start a channel using the RUNMQCHL command.
You control pipelining with the PipeLineLength parameter in the qm.ini file. This
parameter is added to the CHANNELS stanza:
PipeLineLength=1|number
This attribute specifies the maximum number of concurrent threads a
channel will use. The default is 1. Any value greater than 1 will be treated
as 2.
With WebSphere MQ for Windows, use the WebSphere MQ Services snap-in to set
the PipeLineLength parameter in the registry. Refer to the WebSphere MQ System
Administration Guide book for a complete description of the CHANNELS stanza.
Notes:
1. PipeLineLength applies only to V5.2 or later products.
2. Pipelining is effective only for TCP/IP channels.
When you use pipelining, the queue managers at both ends of the channel must be
configured to have a PipeLineLength greater than 1.
Check the design of your exit programs before you use pipelining:
v Exits must be reentrant at all stages of their execution.
v When you use MQI calls, remember that MQI handles are thread-specific.
Consider a message exit that opens a queue and uses its handle for MQPUT calls
on all subsequent invocations of the exit. This fails in pipelining mode because the
exit is called from different threads. To avoid this failure, keep a queue handle for
each thread and check the thread identifier each time the exit is invoked.
For Windows, see Chapter 10, “Setting up communication for Windows,” on page
131.
Deciding on a connection
There are two forms of communication for WebSphere MQ on UNIX systems:
v TCP
v LU 6.2
Each channel definition must specify one only as the transmission protocol
(Transport Type) attribute. One or more protocols may be used by a queue
manager.
Sending end
Specify the host name, or the TCP address of the target machine, in the Connection
Name field of the channel definition. The port to connect to will default to 1414.
Port number 1414 is assigned by the Internet Assigned Numbers Authority to
WebSphere MQ.
To use a port number other than the default, change the connection name field
thus:
Connection Name REMHOST(1822)
where REMHOST is the hostname of the remote machine and 1822 is the port number
required. (This must be the port that the listener at the receiving end is listening
on.)
Alternatively you can change the port number by specifying it in the queue
manager configuration file (qm.ini):
TCP:
Port=1822
For more information about the values you set using qm.ini, see Appendix C,
“Configuration file stanzas for distributed queuing,” on page 529.
Receiving on TCP
You can use either the TCP/IP listener, which is the inet daemon (INETD), or the
WebSphere MQ listener.
Some Linux distributions now use the extended inet daemon (XINETD) instead of
the inet daemon. For information about how to use the extended inet daemon on a
Linux system, see “Using the extended inet daemon (XINETD)” on page 250.
The updates are active after inetd has reread the configuration files. To do this,
issue the following commands from the root user ID:
v On AIX:
refresh -s inetd
v On HP-UX, from the mqm user ID:
inetd -c
v On other UNIX systems:
kill -1 <process number>
When the listener program started by INETD inherits the locale from INETD, it is
possible that the MQMDE will not be honored (merged) and will be placed on the
queue as message data. To ensure that the MQMDE is honored, you must set the
locale correctly. The locale set by INETD may not match that chosen for other
locales used by WebSphere MQ processes. To set the locale:
1. Create a shell script which sets the locale environment variables LANG,
LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, and
LC_MESSAGES to the locale used for other WebSphere MQ process.
2. In the same shell script, call the listener program.
3. Modify the inetd.conf file to call your shell script in place of the listener
program.
It is possible to have more than one queue manager on the server machine. You
must add a line to each of the two files, as above, for each of the queue managers.
For example:
MQSeries1 1414/tcp
MQSeries2 1822/tcp
MQSeries2 stream tcp nowait mqm /mqmtop/bin/amqcrsta amqcrsta -m QM2
This avoids error messages being generated if there is a limitation on the number
of outstanding connection requests queued at a single TCP port. For information
about the number of outstanding connection requests, see “Using the TCP listener
backlog option.”
If the backlog reaches the values shown in Table 15, the TCP/IP connection is
rejected and the channel will not be able to start.
For MCA channels, this results in the channel going into a RETRY state and
retrying the connection at a later time.
However, to avoid this error, you can add an entry in the qm.ini file:
TCP:
ListenerBacklog = n
This overrides the default maximum number of outstanding requests (see Table 15)
for the TCP/IP listener.
Note: Some operating systems support a larger value than the default. If necessary,
this can be used to avoid reaching the connection limit.
To run the listener with the backlog option switched on, use the RUNMQLSR -B
command. For information about the RUNMQLSR command, see the WebSphere MQ
System Administration Guide book.
The square brackets indicate optional parameters; QMNAME is not required for the
default queue manager, and the port number is not required if you are using the
default (1414).
For the best performance, run the WebSphere MQ listener as a trusted application
as described in “Running channels and listeners as trusted applications” on page
129. See the WebSphere MQ Application Programming Guide for information about
trusted applications.
You can stop all WebSphere MQ listeners running on a queue manager that is
inactive, using the command:
endmqlsr [-m QMNAME]
If you do not specify a queue manager name, the default queue manager is
assumed.
On some UNIX systems, you can define how long TCP waits before checking that
the connection is still available, and how frequently it retries the connection if the
first check fails. This is either a kernel tunable parameter, or can be entered at the
command line. See the documentation for your UNIX system for more information.
See the Multiplatform APPC Configuration Guide and the following table for
information.
Table 16. Settings on the local UNIX system for a remote queue manager platform
Remote platform TPNAME TPPATH
z/OS without The same as the corresponding -
CICS TPName in the side information on
the remote queue manager.
z/OS using CICS CKRC (sender) CKSV (requester) -
CKRC (server)
i5/OS The same as the compare value in -
the routing entry on the i5/OS
system.
UNIX systems The same as the corresponding mqmtop/bin/amqcrs6a
TPName in the side information on
the remote queue manager.
Table 16. Settings on the local UNIX system for a remote queue manager
platform (continued)
Remote platform TPNAME TPPATH
Windows As specified in the Windows Run mqmtop\bin\amqcrs6a
Listener command, or the
invokable Transaction Program
that was defined using TpSetup on
Windows.
If you have more than one queue manager on the same machine, ensure that the
TPnames in the channel definitions are unique.
Sending end
v On UNIX systems, create a CPI-C side object (symbolic destination) and enter
this name in the Connection name field in the channel definition. Also create an
LU 6.2 link to the partner.
In the CPI-C side object enter the partner LU name at the receiving machine, the
transaction program name and the mode name. For example:
Partner LU Name REMHOST
Remote TP Name recv
Service Transaction Program no
Mode Name #INTER
On HP-UX, use the APPCLLU environment variable to name the local LU that
the sender should use. On Solaris, set the APPC_LOCAL_LU environment
variable to be the local LU name.
SECURITY PROGRAM is used, where supported by CPI-C, when WebSphere
MQ attempts to establish an SNA session.
Receiving on LU 6.2
v On UNIX systems, create a listening attachment at the receiving end, an LU 6.2
logical connection profile, and a TPN profile.
In the TPN profile, enter the full path to the executable and the Transaction
Program name:
Full path to TPN executable mqmtop/bin/amqcrs6a
Transaction Program name recv
User ID 0
On systems where you can set the User ID, you should specify a user who is a
member of the mqm group. On AIX, Solaris, and HP-UX, set the APPCTPN
(transaction name) and APPCLLU (local LU name) environment variables (you
can use the configuration panels for the invoked transaction program).
You may need to use a queue manager other than the default queue manager. If
so, define a command file that calls:
amqcrs6a -m Queue_Man_Name
First it describes the parameters needed for an LU 6.2 connection, then it describes
“Establishing a TCP connection” on page 180.
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for AIX configuration” on
page 181.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use the following worksheet to record the values you will use for this
configuration. Where numbers appear in the Reference column they indicate that
the value must match that in the appropriate worksheet elsewhere in this book.
The examples that follow in this chapter refer back to the values in the ID column
of this table. The entries in the Parameter Name column are explained in
“Explanation of terms” on page 173.
Table 17. Configuration worksheet for Communications Server for AIX
ID Parameter Name Reference Example User Value
Parameters for local node
1 Network name NETID
2 Control Point name AIXPU
3 Node ID 07123456
4 Local LU name AIXLU
5 Local LU alias AIXQMGR
Table 17. Configuration worksheet for Communications Server for AIX (continued)
ID Parameter Name Reference Example User Value
6 TP Name MQSERIES
7 Full path to TP executable usr/lpp/mqm/bin/amqcrs6a
8 Token-ring adapter address 123456789012
9 Mode name #INTER
Connection to a Windows system
The values in this section of the table must match those used in Table 13 on page 142, as indicated.
10 Network name 2 NETID
11 Remote LU name 5 WINNTLU
12 Remote Transaction Program 7 MQSERIES
name
13 LU 6.2 CPI-C Side Information NTCPIC
profile name
14 Mode name 17 #INTER
15 LAN destination address 9 08005AA5FAB9
16 Token-Ring Link Station NTPRO
profile name
17 CP name of adjacent node 3 WINNTCP
18 LU 6.2 partner LU profile NTLUPRO
name
Connection to an HP-UX system
The values in this section of the table must match those used in Table 19 on page 187, as indicated.
10 Network name 4 NETID
11 Remote LU name 5 HPUXLU
12 Remote Transaction Program 7 MQSERIES
name
13 LU 6.2 CPI-C Side Information HPUXCPIC
profile name
14 Mode name 6 #INTER
15 LAN destination address 8 100090DC2C7C
16 Token-Ring Link Station HPUXPRO
profile name
17 CP name of adjacent node 2 HPUXPU
18 LU 6.2 partner LU profile HPUXLUPRO
name
Connection to a Solaris system
The values in this section of the table must match those used in Table 21 on page 211, as indicated.
10 Network name 2 NETID
11 Remote LU name 7 SOLARLU
12 Remote Transaction Program 8 MQSERIES
name
17 LU 6.2 CPI-C Side Information SOLCPIC
profile name
Table 17. Configuration worksheet for Communications Server for AIX (continued)
ID Parameter Name Reference Example User Value
14 Mode name 17 #INTER
5 LAN destination address 5 08002071CC8A
16 Token-Ring Link Station SOLPRO
profile name
17 CP name of adjacent node 3 SOLARPU
18 LU 6.2 partner LU profile SOLLUPRO
name
Connection to a Linux (x86 platform) system
The values in this section of the table must match those used in Table 23 on page 233, as indicated.
10 Network name 4 NETID
11 Remote LU name 5 LINUXLU
12 Remote Transaction Program 7 MQSERIES
name
17 LU 6.2 CPI-C Side Information LXCPIC
profile name
14 Mode name 6 #INTER
5 LAN destination address 8 08005AC6DF33
16 Token-Ring Link Station LXPRO
profile name
17 CP name of adjacent node 2 LINUXPU
18 LU 6.2 partner LU profile LXLUPRO
name
Connection to an i5/OS system
The values in this section of the table must match those used in Table 35 on page 387, as indicated.
10 Network name 1 NETID
11 Remote LU name 3 AS400LU
12 Remote Transaction Program 8 MQSERIES
name
13 LU 6.2 CPI-C Side Information AS4CPIC
profile name
14 Mode name 17 #INTER
15 LAN destination address 4 10005A5962EF
16 Token-Ring Link Station AS4PRO
profile name
17 CP name of adjacent node 2 AS400PU
18 LU 6.2 partner LU profile AS4LUPRO
name
Connection to a z/OS system
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
10 Network name 2 NETID
11 Remote LU name 4 MVSLU
Table 17. Configuration worksheet for Communications Server for AIX (continued)
ID Parameter Name Reference Example User Value
12 Remote Transaction Program 7 MQSERIES
name
13 LU 6.2 CPI-C Side Information MVSCPIC
profile name
14 Mode name 10 #INTER
15 LAN destination address 6 400074511092
16 Token-Ring Link Station MVSPRO
profile name
17 CP name of adjacent node 3 MVSPU
18 LU 6.2 partner LU profile MVSLUPRO
name
Connection to a z/OS system using a generic interface
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
10 Network name 2 NETID
11 Remote LU name 10 MVSGR
12 Remote Transaction Program 7 MQSERIES
name
13 LU 6.2 CPI-C Side Information MVSCPIC
profile name
14 Mode name 6 #INTER
15 LAN destination address 8 400074511092
16 Token-Ring Link Station MVSPRO
profile name
17 CP name of adjacent node 3 MVSPU
18 LU 6.2 partner LU profile MVSLUPRO
name
Connection to a VSE/ESA system
The values in this section of the table must match those used in your VSE/ESA system.
10 Network name 1 NETID
11 Remote LU name 3 VSELU
12 Remote Transaction Program 4 MQ01
name
13 LU 6.2 CPI-C Side Information VSECPIC
profile name
14 Mode name #INTER
15 LAN destination address 5 400074511092
16 Token-Ring Link Station VSEPRO
profile name
17 CP name of adjacent node 2 VSEPU
18 LU 6.2 partner LU profile VSELUPRO
name
Explanation of terms
1Network name
This is the unique ID of the network to which you are connected. Your
network administrator will tell you this value.
2 Control Point name
This is a unique control point name for this workstation. Your network
administrator will assign this to you.
3 XID node ID
This is a unique identifier for this workstation. On other platforms it is
often referred to as the exchange ID (XID). Your network administrator will
assign this to you.
4 Local LU name
A logical unit (LU) manages the exchange of data between systems. The
local LU name is the name of the LU on your system. Your network
administrator will assign this to you.
5 Local LU alias
The local LU alias is the name by which your local LU is known to your
applications. You can choose this name yourself. It need be unique only on
this machine.
6 TP Name
WebSphere MQ applications trying to converse with this workstation will
specify a symbolic name for the program to be run at the receiving end.
This will have been defined on the channel definition at the sender. It is
recommended that when AIX is the receiver a Transaction Program Name
of MQSERIES is used, or in the case of a connection to VSE/ESA, where
the length is limited to 4 bytes, use MQTP.
See Table 16 on page 166 for more information.
7 Full path to TP executable
This is the path and name of a shell script file that invokes the actual
program to be run when a conversation is initiated with this workstation.
You can choose the path and name of the script file. The contents of the
file are illustrated in “WebSphere MQ for AIX TPN setup” on page 185.
8 Token-ring adapter address
This is the 12-character hex address of the token-ring card. It can be found
by entering the AIX command:
lsfg -v -l tokn
where n is the number assigned to the token-ring adapter you are using.
The Network Address field of the Token-Ring section indicates the
adapter’s address.
9 Mode name
This is the name of a configuration profile used by Communications Server
for AIX. The profile contains the set of parameters that control the APPC
conversation. The mode name specified in the profile will be assigned to
you by your network administrator. You supply the name to be used for
the profile.
13 LU 6.2 CPI-C Side Information profile name
This is a name given to the Side Information profile defining a partner
node. You supply the name. It needs to be unique only on this machine.
You will later use the name in the WebSphere MQ sender channel
definition.
16 Token-Ring Link Station profile name
This is the name of a configuration profile used by Communications Server
for AIX. You supply the name to be used for the profile. The link station
profile associates the link station with the SNA DLC profile, which has
been used to define the hardware adapter and link characteristics, and the
node control point.
17 CP name of adjacent node
This is the unique control point name of the partner system which which
you are establishing communication. Your network administrator will
assign this to you.
18 LU 6.2 partner LU profile name
This is the name of a configuration profile used by Communications Server
for AIX. You supply the name to be used for the profile. It needs to be
unique only on this machine. The profile defines parameters for
establishing a session with a specific partner LU. In some scenarios, this
profile may not be required but it is shown here to reduce the likelihood of
error. See the SNA Server for AIX Configuration Reference manual for details.
To update the SNA configuration profile, you need root authority. (Without root
authority you can display options and appear to modify them, but cannot actually
make any changes.) You can make configuration changes when SNA is either
active or inactive.
The configuration scenario that follows was accomplished using the graphical
interface.
If you are an experienced user of AIX, you may choose to circumvent the panels
and use the command-line interface. Refer to the SNA Server for AIX Configuration
Reference manual to see the commands that correspond to the panels illustrated.
Throughout the following example, only the panels for profiles that must be added
or updated are shown.
d. Enter a port name in the SNA port name box, for example, MQPORT.
e. Check Initially Active.
f. Click on OK.
2. Defining your connection to the network node:
a. From the main menu on the main window, click on Services, Connectivity,
and New link station ...
b. Click on OK to link your station to the chosen port (MQPORT). A window
entitled Token ring link station appears:
c. Enter a name for your link station (4), for example, NETNODE.
d. Enter the port name to which you want to connect the link station. In this
case, the port name would be MQPORT.
e. Check Any in the LU traffic box.
f. Define where the remote node is by entering the control point on the
network node in the Independent LU traffic box. The control point consists
of a Network name (10) and a CP name of adjacent node (17).
Note: The network node does not have to be on the remote system that you
are connecting to.
g. Ensure the Remote node type is Network node.
h. In the Contact information, enter the MAC address (15) of the token ring
card on the network node.
Note: The network node does not have to be on the remote system that you
are connecting to.
i. Click on Advanced .... A window entitled Token ring parameters appears:
Defining a local LU
To define a local LU:
1. From the main menu on the main window, click on Services, APPC, and New
independent local LU .... A window entitled Local LU appears:
If you are migrating from a previous version of MQSeries, you should delete any
existing Communications Server definitions of transaction programs that can be
invoked by WebSphere MQ using the following commands:
1. Type
snaadmin delete_tp_load_info.tp_name=xxxxx
2. Then type
snaadmin delete_tp.tp_name=xxxxx
You can then re-create the transaction program definition using the following
instructions
From the main window, click Services, APPC, and Transaction programs ... The
following panel is displayed:
Note: You must add root to the mqm group. You need not have the primary group
set to mqm. As long as mqm is in the set of groups, you can use the
commands. If you are running only applications that use the queue manager
you do not need mqm group authority.
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for AIX configuration.”
Basic configuration
1. Create the queue manager from the AIX command line using the command:
crtmqm -u dlqname -q aix
where:
aix Is the name of the queue manager
-q Indicates that this is to become the default queue manager
-u dlqname
Specifies the name of the undeliverable message queue
This command creates a queue manager and a set of default objects.
2. Start the queue manager from the AIX command line using the command:
strmqm aix
where aix is the name given to the queue manager when it was created.
3. Start runmqsc from the AIX command line and use it to create the
undeliverable message queue by entering the command:
def ql (dlqname)
where dlqname is the name given to the undeliverable message queue when the
queue manager was created.
Channel configuration
The following section details the configuration to be performed on the AIX queue
manager to implement the channel described in Figure 32 on page 105.
In each case the MQSC command is shown. Either start runmqsc from an AIX
command line and enter each command in turn, or build the commands into a
command file.
Examples are given for connecting WebSphere MQ for AIX and WebSphere MQ for
Windows. If you wish to connect to WebSphere MQ on another platform use the
appropriate set of values from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
Table 18. Configuration worksheet for WebSphere MQ for AIX
ID Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name AIX
B Local queue name AIX.LOCALQ
Connection to WebSphere MQ for Windows
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (SNA) channel name AIX.WINNT.SNA
H Sender (TCP/IP) channel name AIX.WINNT.TCP
I Receiver (SNA) channel name G WINNT.AIX.SNA
J Receiver (TCP) channel name H WINNT.AIX.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.AIX.TCP
J Receiver (TCP) channel name H AIX.DECUX.TCP
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
E Queue name at remote system B HPUX.LOCALQ
F Transmission queue name HPUX
G Sender (SNA) channel name AIX.HPUX.SNA
H Sender (TCP) channel name AIX.HPUX.TCP
I Receiver (SNA) channel name G HPUX.AIX.SNA
J Receiver (TCP) channel name H HPUX.AIX.TCP
Connection to WebSphere MQ for Solaris
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name SOLARIS
G Sender (SNA) channel name AIX.SOLARIS.SNA
H Sender (TCP/IP) channel name AIX.SOLARIS.TCP
I Receiver (SNA) channel name G SOLARIS.AIX.SNA
J Receiver (TCP/IP) channel name H SOLARIS.AIX.TCP
Connection to WebSphere MQ for Linux
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (SNA) channel name AIX.LINUX.SNA
H Sender (TCP/IP) channel name AIX.LINUX.TCP
I Receiver (SNA) channel name G LINUX.AIX.SNA
J Receiver (TCP/IP) channel name H LINUX.AIX.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
G Sender (SNA) channel name AIX.AS400.SNA
H Sender (TCP) channel name AIX.AS400.TCP
I Receiver (SNA) channel name G AS400.AIX.SNA
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
D Remote queue name MVS.REMOTEQ
E Queue name at remote system B MVS.LOCALQ
F Transmission queue name MVS
G Sender (SNA) channel name AIX.MVS.SNA
H Sender (TCP) channel name AIX.MVS.TCP
I Receiver (SNA) channel name G MVS.AIX.SNA
J Receiver (TCP) channel name H MVS.AIX.TCP
Connection to WebSphere MQ for z/OS using queue-sharing groups
The values in this section of the table must match those used in Table 30 on page 319, as indicated.
C Remote queue manager name A QSG
D Remote queue name QSG.REMOTEQ
E Queue name at remote system B QSG.SHAREDQ
F Transmission queue name QSG
G Sender (SNA) channel name AIX.QSG.SNA
H Sender (TCP) channel name AIX.QSG.TCP
I Receiver (SNA) channel name G QSG.AIX.SNA
J Receiver (TCP) channel name H QSG.AIX.TCP
Connection to MQSeries for VSE/ESA
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name AIX.VSE.SNA
I Receiver channel name G VSE.AIX.SNA
where aix is the queue manager name (A). After creating this file, enable it for
execution by running the command:
chmod 755 /u/interops/AIX.crs6a
As an alternative to creating an executable file, you can specify the path on the
Add LU 6.2 TPN Profile panel, using command line parameters.
Specifying a path in one of these two ways ensures that SNA receiver channels
activate correctly when a sender channel initiates a conversation.
First it describes the parameters needed for an LU 6.2 connection, then it describes
“Establishing a session using HP SNAplus2” on page 191 and “Establishing a TCP
connection” on page 205.
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for HP-UX configuration”
on page 206.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer back to the values in the ID column. The entries in the
Parameter Name column are explained in “Explanation of terms” on page 190.
Table 19. Configuration worksheet for HP SNAplus2
ID Parameter Name Reference Example User Value
Parameters for local node
1 Configuration file name sna_node.cfg
2 Control point name HPUXPU
3 Node ID to send 05D 54321
4 Network name NETID
5 Local APPC LU HPUXLU
The values in this section of the table must match those used in Table 13 on page 142, as indicated.
12 Link station name NTCONN
13 Network name 2 NETID
14 CP name 3 WINNTCP
15 Remote LU 5 WINNTLU
16 Application TP 7 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name NTCPIC
19 Remote network address 9 08005AA5FAB9
20 Node ID to receive 4 05D 30F65
Connection to an AIX system
The values in this section of the table must match those used in Table 17 on page 169, as indicated.
12 Link station name AIXCONN
13 Network name 1 NETID
14 CP name 2 AIXPU
15 Remote LU 4 AIXLU
16 Application TP 6 MQSERIES
17 Mode name 14 #INTER
18 CPI-C symbolic destination name AIXCPIC
19 Remote network address 8 123456789012
20 Node ID to receive 3 071 23456
Connection to a Solaris system
The values in this section of the table must match those used in Table 21 on page 211, as indicated.
12 Link station name SOLCONN
13 Network name 2 NETID
14 CP name 3 SOLARPU
15 Remote LU 7 SOLARLU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name SOLCPIC
19 Remote network address 5 08002071CC8A
20 node ID to receive 6 05D 310D6
The values in this section of the table must match those used in Table 23 on page 233, as indicated.
12 Link station name LXCONN
13 Network name 4 NETID
14 CP name 2 LINUXPU
15 Remote LU 5 LINUXLU
16 Application TP 7 MQSERIES
17 Mode name 6 #INTER
18 CPI-C symbolic destination name LXCPIC
19 Remote network address 8 08005AC6DF33
20 node ID to receive 3 05D 30A55
Connection to an i5/OS system
The values in this section of the table must match those used in Table 35 on page 387, as indicated.
12 Link station name AS4CONN
13 Network name 1 NETID
14 CP name 2 AS400PU
15 Remote LU 3 AS400LU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name AS4CPIC
19 Remote network address 4 10005A5962EF
Connection to a z/OS system
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
12 Link station name MVSCONN
13 Network name 2 NETID
14 CP name 3 MVSPU
15 Remote LU 4 MVSLU
16 Application TP 7 MQSERIES
17 Mode name 10 #INTER
18 CPI-C symbolic destination name MVSCPIC
19 Remote network address 8 400074511092
Connection to a VSE/ESA system
The values in this section of the table must match those used in your VSE/ESA system.
12 Link station name VSECONN
13 Network name 1 NETID
14 CP name 2 VSEPU
15 Remote LU 3 VSELU
16 Application TP 4 MQ01 MQ01
17 Mode name #INTER
Explanation of terms
1 Configuration file name
This is the unique name of the SNAplus2 configuration file. The default for
this name is sna_node.cfg.
Although it is possible to edit this file it is strongly recommended that
configuration is done using xsnapadmin.
2 Control point name
This is the unique Control point name for this workstation. In the SNA
network, the Control point is an addressable location (PU type 2.1). Your
network administrator will assign this to you.
3 Node ID to send
This is the unique ID of this workstation. On other platforms this is often
referred to as the Exchange ID or XID. Your network administrator will
assign this ID for you.
4 Network name
This is the unique ID of the network to which you are connected. It is an
alphanumeric value and can be 1-8 characters long. The network name
works with the Control point name to uniquely identify a system. Your
network administrator will tell you the value.
5 Local APPC LU
An LU manages the exchange of data between transactions. The local
APPC LU name is the name of the LU on your system. Your network
administrator will assign this to you.
6 APPC mode
This is the name given to the set of parameters that control the APPC
conversation. This name must be defined at each partner system. Your
network administrator will assign this to you.
7 Invokable TP
WebSphere MQ applications trying to converse with this workstation will
specify a symbolic name for the program to be run at the receiving end.
This will have been defined on the channel definition at the sender. For
simplicity, wherever possible use a transaction program name of
MQSERIES, or in the case of a connection to VSE/ESA, where the length is
limited to 4 bytes, use MQTP.
See Table 16 on page 166 for more information.
8 Token-ring adapter address
Use the HP-UX System Administration Manager (SAM) to discover the
adapter address for this workstation. You need root authority to use SAM.
From the initial menu, select Networking and Communications, then
select Network Interface cards followed by LAN 0 (or whichever LAN
you are using). The adapter address is displayed under the heading Station
Address (hex). The card name represents the appropriate card type. If you
do not have root level authority, your HP-UX system administrator can tell
you the value.
SNAplus2 configuration
SNAplus2 configuration involves the following steps:
1. Defining a local node
2. Adding a Token Ring Port
3. Defining a local LU
The SNAplus2 main menu, from which you will start, is shown below:
3. Complete the Control point name with the values Network name (4) and
Control point name (2).
4. Enter the Control point name (2) in the Control point alias field.
5. Enter the Node ID (3).
6. Select End node.
7. Press OK.
3. Select a Token Ring Card port and press OK. The following panel is displayed:
Defining a local LU
1. From the main SNAplus2 menu, select the Independent local LUs panel.
2. Press Add. The following panel is displayed:
APPC configuration
APPC configuration involves the following steps:
1. Defining a remote node
2. Defining a partner LU
3. Defining a link station
4. Defining a mode
5. Adding CPI-C information
6. Adding a TP definition
3. Select Define remote node and press OK. The following panel is displayed:
Defining a partner LU
1. From the main SNAplus2 menu, select the remote node in the Remote systems
panel.
2. Press Add. The following panel is displayed:
Defining a mode
1. From the SNAplus2 main menu, select the Services pull-down: The following
panel is displayed:
5. Enter the Name (18). Select Application TP and enter the value (16). Select
Use PLU alias and enter the name (15). Enter the Mode name (17).
6. Press OK.
See “WebSphere MQ for HP-UX invokable TP setup” on page 209 for more
information about TP definitions.
HP-UX operation
The SNAplus2 control daemon is started with the snap start command. Depending
on the options selected at installation, it may already be running.
Logging and tracing are controlled from here. Log and trace files can be found in
the /var/opt/sna directory. The logging files sna.aud and sna.err can be read
using a standard editor such as vi.
In order to read the trace files sna1.trc and sna2.trc they must first be formatted by
running the command snaptrcfmt -f sna1.trc -o sna1 which produces a sna1.dmp
file which can be read using a normal editor.
The configuration file itself is editable but this is not a recommended method of
configuring SNAplus2.
The APPCLU environment variables must be set before starting a sender channel
from the HP-UX system. The command can be either entered interactively or
added to the logon profile. Depending on the level of BOURNE shell or KORN
shell program being used, the command will be:
export APPCLLU=HPUXLU 5 newer level
or
APPCLLU=HPUXLU 5 older level
export
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for HP-UX configuration” on page 206.
Note: You must add root to the mqm group. You do not need not have the
primary group set to mqm. As long as mqm is in the set of groups, you can
use the commands. If you are running only applications that use the queue
manager you do not need to have mqm group authority.
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for HP-UX configuration.”
Basic configuration
1. Create the queue manager from the UNIX prompt using the command:
crtmqm -u dlqname -q hpux
where:
hpux Is the name of the queue manager
-q Indicates that this is to become the default queue manager
-u dlqname
Specifies the name of the undeliverable message queue
This command creates a queue manager and a set of default objects. It sets the
DEADQ attribute of the queue manager but does not create the undeliverable
message queue.
2. Start the queue manager from the UNIX prompt using the command:
strmqm hpux
where hpux is the name given to the queue manager when it was created.
Channel configuration
The following section details the configuration to be performed on the HP-UX
queue manager to implement the channel described in Figure 32 on page 105.
In each case the MQSC command is shown. Either start runmqsc from a UNIX
prompt and enter each command in turn, or build the commands into a command
file.
Examples are given for connecting WebSphere MQ for HP-UX and WebSphere MQ
for Windows. If you wish connect to WebSphere MQ on another platform use the
appropriate set of values from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
206 WebSphere MQ Intercommunication
HP-UX configuration
throughout this book. All others are keywords and should be entered as
shown.
Table 20. Configuration worksheet for WebSphere MQ for HP-UX
ID Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name HPUX
B Local queue name HPUX.LOCALQ
Connection to WebSphere MQ for Windows
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (SNA) channel name HPUX.WINNT.SNA
H Sender (TCP/IP) channel name HPUX.WINNT.TCP
I Receiver (SNA) channel name G WINNT.HPUX.SNA
J Receiver (TCP) channel name H WINNT.HPUX.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (SNA) channel name HPUX.AIX.SNA
H Sender (TCP) channel name HPUX.AIX.TCP
I Receiver (SNA) channel name G AIX.HPUX.SNA
J Receiver (TCP) channel name H AIX.HPUX.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.HPUX.TCP
J Receiver (TCP) channel name H HPUX.DECUX.TCP
Connection to WebSphere MQ for Solaris
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name SOLARIS
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (SNA) channel name HPUX.LINUX.SNA
H Sender (TCP/IP) channel name HPUX.LINUX.TCP
I Receiver (SNA) channel name G LINUX.HPUX.SNA
J Receiver (TCP/IP) channel name H LINUX.HPUX.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
G Sender (SNA) channel name HPUX.AS400.SNA
H Sender (TCP/IP) channel name HPUX.AS400.TCP
I Receiver (SNA) channel name G AS400.HPUX.SNA
J Receiver (TCP) channel name H AS400.HPUX.TCP
Connection to WebSphere MQ for z/OS
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
D Remote queue name MVS.REMOTEQ
E Queue name at remote system B MVS.LOCALQ
F Transmission queue name MVS
G Sender (SNA) channel name HPUX.MVS.SNA
H Sender (TCP) channel name HPUX.MVS.TCP
I Receiver (SNA) channel name G MVS.HPUX.SNA
J Receiver (TCP) channel name H MVS.HPUX.TCP
Connection to MQSeries for VSE/ESA
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
This ensures that SNA receiver channels activate correctly when a sender channel
initiates a conversation.
trptype(tcp) +
conname(remote_tcpip_hostname) +
xmitq(WINNT) + F
replace
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for Solaris configuration”
on page 229.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer to the values in the ID column. The entries in the Parameter
Name column are explained in “Explanation of terms” on page 214.
Table 21. Configuration worksheet for SNAP-IX
ID Parameter Name Ref. Example User Value
Parameters for local node
1 Configuration file name sna_node.cfg
2 Control point name SOLARXPU
3 Node ID to send 05D 23456
The values in this section of the table must match those used in the Table for Windows and LU6.2, as indicated.
12 Link station name NTCONN
13 Network name 2 NETID
14 CP name 3 WINNTCP
15 Remote LU 5 WINNTLU
16 Application TP 7 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name NTCPIC
19 Remote network address 9 08005AA5FAB9
20 Node ID to receive 4 05D 30F65
Connection to an AIX system
The values in this section of the table must match those used in the Table for AIX and LU6.2, as indicated.
12 Link station name AIXCONN
13 Network name 1 NETID
14 CP name 2 AIXPU
15 Remote LU 4 AIXLU
16 Application TP 6 MQSERIES
17 Mode name 14 #INTER
18 CPI-C symbolic destination name AIXCPIC
19 Remote network address 8 123456789012
20 Node ID to receive 3 071 23456
Connection to an HP-UX system
The values in this section of the table must match those used in the Table for HP-UX and LU6.2, as indicated.
12 Link station name HPUXCONN
13 Network name 2 NETID
14 CP name 3 HPUXPU
15 Remote LU 7 HPUXLU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name HPUXCPIC
The values in this section of the table must match those used in the table the Table for Linux (x86 platform) and
LU6.2, as indicated.
12 Link station name LXCONN
13 Network name 4 NETID
14 CP name 2 LINUXPU
15 Remote LU 5 LINUXLU
16 Application TP 7 MQSERIES
17 Mode name 6 #INTER
18 CPI-C symbolic destination name LXCPIC
19 Remote network address 8 08005AC6DF33
20 Node ID to receive 3 05D 30A55
Connection to an i5/OS system
The values in this section of the table must match those used in the Table for i5/OS and LU6.2, as indicated.
12 Link station name AS4CONN
13 Network name 1 NETID
14 CP name 2 AS400PU
15 Remote LU 3 AS400LU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name AS4CPIC
19 Remote network address 4 10005A5962EF
Connection to a z/OS system
The values in this section of the table must match those used in the Table for z/OS and LU6.2, as indicated.
12 Link station name MVSCONN
13 Network name 2 NETID
14 CP name 3 MVSPU
15 Remote LU 4 MVSLU
16 Application TP 7 MQSERIES
17 Mode name 10 #INTER
18 CPI-C symbolic destination name MVSCPIC
19 Remote network address 8 400074511092
Connection to a VSE/ESA system
The values in this section of the table must match those used in the Table for VSE/ESA and LU6.2, as indicated.
12 Link station name VSECONN
13 Network name 1 NETID
14 CP name 2 VSEPU
Explanation of terms
1 Configuration file name
This is the unique name of the SNAP-IX configuration file. The default for
this name is sna_node.cfg.
Although it is possible to edit this file, it is strongly recommended that
configuration is done using xsnadmin.
2 Control point name
This is the unique Control point name for this workstation. In the SNA
network, the Control point is an addressable location (PU type 2.1). Your
network administrator will assign this to you.
3 Node ID to send
This is the unique ID of this workstation. On other platforms this is often
referred to as the Exchange ID or XID. Your network administrator will
assign this ID for you.
4 Network name
This is the unique ID of the network to which you are connected. It is an
alphanumeric value and can be 1-8 characters long. The network name
works with the Control point name to uniquely identify a system. Your
network administrator will tell you the value.
5 Local APPC LU
An LU manages the exchange of data between transactions. The local
APPC LU name is the name of the LU on your system. Your network
administrator will assign this to you.
6 APPC mode
This is the name given to the set of parameters that control the APPC
conversation. This name must be defined at each partner system. Your
network administrator will assign this to you.
7 Invokable TP
WebSphere MQ applications trying to converse with this workstation will
specify a symbolic name for the program to be run at the receiving end.
This will have been defined on the channel definition at the sender. For
simplicity, wherever possible use a transaction program name of
MQSERIES, or in the case of a connection to VSE/ESA, where the length is
limited to 4 bytes, use MQTP.
8 Local MAC address
This is the network address of the token-ring card. The address to be
specified is found in the ether value displayed in response to the
ifconfig tr0 command issued at a root level of authority. (Tr0 is the name
Use sna start followed by xsnaadmin to type the SNAP-IX configuration panels.
You need root authority to use xsnaadmin.
SNAP-IX configuration
SNAP-IX configuration involves the following steps:
1. Defining a local node
2. Adding a Token Ring Port
3. Defining a local LU
The SNAP-IX main menu, from which you start, is shown here:
3. Complete the Control point name with the values Network name (4) and
Control point name (2).
4. Type the Control point name (2) in the Control point alias field.
5. Type the Node ID (3).
6. Click End node.
7. Click OK.
3. Click Token Ring Card and click OK. The following panel is displayed:
Defining a local LU
1. From the main SNAP-IX menu, click Independent local LUs.
2. Click Add. The following panel is displayed:
APPC configuration
APPC configuration involves the following steps:
1. Defining a remote node
2. Defining a partner LU
3. Defining a link station
4. Defining a mode
5. Adding CPI-C information
6. Adding a TP definition
3. Select the Define remote node check box and click OK. The following panel is
displayed:
5. Click OK.
6. A default partner LU with the same name is generated and a message is
displayed.
7. Click OK.
Defining a partner LU
1. From the main SNAP-IX menu, click Remote systems and click the remote
node.
2. Click Add. The following panel is displayed:
Defining a mode
1. From the SNAP-IX main menu, click the Services pull-down: The following
panel is displayed:
5. Type the Name (18). Select the Application TP check box and type the value
(16). Select the Use PLU alias check box and type the name (15). Type the
Mode name (17).
6. Click OK.
SNAP-IX operation
The SNAP-IX control daemon is started with the sna start command. Depending
on the options selected at installation, it may already be running.
Logging and tracing are controlled from here. Log and trace files can be found in
the /var/opt/sna directory. The logging files sna.aud and sna.err can be read using
a standard editor such as vi.
In order to read the trace files sna1.trc and sna2.trc you must first format them by
running the command snatrcfmt -f sna1.trc -o sna1. This produces a sna1.dmp file
that can be read using a normal editor.
It is possible to edit the configuration file, but this is not a recommended method
of configuring SNAP-IX.
The APPCLLU environment variables must be set before starting a sender channel
from the Solaris system. The command can be either entered interactively or added
to the logon profile. Depending on the level of BOURNE shell or KORN shell
program being used, the command will be:
export APPCLLU=SOLARXLU 5 newer level
or
APPCLLU=SOLARXLU 5 older level
export
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for Solaris configuration” on page 229.
What next?
The TCP/IP connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for Solaris configuration” on page 229.
Basic configuration
1. Create the queue manager from the UNIX prompt using the command:
crtmqm -u dlqname -q solaris
where:
solaris
Is the name of the queue manager
-q Indicates that this is to become the default queue manager
-u dlqname
Specifies the name of the undeliverable message queue
This command creates a queue manager and a set of default objects.
2. Start the queue manager from the UNIX prompt using the command:
strmqm solaris
where solaris is the name given to the queue manager when it was created.
Channel configuration
The following section details the configuration to be performed on the Solaris
queue manager to implement the channel described in Figure 32 on page 105.
The MQSC command to create each object is shown. Either start runmqsc from a
UNIX prompt and enter each command in turn, or build the commands into a
command file.
Examples are given for connecting WebSphere MQ for Solaris and WebSphere MQ
for Windows. If you wish to connect to WebSphere MQ on another platform use
the appropriate set of values from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (SNA) channel name SOLARIS.WINNT.SNA
H Sender (TCP/IP) channel name SOLARIS.WINNT.TCP
I Receiver (SNA) channel name G WINNT.SOLARIS.SNA
J Receiver (TCP) channel name H WINNT.SOLARIS.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (SNA) channel name SOLARIS.AIX.SNA
H Sender (TCP) channel name SOLARIS.AIX.TCP
I Receiver (SNA) channel name G AIX.SOLARIS.SNA
J Receiver (TCP) channel name H AIX.SOLARIS.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.SOLARIS.TCP
J Receiver (TCP) channel name H SOLARIS.DECUX.TCP
Connection to WebSphere MQ for HP-UX
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
E Queue name at remote system B HPUX.LOCALQ
F Transmission queue name HPUX
G Sender (SNA) channel name SOLARIS.HPUX.SNA
H Sender (TCP) channel name SOLARIS.HPUX.TCP
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (SNA) channel name SOLARIS.LINUX.SNA
H Sender (TCP/IP) channel name SOLARIS.LINUX.TCP
I Receiver (SNA) channel name G LINUX.SOLARIS.SNA
J Receiver (TCP/IP) channel name H LINUX.SOLARIS.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
G Sender (SNA) channel name SOLARIS.AS400.SNA
H Sender (TCP) channel name SOLARIS.AS400.TCP
I Receiver (SNA) channel name G AS400.SOLARIS.SNA
J Receiver (TCP) channel name H AS400.SOLARIS.TCP
Connection to WebSphere MQ for z/OS
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
D Remote queue name MVS.REMOTEQ
E Queue name at remote system B MVS.LOCALQ
F Transmission queue name MVS
G Sender (SNA) channel name SOLARIS.MVS.SNA
H Sender (TCP) channel name SOLARIS.MVS.TCP
I Receiver (SNA) channel name G MVS.SOLARIS.SNA
J Receiver (TCP) channel name H MVS.SOLARIS.TCP
Connection to MQSeries for VSE/ESA
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name SOLARIS.VSE.SNA
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer to the values in the ID column. The entries in the Parameter
Name column are explained in “Explanation of terms” on page 236.
Table 23. Configuration worksheet for Communications Server for Linux
ID Parameter Name Reference Example User Value
Parameters for local node
1 Configuration file name sna_node.cfg
2 Control point name LINUXPU
3 Node ID to send 05D 30A55
Table 23. Configuration worksheet for Communications Server for Linux (continued)
ID Parameter Name Reference Example User Value
4 Network name NETID
5 Local APPC LU LINUXLU
6 APPC mode #INTER
7 Invokable TP MQSERIES
8 Local MAC address 08005AC6DF33
9 Port name MQPORT
10 Command path /opt/mqm/bin/amqcrs6a
11 Local queue manager LINUX
Connection to a Windows system
The values in this section of the table must match those used in Table 13 on page 142, as indicated.
12 Link station name NTCONN
13 Network name 2 NETID
14 CP name 3 WINNTCP
15 Remote LU 5 WINNTLU
16 Application TP 7 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name NTCPIC
19 Remote network address 9 08005AA5FAB9
20 Node ID to receive 4 05D 30F65
Connection to an AIX system
The values in this section of the table must match those used in Table 17 on page 169, as indicated.
12 Link station name AIXCONN
13 Network name 1 NETID
14 CP name 2 AIXPU
15 Remote LU 4 AIXLU
16 Application TP 6 MQSERIES
17 Mode name 9 #INTER
18 CPI-C symbolic destination name AIXCPIC
19 Remote network address 8 123456789012
20 Node ID to receive 3 071 23456
Connection to an HP-UX system
The values in this section of the table must match those used in Table 19 on page 187, as indicated.
12 Link station name HPUXCONN
13 Network name 4 NETID
14 CP name 2 HPUXPU
15 Remote LU 5 HPUXLU
16 Application TP 7 MQSERIES
17 Mode name 6 #INTER
18 CPI-C symbolic destination name HPUXCPIC
Table 23. Configuration worksheet for Communications Server for Linux (continued)
ID Parameter Name Reference Example User Value
19 Remote network address 8 100090DC2C7C
20 node ID to receive 3 05D 54321
Connection to a Solaris system
The values in this section of the table must match those used in Table 21 on page 211, as indicated.
12 Link station name SOLCONN
13 Network name 2 NETID
14 CP name 3 SOLARPU
15 Remote LU 7 SOLARLU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name SOLCPIC
19 Remote network address 5 08002071CC8A
20 Node ID to receive 6 05D 310D6
Connection to an i5/OS system
The values in this section of the table must match those used in Table 35 on page 387, as indicated.
12 Link station name AS4CONN
13 Network name 1 NETID
14 CP name 2 AS400PU
15 Remote LU 3 AS400LU
16 Application TP 8 MQSERIES
17 Mode name 17 #INTER
18 CPI-C symbolic destination name AS4CPIC
19 Remote network address 4 10005A5962EF
Connection to a z/OS system
The values in this section of the table must match those used in Table 27 on page 290, as indicated.
12 Link station name MVSCONN
13 Network name 2 NETID
14 CP name 3 MVSPU
15 Remote LU 4 MVSLU
16 Application TP 7 MQSERIES
17 Mode name 6 #INTER
18 CPI-C symbolic destination name MVSCPIC
19 Remote network address 8 400074511092
Connection to a VSE/ESA system
The values in this section of the table must match those used in your VSE/ESA system.
12 Link station name VSECONN
13 Network name 1 NETID
14 CP name 2 VSEPU
15 Remote LU 3 VSELU
Table 23. Configuration worksheet for Communications Server for Linux (continued)
ID Parameter Name Reference Example User Value
16 Application TP 4 MQ01
17 Mode name #INTER
18 CPI-C symbolic destination name VSECPIC
19 Remote network address 5 400074511092
Explanation of terms
1 Configuration file name
This is the unique name of the Communications Server for Linux
configuration file. The default for this name is sna_node.cfg.
Although it is possible to edit this file, it is strongly recommended that
configuration is done using xsnadmin.
2 Control point name
This is the unique control point name for this workstation. In the SNA
network, the control point is an addressable location (PU type 2.1). Your
network administrator will assign this to you.
3 Node ID to send
This is the unique ID of this workstation. On other platforms this is often
referred to as the Exchange ID or XID. Your network administrator will
assign this ID for you.
4 Network name
This is the unique ID of the network to which you are connected. It is an
alphanumeric value and can be 1-8 characters long. The network name
works with the control point name to uniquely identify a system. Your
network administrator will tell you the value.
5 Local APPC LU
An LU manages the exchange of data between transactions. The local
APPC LU name is the name of the LU on your system. Your network
administrator will assign this to you.
6 APPC mode
This is the name given to the set of parameters that control the APPC
conversation. This name must be defined at each partner system. Your
network administrator will assign this to you.
7 Invokable TP
WebSphere MQ applications trying to converse with this workstation will
specify a symbolic name for the program to be run at the receiving end.
This will have been defined on the channel definition at the sender. For
simplicity, wherever possible use a transaction program name of
MQSERIES, or in the case of a connection to VSE/ESA, where the length is
limited to 4 bytes, use MQ01.
8 Local MAC address
This is the network address of the token-ring card. The address to be
specified is found in the ether value displayed in response to the
ifconfig tr0 command issued at a root level of authority. (Tr0 is the name
of the machine’s token-ring interface.) If you do not have the necessary
level of authority, your Linux system administrator can tell you the value.
The following information guides you through the tasks you must perform to
create the SNA infrastructure that WebSphere MQ requires. This example creates
the definitions for a partner node and LU on HP-UX.
Use sna start followed by xsnaadmin to access the Communications Server for
Linux main window. You need root authority to use xsnaadmin.
The Communications Server for Linux main window, from which you start, is
shown here:
3. In the Control point name fields, specify the network qualified name of the
control point at the local node. In the first field, type the network name (4).
In the second field, type the control point name (2).
4. In the Control point alias field, type the control point name (2) again.
5. In the Node ID fields, type the two components of the node ID (3).
6. Click OK. A message is displayed informing you that a default LU has been
defined automatically for the local node.
7. Click OK.
2. Set Port using to Token Ring Card, or to the type of network adapter card you
are using.
3. Click OK. The “Token-Ring SAP” window opens.
4. In the SNA port name field, type the port name (9).
5. Click OK.
Defining a local LU
1. From the Communications Server for Linux main menu, click Services —>
APPC —> New independent local LU. The “Local LU” window opens.
APPC configuration
APPC configuration involves the following steps:
1. Defining a remote node
2. Defining a partner LU
3. Defining a link station
4. Defining a mode
5. Adding CPI-C information
6. Adding a TP definition
2. In the Node’s SNA network name fields, specify the network qualified name
of the control point at the remote node. Communications Server for Linux
completes the first field for you by setting it to the network name (4 and
13) you entered earlier. In the second field, type the control point name
(14).
3. Click OK. A message is displayed informing you that a default LU has been
defined automatically for the remote node.
4. Click OK.
Defining a partner LU
1. From the Communications Server for Linux main menu, click Services —>
APPC —> New partner LUs —> Partner LU on remote node. The “Partner
LU” window opens.
2. In the Partner LU name fields, specify the network qualified name of the
partner LU at the remote node. Communications Server for Linux completes
the first field for you by setting it to the network name (4 and 13) you
entered earlier. In the second field, type the name of the partner LU (15).
3. In the Alias and Uninterpreted name fields, type the name of the partner LU
(15) again.
4. Click Location, select the network qualified name of the control point at the
remote node (13.14) from the list that is displayed, and click OK.
5. Click OK.
4. In the Name field, type the name of the link station (12).
5. Set Activation to On demand.
6. Select the Independent only check box.
7. Click Remote node, select the network qualified name of the control point at
the remote node (13.14) from the list that is displayed, and click OK.
8. Set Remote node type to End or LEN node.
9. In the MAC address field, type the MAC address (19) of the network
adapter card at the remote node.
10. Click Advanced. The “Token ring link station parameters” window opens.
Defining a mode
This purpose of the section is to explain how to define a new mode with the name
LU62PS. The example continues subsequently, however, by using the mode
#INTER (17), which is a standard mode supplied by Communications Server for
Linux.
1. From the Communications Server for Linux main menu, click Services —>
APPC —> Modes. The “Modes” window opens.
3. In the Name field, type the name of the new mode, LU62PS.
4. Click COS Name, select the class of service #INTER from the list that is
displayed, and click OK.
5. For the Session limits:
v Type 8 in the Initial field.
v Type 8 in the Maximum field.
3. In the Name field, type the CPI-C symbolic destination name (18).
4. Select the Use PLU alias check box, and type the name of the partner LU
(15), which you specified earlier as the partner LU alias.
5. In the Mode field, type the mode name (17).
6. Select the Application TP check box, and type the TP name (16).
7. Click OK to exit the “CPI-C destination” window.
8. Click Close to exit the “CPI-C destination names” window.
Adding a TP definition
1. From the Communications Server for Linux main menu, click Services —>
APPC —> Transaction programs. The “Transaction Programs” window opens.
3. Select the Application TP check box, and type the TP name (7).
4. Clear the Queue incoming Allocates check box.
5. In the Full path to TP executable field, type the full path to the executable
program (10).
6. In the Arguments field, type -m local queue manager (11).
7. In the User ID and Group ID fields, type mqm.
8. In the Environment field, type APPCLLU=local LU name (5) and APPCTPN=TP
name (7) separated by the pipe character.
9. Click OK to exit the “TP invocation” window.
10. Click Selection —> Close TP window to exit the “Transaction Programs”
window.
Logging and tracing are controlled from here. Log and trace files can be found in
the /var/opt/sna directory. The logging files sna.aud and sna.err can be read
using a standard editor such as vi.
In order to read the sna1.trc trace file, you must first format it by running the
command:
snatrcfmt -f sna1.trc -o sna1
This produces an sna1.dmp file, which can be read using a normal editor. The
sna2.trc trace file can be processed in the same way.
It is possible to edit the configuration file, but this is not a recommended method
of configuring Communications Server for Linux.
The APPCLLU environment variable must be set before starting a sender channel
from the Linux system. The command can be either entered interactively or added
to the logon profile. Depending on the level of Bourne shell or Korn shell program
being used, the command is:
export APPCLLU=Local LU name 5 newer level
or
APPCLLU=Local LU name 5 older level
export
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for Linux configuration” on page 251.
If you have more than one queue manager on your system, and therefore require
more than one service, you must add a line for each additional queue manager to
both /etc/services and inetd.conf.
For example:
MQSeries1 1414/tcp
MQSeries2 1822/tcp
MQSeries1 stream tcp nowait mqm /mqmtop/bin/amqcrsta amqcrsta -m QM1
MQSeries2 stream tcp nowait mqm /mqmtop/bin/amqcrsta amqcrsta -m QM2
This avoids error messages being generated if there is a limitation on the number
of outstanding connection requests queued at a single TCP port. For information
about the number of outstanding connection requests, see “Using the TCP listener
backlog option” on page 165.
If you have more than one queue manager on your system, and therefore require
more than one service, you must add a line to /etc/services for each additional
queue manager. You can create a file in the /etc/xinetd.d directory for each
service, or you can add additional stanzas to the MQSeries file you created
previously.
What next?
The TCP/IP connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for Linux configuration.”
Basic configuration
1. Create the queue manager from the UNIX prompt using the command:
crtmqm -u dlqname -q linux
where:
linux Is the name of the queue manager
-q Indicates that this is to become the default queue manager
-u dlqname
Specifies the name of the dead letter queue
This command creates a queue manager and a set of default objects.
2. Start the queue manager from the UNIX prompt using the command:
strmqm linux
where linux is the name given to the queue manager when it was created.
Channel configuration
The following section details the configuration to be performed on the Linux queue
manager to implement the channel described in Figure 32 on page 105.
The MQSC command to create each object is shown. Either start runmqsc from a
UNIX prompt and enter each command in turn, or build the commands into a
command file.
Examples are given for connecting WebSphere MQ for Linux and WebSphere MQ
for HP-UX. If you wish to connect to WebSphere MQ on another platform use the
appropriate set of values from the table in place of those for HP-UX.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
Chapter 16. Example configuration - IBM WebSphere MQ for Linux 251
Linux configuration
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (SNA) channel name LINUX.WINNT.SNA
H Sender (TCP/IP) channel name LINUX.WINNT.TCP
I Receiver (SNA) channel name G WINNT.LINUX.SNA
J Receiver (TCP) channel name H WINNT.LINUX.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (SNA) channel name LINUX.AIX.SNA
H Sender (TCP) channel name LINUX.AIX.TCP
I Receiver (SNA) channel name G AIX.LINUX.SNA
J Receiver (TCP) channel name H AIX.LINUX.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.LINUX.TCP
J Receiver (TCP) channel name H LINUX.DECUX.TCP
Connection to WebSphere MQ for HP-UX
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
E Queue name at remote system B HPUX.LOCALQ
F Transmission queue name HPUX
G Sender (SNA) channel name LINUX.HPUX.SNA
H Sender (TCP) channel name LINUX.HPUX.TCP
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name GIS
G Sender (SNA) channel name LINUX.SOLARIS.SNA
H Sender (TCP/IP) channel name LINUX.SOLARIS.TCP
I Receiver (SNA) channel name G SOLARIS.LINUX.SNA
J Receiver (TCP/IP) channel name H SOLARIS.LINUX.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
G Sender (SNA) channel name LINUX.AS400.SNA
H Sender (TCP) channel name LINUX.AS400.TCP
I Receiver (SNA) channel name G AS400.LINUX.SNA
J Receiver (TCP) channel name H AS400.LINUX.TCP
Connection to WebSphere MQ for z/OS
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
D Remote queue name MVS.REMOTEQ
E Queue name at remote system B MVS.LOCALQ
F Transmission queue name MVS
G Sender (SNA) channel name LINUX.MVS.SNA
H Sender (TCP) channel name LINUX.MVS.TCP
I Receiver (SNA) channel name G MVS.LINUX.SNA
J Receiver (TCP) channel name H MVS.LINUX.TCP
Connection to MQSeries for VSE/ESA (WebSphere MQ for Linux (x86 platform) only)
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name LINUX.VSE.SNA
The example illustrates the use of TCP/IP connections. The example assumes that
channels are to be triggered to start when the first message arrives on the
transmission queue they are servicing. You must start the channel initiator in order
for triggering to work.
In all the examples, the MQSC commands are shown as they would appear in a
file of commands, and as they would be typed at the command line. The two
methods look identical, but, to issue a command at the command line, you must
first type runmqsc, for the default queue manager, or runmqsc qmname where qmname
is the name of the required queue manager. Then type any number of commands,
as shown in the examples.
You could verify the commands in your file before running it using:
runmqsc -v QMNAME < mqsc.in > mqsc.out
For portability, you should restrict the line length of your commands to 72
characters. Use a concatenation character to continue over more than one line. On
Windows use Ctrl-z to end the input at the command line. On UNIX systems use
Ctrl-d. Alternatively, use the end command.
Figure 35. The message channel example for Windows, and UNIX systems
The payroll query application puts a query message to the remote queue
“PAYROLL.QUERY” defined on QM1. This remote queue definition resolves to the
local queue “PAYROLL” on QM2. In addition, the payroll query application
specifies that the reply to the query is sent to the local queue “PAYROLL.REPLY”
on QM1. The payroll processing application gets messages from the local queue
“PAYROLL” on QM2, and sends the replies to wherever they are required; in this
case, local queue “PAYROLL.REPLY” on QM1.
In the example definitions for TCP/IP, QM1 has a host address of 9.20.9.31 and is
listening on port 1411, and QM2 has a host address of 9.20.9.32 and is listening on
port 1412. The example assumes that these are already defined on your system and
available for use.
The connection details are supplied in the CONNAME attribute of the sender
channel definitions.
All the object definitions have been provided with the DESCR and REPLACE
attributes. The other attributes supplied are the minimum required to make the
example work. The attributes that are not supplied take the default values for
queue manager QM1.
Note: The remote queue definition is not a physical queue, but a means of
directing messages to the transmission queue, QM2, so that they can
be sent to queue manager QM2.
Transmission queue definition
DEFINE QLOCAL(QM2) DESCR(’Transmission queue to QM2’) REPLACE +
USAGE(XMITQ) PUT(ENABLED) GET(ENABLED) TRIGGER TRIGTYPE(FIRST) +
INITQ(SYSTEM.CHANNEL.INITQ) PROCESS(QM1.TO.QM2.PROCESS)
You do not need to provide a remote queue definition to enable the replies to be
returned to QM1. The message descriptor of the message retrieved from local
queue PAYROLL contains both the reply-to queue and the reply-to queue manager
Chapter 17. Message channel planning example for distributed platforms 257
Planning example for distributed platforms
names. Therefore, as long as QM2 can resolve the reply-to queue manager name to
that of a transmission queue on queue manager QM2, the reply message can be
sent. In this example, the reply-to queue manager name is QM1 and so queue
manager QM2 simply requires a transmission queue of the same name.
All the object definitions have been provided with the DESCR and REPLACE
attributes and are the minimum required to make the example work. The attributes
that are not supplied take the default values for queue manager QM2.
For information about starting the channel initiator and listener, see Chapter 10,
“Setting up communication for Windows,” on page 131 and Chapter 12, “Setting
up communication on UNIX systems,” on page 163.
Note: On Windows, you can also run the channel as a thread; see the WebSphere
MQ Script (MQSC) Command Reference book for information about how to
define a channel as a threaded channel.
v Adding user-exit programs on the channels to allow for link encryption, security
checking, or additional message processing.
v Using queue-manager aliases and reply-to queue aliases to understand more
about how these can be used in the organization of your queue manager
network.
Chapter 17. Message channel planning example for distributed platforms 259
Planning example for distributed platforms
The implementation of these panels and commands on z/OS is integrated into the
operations and control panels and the MQSC commands. No differentiation is
made in the organization of these two sets of panels and commands.
The information in this chapter applies in all cases where the channel initiator is
used for distributed queuing. It applies whether or not you are using
queue-sharing groups, or intra-group queuing.
The channel control function consists of panels, commands and programs, two
synchronization queues, channel command queues, and the channel definitions.
The following is a brief description of the components of the channel control
function.
v The channel definitions are held as objects in page set zero or in DB2®, like
other WebSphere MQ objects in z/OS.
v You use the operations and control panels, MQSC commands, or PCF commands
to:
– Create, copy, display, alter, and delete channel definitions
– Start and stop channel initiators and listeners
– Start, stop, and ping channels, reset channel sequence numbers, and resolve
in-doubt messages when links cannot be re-established
– Display status information about channels
– Display information about DQM
In particular, you can use the CSQINPX initialization input data set to issue your
MQSC commands. This can be processed every time you start the channel
initiator. See the WebSphere MQ for z/OS Concepts and Planning Guide for
information about this.
v There are two queues (SYSTEM.CHANNEL.SYNCQ and
SYSTEM.QSG.CHANNEL.SYNCQ) used for channel re-synchronization
purposes. You should define these with INDXTYPE(MSGID) for performance
reasons.
v The channel command queue (SYSTEM.CHANNEL.INITQ) is used to hold
commands for channel initiators, channels, and listeners.
v The channel control function program runs in its own address space, separate
from the queue manager, and comprises the channel initiator, listeners, MCAs,
trigger monitor, and command handler.
v For queue-sharing groups and shared channels, see Chapter 23, “Preparing
WebSphere MQ for z/OS for DQM with queue-sharing groups,” on page 305.
v For intra-group queuing, see Chapter 27, “Intra-group queuing,” on page 327
Note: To use the operations and control panels, you must have the correct security
authorization; see the WebSphere MQ for z/OS System Setup Guide for
information. Figure 36 shows the panel that is displayed when you start a
panel session. The text after the panel explains the actions you should
perform in this panel.
v Display a list of objects of the type specified. Type in an asterisk (*) in the Name
field and press Enter to display a list of objects (of the type specified) that have
already been defined on this subsystem. You can then select one or more objects
to work with in sequence. Figure 37 shows a list of channels produced in this
way.
v Specify the disposition in the queue-sharing group of the objects you want to
work with in the Disposition field. The disposition determines where the object
is kept and how the object behaves.
v Choose the local queue manager, or queue-sharing group to which you want to
connect in the Connect name field. If you want the commands to be issued on a
remote queue manager, choose either the Target queue manager field or the
Action queue manager field, depending upon whether the remote queue
manager is not or is a member of a queue-sharing group. If the remote queue
manager is not a member of a queue-sharing group, choose the Target queue
manager field. If the remote queue manager is a member of a queue-sharing
group, choose the Action queue manager field.
v Choose the wait time for responses to be received in the Response wait time
field.
Type action codes, then press Enter. Press F11 to display connection status.
1=Display 2=Define like 3=Alter 4=Manage 5=Perform
6=Start 7=Stop
Defining a channel
To define a channel using the MQSC commands, use DEFINE CHANNEL.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 2 (Define like)
Object type channel type (for example SENDER) or CHANNEL
Name
Disposition The location of the new object.
You are presented with some panels to complete with information about the name
and attributes you want for the channel you are defining. They are initialized with
the default attribute values. Change any you want before pressing Enter.
Note: If you entered CHANNEL in the object type field, you are presented with
the Select a Valid Channel Type panel first.
If you want to define a channel with the same attributes as an existing channel,
put the name of the channel you want to copy in the Name field on the initial
panel. The panels will be initialized with the attributes of the existing object.
For information about the channel attributes, see Chapter 6, “Channel attributes,”
on page 75
Notes:
1. You are strongly recommended to name all the channels in your network
uniquely. As shown in Table 1 on page 28, including the source and target
queue manager names in the channel name is a good way to do this.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 3 (Alter)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.ALTER
Disposition The location of the stored object.
You are presented with some panels containing information about the current
attributes of the channel. Change any of the unprotected fields that you want by
overtyping the new value, and then press Enter to change the channel definition.
For information about the channel attributes, see Chapter 6, “Channel attributes,”
on page 75.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 1 (List or Display)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.DISPLAY
Disposition The location of the object.
You are presented with some panels displaying information about the current
attributes of the channel.
For information about the channel attributes, see Chapter 6, “Channel attributes,”
on page 75.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 4 (Manage)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.DELETE
Disposition The location of the object.
You are presented with another panel. Select function type 1 on this panel.
Press Enter to delete the channel definition; you will be asked to confirm that you
want to delete the channel definition by pressing Enter again.
Note: The channel initiator has to be running before a channel definition can be
deleted (except for client-connection channels).
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 1 (Display)
Object type SYSTEM
Name Blank
You are presented with another panel. Select function type 1 on this panel.
Notes:
1. Displaying distributed queuing information may take some time if you have
lots of channels.
2. The channel initiator has to be running before you can display information
about distributed queuing.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 6 (Start)
Object type SYSTEM
Name Blank
The Start a System Function panel is displayed. The text following the panel below
explains what action you should take.:
Select function type, complete fields, then press Enter to start system
function.
Channel initiator
JCL substitution . . . . . ________________________________________________
________________________________________________
Channel listener
Inbound disposition . . . Q G=Group, Q=Qmgr
Transport type . . . . . . _ L=LU6.2, T=TCP/IP
LU name (LU6.2) . . . . . _________________
Port number (TCP/IP) . . . 1414
IP address (TCP/IP) . . . ________________________________________________
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 7 (Stop)
Object type SYSTEM
Name Blank
The Stop a System Function panel is displayed. The text following the panel
explains how you should use this panel:
Select function type, complete fields, then press Enter to stop system
function.
Channel initiator
Restart shared channels Y Y=Yes, N=No
Channel listener
Inbound disposition . . . Q G=Group, Q=Qmgr
Transport type . . . . . . _ L=LU6.2, T=TCP/IP
The channel initiator will wait for all running channels to stop in quiesce mode
before it stops.
Note: If some of the channels are receiver or requester channels that are running
but not active, a stop request issued to either the receiver’s or sender’s
channel initiator will cause it to stop immediately.
However, if messages are flowing, the channel initiator waits for the current batch
of messages to complete before it stops.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 6 (Start)
Object type SYSTEM
Name Blank
The Start a System Function panel is displayed (see Figure 38 on page 271).
Note: For the TCP/IP listener, you can start multiple combinations of Port and IP
address.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 7 (Stop)
Object type SYSTEM
Name Blank
The Stop a System Function panel is displayed (see Figure 39 on page 272).
Note: For a TCP/IP listener, you can stop specific combinations of Port and IP
address, or you can stop all combinations.
Starting a channel
To start a channel using the MQSC commands, use START CHANNEL.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 6 (Start)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.USE
Disposition The disposition of the object.
The Start a Channel panel is displayed. The text following the panel explains how
to use the panel.:
Start a Channel
Select the disposition of the channel instance and on which queue manager it is to
be started.
When you start a channel in this way, the following rules apply to that channel:
v You can stop the channel from any queue manager in the queue-sharing group.
You can do this even if the channel initiator on which it was started is not
running at the time you issue the stop-channel request. When the channel has
stopped, you can restart it by specifying disposition = S
(CHLDISP(FIXSHARED)) on the same, or another, channel initiator. You can also
start it by specifying disposition = A (CHLDISP(SHARED)).
v If the channel is in the starting or retry state, you can restart it by specifying
disposition = S (CHLDISP(FIXSHARED)) on the same or a different channel
initiator. You can also start it by specifying disposition = A
(CHLDISP(SHARED)).
v The channel is eligible to be trigger started when it goes into the inactive state.
Shared channels that are trigger started always have a shared disposition
(CHLDISP(SHARED)).
v The channel is eligible to be started with CHLDISP(FIXSHARED), on any
channel initiator, when it goes into the inactive state. You can also start it by
specifying disposition = A (CHLDISP(SHARED)).
v The channel is not recovered by any other active channel initiator in the
queue-sharing group when the channel initiator on which it was started is
stopped with SHARED(RESTART), or when the channel initiator terminates
abnormally. The channel is recovered only when the channel initiator on which
it was started is next restarted. This stops failed channel-recovery attempts being
passed to other channel initiators in the queue-sharing group, which would add
to their workload.
Testing a channel
To test a channel using the MQSC commands, use PING CHANNEL.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 5 (Perform)
Object type SENDER, SERVER, or CHANNEL
Name CHANNEL.TO.USE
Disposition The disposition of the channel object.
The Perform a Channel Function panel is displayed. The text following the panel
explains how to use the panel.:
Select the disposition of the channel for which the test is to be done and on which
queue manager it is to be tested.
The data length is initially set to 16. Change it if you want and press Enter.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 5 (Perform)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.USE
Disposition The disposition of the channel object.
The Perform a Channel Function panel is displayed (see Figure 41 on page 275 ).
Select the disposition of the channel for which the reset is to be done and on which
queue manager it is to be done.
The sequence number field is initially set to one. Change this if you want, and
press Enter.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 5 (Perform)
Object type SENDER, SERVER, or CHANNEL
Name CHANNEL.TO.USE
Disposition The disposition of the object.
The Perform a Channel Function panel is displayed (see Figure 41 on page 275 ).
Select the disposition of the channel for which resolution is to be done and which
queue manager it is to be done on. Press Enter.
Stopping a channel
To stop a channel using the MQSC commands, use STOP CHANNEL.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 7 (Stop)
Object type channel type (for example SENDER) or CHANNEL
Name CHANNEL.TO.USE
Disposition The disposition of the object.
The Stop a Channel panel is displayed. The text following the panel explains how
to use the panel.:
Stop a Channel
Select the disposition of the channel for which the stop is to be done and on which
queue manager it is to be stopped.
Choose the queue manager and connection name for the channel you want to stop.
Usage notes
This section gives some usage notes about stopping a channel:
v If a shared channel is in a retry state and the channel initiator on which it was
started is not running, a STOP request for the channel is issued on the queue
manager where the command was entered.
See “Stopping and quiescing channels” on page 66 for more information. For
information about restarting stopped channels, see “Restarting stopped channels”
on page 67.
Note: Displaying channel status information may take some time if you have lots
of channels.
Using the operations and control panels on the List Channel panel (see Figure 37
on page 267), a summary of the channel status is shown for each channel as
follows:
where nnn is the number of active connections, and status is one of the following:
INIT INITIALIZING
BIND BINDING
START STARTING
RUN RUNNING
STOP STOPPING or STOPPED
RETRY RETRYING
REQST REQUESTING
To display more information about the channel status, press the Status key (F11) on
the List Channel or the Display, or Alter channel panels to display the List
Channels - Current Status panel (see Figure 43 on page 279).
Type action codes, then press Enter. Press F11 to display saved status.
1=Display current status
INIT INITIALIZING
BIND BINDING
START STARTING
RUN RUNNING
STOP STOPPING or STOPPED
RETRY RETRYING
REQST REQUESTING
DOUBT STOPPED and INDOUBT(YES)
You can press F11 to see a similar list of channel connections with saved status;
press F11 to get back to the current list. Note that the saved status does not apply
until at least one batch of messages has been transmitted on the channel.
Use action code 1 (or a slash (/)) to select a connection and press Enter. The
Display Channel Connection Current Status panels are displayed.
Using the operations and control panels, starting from the initial panel, complete
these fields and press Enter:
Field Value
Action 1 (List or Display)
Object type CLUSCHL
Name *
You are presented with a panel like figure 44, in which the information for each
cluster channel occupies three lines, and includes its channel, cluster, and queue
manager names. For cluster-sender channels, the overall state is shown.
Type action codes, then press Enter. Press F11 to display connection status.
1=Display 5=Perform 6=Start 7=Stop
To display full information about one or more channels, type Action code 1 against
their names and press Enter. Use Action codes 5, 6, or 7 to perform functions (such
as ping, resolve, and reset), and start or stop a cluster channel.
To display more information about the channel status, press the Status key (F11).
To enable distributed queuing, you must perform the following three tasks:
v Customize the distributed queuing facility and define the WebSphere MQ objects
required; this is described in the WebSphere MQ for z/OS Concepts and Planning
Guide and the WebSphere MQ for z/OS System Setup Guide.
v Define access security; this is described in the WebSphere MQ for z/OS System
Setup Guide.
v Set up your communications; this is described in Chapter 20, “Setting up
communication for z/OS,” on page 285.
See the WebSphere MQ for z/OS Concepts and Planning Guide for information about
these tasks.
Use the TRIGDATA field on the transmission queue to trigger the specified
channel. For example:
DEFINE QLOCAL(MYXMITQ) USAGE(XMITQ) TRIGGER(YES) +
INITQ(SYSTEM.CHANNEL.INITQ) TRIGDATA(MYCHANNEL)
DEFINE CHL(MYCHANNEL) CHLTYPE(SDR) TRPTYPE(TCP) +
XMITQ(MYXMITQ) CONNAME(’9.20.9.30(1555)’)
Synchronization queue
DQM requires a queue for use with sequence numbers and logical units of work
identifiers (LUWID). You must ensure that a queue is available with the name
SYSTEM.CHANNEL.SYNCQ (see WebSphere MQ for z/OS Concepts and Planning
Guide). This queue must be available otherwise the channel initiator cannot start.
Make sure that you define this queue using INDXTYPE(MSGID). This will improve
the speed at which they can be accessed.
Operator messages
Because the channel initiator uses a number of asynchronously operating
dispatchers, operator messages could appear on the log out of chronological
sequence.
initiator has processed the command, further messages indicating its success or
otherwise are send to the command issuer along with message CSQ9022I or
CSQ9023I respectively. Any error messages generated could also be sent to the
z/OS console.
Undelivered-message queue
A DLQ handler is provided with WebSphere MQ for z/OS. See WebSphere MQ for
z/OS System Administration Guide for more information.
Queues in use
MCAs for receiver channels may keep the destination queues open even when
messages are not being transmitted; this results in the queues appearing to be ‘in
use’.
Security changes
If you change security access for a user ID, the change may not take effect
immediately. (See one of WebSphere MQ for z/OS Concepts and Planning Guide,
WebSphere MQ for z/OS System Setup Guide and WebSphere MQ for z/OS System
Administration Guide for more information.)
Communications stopped
TCP
If TCP is stopped for some reason and then restarted, the WebSphere MQ for z/OS
TCP listener waiting on a TCP port is stopped.
Automatic channel reconnect allows the channel initiator to detect that TCP/IP is
not available and to automatically restart the TCP/IP listener when TCP/IP
returns. This alleviates the need for operations staff to notice the problem with
TCP/IP and manually restart the listener. While the listener is out of action, the
channel initiator can also be used to retry the listener at the interval specified by
LSTRTMR in the channel initiator parameter module. These attempts can continue
until TCP/IP returns and the listener successfully restarts automatically. For
information about LSTRTMR, see the WebSphere MQ for z/OS System Setup Guide.
LU6.2
If APPC is stopped, the listener is also stopped. Again, in this case, the listener
automatically retries at the LSTRTMR interval so that, if APPC restarts, the listener
can restart too.
If the DB2 fails, shared channels that are already running continue to run, but any
new channel start requests will fail. When the DB2 is restored new requests are
able to complete.
To use ARM, you must set up your queue managers and channel initiators in a
particular way to make them restart automatically. For information about this, see
WebSphere MQ for z/OS Concepts and Planning Guide.
You might also find it helpful to refer to Chapter 21, “Example configuration - IBM
WebSphere MQ for z/OS,” on page 289. If you are using queue sharing groups,
see Chapter 24, “Setting up communication for WebSphere MQ for z/OS using
queue-sharing groups,” on page 311.
Deciding on a connection
There are two forms of communication protocol that can be used:
v TCP
v LU 6.2 through APPC/MVS
Each channel definition must specify only one protocol as the transmission
protocol (Transport Type) attribute. A queue manager can use more than one
protocol to communicate.
The channel initiator address space must have authority to read the data set. The
following techniques can be used to access your TCPIP.DATA data set, depending
on which TCP/IP product and interface you are using:
v Environment variable, RESOLVER_CONFIG
v HFS file, /etc/resolv.conf
v //SYSTCPD DD statement
v //SYSTCPDD DD statement
v jobname/userid.TCPIP.DATA
v SYS1.TCPPARMS(TCPDATA)
v zapname.TCPIP.DATA
You must also be careful to specify the high-level qualifier for TCP/IP correctly.
You should have a suitably configured Domain Name System (DNS) server,
capable of both Name to IP Address translation and IP Address to Name
translation.
Each TCP channel when started will use TCP resources; you may need to adjust
the following parameters in your PROFILE.TCPIP configuration data set:
ACBPOOLSIZE
Add one per started TCP channel, plus one
CCBPOOLSIZE
Add one per started TCP channel, plus one per DQM dispatcher, plus one
DATABUFFERPOOLSIZE
Add two per started TCP channel, plus one
MAXFILEPROC
Controls how many channels each dispatcher in the channel initiator can
handle.
This parameter is specified in the BPXPRMxx member of SYSI.PARMLIB.
Ensure that you specify a value large enough for your needs.
Sending end
The connection name (CONNAME) field in the channel definition should be set to
either the host name (for example MVSHUR1) or the TCP network address of the
target, in IPv4 dotted decimal form (for example 9.20.9.30) or IPv6 hexadecimal
form (for example fe80:43e4:0204:acff:fe97:2c34:fde0:3485). If the connection name is
a host name, a TCP name server is required to convert the host name into a TCP
host address. (This is a function of TCP, not WebSphere MQ.)
On the initiating end of a connection (sender, requester, and server channel types)
it is possible to provide an optional port number for the connection, for example:
Connection name
9.20.9.30(1555)
In this case the initiating end will attempt to connect to a receiving program
listening on port 1555.
The channel initiator can use any TCP/IP stack which is active and available. By
default, the channel initiator will bind its outbound channels to the default IP
address for the TCP/IP stack named in the TCPNAME queue manager attribute.
To connect through a different stack, you should specify either the hostname or IP
address of the stack in the LOCLADDR attribute of the channel.
Receiving on TCP
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel. You start this listener program
with the START LISTENER command, or using the operations and control panels.
By default, the TCP Listener program uses port 1414 and listens on all addresses
available to your TCP stack. You may start your TCP listener program to only
By default, TCP/IP listeners can bind only to addresses associated with the
TCP/IP stack named in the TCPNAME queue manager attribute. To start listeners
for other addresses, set your TCPSTACK queue manager attribute to ’MULTIPLE’.
The default listener backlog value on z/OS is 255. If the backlog reaches this
values, the TCP/IP connection is rejected and the channel will not be able to start.
For MCA channels, this results in the channel going into a RETRY state and
retrying the connection at a later time.
APPC/MVS setup
Each instance of the channel initiator must have the name of the LU that it is to
use defined to APPC/MVS, in the APPCPMxx member of SYS1.PARMLIB, as in
the following example:
LUADD ACBNAME(luname) NOSCHED TPDATA(CSQ.APPCTP)
luname is the name of the logical unit to be used. NOSCHED is required; TPDATA is not
used. No additions are necessary to the ASCHPMxx member, or to the APPC/MVS
TP profile data set.
The side information data set must be extended to define the connections used by
DQM. See the supplied sample CSQ4SIDE for details of how to do this using the
APPC utility program ATBSDFMU. For details of the TPNAME values to use, see
the Multiplatform APPC Configuration Guide (“Red Book”) and the following table
for information:
Table 26. Settings on the local z/OS system for a remote queue manager platform
Remote platform TPNAME
z/OS, OS/390, or The same as TPNAME in the corresponding side information on the
MVS/ESA remote queue manager.
i5/OS The same as the compare value in the routing entry on the i5/OS
system.
HP OpenVMS As specified in the OVMS Run Listener command.
HP NonStop The same as the TPNAME specified in the receiver-channel definition.
Server
UNIX systems The same as TPNAME in the corresponding side information on the
remote queue manager.
Table 26. Settings on the local z/OS system for a remote queue manager
platform (continued)
Remote platform TPNAME
Windows As specified in the Windows Run Listener command, or the invokable
Transaction Program that was defined using TpSetup on Windows.
If you have more than one queue manager on the same machine, ensure that the
TPnames in the channel definitions are unique.
See the Multiplatform APPC Configuration Guide also for information about the
VTAM definitions that may be required.
The z/OS command VARY ACTIVE must be issued against both base and listener
LUs before attempting to start either inbound or outbound communications.
Receiving on LU 6.2
Receiving MCAs are started in response to a startup request from the sending
channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel. The listener program is an
APPC/MVS server. You start it with the START LISTENER command, or using the
operations and control panels. You must specify the LU name to use by means of a
symbolic destination name defined in the side information data set. The local LU
so identified must be the same as that used for outbound transmissions, as set in
the channel initiator parameters.
First it describes the parameters needed for an LU 6.2 connection; then it describes:
v “Establishing an LU 6.2 connection” on page 292
v “Establishing a TCP connection” on page 294
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for z/OS configuration” on
page 294.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer back to the values in the ID column. The entries in the
Parameter Name column are explained in “Explanation of terms” on page 291.
Table 27. Configuration worksheet for z/OS using LU 6.2
ID Parameter Name Reference Example Used User Value
Definition for local node
1 Command prefix +cpf
2 Network ID NETID
3 Node name MVSPU
4 Local LU name MVSLU
5 Symbolic destination M1
6 Modename #INTER
7 Local Transaction Program name MQSERIES
8 LAN destination address 400074511092
Connection to a Windows system
The values in this section of the table must match those used in Table 13 on page 142, as indicated.
13 Symbolic destination M3
14 Modename 21 #INTER
15 Remote Transaction Program name 7 MQSERIES
16 Partner LU name 5 WINNTLU
21 Remote node ID 4 05D 30F65
Connection to an AIX system
The values in this section of the table must match those used in Table 17 on page 169, as indicated.
13 Symbolic Destination M4
14 Modename 18 #INTER
15 Remote Transaction Program name 6 MQSERIES
16 Partner LU name 4 AIXLU
Connection to an HP-UX system
The values in this section of the table must match those used in Table 19 on page 187, as indicated.
13 Symbolic Destination M5
14 Modename 6 #INTER
15 Remote Transaction Program name 7 MQSERIES
16 Partner LU name 5 HPUXLU
Connection to a Solaris system
The values in this section of the table must match those used in Table 21 on page 211, as indicated.
The values in this section of the table must match those used in Table 23 on page 233, as indicated.
13 Symbolic destination M8
14 Modename 6 #INTER
15 Remote Transaction Program name 7 MQSERIES
16 Partner LU name 5 LINUXLU
Connection to an i5/OS system
The values in this section of the table must match those used in Table 35 on page 387, as indicated.
13 Symbolic Destination M9
14 Modename 21 #INTER
15 Remote Transaction Program name 8 MQSERIES
16 Partner LU name 3 AS400LU
Connection to a VSE/ESA system
The values in this section of the table must match those used in your VSE/ESA system.
13 Symbolic destination MA
14 Modename #INTER
15 Remote Transaction Program name 4 MQ01
16 Partner LU name 3 VSELU
Explanation of terms
1 Command prefix
This is the unique command prefix of your WebSphere MQ for z/OS
queue-manager subsystem. The z/OS systems programmer defines this at
installation time, in SYS1.PARMLIB(IEFSSNss), and will be able to tell you
the value.
2 Network ID
The VTAM startup procedure in your installation is partly customized by
the ATCSTRxx member of the data set referenced by the DDNAME
VTAMLST. The Network ID is the value specified for the NETID parameter
in this member. For Network ID you must specify the name of the NETID
that owns the WebSphere MQ communications subsystem (WebSphere MQ
channel initiator). Your network administrator will tell you the value.
3 Node name
VTAM, being a low-entry network node, does not have a Control Point
name for Advanced Peer-to-Peer Networking (APPN) use. It does however
have a system services control point name (SSCPNAME). For node name,
you must specify the name of the SSCP that owns the WebSphere MQ
LUADD ACBNAME(mvslu)
NOSCHED
TPDATA(csq.appctp)
Specify values for ACBNAME(4) and TPDATA .
The NOSCHED parameter tells APPC that our new LU will not be using the
LU 6.2 scheduler (ASCH), but has one of its own. TPDATA refers to the
Transaction Program data set in which LU 6.2 stores information about
transaction programs. Again, WebSphere MQ will not use this, but it is required
by the syntax of the LUADD command.
2. Start the APPC subsystem with the command:
START APPC,SUB=MSTR,APPC=xx
where xx is the suffix of the PARMLIB member in which you added the LU in
step 1.
The effect of this is cumulative, that is, APPC will not lose its knowledge
of objects already defined to it in this or another PARMLIB member.
3. Add the new LU to a suitable VTAM major node definition. These are typically
in SYS1.VTAMLST. The APPL definition will look similar to the sample shown
in Figure 45.
4. Activate the major node. This can be done with the command:
V NET,ACT,ID=majornode
5. Add an entry defining your LU to the CPI-C side information data set. Use the
APPC utility program ATBSDFMU to do this. Sample JCL is in
thlqual.SCSQPROC(CSQ4SIDE) (where thlqual is the target library high-level
qualifier for WebSphere MQ data sets in your installation.)
The entry you add will look like this:
SIADD
DESTNAME(M1) 5
MODENAME(#INTER) 6
TPNAME(MQSERIES) 7
PARTNER_LU(MVSLU) 4
6. Alter the queue manager object to use the correct distributed queueing
parameters using the following command. You must specify the local LU (4)
assigned to your queue manager in the LUNAME attribute of the queue
manager .
ALTER QMGR LUNAME(MVSLU)
Add an entry to the CPI-C side information data set to define the connection.
Sample JCL to do this is in thlqual.SCSQPROC(CSQ4SIDE).
What next?
The TCP connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for z/OS configuration.”
If you wish to use a port other than 1414 (the default WebSphere MQ port), use
the command:
+cpf START LSTR PORT(1555)
Channel configuration
The following sections detail the configuration to be performed on the z/OS queue
manager to implement the channel described in Figure 32 on page 105.
Examples are given for connecting WebSphere MQ for z/OS and WebSphere MQ
for Windows. If you wish to connect to WebSphere MQ on another platform use
the appropriate set of values from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
Table 28. Configuration worksheet for WebSphere MQ for z/OS
ID Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name MVS
B Local queue name MVS.LOCALQ
Connection to WebSphere MQ for Windows
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (LU 6.2) channel name MVS.WINNT.SNA
H Sender (TCP) channel name MVS.WINNT.TCP
I Receiver (LU 6.2) channel name G WINNT.MVS.SNA
J Receiver (TCP/IP) channel name H WINNT.MVS.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (LU 6.2) channel name MVS.AIX.SNA
H Sender (TCP/IP) channel name MVS.AIX.TCP
I Receiver (LU 6.2) channel name G AIX.MVS.SNA
J Receiver (TCP/IP) channel name H AIX.MVS.TCP
Connection to MQSeries for Compaq Tru64 UNIX
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
E Queue name at remote system B HPUX.LOCALQ
F Transmission queue name HPUX
G Sender (LU 6.2) channel name MVS.HPUX.SNA
H Sender (TCP) channel name MVS.HPUX.TCP
I Receiver (LU 6.2) channel name G HPUX.MVS.SNA
J Receiver (TCP) channel name H HPUX.MVS.TCP
Connection to WebSphere MQ for Solaris
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name SOLARIS
G Sender (LU 6.2) channel name MVS.SOLARIS.SNA
H Sender (TCP) channel name MVS.SOLARIS.TCP
I Receiver (LU 6.2) channel name G SOLARIS.MVS.SNA
J Receiver (TCP/IP) channel name H SOLARIS.MVS.TCP
Connection to WebSphere MQ for Linux
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (LU 6.2) channel name MVS.LINUX.SNA
H Sender (TCP) channel name MVS.LINUX.TCP
I Receiver (LU 6.2) channel name G LINUX.MVS.SNA
J Receiver (TCP/IP) channel name H LINUX.MVS.TCP
Connection to WebSphere MQ for iSeries
The values in this section of the table must match those used in Table 36 on page 401, as indicated.
C Remote queue manager name A AS400
D Remote queue name AS400.REMOTEQ
E Queue name at remote system B AS400.LOCALQ
F Transmission queue name AS400
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name MVS.VSE.SNA
I Receiver channel name G VSE.MVS.SNA
Remote Queue
Object type : QREMOTE
Name : WINNT.REMOTEQ D
Name on remote system : WINNT.LOCALQ E
Remote system name : WINNT C
Transmission queue : WINNT F
Sender Channel
Channel name : MVS.WINNT.SNA G
Transport type : L (LU6.2)
Transmission queue name : WINNT F
Connection name : M3 13
Receiver Channel
Channel name : WINNT.MVS.SNA I
Remote Queue
Object type : QREMOTE
Name : WINNT.REMOTEQ D
Name on remote system : WINNT.LOCALQ E
Remote system name : WINNT C
Transmission queue : WINNT F
Sender Channel
Channel name : MVS.WINNT.TCP H
Transport type : T (TCP)
Transmission queue name : WINNT F
Connection name : winnt.tcpip.hostname
Receiver Channel
Channel name : WINNT.MVS.TCP J
The example illustrates the use of both TCP/IP and LU 6.2 connections. The
example assumes that channels are to be triggered to start when the first message
arrives on the transmission queue they are servicing.
The payroll query application puts a query message to the remote queue
“PAYROLL.QUERY” defined on QM1. This remote queue definition resolves to the
local queue “PAYROLL” on QM2. In addition, the payroll query application
specifies that the reply to the query is sent to the local queue “PAYROLL.REPLY”
on QM1. The payroll processing application gets messages from the local queue
“PAYROLL” on QM2, and sends the replies to wherever they are required; in this
case, local queue “PAYROLL.REPLY” on QM1.
1411, and QM2 has a host address of 9.20.9.32 and is listening on port 1412. In the
definitions for LU 6.2, QM1 is listening on a symbolic luname called LUNAME1
and QM2 is listening on a symbolic luname called LUNAME2. The example
assumes that these are already defined on your z/OS system and available for use.
To define them, see Chapter 21, “Example configuration - IBM WebSphere MQ for
z/OS,” on page 289.
The connection details are supplied in the CONNAME attribute of the sender
channel definitions.
All the object definitions have been provided with the DESCR and REPLACE
attributes. The other attributes supplied are the minimum required to make the
example work. The attributes that are not supplied take the default values for
queue manager QM1.
Note: The remote queue definition is not a physical queue, but a means of
directing messages to the transmission queue, QM2, so that they can be sent
to queue manager QM2.
When the first message is put on this transmission queue, a trigger message is sent
to the initiation queue, SYSTEM.CHANNEL.INITQ. The channel initiator gets the
message from the initiation queue and starts the channel identified in the trigger
data. The channel initiator can only get trigger messages from the
SYSTEM.CHANNEL.INITQ queue, so you should not use any other queue as the
initiation queue.
You do not need to provide a remote queue definition to enable the replies to be
returned to QM1. The message descriptor of the message retrieved from local
queue PAYROLL contains both the reply-to queue and the reply-to queue manager
names. Therefore, as long as QM2 can resolve the reply-to queue manager name to
that of a transmission queue on queue manager QM2, the reply message can be
sent. In this example, the reply-to queue manager name is QM1 and so queue
manager QM2 simply requires a transmission queue of the same name.
All the object definitions have been provided with the DESCR and REPLACE
attributes and are the minimum required to make the example work. The attributes
that are not supplied take the default values for queue manager QM2.
When the first message is put on this transmission queue, a trigger message is sent
to the initiation queue, SYSTEM.CHANNEL.INITQ. The channel initiator gets the
message from the initiation queue and starts the channel identified in the trigger
data. The channel initiator can only get trigger messages from
SYSTEM.CHANNEL.INITQ so you should not use any other queue as the
initiation queue.
The applications can then send messages to each other. Because the channels are
triggered to start by the arrival of the first message on each transmission queue,
you do not need to issue the START CHANNEL MQSC command.
For details about starting a channel initiator see “Starting a channel initiator” on
page 270, and for details about starting a listener see “Starting a channel listener”
on page 272.
v Adding more queue, and channel definitions to allow other applications to send
messages between the two queue managers.
v Adding user exit programs on the channels to allow for link encryption, security
checking, or additional message processing.
v Using queue manager aliases and reply-to queue aliases to understand more
about how these can be used in the organization of your queue manager
network.
Concepts
This section describes the concepts related to distributed queuing with
queue-sharing groups. For additional information on the concepts of shared queues
and queue-sharing groups, see WebSphere MQ for z/OS Concepts and Planning Guide,
″Shared queues″ .
Class of service
A shared queue is a type of local queue that offers a different class of service.
Messages on a shared queue are stored in a coupling facility (CF), which allows
them to be accessed by all queue managers in the queue-sharing group. A message
on a shared queue must be a message of length no more than 100MB.
Generic interface
A queue-sharing group has a generic interface that allows the network to view the
group as a single entity. This is achieved by having a single generic address that
can be used to connect to any queue manager within the group.
Each queue manager in the queue-sharing group listens for inbound session
requests on an address that is logically related to the generic address. For more
information see “Listeners” below.
Components
What follows is a description of the components required to enable distributed
queuing with queue-sharing groups.
Listeners
The group LU 6.2 and TCP/IP listeners listen on an address that is logically
connected to the generic address.
For the LU 6.2 listener, the specified LUGROUP is mapped to the VTAM generic
resource associated with the queue-sharing group. For an example of setting up
this technology, see Table 26 on page 287.
Triggering
A triggered shared queue can generate more than one trigger message for a
satisfied trigger condition. There is one trigger message generated for each local
initiation queue defined on a queue manager in the queue-sharing group
associated with the triggered shared queue.
In the case of distributed queuing, each channel initiator receives a trigger message
for a satisfied shared transmission queue trigger condition. However, only one
channel initiator will actually process the triggered start, and the others will fail
safely. The triggered channel is then started with a load balanced start (see
“Load-balanced channel start” on page 308) that will be triggered to start channel
QSG.TO.QM2. To create a shared transmission queue, use the WebSphere MQ
commands (MQSC) as shown in the following example:
DEFINE QLOCAL(QM2) DESCR(’Transmission queue to QM2’) +
USAGE(XMITQ) QSGDISP(SHARED) +
CFSTRUCT(APPLICATION1) INITQ(SYSTEM.CHANNEL.INITQ) +
TRIGGER TRIGDATA(QSG.TO.QM2)
Note: The private copy of the group definition can be changed or deleted.
There are two perspectives from which to look at the message channel agents used
for distributed queuing with queue-sharing groups:
v Inbound
v Outbound
Inbound
An inbound channel is a shared channel if it is connected to the queue manager
through the group listener. It is connected either through the generic interface to
the queue-sharing group, then directed to a queue manager within the group, or
targeted at a specific queue manager’s group port or the luname used by the group
listener.
Outbound
An outbound channel is a shared channel if it moves messages from a shared
transmission queue. In the above example commands, sender channel QSG.TO.QM2
is a shared channel because its transmission queue, QM2 is defined with
QSGDISP(SHARED).
Synchronization queue
Shared channels have their own shared synchronization queue called
SYSTEM.QSG.CHANNEL.SYNCQ, which is accessible to any member of the
queue-sharing group. (Private channels continue to use the private synchronization
queue. See “Synchronization queue” on page 282) This means that the channel can
be restarted on a different queue manager and channel initiator instance within the
queue-sharing group in the event of failure of the communications subsystem,
channel initiator or queue manager. (See “Shared channel recovery” on page 308
for details.)
DQM with queue-sharing groups requires that a shared queue is available with the
name SYSTEM.QSG.CHANNEL.SYNCQ. This queue must be available so that a
group listener can successfully start.
If a group listener fails because the queue was not available, the queue can be
defined and the listener can be restarted without recycling the channel initiator,
and the non-shared channels are not affected.
Make sure that you define this queue using INDXTYPE(MSGID). This will improve
the speed at which they can be accessed.
Benefits
The following section describes the benefits of shared queuing, which are:
v Load-balanced channel start
v Shared channel recovery
v Client channels
Chapter 23. Preparing WebSphere MQ for z/OS for DQM with queue-sharing groups 307
Load-balanced channel start
A shared transmission queue can be serviced by an outbound channel running on
any channel initiator in the queue-sharing group. Load-balanced channel start
determines where a start channel command is targeted. An appropriate channel
initiator is chosen that has access to the necessary communications subsystem. For
example, a channel defined with TRPTYPE(LU6.2) will not be started on a channel
initiator that only has access to a TCP/IP subsystem.
The choice of channel initiator is dependant on the channel load and the headroom
of the channel initiator. The channel load is the number of active channels as a
percentage of the maximum number of active channels allowed as defined in the
channel initiator parameters. The headroom is the difference between the number
of active channels and the maximum number allowed.
Client channels
Client connection channels can benefit from the high availability of messages in
queue-sharing groups that are connected to the generic interface instead of being
connected to a specific queue manger. (For more information about this, see the
WebSphere MQ Clients manual.)
Users in the network see the shared queue as being hosted by each queue manager
within the queue-sharing group (the shared queue is not advertised as being
An attempt to start a channel for which shared queue peer recovery is still in
progress might result in a failure. An error message indicating that recovery is in
progress is issued, and the channel is put into retry state. Once queue manager
peer recovery is complete, the channel can restart at the time of the next retry.
An attempt to RESOLVE, PING, or DELETE a channel can fail for the same reason.
Intra-group queuing
Intra-group queuing (IGQ) can effect potentially fast and less-expensive small
message transfer between queue managers within a queue-sharing group (QSG),
without the need to define channels between the queue managers. That is,
intra-group queuing can be used to deliver, more efficiently, small messages to
queues residing on remote queue managers within a queue-sharing group. See
Chapter 27, “Intra-group queuing,” on page 327 for more information.
Chapter 23. Preparing WebSphere MQ for z/OS for DQM with queue-sharing groups 309
310 WebSphere MQ Intercommunication
Chapter 24. Setting up communication for WebSphere MQ for
z/OS using queue-sharing groups
When a distributed-queuing management channel is started, it tries to use the
connection specified in the channel definition. For this to succeed, it is necessary
for the connection to be defined and available. This section explains how to do
this.
You might also find it useful to refer to Chapter 25, “Example configuration - IBM
WebSphere MQ for z/OS using queue-sharing groups,” on page 313.
Deciding on a connection
There are two forms of communication protocol that can be used:
v TCP
v LU 6.2 through APPC/MVS
Sending end
The connection name (CONNAME) field in the channel definition to connect to
your queue sharing group should be set to the generic interface of your
queue-sharing group (see “Generic interface” on page 305). If you are using
DNS/WLM, the generic interface is the name in the DNSGROUP queue manager
attribute. If it is not set, it is the queue-sharing group name. For details of
DNSGROUP, see WebSphere MQ Script (MQSC) Command Reference.
All group listeners in the queue-sharing group must be listening on the same port.
If you have more than one channel initiator running on a single MVS image you
can define virtual IP addresses and start your TCP listener program to only listen
on a specific address or hostname by specifying IPADDR in the START LISTENER
command. (For more information, see Chapter 23, “Preparing WebSphere MQ for
z/OS for DQM with queue-sharing groups,” on page 305.)
First it describes the parameters needed for an LU 6.2 connection; then it describes:
v “Establishing an LU 6.2 connection into a queue-sharing group” on page 316
v “Establishing a TCP connection into a queue-sharing group” on page 317
When the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for z/OS shared channel
configuration” on page 318.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use this worksheet to record the values you use for your configuration. Where
numbers appear in the Reference column they indicate that the value must match
that in the appropriate worksheet elsewhere in this book. The examples that follow
in this chapter refer back to the values in the ID column. The entries in the
Parameter Name column are explained in “Explanation of terms.”
Table 29. Configuration worksheet for z/OS using LU 6.2
ID Parameter Name Reference Example Used User Value
Definition for local node using generic resources
1 Command prefix +cpf
2 Network ID NETID
3 Node name MVSPU
6 Modename #INTER
7 Local Transaction Program name MQSERIES
8 LAN destination address 400074511092
9 Local LU name MVSLU1
10 Generic resource name MVSGR
11 Symbolic destination G1
12 Symbolic destination for generic G2
resource name
Connection to a Windows system
The values in this section of the table must match those used in Table 13 on page 142, as indicated.
13 Symbolic destination M3
14 Modename 21 #INTER
15 Remote Transaction Program name 7 MQSERIES
16 Partner LU name 5 WINNTLU
21 Remote node ID 4 05D 30F65
Connection to an AIX system
The values in this section of the table must match those used in Table 17 on page 169, as indicated.
13 Symbolic Destination M4
14 Modename 18 #INTER
15 Remote Transaction Program name 6 MQSERIES
16 Partner LU name 4 AIXLU
Explanation of terms
1 Command prefix
This is the unique command prefix of your WebSphere MQ for z/OS
queue-manager subsystem. The z/OS systems programmer defines this at
installation time, in SYS1.PARMLIB(IEFSSNss), and will be able to tell you
the value.
2 Network ID
The VTAM startup procedure in your installation is partly customized by
the ATCSTRxx member of the data set referenced by the DDNAME
VTAMLST. The Network ID is the value specified for the NETID parameter
in this member. For Network ID you must specify the name of the NETID
that owns the WebSphere MQ communications subsystem. Your network
administrator will tell you the value.
3 Node name
VTAM, being a low-entry network node, does not have a Control Point
name for Advanced Peer-to-Peer Networking (APPN) use. It does however
have a system services control point name (SSCPNAME). For node name,
you must specify the name of the SSCP that owns the WebSphere MQ
communications subsystem. This is defined in the same ATCSTRxx
member as the Network ID. Your network administrator will tell you the
value.
9 Local LU name
A logical unit (LU) is software that serves as an interface or translator
between a transaction program and the network. It manages the exchange
of data between transaction programs. The local LU name is the unique
VTAM APPLID of this WebSphere MQ subsystem. Your network
administrator will tell you this value.
11 12 13 Symbolic destination
This is the name you give to the CPI-C side information profile. You need
a side information entry for each LU 6.2 listener.
6 14 Modename
This is the name given to the set of parameters that control the LU 6.2
conversation. An entry with this name and similar attributes must be
defined at each end of the session. In VTAM, this corresponds to a mode
table entry. You network administrator will assign this to you.
7 15 Transaction Program name
WebSphere MQ applications trying to converse with this queue manager
will specify a symbolic name for the program to be run at the receiving
end. This will have been specified in the TPNAME attribute on the channel
definition at the sender. For simplicity, wherever possible use a transaction
program name of MQSERIES, or in the case of a connection to VSE/ESA,
where the length is limited to 4 bytes, use MQTP.
See Table 26 on page 287 for more information.
8 LAN destination address
This is the LAN destination address that your partner nodes will use to
communicate with this host. When you are using a 3745 network
controller, it will be the value specified in the LOCADD parameter for the
line definition to which your partner is physically connected. If your
partner nodes use other devices such as 317X or 6611 devices, the address
will have been set during the customization of those devices. Your network
administrator will tell you this value.
10 Generic resource name
A generic resource name is a unique name assigned to a group of LU
names used by the channel initiators in a queue-sharing group.
16 Partner LU name
This is the LU name of the WebSphere MQ queue manager on the system
with which you are setting up communication. This value is specified in
the side information entry for the remote partner.
21 Remote node ID
For a connection to Windows, this is the ID of the local node on the
Windows system with which you are setting up communication.
Chapter 25. Example configuration - IBM WebSphere MQ for z/OS using queue-sharing groups 315
LU 6.2 connection
where xx is the suffix of the PARMLIB member in which you added the LU in
step 1.
The effect of this is cumulative, that is, APPC will not lose its knowledge
of objects already defined to it in this or another PARMLIB member.
3. Add the new LU to a suitable VTAM major node definition. These are typically
in SYS1.VTAMLST. The APPL definition will look similar to the sample shown.
MVSLU APPL ACBNAME=MVSLU1, 9
APPXC=YES,
AUTOSES=0,
DDRAINL=NALLOW,
DLOGMOD=#INTER, 6
DMINWML=10,
DMINWNR=10,
DRESPL=NALLOW,
DSESLIM=60,
LMDENT=19,
MODETAB=MTCICS,
PARSESS=YES,
VERIFY=NONE,
SECACPT=ALREADYV,
SRBEXIT=YES
4. Activate the major node. This can be done with the command:
V,NET,ACT,majornode
5. Add entries defining your LU and generic resource name to the CPI-C side
information data set. Use the APPC utility program ATBSDFMU to do this.
Add an entry to the CPI-C side information data set to define the connection.
Sample JCL to do this is in thlqual.SCSQPROC(CSQ4SIDE).
What next?
The connection is now established. You are ready to complete the configuration.
Go to “WebSphere MQ for z/OS shared channel configuration” on page 318.
Using WLM/DNS
You must set DNSWLM(YES); optionally you can add the name of the group name
to be used as a hostname to the DNSGROUP attribute. If you leave the name blank
the queue-sharing group name is used.
ALTER QMGR TCPNAME(TCPIP) DNSWLM(YES) DNSGROUP(MYGROUP)
WLM/DNS does not offer any support for mapping one incoming port number to
a different outgoing port number. This means that each channel initiator must use
a different hostname, by one of the following methods:
v Run each channel initiator on a different MVS image
v Run each channel initiator with a different TCP stack on the same MVS image.
Chapter 25. Example configuration - IBM WebSphere MQ for z/OS using queue-sharing groups 317
z/OS and TCP
See z/OS Communications Server: IP User’s Guide and Commands, SC31-8780 for
more information on VIPA.
See z/OS CS: IP Configuration Guide and z/OS CS: IP Configuration Reference for more
information.
Sysplex Distributor will balance the inbound connections between each LPAR. If
there is more than one channel initiator on an LPAR, then the use of SHAREPORT
will pass that inbound connection to the listener port with the smallest number of
connections.
What next?
The TCP connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for z/OS shared channel configuration.”
There can be only one instance of the shared channel running at a time. If you try
to start a second instance of the channel it will fail (the error message varies
depending on other factors). The shared synchronization queue keeps track of the
channel status.
Examples are given for connecting WebSphere MQ for z/OS and Windows. If you
wish to connect to WebSphere MQ on another platform use the appropriate set of
values from the table in place of those for Windows.
Note: The words in bold are user-specified and reflect the names of WebSphere
MQ objects used throughout these examples. If you change the names used
here, ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as
shown.
Table 30. Configuration worksheet for WebSphere MQ for z/OS using queue-sharing groups
ID Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name QSG
B Local queue name QSG.SHAREDQ
Connection to WebSphere MQ for Windows
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (LU 6.2) channel name QSG.WINNT.SNA
H Sender (TCP) channel name QSG.WINNT.TCP
I Receiver (LU 6.2) channel name G WINNT.QSG.SNA
J Receiver (TCP/IP) channel name H WINNT.QSG.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (LU 6.2) channel name QSG.AIX.SNA
H Sender (TCP/IP) channel name QSG.AIX.TCP
I Receiver (LU 6.2) channel name G AIX.QSG.SNA
Chapter 25. Example configuration - IBM WebSphere MQ for z/OS using queue-sharing groups 319
z/OS configuration
Table 30. Configuration worksheet for WebSphere MQ for z/OS using queue-sharing groups (continued)
ID Parameter Name Reference Example Used User Value
J Receiver (TCP/IP) channel name H AIX.QSG.TCP
Remote Queue
Object type : QREMOTE
Name : WINNT.REMOTEQ D
Name on remote system : WINNT.LOCALQ E
Remote system name : WINNT C
Transmission queue : WINNT F
Disposition : GROUP
Sender Channel
Channel name : MVS.WINNT.SNA G
Transport type : L (LU6.2)
Transmission queue name : WINNT F
Connection name : M3 13
Disposition : GROUP
Receiver Channel
Channel name : WINNT.QSG.SNA I
Disposition : GROUP
Remote Queue
Object type : QREMOTE
Name : WINNT.REMOTEQ D
Name on remote system : WINNT.LOCALQ E
Remote system name : WINNT C
Transmission queue : WINNT F
Disposition : GROUP
Sender Channel
Channel name : QSG.WINNT.TCP H
Transport type : T (TCP)
Transmission queue name : WINNT F
Connection name : winnt.tcpip.hostname
Disposition : GROUP
Receiver Channel
Channel name : WINNT.QSG.TCP J
Disposition : GROUP
Chapter 25. Example configuration - IBM WebSphere MQ for z/OS using queue-sharing groups 321
z/OS configuration
It is recommended that you are familiar with the example in Chapter 22, “Message
channel planning example for z/OS,” on page 299 before trying this example.
The payroll query application is now connected to queue manager QM3 and puts a
query to the remote queue ’PAYROLL QUERY’ defined on QM3. This remote
queue definition resolves to the shared queue ’PAYROLL’ hosted by the queue
managers in the queue-sharing group QSG1. The payroll processing application
now has two instances running, one connected to QM4 and one connected to QM5.
'SYSTEM.CHANNEL.INITQ'
Reply Channel
message
Queue local 'PAYROLL.REPLY' QSG1.TO.QM3
WLM / DNS
request Payroll
QM3.TO.QSG1 Queue manager ‘QM4’ processing
Trig
chan SYSTEM.CHANNEL.INITQ Query
QSG1.TO.QM3 message
Query
Coupling Facility
Reply
Payroll
processing
Figure 47. Message channel planning example for WebSphere MQ for z/OS using queue-sharing groups
All three queue managers are assumed to be running on z/OS. In the example
definitions for TCP/IP, QM4 has a host name of MVSIP01 and QM5 has a host
name of MVSIP02. Both queue managers are listening on port 1414 and have
registered to use WLM/DNS. The generic address that WLM/DNS provides for
this group is QSG1.MVSIP. QM3 has a host address of 9.20.9.31 and is listening on
port 1411.
In the example definitions for LU6.2, QM3 is listening on a symbolic luname called
LUNAME1. The name of the generic resource defined for VTAM for the lunames
listened on by QM4 and QM5 is LUQSG1. The example assumes that these are
already defined on your z/OS system and are available for use. To define them see
“Defining yourself to the network using generic resources” on page 316.
In this example QSG1 is the name of a queue-sharing group, and queue managers
QM4 and QM5 are the names of members of the group.
Queue managers QM4 and QM5 are members of the queue sharing group. The
definitions produced for QM4 are also available for QM5.
Shared objects
The shared object definitions are stored in DB2 and their associated messages are
stored within the Coupling Facility.
DEFINE QLOCAL(PAYROLL) QSGDISP(SHARED) REPLACE PUT(ENABLED) GET(ENABLED) +
CFSTRUCT(APPLICATION1) +
DESCR(’Shared queue for payroll details’)
Group objects
The group object definitions are stored in DB2, and each queue manager in the
queue-sharing group creates a local copy of the defined object.
Chapter 26. Message channel planning example for z/OS using queue-sharing groups 325
Planning examples for z/OS
Remaining definitions
These definitions are required for the same purposes as those in the first example.
DEFINE QREMOTE(PAYROLL.QUERY) DESCR(’Remote queue for QSG1’) REPLACE +
PUT(ENABLED) XMITQ(QSG1) RNAME(APPL) RQMNAME(QSG1)
For a TCP/IP connection each member of the group must have a group listener
started that is listening on port 1414.
STA LSTR PORT(1414) IPADDR(MVSIP01) INDISP(GROUP)
For an LU6.2 connection each member of the group must have a group listener
started that is listening on a symbolic luname that corresponds to the generic
resource LUQSG1.
v Start the listener on QM3
STA LSTR PORT(1411)
Concepts
This section describes the concepts of intra-group queuing.
Intra-group queuing (IGQ) can effect potentially fast and less-expensive small
message transfer between queue managers within a queue-sharing group (QSG),
without the need to define channels between the queue managers. That is,
intra-group queuing can be used to deliver, more efficiently, small messages to
queues residing on remote queue managers within a queue-sharing group.
Terminology
This section describes the terminology of intra-group queuing.
Intra-group queuing
Intra-group queuing can effect potentially fast and less expensive message transfer
between queue managers in a queue-sharing group, without the need to define
channels.
The IGQ agent for each queue manager is always started because intra-group
queuing is used by the queue manager itself for its own internal processing.
Benefits
This section describes the benefits of intra-group queuing.
Improved performance
Because there is only one IGQ agent needed for the delivery of a message to a
target queue (instead of two intermediate sender and receiver agents), the delivery
of messages using intra-group queuing can be less expensive than the delivery of
messages using channels. In intra-group queuing there is only a receiving
component, because the need for the sending component has been removed. This
saving is because the message is available to the IGQ agent at the destination
queue manager for delivery to the destination queue once the put operation at the
local queue manager has completed and, in the case of messages put in syncpoint
scope, committed.
Supports migration
Applications external to a queue-sharing group can deliver messages to a queue
residing on any queue manager in the queue-sharing group, while being connected
only to a particular queue manager in the queue-sharing group. This is because
messages arriving on a receiver channel, destined for a queue on a remote queue
manager, can be transparently sent to the destination queue using intra-group
queuing. This facility allows applications to be deployed among the queue-sharing
group without the need to change any systems that are external to the
queue-sharing group.
QSG=SQ26 S/390
Windows NT
R S
RQ1 IGQ
E CF V
Agent
Q R
TCP/IP
S R
A A
P P
P XQ1 SYSTEM.QSG.TRANSMIT.QUEUE LQ1 P
L L
Limitations
This section describes the limitations of intra-group queuing.
Getting started
This section describes getting started with intra-group queuing.
Serving Application
MQGET
S/390
QSG = SQ26
CHINIT2
Receive MQPUT PUT
R
IGQ
Agent
LQ1
QMG2
GET
CF
MQPUT
SYSTEM.QSG.TRANSMIT.QUEUE
CHINIT1
MQGET MQPUT
S
Send
RQ1
XQ1
QMG1
MQPUT
Requesting Application
Open/Put processing
1. It is important to note that when the requesting application opens remote
queue RQ1, name resolution occurs for both the non-shared transmission queue
XQ1 and the shared transmission queue SYSTEM.QSG.TRANSMIT.QUEUE.
CLUS1
CF
SYSTEM.QSG.TRANSMIT.QUEUE
TO.QMG2 TO.QMG3
TO.QMG4
SYSTEM.CLUSTER.TRANSMIT.QUEUE
QMG1
Requesting Application
Assume that the requesting application opens the cluster queue with the
MQOO_BIND_NOT_FIXED option, so that the target queue manager for the
cluster queue is selected at put time.
Messages
This section describes the messages put to the SYSTEM.QSG.TRANSMIT.QUEUE.
Message structure
Like all other messages that are put to transmission queues, messages that are put
to the SYSTEM.QSG.TRANSMIT.QUEUE are prefixed with the transmission queue
header (MQXQH).
Message persistence
In WebSphere MQ Version 5 Release 3 and above, shared queues support both
persistent and non-persistent messages.
If the queue manager terminates while the IGQ agent is processing non-persistent
messages, or if the IGQ agent terminates abnormally while in the middle of
processing messages, non-persistent messages being processed may be lost.
Applications must make arrangements for the recovery of non-persistent messages
if their recovery is required.
If a put request for a non-persistent message, issued by the IGQ agent, fails
unexpectedly, the message being processed is lost.
Delivery of messages
The IGQ agent retrieves and delivers all nonpersistent messages outside of
syncpoint scope, and all persistent messages within syncpoint scope. In this case,
the IGQ agent acts as the syncpoint coordinator. The IGQ agent therefore processes
nonpersistent messages in a way similar to the way fast, nonpersistent messages
are processed on a message channel. See “Fast, nonpersistent messages” on page
21.
Batching of messages
The IGQ agent uses a fixed batchsize of 50 messages. Any persistent messages
retrieved within a batch will be committed at intervals of 50 messages. The agent
commits a batch consisting of persistent messages when there are no more
messages available for retrieval on the SYSTEM.QSG.TRANSMIT.QUEUE.
Message size
The maximum size of message that can be put to the
SYSTEM.QSG.TRANSMIT.QUEUE is the maximum supported message length for
shared queues minus the length of a transmission queue header (MQXQH).
Undelivered/unprocessed messages
If an IGQ agent cannot deliver a message to the destination queue, the IGQ agent:
v Honours the MQRO_DISCARD_MSG report option (if the Report options field
of the MQMD for the undelivered message indicates that it should) and discards
the undelivered message.
v Attempts to place the undelivered message on to the dead letter queue for the
destination queue manager, if the message has not already been discarded . The
IGQ agent prefixes the message with a dead letter queue header (MQDLH).
Report messages
This section describes report messages.
The persistence of the report message is the same as the persistence of the
undelivered message. If the IGQ agent fails to resolve the name of the destination
reply-to queue, or if it fails to put the reply message to a transmission queue (for
subsequent transfer to the destination reply-to queue) it attempts to put the
exception report to the dead letter queue of the queue manager on which the
report message is generated. If this is not possible, then if the undelivered message
is:
v persistent, the IGQ agent discards the exception report, backs out the current
batch of messages and enters a state of retry. For more information, see “Retry
capability of the intra-group queuing agent” on page 339.
v non-persistent, the IGQ agent discards the exception report and continues
processing the next message on the SYSTEM.QSG.TRANSMIT.QUEUE.
Security
This section describes the security arrangements for intra-group queuing.
Queue manager attributes IGQAUT (IGQ authority) and IGQUSER (IGQ agent
user ID) can be set to control the level of security checking that is performed when
the IGQ agent opens destination queues.
Specific properties
This section describes the specific properties of intra-group queuing.
Intra-group queuing introduces the following new rules for object handle
invalidation :
v If the SYSTEM.QSG.TRANSMIT.QUEUE was included in the name resolution
path during open processing because intra-group queuing was ENABLED at
open time, but intra-group queuing is found to be DISABLED at put time, then
the queue manager invalidates the object handle and fails the put request with
MQRC_OBJECT_CHANGED.
v If the SYSTEM.QSG.TRANSMIT.QUEUE was not included in the name
resolution path during open processing because intra-group queuing was
DISABLED at open time, but intra-group queuing is found to be ENABLED at
put time, then the queue manager invalidates the object handle and fails the put
request with MQRC_OBJECT_CHANGED.
v If the SYSTEM.QSG.TRANSMIT.QUEUE was included in the name resolution
path during open processing because intra-group queuing was enabled at open
time, but the SYSTEM.QSG.TRANSMIT.QUEUE definition is found to have
changed by put time, then the queue manager invalidates the object handle and
fails the put request with MQRC_OBJECT_CHANGED.
Constant Value
Short retry count 10
Short retry interval 60 secs = 1 min
Long retry count 999,999,999
Long retry interval 1200 secs = 20 min
An attempt, by the IGQ agent to serialize access to shared queues while peer
recovery is still in progress might fail. An error message is issued and the IGQ
agent is put into retry state. When queue manager peer recovery is complete, for
example at the time of the next retry, the IGQ agent can start.
Configuration 1
Configuration 1 describes how distributed queuing is currently used to transfer
messages between queue managers QMG1 and QMG3.
S/390
P Windows NT P
A A
Y PAYROLL. TCP/IP Y
R QUERY S R
O TCP/IP
O
L S R R L
L L
QSG=SQ26 S/390
P Windows NT P
A A
Y PAYROLL. Y
IGQ
R QUERY CF R
Agent
O TCP/IP
O
L S R L
L L
Note: The payroll query example transfers small messages only. If you need to
transfer both persistent and non-persistent messages, a combination of
Configuration 1 and Configuration 2 can be established, so that large
messages can be transferred using the distributed queuing route, while small
messages can be transferred using the potentially faster intra-group queuing
route.
Configuration 3
Configuration 3 describes how queue-sharing groups and shared queues can be
used, with no effect on the backend payroll server application, to transfer messages
between queue managers QMG1 and QMG3.
R QMG2 PAYROLL S
E (xmitq) V
Q R
QMG1 CHINIT2 QMG2 QMG3
Configuration 1 definitions
The definitions required for Configuration 1 are as follows (please note that the
definitions do not take into account triggering, and that only channel definitions
for communication using TCP/IP are provided).
On QMG1
Remote queue definition
DEFINE QREMOTE(PAYROLL.QUERY) DESCR(’Remote queue for QMG3’) REPLACE +
PUT(ENABLED) RNAME(PAYROLL) RQMNAME(QMG3) XMITQ(QMG2)
Chapter 28. Example configuration — WebSphere MQ for z/OS using intra-group queuing 343
This is the place where you should replace MVSQMG2(1415) with your queue
manager connection name and port.
On QMG2
Transmission queue definition
DEFINE QLOCAL(QMG1) DESCR(’Transmission queue to QMG1’) REPLACE +
PUT(ENABLED) USAGE(XMITQ) GET(ENABLED)
This is the place where you should replace WINTQMG1(1414) with your queue
manager connection name and port.
DEFINE CHANNEL(QMG2.TO.QMG3) CHLTYPE(SDR) TRPTYPE(TCP) REPLACE +
DESCR(’Sender channel to QMG3’) XMITQ(QMG3) CONNAME(’MVSQMG3(1416)’)
This is the place where you should replace MVSQMG3(1416) with your queue
manager connection name and port.
On QMG3
Local queue definition
DEFINE QLOCAL(PAYROLL) DESCR(’Payroll query request queue’) REPLACE +
PUT(ENABLED) USAGE(NORMAL) GET(ENABLED) SHARE
This is the place where you should replace MVSQMG2(1415) with your queue
manager connection name and port.
On QMG1
Remote queue definition
DEFINE QREMOTE(PAYROLL.QUERY) DESCR(’Remote queue for QMG3’) REPLACE +
PUT(ENABLED) RNAME(PAYROLL) RQMNAME(QMG3) XMITQ(QMG2)
This is the place where you should replace MVSQMG2(1415) with your queue
manager connection name and port.
On QMG2
Transmission queue definition
DEFINE QLOCAL(QMG1) DESCR(’Transmission queue to QMG1’) REPLACE +
PUT(ENABLED) USAGE(XMITQ) GET(ENABLED)
This is the place where you should replace APPLICATION1 with your defined CF
structure name. Also note that this queue, being a shared queue, need only be
defined on one of the queue managers in the queue sharing group.
This is the place where you should replace WINTQMG1(1414) with your queue
manager connection name and port.
Chapter 28. Example configuration — WebSphere MQ for z/OS using intra-group queuing 345
Queue Manager definition
ALTER QMGR IGQ(ENABLED)
On QMG3
Local queue definition
DEFINE QLOCAL(PAYROLL) DESCR(’Payroll query request queue’) REPLACE +
PUT(ENABLED) USAGE(NORMAL) GET(ENABLED) SHARE
Configuration 3 definitions
The definitions required for Configuration 3 are as follows (please note that the
definitions do not take into account triggering, and that only channel definitions
for communication using TCP/IP are provided). It is assumed that queue
managers QMG2 and QMG3 are already configured to be members of the same
queue-sharing group.
On QMG1
Remote queue definition
DEFINE QREMOTE(PAYROLL.QUERY) DESCR(’Remote queue for QMG3’) REPLACE +
PUT(ENABLED) RNAME(PAYROLL) RQMNAME(QMG3) XMITQ(QMG2)
This is the place where you should replace MVSQMG2(1415) with your queue
manager connection name and port.
On QMG2
Transmission queue definition
DEFINE QLOCAL(QMG1) DESCR(’Transmission queue to QMG1’) REPLACE +
PUT(ENABLED) USAGE(XMITQ) GET(ENABLED)
This is the place where you should replace WINTQMG1(1414) with your queue
manager connection name and port.
This is the place where you should replace APPLICATION1 with your defined CF
structure name. Also note that this queue, being a shared queue, need only be
defined on one of the queue managers in the queue sharing group.
On QMG3
No definitions are required on QMG3.
For Configuration 2:
1. Start queue managers QMG1, QMG2, and QMG3.
2. Start the channel initiator for QMG2.
3. Start the listeners on QMG1, QMG2 to listen on ports 1414 and 1415,
respectively.
4. Start the sender channel on QMG1 and QMG2.
5. Start the payroll query requesting application connected to QMG1.
6. Start the payroll server application connected to QMG3.
7. Submit a payroll query request to QMG3 and wait for the payroll reply.
For Configuration 3:
1. Start queue managers QMG1, QMG2 and QMG3.
2. Start the channel initiator for QMG2.
3. Start the listeners on QMG1, QMG2 to listen on ports 1414 and 1415,
respectively.
4. Start sender channels on QMG1 and QMG2.
5. Start the payroll query requesting application connected to QMG1.
6. Start the payroll server application connected to QMG3.
7. Submit a payroll query request to QMG3 and wait for the payroll reply.
Chapter 28. Example configuration — WebSphere MQ for z/OS using intra-group queuing 347
v Expanded to make use of channel triggering as well as application (PAYROLL
and PAYROLL.REPLY queue) triggering.
v Configured for communication using LU6.2.
v Expanded to configure more queue managers to the queue sharing group. Then
the server application can be cloned to run on other queue manager instances to
provide multiple servers for the PAYROLL query queue.
v Expanded to increase the number of instances of the payroll query requesting
application to demonstrate the processing of requests from multiple clients.
v Expanded to make use of security (IGQAUT and IGQUSER).
Operator commands
The following table shows the full list of WebSphere MQ for iSeries commands
that you may need when setting up and controlling channels. In general, issuing a
command results in the appropriate panel being displayed.
Getting started
Use these commands and panels to:
1. Define message channels and associated objects
2. Monitor and control message channels
By using the F4=Prompt key, you can specify the relevant queue manager. If you
do not use the prompt, the default queue manager is assumed. With F4=Prompt,
an additional panel is displayed where you may enter the relevant queue manager
name and sometimes other data.
Channels must be completely defined, and their associated objects must exist and
be available for use, before a channel can be started. This chapter shows you how
to do this.
In addition, the particular communication link for each channel must be defined
and available before a channel can be run. For a description of how LU 6.2 and
TCP/IP links are defined, see the particular communication guide for your
installation.
Creating objects
Use the CRTMQMQ command to create the queue and alias objects, such as:
transmission queues, remote queue definitions, queue manager alias definitions,
reply-to queue alias definitions, and reply-to local queues.
For a list of default objects, see the WebSphere MQ for iSeries V6 System
Administration Guide book.
Creating a channel
To create a new channel:
1. Use F6 from the Work with MQM Channels panel (the second panel that
displays channel details).
Alternatively, use the CRTMQMCHL command from the command line.
Either way, this displays the Create Channel panel. Type:
v The name of the channel in the field provided
v The channel type for this end of the link
2. Press Enter.
Note: You are strongly recommended to name all the channels in your network
uniquely. As shown in Table 1 on page 28, including the source and target
queue manager names in the channel name is a good way to do this.
Your entries are validated and errors are reported immediately. Correct any errors
and continue.
You are presented with the appropriate channel settings panel for the type of
channel you have chosen. Fill in the fields with the information you have gathered
previously. See Appendix A, “Channel planning form,” on page 521 for an example
of how you might want to gather information. Press Enter to create the channel.
You are provided with help in deciding on the content of the various fields in the
descriptions of the channel definition panels in the help panels, and in Chapter 6,
“Channel attributes,” on page 75.
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Starting a channel
Listeners are valid for TCP only. For SNA listeners, you must configure your
communications subsystem.
For applications to be able to exchange messages you must start a listener program
for inbound connections using the STRMQMLSR command.
For outbound connections you must start the channel in one of the following ways:
1. Use the CL command STRMQMCHL, specifying the channel name, to start the
channel as a process or a thread, depending on the MCATYPE parameter. (If
channels are started as threads, they are threads of a channel initiator.)
STRMQMCHL CHLNAME(QM1.TO.QM2) MQNAME(MYQMGR)
2. Use a channel initiator to trigger the channel. One channel initiator is started
automatically when the queue manager is started. This can be eliminated by
changing the chinit stanza in the qm.ini file for that queue manager.
3. Use the WRKMQMCHL command to begin the Work with Channels panel and
choose option 14 to start a channel.
Selecting a channel
To select a channel, use the WRKMQMCHL command to begin at the Work with
Channels panel:
1. Move the cursor to the option field at the left of the required channel name.
2. Type an option number.
3. Press Enter to activate your choice.
If you select more than one channel, the options are activated in sequence.
Browsing a channel
To browse the settings of a channel, use the WRKMQMCHL command to begin at
the Display Channel panel:
1. Move the cursor to the left of the required channel name.
2. Type option 5 (Display).
3. Press Enter to activate your choice.
If you select more than one channel, they are presented in sequence.
Alternatively, you can use the DSPMQMCHL command from the command line.
This results in the respective Display Channel panel being displayed with details
of the current settings for the channel. The fields are described in Chapter 6,
“Channel attributes,” on page 75.
Bottom
Renaming a channel
To rename a message channel, begin at the Work with Channels panel:
1. End the channel.
2. Use option 3 (Copy) to create a duplicate with the new name.
3. Use option 5 (Display) to check that it has been created correctly.
4. Use option 4 (Delete) to delete the original channel.
If you decide to rename a message channel, ensure that both channel ends are
renamed at the same time.
Alternatively, selecting option 8 (Work with Status) from the Work with MQM
Channels panel also brings up the first status panel.
Work with channel status applies to all message channels. It does not apply to
MQI channels other than server-connection channels on WebSphere MQ for iSeries
V5.1 and later.
Note: The Work with Channel Status screens only show channels that are active
after messages have been sent through the channel and the sequence
number has been incremented.
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F5=Refresh F6=Create F9=Retrieve F11=Change view
F12=Cancel F21=Print
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F5=Refresh F6=Create F9=Retrieve F11=Change view
F12=Cancel F21=Print
Bottom
Parameters or command
===>
F3=Exit F4=Prompt F5=Refresh F6=Create F9=Retrieve F11=Change view
F12=Cancel F21=Print
The options available in the Work with Channel Status panel are:
Note: When using the WRKMQMCHST command, the channel status shown is
SAVED channel status not CURRENT channel status. To see CURRENT
channel status, use the WRKMQMCHL command.
Work-with-channel choices
The Work with Channels panel is reached with the command WRKMQMCHL, and
it allows you to monitor the status of all channels listed, and to issue commands
against selected channels.
Panel choices
The following choices are provided in the Work with MQM channels panel and the
Work with Channel Status panel.
F6=Create
Use the Create option, or enter the CRTMQMCHL command from the command
line, to obtain the Create Channel panel. There are examples of Create Channel
panels, starting at Figure 55 on page 355.
With this panel, you create a new channel definition from a screen of fields filled
with default values supplied by WebSphere MQ for iSeries. Type the name of the
channel, select the type of channel you are creating, and the communication
method to be used.
When you press Enter, the panel is displayed. Type information in all the required
fields in this panel, and the three pages making up the complete panel, and then
save the definition by pressing Enter.
The channel name must be the same at both ends of the channel, and unique
within the network. However, you should restrict the characters used to those that
are valid for WebSphere MQ for iSeries object names; see Chapter 6, “Channel
attributes,” on page 75.
All panels have default values supplied by WebSphere MQ for iSeries for some
fields. You can customize these values, or you can change them when you are
creating or copying channels. To customize the values, see the WebSphere MQ for
iSeries System Administration.
You can create your own set of channel default values by setting up dummy
channels with the required defaults for each channel type, and copying them each
time you want to create new channel definitions.
Table 31 on page 364 shows the channel attributes for each type of channel. See
Chapter 6, “Channel attributes,” on page 75 for details about the fields.
2=Change
Use the Change option, or the CHGMQMCHL command, to change an existing
channel definition, except for the channel name. Simply type over the fields to be
changed in the channel definition panel, and then save the updated definition by
pressing Enter.
3=Copy
Use the Copy option, or the CPYMQMCHL command, to copy an existing channel.
The Copy panel enables you to define the new channel name. However, you
should restrict the characters used to those that are valid for WebSphere MQ for
iSeries object names; see the WebSphere MQ for iSeries System Administration.
Press Enter on the Copy panel to display the details of current settings. You can
change any of the new channel settings. Save the new channel definition by
pressing Enter.
4=Delete
Use the Delete option to delete the selected channel. A panel is displayed to
confirm or cancel your request.
5=Display
Use the Display option to display the current definitions for the channel. This
choice displays the panel with the fields showing the current values of the
parameters, and protected against user input.
13=Ping
Use the Ping option to exchange a fixed data message with the remote end. This
gives some confidence to the system supervisor that the link is available and
functioning.
Ping does not involve the use of transmission queues and target queues. It uses
channel definitions, the related communication link, and the network setup.
It is available from sender and server channels, only. The corresponding channel is
started at the far side of the link, and performs the start up parameter negotiation.
Errors are notified normally.
The result of the message exchange is presented in the Ping panel for you, and is
the returned message text, together with the time the message was sent, and the
time the reply was received.
14=Start
The Start option is available for sender, server, and requester channels. It should
not be necessary where a channel has been set up with queue manager triggering.
Chapter 29. Monitoring and controlling channels on iSeries 365
Panel choices
The Start option is also used for receiver channels that have a DISABLED or
STOPPED status. Starting a receiver channel that is in DISABLED or STOPPED
state resets the channel and allows it to be started from the remote channel.
When started, the sending MCA reads the channel definition file and opens the
transmission queue. A channel start-up sequence is executed, which remotely starts
the corresponding MCA of the receiver or server channel. When they have been
started, the sender and server processes await messages arriving on the
transmission queue and transmit them as they arrive.
When you use triggering, you will need to start the continuously running trigger
process to monitor the initiation queue. The STRMQMCHLI command can be used
for this.
At the far end of a channel, the receiving process may be started in response to a
channel startup from the sending end. The method of doing this is different for LU
6.2 and TCP/IP connected channels:
v LU 6.2 connected channels do not require any explicit action at the receiving end
of a channel.
v TCP connected channels require a listener process to be running continuously.
This process awaits channel startup requests from the remote end of the link and
starts the process defined in the channel definitions for that connection.
When the remote system is i5/OS, you can use the STRMQMLSR command for
this.
Use of the Start option always causes the channel to re-synchronize, where
necessary.
To transfer messages, remote queues and remote queue definitions must exist.
A message is returned to the panel confirming that the request to start a channel
has been accepted. For confirmation that the Start process has succeeded, check the
system log, or press F5 (refresh the screen).
15=End
Use the End option to request the channel to stop activity. The channel will not
send any more messages until the operator starts the channel again. (For
information about restarting stopped channels, see “Restarting stopped channels”
on page 67.)
You can select the type of stop you require if you press F4 before Enter. You can
choose IMMEDIATE, or CONTROLLED.
Stop immediate
Normally, this option should not be used. It terminates the channel process. The
channel does not complete processing the current batch of messages, and cannot,
therefore, leave the channel in doubt. In general, it is recommended that the
operators use the controlled stop option.
Stop controlled
This choice requests the channel to close down in an orderly way; the current
batch of messages is completed, and the syncpoint procedure is carried out with
the other end of the channel.
16=Reset
The Reset option changes the message sequence number. Use it with care, and only
after you have used the Resolve option to resolve any in-doubt situations. This
option is available only at the sender or server channel. The first message starts the
new sequence the next time the channel is started.
17=Resolve
Use the Resolve option when messages are held in-doubt by a sender or server, for
example because one end of the link has terminated, and there is no prospect of it
recovering. The Resolve option accepts one of two parameters: BACKOUT or
COMMIT. Backout restores messages to the transmission queue, while Commit
discards them.
The channel program does not try to establish a session with a partner. Instead, it
determines the logical unit of work identifier (LUWID) which represents the
in-doubt messages. It then issues, as requested, either:
v BACKOUT to restore the messages to the transmission queue; or
v COMMIT to delete the messages from the transmission queue.
In addition, where needed, the triggering arrangement must be prepared with the
definition of the necessary processes and queues.
If you want to make use of remote queue definitions, use the same command to
create a queue of type *RMT, and Usage of *NORMAL.
To create a transmission queue, use the CRTMQMQ command from the command
line to present you with the first queue creation panel; see Figure 66.
Queue name . . . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
+
Type the name of the queue and specify the type of queue that you wish to create:
Local, Remote, or Alias. For a transmission queue, specify Local (*LCL) on this
panel and press Enter.
You are presented with the second page of the Create MQM Queue panel; see
Figure 67.
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Change any of the default values shown. Press page down to scroll to the next
screen; see Figure 68.
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Type *TMQ, for transmission queue, in the Usage field of this panel, and change any
of the default values shown in the other fields.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
When you are satisfied that the fields contain the correct data, press Enter to create
the queue.
Triggering channels
An overview of triggering is given in “Triggering channels” on page 19, while it is
described in depth in the WebSphere MQ Application Programming Guide. This
section provides you with information specific to WebSphere MQ for iSeries.
You need to set up the transmission queue for the channel specifying TRIGGER
and specifying the channel name in the TRIGDATA field: For example:
CRTMQMQ QNAME(MYXMITQ) QTYPE(*LCL) MQMNAME(MYQMGR) +
PRCNAME(MYPROCESS) TRGENBL(*YES) INITQNAME(MYINITQ) +
USAGE(*TMQ)
Next you define a process in WebSphere MQ for iSeries naming the MCA sender
program, as the program to be triggered when messages arrive on the transmission
queue. Type CRTMQMPRC on the command line to display the Create Process
panel. Alternatively, select F6 (Create) from the Work with MQM Process panel.
See Figure 70 on page 372 for the first page of the Create Process panel. The
WebSphere MQ for iSeries System Administration contains details of defining
processes to be triggered.
More...
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Channel programs
There are different types of channel programs (MCAs) available for use at the
channels. The names are contained in the following table.
Table 32. Program and transaction names
Program name Direction of connection Communication
AMQCRSTA Inbound TCP
AMQCRS6A Inbound LU 6.2
AMQRMCLA Outbound Any
Undelivered-message queue
It is advisable that you have an application available to process the messages
arriving on the undelivered-message queue (also known as the dead-letter queue
or DLQ). The program could be triggered, or run at regular intervals. For more
details, see the WebSphere MQ for iSeries System Administration and the WebSphere
MQ Application Programming Guide.
Queues in use
MCAs for receiver channels may keep the destination queues open even when
messages are not being transmitted; this results in the queues appearing to be “in
use”.
You need to provide users with authority to make use of the WebSphere MQ for
iSeries facilities, and this is organized according to actions to be taken with respect
to objects and definitions. For example:
v Queue managers can be started and stopped by authorized users
v Applications need to connect to the queue manager, and have authority to make
use of queues
v Message channels need to be created and controlled by authorized users
The message channel agent at a remote site needs to check that the message being
delivered has derived from a user with authority to do so at this remote site. In
addition, as MCAs can be started remotely, it may be necessary to verify that the
remote processes trying to start your MCAs are authorized to do so. There are
three possible ways for you to deal with this:
1. Decree in the channel definition that messages must contain acceptable context
authority, otherwise they will be discarded.
2. 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.
3. Implement user exit message processing to ensure that individual messages are
vetted for authorization.
Here are some facts about the way WebSphere MQ for iSeries operates security:
v Users are identified and authenticated by i5/OS.
v Queue manager services invoked by applications are run with the authority of
the queue manager user profile, but in the user’s process.
v Queue manager services invoked by user commands are run with the authority
of the queue manager user profile.
In order to run, such programs must have predefined names and be available on
call to the channel programs. The names of the exit programs are included in the
message channel definitions.
There is a defined control block interface for handing over control to these
programs, and for handling the return of control from these programs.
The precise places where these programs are called, and details of control blocks
and names, are to be found in Part 6, “Further intercommunication considerations,”
on page 413.
Deciding on a connection
There are two forms of communication between WebSphere MQ for iSeries
systems:
v i5/OS TCP
For TCP, a host address may be used, and these connections are set up as
described in the i5/OS Communication Configuration Reference.
In the TCP environment, each distributed service is allocated a unique TCP
address which may be used by remote machines to access the service. The TCP
address consists of a host name/number and a port number. All queue
managers will use such a number to communicate with each other via TCP.
v i5/OS SNA (LU 6.2)
This form of communication requires the definition of an i5/OS SNA logical unit
type 6.2 (LU 6.2) that provides the physical link between the i5/OS system
serving the local queue manager and the system serving the remote queue
manager. Refer to the i5/OS Communication Configuration Reference for details on
configuring communications in i5/OS.
A port number is required for a complete TCP address; if this is not supplied, the
default port number 1414 is used. On the initiating end of a connection (sender,
requester, and server channel types) it is possible to provide an optional port
number for the connection, for example:
Connection name 9.20.9.30 (1555)
In this case the initiating end will attempt to connect to a receiving program at
port 1555.
Receiving on TCP
Receiving channel programs are started in response to a startup request from the
sending channel. To do this, a listener program has to be started to detect incoming
network requests and start the associated channel. You start this listener program
with the STRMQMLSR command.
You can start more than one listener for each queue manager. By default, the
STRMQMLSR command uses port 1414 but you can override this. To override the
default setting, add the following statements to the qm.ini file of the selected
queue manager (in this example, the listener is required to use port 2500):
TCP:
Port=2500
This new value is read only when the TCP listener is started. If you have a listener
already running, this change is not be seen by that program. To use the new value,
stop the listener and issue the STRMQMLSR command again. Now, whenever you
use the STRMQMLSR command, the listener defaults to the new port.
This change makes the listener default to the new port for the duration of the
listener job.
Select option 3 (Change TCP Attributes). You can now specify a time interval in
minutes. You can specify a value in the range 1 through 40320 minutes; the default
is 120.
The default listener backlog value on i5/OS is 255. If the backlog reaches this
value, the TCP connection is rejected and the channel will not be TCP: able to start.
For MCA channels, this results in the channel going into a RETRY state and
retrying the connection at a later time.
However, to avoid this error, you can add an entry in the qm.ini file:
ListenerBacklog = n
This overrides the default maximum number of outstanding requests (255) for the
TCP listener.
Note: Some operating systems support a larger value than the default. If necessary,
this can be used to avoid reaching the connection limit.
The initiated end of the link must have a routing entry definition to complement
this CSI object. Further information on managing work requests from remote
LU 6.2 systems is available in the AS/400 Programming: Work Management Guide.
See the Multiplatform APPC Configuration Guide and the following table for
information.
Table 34. Settings on the local i5/OS system for a remote queue manager platform
Remote platform TPNAME
z/OS, or OS/390 or The same as in the corresponding side information on the
MVS/ESA remote queue manager.
i5/OS The same as the compare value in the routing entry on the
i5/OS system.
HP OpenVMS As specified in the OVMS Run Listener command.
HP NonStop Server The same as the TPNAME specified in the receiver-channel
definition.
UNIX systems The invokable Transaction Program defined in the remote
LU 6.2 configuration.
Windows As specified in the Windows Run Listener command, or the
invokable Transaction Program that was defined using
TpSetup on Windows.
If you have more than one queue manager on the same machine, ensure that the
TPnames in the channel definitions are unique.
a channel” on page 354 for details of how to do this.) Use of the CSI object is
optional in WebSphere MQ for iSeries V5.1 or later.
The initiating end panel is shown in Figure Figure 72. You press F10 from the first
panel displayed to obtain the complete panel as shown.
Additional Parameters
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Note: For LU 6.2, the link between the message channel definition and the
communication connection is the Connection name field of the
message channel definition at the sending end. This field contains
the name of the CSI object.
Library
The name of the library where this definition will be stored.
The CSI object must be available in a library accessible to the program
serving the message channel, for example, QSYS, QMQM, and QGPL.
If the name is incorrect, missing, or cannot be found then an error will
occur on channel start up.
Remote location
Specifies the remote location name with which your program
communicates.
In short, this required parameter contains the logical unit name of the
partner at the remote system, as defined in the device description that is
used for the communication link between the two systems.
The Remote location name can be found by issuing the command
DSPNETA on the remote system and seeing the default local location
name.
Transaction program
Specifies the name (up to 64 characters) of the transaction program on the
remote system to be started. It may be a transaction process name, a
program name, the channel name, or a character string that matches the
Compare value in the routing entry.
This is a required parameter.
Mode-name
Specify a mode name for the remote location.
To enable the initiating end to start the receiving channel, add a routing entry to a
subsystem at the initiated end. The subsystem must be the one that allocates the
APPC device used in the LU 6.2 sessions and, therefore, it must have a valid
communications entry for that device. The routing entry calls the program that
starts the receiving end of the message channel.
Use the i5/OS commands (for example, ADDRTGE) to define the end of the link
that is initiated by a communication session.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Subsystem description
The name of your subsystem where this definition resides. Use the i5/OS
WRKSBSD command to view and update the appropriate subsystem
description for the routing entry.
Routing entry sequence number
A unique number in your subsystem to identify this communication
definition. You can use values in the range 1 to 9999.
Comparison data: Compare value
A text string to compare with that received when the session is started by
a Transaction program parameter, as shown in Figure 72 on page 380. The
character string is derived from the Transaction program field of the sender
CSI.
Note: The starting position field is the character position in the string for
comparison, and this is always 37.
Program to call
The name of the program that runs the inbound message program to be
called to start the session.
The program, AMQCRC6A, is called for the default queue manager. This is
a program supplied with WebSphere MQ for iSeries that sets up the
environment and then calls AMQCRS6A.
For additional queue managers:
v Each queue manager has a specific LU 6.2 invokable program located in
its library. This program is called AMQCRC6B and is automatically
generated when the queue manager is created.
v Each queue manager requires a specific routing entry with unique
routing data to be added. This routing data should match the
Transaction program name supplied by the requesting system (see
“Initiating end (Sending)” on page 379).
Start
Opt Seq Nbr Program Library Compare Value Pos
10 *RTGDTA ’QZSCSRVR’ 37
20 *RTGDTA ’QZRCSRVR’ 37
30 *RTGDTA ’QZHQTRG’ 37
50 *RTGDTA ’QVPPRINT’ 37
60 *RTGDTA ’QNPSERVR’ 37
70 *RTGDTA ’QNMAPINGD’ 37
80 QNMAREXECD QSYS ’AREXECD’ 37
90 AMQCRC6A QMQMBW ’MQSERIES’ 37
100 *RTGDTA ’QTFDWNLD’ 37
150 *RTGDTA ’QMFRCVR’ 37
Note: You can have more than one routing entry for each queue manager
by using different routing data. This gives the option of different job
priorities depending on the classes used.
Class The name and library of the class used for the steps started through this
routing entry. The class defines the attributes of the routing step’s running
environment and specifies the job priority. An appropriate class entry must
be specified. Use, for example, the WRKCLS command to display existing
classes or to create a new class. Further information on managing work
requests from remote LU 6.2 systems is available in the AS/400
Programming: Work Management Guide.
First it describes the parameters needed for an LU 6.2 connection, then it describes
“Establishing an LU 6.2 connection” on page 392 and “Establishing a TCP
connection” on page 398.
Once the connection is established, you need to define some channels to complete
the configuration. This is described in “WebSphere MQ for iSeries configuration”
on page 400.
See Chapter 7, “Example configuration chapters in this book,” on page 105 for
background information about this chapter and how to use it.
Configuration worksheet
Use the following worksheet to record the values you will use for this
configuration. Where numbers appear in the Reference column they indicate that
the value must match that in the appropriate worksheet elsewhere in this book.
The examples that follow in this chapter refer back to the values in the ID column
of this table. The entries in the Parameter Name column are explained in
“Explanation of terms” on page 390.
Table 35. Configuration worksheet for SNA on an i5/OS system
ID Parameter Name Reference Example Used User Value
Definition for local node
1 Local network ID NETID
2 Local control point name AS400PU
3 LU name AS400LU
4 LAN destination address 10005A5962EF
The values in this section must match those used in Table 13 on page 142, as indicated.
9 Network ID 2 NETID
10 Control point name 3 WINNTCP
11 LU name 5 WINNTLU
12 Controller description WINNTCP
13 Device WINNTLU
14 Side information NTCPIC
15 Transaction Program 7 MQSERIES
16 LAN adapter address 9 08005AA5FAB9
17 Mode 17 #INTER
Connection to an AIX system
The values in this section must match those used in Table 17 on page 169, as indicated.
9 Network ID 1 NETID
10 Control point name 2 AIXPU
11 LU name 4 AIXLU
12 Controller description AIXPU
13 Device AIXLU
14 Side information AIXCPIC
15 Transaction Program 6 MQSERIES
16 LAN adapter address 8 123456789012
17 Mode 14 #INTER
Connection to an HP-UX system
The values in this section must match those used in Table 19 on page 187, as indicated.
9 Network ID 4 NETID
10 Control point name 2 HPUXPU
11 LU name 5 HPUXLU
12 Controller description HPUXPU
13 Device HPUXLU
14 Side information HPUXCPIC
15 Transaction Program 7 MQSERIES
16 LAN adapter address 8 100090DC2C7C
17 Mode 17 #INTER
Connection to a Solaris system
The values in this section must match those used in Table 21 on page 211, as indicated.
The values in this section must match those used in Table 23 on page 233, as indicated.
9 Network ID 4 NETID
10 Control point name 2 LINUXPU
11 LU name 5 LINUXLU
12 Controller description LINUXPU
13 Device LINUXLU
14 Side information LXCPIC
15 Transaction Program 7 MQSERIES
16 LAN adapter address 8 08005AC6DF33
17 Mode 6 #INTER
Connection to an z/OS system
The values in this section must match those used in Table 27 on page 290, as indicated.
9 Network ID 2 NETID
10 Control point name 3 MVSPU
11 LU name 4 MVSLU
12 Controller description MVSPU
13 Device MVSLU
14 Side information MVSCPIC
15 Transaction Program 7 MQSERIES
16 LAN adapter address 8 400074511092
17 Mode 6 #INTER
Connection to a VSE/ESA system
The values in this section must match those used in your VSE/ESA system.
9 Network ID 1 NETID
10 Control point name 2 VSEPU
11 LU name 3 VSELU
12 Controller description VSEPU
13 Device VSELU
14 Side information VSECPIC
Explanation of terms
1 2 3
See “How to find network attributes” on page 391 for the details of how to
find the configured values.
4 LAN destination address
The hardware address of the iSeries system token-ring adapter. You can
find the value using the command DSPLIND Line description (6).
5 Subsystem description
This is the name of any i5/OS subsystem that will be active while using
the queue manager. The name QCMN has been used because this is the
i5/OS communications subsystem.
6 Line description
If this has been specified it is indicated in the Description field of the
resource Resource name. See “How to find the value of Resource name” on
page 391 for details. If the value is not specified you will need to create a
line description.
7 Resource name
See “How to find the value of Resource name” on page 391 for details of
how to find the configured value.
8 Local Transaction Program name
WebSphere MQ applications trying to converse with this workstation will
specify a symbolic name for the program to be run at the receiving end.
This will have been defined on the channel definition at the sender. For
simplicity, wherever possible use a transaction program name of
MQSERIES, or in the case of a connection to VSE/ESA, where the length is
limited to 4 bytes, use MQTP.
See Table 34 on page 379 for more information.
12 Controller description
This is an alias for the Control Point name (or Node name) of the partner
system. For convenience we have used the actual name of the partner in
this example.
13 Device
This is an alias for the LU of the partner system. For convenience we have
used the LU name of the partner in this example.
14 Side information
This is the name given to the CPI-C side information profile. You specify
your own 8-character name for this.
If you need to change these values use the command CHGNETA. An IPL may be
required to apply your changes.
More...
Press Enter to continue.
F3=Exit F12=Cancel
Check that the values for Local network ID (1), Local control point name (2),
and Default local location (3), correspond to the values on your worksheet.
Configuration
Opt Resource Description Type Description
CC02 2636 Comm Processor
LIN04 2636 LAN Adapter
LIN041 TOKENRINGL 2636 Token-Ring Port
Bottom
F3=Exit F5=Refresh F6=Print F11=Display resource addresses/statuses
F12=Cancel F23=More options
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
Parameter LIND required. +
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Parameter SBSD required. +
2. Specify your value for Subsystem description (5), and the values shown here
for Routing entry sequence number, Compare value (8), Starting position,
Program to call, and the Library containing the program to call.
3. Type the command STRSBS subsystem description (5) and press Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
Parameter CTLD required. +
2. Specify a value for Controller description (12), set Link type to *LAN, and set
Online at IPL to *NO.
3. Press Enter twice, followed by F10.
4. Specify values for Switched line list (6), Remote network identifier (9),
Remote control point (10), and LAN remote adapter address (16).
5. Press Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
Parameter DEVD required. +
2. Specify values for Device description (13), Remote location (11), Local
location (3), Remote network identifier (9), and Attached controller
(12).
Note: You can avoid having to create controller and device descriptions manually
by taking advantage of i5/OS’s auto-configuration service. Consult the
i5/OS documentation for details.
Additional Parameters
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Parameter CSI required.
2. Specify values for Side information (14), Remote location (11), Transaction
program (15), Local location (3), Mode, and Remote network identifier
(9).
3. Press Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Parameter SBSD required.
2. Specify values for Subsystem description (5) and Device (13), and press
Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
2. Specify values for Remote location name (11), Remote network identifier
(9), Local location name (3), Remote control point (10), and Control
point net ID (9).
3. Press Enter.
What next?
The LU 6.2 connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for iSeries configuration” on page 400.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
2. Specify this machine’s Internet address and Line description, and a Subnet
mask.
3. Press Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
2. Specify the values for Internet address, Line description, and Subnet mask.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Command prompting ended when user pressed F12.
2. Fill in with values appropriate to your network and press Enter to create a
default route entry.
What next?
The TCP connection is now established. You are ready to complete the
configuration. Go to “WebSphere MQ for iSeries configuration.”
Note: AMQ* errors are placed in the log relating to the job that found the error.
Use the WRKACTJOB command to display the list of jobs. Under the
subsystem name QSYSWRK, locate the job and enter 5 against it to work
with that job. WebSphere MQ logs are prefixed ‘AMQ’.
Basic configuration
1. First you need to create a queue manager. To do this, type CRTMQM and press
Enter.
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
2. In the Message Queue Manager name field, type AS400. In the Undelivered
message queue field, type DEAD.LETTER.QUEUE.
3. Press Enter.
4. Now start the queue manager by entering STRMQM MQMNAME(AS400).
5. Create the undelivered message queue using the following parameters. (For
details and an example refer to “Defining a queue” on page 404.)
Local Queue
Queue name : DEAD.LETTER.QUEUE
Queue type : *LCL
Channel configuration
This section details the configuration to be performed on the i5/OS queue manager
to implement the channel described in Figure 32 on page 105.
Examples are given for connecting WebSphere MQ for iSeries and WebSphere MQ
for Windows. If you wish connect to WebSphere MQ on another platform, use the
appropriate values from the table in place of those for Windows
Notes:
1. The words in bold are user-specified and reflect the names of WebSphere MQ
objects used throughout these examples. If you change the names used here,
ensure that you also change the other references made to these objects
throughout this book. All others are keywords and should be entered as shown.
2. The WebSphere MQ channel ping command (PNGMQMCHL) runs
interactively, whereas starting a channel causes a batch job to be submitted. If a
channel ping completes successfully but the channel will not start, this indicates
that the network and WebSphere MQ definitions are probably correct, but that
the i5/OS environment for the batch job is not. For example, make sure that
QSYS2 is included in the system portion of the library list and not just your
personal library list.
For details and examples of how to create the objects listed refer to “Defining a
queue” on page 404 and “Defining a channel” on page 405.
Table 36. Configuration worksheet for WebSphere MQ for iSeries
ID Parameter Name Reference Example Used User Value
Definition for local node
A Queue Manager Name AS400
B Local queue name AS400.LOCALQ
Connection to WebSphere MQ for Windows
The values in this section of the table must match those used in Table 14 on page 158, as indicated.
C Remote queue manager name A WINNT
D Remote queue name WINNT.REMOTEQ
E Queue name at remote system B WINNT.LOCALQ
F Transmission queue name WINNT
G Sender (SNA) channel name AS400.WINNT.SNA
H Sender (TCP/IP) channel name AS400.WINNT.TCP
I Receiver (SNA) channel name G WINNT.AS400.SNA
J Receiver (TCP/IP) channel name H WINNT.AS400.TCP
Connection to WebSphere MQ for AIX
The values in this section of the table must match those used in Table 18 on page 182, as indicated.
C Remote queue manager name A AIX
D Remote queue name AIX.REMOTEQ
E Queue name at remote system B AIX.LOCALQ
F Transmission queue name AIX
G Sender (SNA) channel name AS400.AIX.SNA
H Sender (TCP/IP) channel name AS400.AIX.TCP
The values in this section of the table must match those used in your Compaq Tru64 UNIX system.
C Remote queue manager name A DECUX
D Remote queue name DECUX.REMOTEQ
E Queue name at remote system B DECUX.LOCALQ
F Transmission queue name DECUX
H Sender (TCP) channel name DECUX.AS400.TCP
J Receiver (TCP) channel name H AS400.DECUX.TCP
Connection to WebSphere MQ for HP-UX
The values in this section of the table must match those used in Table 20 on page 207, as indicated.
C Remote queue manager name A HPUX
D Remote queue name HPUX.REMOTEQ
E Queue name at remote system B HPUX.LOCALQ
F Transmission queue name HPUX
G Sender (SNA) channel name AS400.HPUX.SNA
H Sender (TCP) channel name AS400.HPUX.TCP
I Receiver (SNA) channel name G HPUX.AS400.SNA
J Receiver (TCP) channel name H HPUX.AS400.TCP
Connection to WebSphere MQ for Solaris
The values in this section of the table must match those used in Table 22 on page 230, as indicated.
C Remote queue manager name A SOLARIS
D Remote queue name SOLARIS.REMOTEQ
E Queue name at remote system B SOLARIS.LOCALQ
F Transmission queue name SOLARIS
G Sender (SNA) channel name AS400.SOLARIS.SNA
H Sender (TCP/IP) channel name AS400.SOLARIS.TCP
I Receiver (SNA) channel name G SOLARIS.AS400.SNA
J Receiver (TCP/IP) channel name H SOLARIS.AS400.TCP
Connection to WebSphere MQ for Linux
The values in this section of the table must match those used in Table 24 on page 252, as indicated.
C Remote queue manager name A LINUX
D Remote queue name LINUX.REMOTEQ
E Queue name at remote system B LINUX.LOCALQ
F Transmission queue name LINUX
G Sender (SNA) channel name AS400.LINUX.SNA
H Sender (TCP/IP) channel name AS400.LINUX.TCP
I Receiver (SNA) channel name G LINUX.AS400.SNA
The values in this section of the table must match those used in Table 28 on page 295, as indicated.
C Remote queue manager name A MVS
D Remote queue name MVS.REMOTEQ
E Queue name at remote system B MVS.LOCALQ
F Transmission queue name MVS
G Sender (SNA) channel name AS400.MVS.SNA
H Sender (TCP) channel name AS400.MVS.TCP
I Receiver (SNA) channel name G MVS.AS400.SNA
J Receiver (TCP) channel name H MVS.AS400.TCP
Connection to MQSeries for VSE/ESA
The values in this section of the table must match those used in your VSE/ESA system.
C Remote queue manager name A VSE
D Remote queue name VSE.REMOTEQ
E Queue name at remote system B VSE.LOCALQ
F Transmission queue name VSE
G Sender channel name AS400.VSE.SNA
I Receiver channel name G VSE.AS400.SNA
Remote Queue
Queue name : WINNT.REMOTEQ D
Queue type : *RMT
Remote queue : WINNT.LOCALQ E
Remote Queue Manager : WINNT C
Transmission queue : WINNT F
Sender Channel
Channel Name : AS400.WINNT.SNA G
Channel Type : *SDR
Transport type : *LU62
Connection name : WINNTCPIC 14
Transmission queue : WINNT F
Receiver Channel
Channel Name : WINNT.AS400.SNA I
Channel Type : *RCVR
Transport type : *LU62
Remote Queue
Queue name : WINNT.REMOTEQ D
Queue type : *RMT
Remote queue : WINNT.LOCALQ E
Remote Queue Manager : WINNT C
Transmission queue : WINNT F
Sender Channel
Channel Name : AS400.WINNT.TCP H
Channel Type : *SDR
Transport type : *TCP
Connection name : WINNT.tcpip.hostname
Transmission queue : WINNT F
Receiver Channel
Channel Name : WINNT.AS400.TCP J
Channel Type : *RCVR
Transport type : *TCP
Defining a queue
Type CRTMQMQ on the command line.
Queue name . . . . . . . . . . .
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Parameter QNAME required.
Fill in the two fields of this panel and press Enter. This causes another panel to
appear, with entry fields for the other parameters you have. Defaults can be taken
for all other queue attributes.
Defining a channel
Type CRTMQMCHL on the command line.
Channel name . . . . . . . . . .
Channel type . . . . . . . . . . *RCVR, *SDR, *SVR, *RQSTR
Bottom
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display
F24=More keys
Parameter CHLNAME required.
Fill in the two fields of this panel and press Enter. Another panel is displayed on
which you can specify the values for the other parameters given earlier. Defaults
can be taken for all other channel attributes.
The example illustrates the use of TCP/IP connections. The example assumes that
channels are to be triggered to start when the first message arrives on the
transmission queue they are servicing. You must start the channel initiator in order
for triggering to work. To do this, use the STRMQMCHLI command.
Figure 75. The message channel example for WebSphere MQ for iSeries
The payroll query application puts a query message to the remote queue
“PAYROLL.QUERY” defined on QM1. This remote queue definition resolves to the
local queue “PAYROLL” on QM2. In addition, the payroll query application
specifies that the reply to the query is sent to the local queue “PAYROLL.REPLY”
on QM1. The payroll processing application gets messages from the local queue
“PAYROLL” on QM2, and sends the replies to wherever they are required; in this
case, local queue “PAYROLL.REPLY” on QM1.
The connection details are supplied in the CONNAME attribute of the sender
channel definitions.
All the object definitions have been provided with the TEXT attributes. The other
attributes supplied are the minimum required to make the example work. The
attributes that are not supplied take the default values for queue manager QM1.
QNAME ‘PAYROLL.QUERY’
QTYPE *RMT
TEXT ‘Remote queue for QM2’
PUTENBL *YES
TMQNAME ‘QM2’ (default = remote queue manager name)
RMTQNAME ‘PAYROLL’
RMTMQMNAME ‘QM2’
Note: The remote queue definition is not a physical queue, but a means of
directing messages to the transmission queue, QM2, so that they can
be sent to queue manager QM2.
QNAME QM2
QTYPE *LCL
TEXT ‘Transmission queue to QM2’
USAGE *TMQ
PUTENBL *YES
GETENBL *YES
TRGENBL *YES
TRGTYPE *FIRST
INITQNAME SYSTEM.CHANNEL.INITQ
TRIGDATA QM1.TO.QM2
CHLNAME QM1.TO.QM2
CHLTYPE *SDR
TRPTYPE *TCP
TEXT ‘Sender channel to QM2’
TMQNAME QM2
CONNAME ‘9.20.9.32(1412)’
Chapter 33. Message channel planning example for WebSphere MQ for iSeries 409
Planning example for i5/OS
CHLNAME QM2.TO.QM1
CHLTYPE *RCVR
TRPTYPE *TCP
TEXT ‘Receiver channel from QM2’
QNAME PAYROLL.REPLY
QTYPE *LCL
TEXT ‘Reply queue for replies to query messages sent to QM2’
PUTENBL *YES
GETENBL *YES
You do not need to provide a remote queue definition to enable the replies to be
returned to QM1. The message descriptor of the message retrieved from local
queue PAYROLL contains both the reply-to queue and the reply-to queue manager
names. Therefore, as long as QM2 can resolve the reply-to queue manager name to
that of a transmission queue on queue manager QM2, the reply message can be
sent. In this example, the reply-to queue manager name is QM1 and so queue
manager QM2 simply requires a transmission queue of the same name.
All the object definitions have been provided with the TEXT attribute and are the
minimum required to make the example work. The attributes that are not supplied
take the default values for queue manager QM2.
QNAME PAYROLL
QTYPE *LCL
TEXT ‘Local queue for QM1 payroll details’
PUTENBL *YES
GETENBL *YES
QNAME QM1
QTYPE *LCL
TEXT ‘Transmission queue to QM1’
USAGE *TMQ
PUTENBL *YES
GETENBL *YES
TRGENBL *YES
TRGTYPE *FIRST
INITQNAME SYSTEM.CHANNEL.INITQ
TRIGDATA QM2.TO.QM1
CHLNAME QM2.TO.QM1
CHLTYPE *SDR
TRPTYPE *TCP
TEXT ‘Sender channel to QM1’
TMQNAME QM1
CONNAME ‘9.20.9.31(1411)’
CHLNAME QM1.TO.QM2
CHLTYPE *RCVR
TRPTYPE *TCP
TEXT ‘Receiver channel from QM1’
The applications can then send messages to each other. The channels are triggered
to start by the first message arriving on each transmission queue, so you do not
need to issue the STRMQMCHL command.
For details about starting a channel initiator and a listener see Chapter 29,
“Monitoring and controlling channels on iSeries,” on page 351.
Chapter 33. Message channel planning example for WebSphere MQ for iSeries 411
Planning example for i5/OS
v Adding user exit programs on the channels to allow for link encryption, security
checking, or additional message processing.
v Using queue manager aliases and reply-to queue aliases to understand more
about how these can be used in the organization of your queue manager
network.
For a version of this example that uses MQSC commands, see Chapter 22,
“Message channel planning example for z/OS,” on page 299.
Message channel agents (MCAs) can also call data-conversion exits; these are
discussed in the WebSphere MQ Application Programming Guide.
The different types of channel-exit program are described below. Table 37 shows
the types of channel exit that are available for each channel type.
Table 37. Channel exits available for each channel type
Channel Type Message exit Message- retry Receive exit Security exit Send exit Auto-
exit definition exit
Sender channel U U U U
Server channel U U U U
Cluster- sender U U U U U
channel
Receiver U U U U U U
channel
Requester U U U U U
channel
Cluster- U U U U U U
receiver
channel
Client- U U U
connection
channel
Server- U U U U
connection
channel
Notes:
1. On z/OS, the auto-definition exit applies to cluster-sender and cluster-receiver channels only.
If you are going to run channel exits on a client, you cannot use the MQSERVER
environment variable. Instead, create and reference a client channel definition table
as described in the WebSphere MQ Clients book.
© Copyright IBM Corp. 1994, 2005 415
Channel-exit programs
Processing overview
On startup, the MCAs exchange a startup dialog to synchronize processing. Then
they switch to a data exchange that includes the security exits; these must end
successfully for the startup phase to complete and to allow messages to be
transferred.
During the message transfer phase, the sending MCA gets messages from a
transmission queue, calls the message exit, calls the send exit, and then sends the
message to the receiving MCA, as shown in Figure 77.
Application
MCA Exit
Message
Queue transmission (get)
Exit
Comms
link Send
Figure 77. Example of a send exit at the sender end of message channel
MCA Exit
Comms
link
Receive
Application Exit
Message
(put)
Queue Local
Figure 78. Example of a receive exit at the receiver end of message channel
The receiving MCA receives a message from the communications link, calls the
receive exit, calls the message exit, and then puts the message on the local queue,
as shown in Figure 78. (The receive exit can be called more than once before the
message exit is called.)
Channel security exit programs are called at the following places in an MCA’s
processing cycle:
v At MCA initiation and termination.
v Immediately after the initial data negotiation is finished on channel startup. The
receiver or server end of the channel may initiate a security message exchange
with the remote end by providing a message to be delivered to the security exit
at the remote end. It may also decline to do so. The exit program is re-invoked
to process any security message received from the remote end.
v Immediately after the initial data negotiation is finished on channel startup. The
sender or requester end of the channel processes a security message received
from the remote end, or initiates a security exchange when the remote end
cannot. The exit program is re-invoked to process all subsequent security
messages that may be received.
Channel closes
Channel closes
Figure 83 illustrates the use of security exits in a client connection, using the
WebSphere MQ Object Authority Manager to authenticate a user. Either
SecurityParmsPtr or SecurityParmsOffset is set in the MQCNO structure on the
client and there are security exits at both ends of the channel. After the normal
security message exchange has ended, as described for figure 79, and the channel
is ready to run, the MQCSP structure accessed from the MQCXP SecurityParms
field is passed to the security exit on the client. The exit type is set to
MQXR_SEC_PARMS. The security exit can elect to do nothing to the user identifier
and password, or it can alter either or both of them. The data returned from the
exit is then sent to the server-connection end of the channel. The MQCSP structure
is rebuilt on the server-connection end of the channel and is passed to the
server-connection security exit accessed from the MQCXP SecurityParms field. The
security exit receives and processes this data. This processing will normally be to
reverse any change made to the userid and password fields in the client exit. The
resulting MQCSP structure is referenced using SecurityParmsPtr in the MQCNO
structure on the queue manager system.
Figure 83. Client connection-initiated exchange with agreement for client connection using
security parameters
The channel security exit program is passed an agent buffer containing the security
data, excluding any transmission headers, generated by the security exit. This may
be any suitable data so that either end of the channel is able to perform security
validation.
The security exit program at both the sending and receiving end of the message
channel may return one of four response codes to any call:
v Security exchange ended with no errors
v Suppress the channel and close down
v Send a security message to the corresponding security exit at the remote end
v Send a security message and demand a reply
Notes:
1. The channel security exits usually work in pairs. When you define the
appropriate channels, make sure that compatible exit programs are named for
both ends of the channel.
2. In i5/OS, security exit programs that have been compiled with “Use adopted
authority” (USEADPAUT=*YES) have the ability to adopt QMQM or
QMQMADM authority. Take care that the exit does not exploit this feature to
pose a security risk to your system.
3. On an SSL channel on which the other end of the channel provides a certificate,
the security exit receives the Distinguished Name of the subject of this
certificate in the MQCD field accessed by SSLPeerNamePtr and the
Distinguished Name of the issuer in the MQCXP field accessed by
SSLRemCertIssNamePtr. Uses to which this name can be put are:
v to restrict access over the SSL channel.
v to change MCAUSER based on the name
Channel send and receive exit programs are called at the following places in an
MCA’s processing cycle:
v The send and receive exit programs are called for initialization at MCA initiation
and for termination at MCA termination.
v The send exit program is invoked at either end of the channel, immediately
before a transmission is sent over the link.
v The receive exit program is invoked at either end of the channel, immediately
after a transmission has been taken from the link.
There may be many transmissions for one message transfer, and there could be
many iterations of the send and receive exit programs before a message reaches the
message exit at the receiving end.
The channel send and receive exit programs are passed an agent buffer containing
the transmission data as sent or received from the communications link. For send
exit programs, the first eight bytes of the buffer are reserved for use by the MCA,
and must not be changed. If the program returns a different buffer, then these first
eight bytes must exist in the new buffer. The format of data presented to the exit
programs is not defined.
A good response code must be returned by send and receive exit programs. Any
other response will cause an MCA abnormal end (abend).
Note: Do not issue an MQGET, MQPUT, or MQPUT1 call within syncpoint from a
send or receive exit.
Notes:
1. Send and receive exits usually work in pairs. For example a send exit may
compress the data and a receive exit decompress it, or a send exit may encrypt
the data and a receive exit decrypt it. When you define the appropriate
channels, make sure that compatible exit programs are named for both ends of
the channel.
2. If compression is turned on for the channel, the exits will be passed
compressed data.
3. Channel send and receive exits may be called for message segments other than
for application data, for example, status messages. They are not called during
the startup dialog, nor the security check phase.
4. Although message channels send messages in one direction only,
channel-control data flows in both directions, and these exits are available in
both directions, also. However, some of the initial channel startup data flows
are exempt from processing by any of the exits.
5. There are circumstances in which send and receive exits could be invoked out
of sequence; for example, if you are running a series of exit programs or if you
are also running security exits. Then, when the receive exit is first called upon
to process data, it may receive data that has not passed through the
corresponding send exit. If the receive exit were just to perform the operation,
for example decompression, without first checking that it was really required,
the results would be unexpected.
You should code your send and receive exits in such a way that the receive exit
can check that the data it is receiving has been processed by the corresponding
send exit. The recommended way to do this is to code your exit programs so
that:
v The send exit sets the value of the ninth byte of data to 0 and shifts all the
data along one byte, before performing the operation. (The first eight bytes
are reserved for use by the MCA.)
v If the receive exit receives data that has a 0 in byte 9, it knows that the data
has come from the send exit. It removes the 0, performs the complementary
operation, and shifts the resulting data back by one byte.
v If the receive exit receives data that has something other than 0 in byte 9, it
assumes that the send exit has not run, and sends the data back to the caller
unchanged.
When using security exits, if the channel is ended by the security exit it is
possible that a send exit may be called without the corresponding receive exit.
One way to prevent this from being a problem is to code the security exit to set
a flag, in MQCD.SecurityUserData or MQCD.SendUserData, for example, when
the exit decides to end the channel. Then the send exit should check this field,
and process the data only if the flag is not set. This prevents the send exit from
unnecessarily altering the data, and thus prevents any conversion errors that
could occur if the security exit received altered data.
6. In the case of MQI channels for clients, byte 10 of the agent buffer identifies the
API call in use when the send or receive exit is called. This is useful for
identifying which channel flows include user data and may require processing
such as encryption or digital signing.
Table 38 on page 425 shows the data that appears in byte 10 of the channel
flow when an API call is being processed.
Note: These are not the only values of this byte. There are other reserved
values.
that is when ExitReason has the value MQXR_INIT. When the send exit is invoked
immediately before transmission, with ExitReason set to MQXR_XMIT, ExitSpace
bytes are reserved in the transmission buffer. ExitSpace is not supported on z/OS.
The send exit need not use all of the reserved space. It can use less than ExitSpace
bytes or, if the transmission buffer is not full, the exit can use more than the
amount reserved. When setting the value of ExitSpace, you must leave at least 1
KB for message data in the transmission buffer. Note that channel performance can
be affected if reserved space is used for large amounts of data.
The following example shows how space is allocated for three send exits, called in
succession:
1. When called for initialization:
v Send exit A reserves 1 KB.
v Send exit B reserves 2 KB.
v Send exit C reserves 3 KB.
2. The maximum transmission size is 32 KB and the user data is 5 KB long.
3. Exit A is called with 5 KB of data; up to 27 KB are available, because 5KB is
reserved for exits B and C. Exit A adds 1KB, the amount it reserved.
4. Exit B is called with 6 KB of data; up to 29 KB are available, because 3KB is
reserved for exit C. Exit B adds 1KB, less than the 2KB it reserved.
5. Exit C is called with 7 KB of data; up to 32 KB are available. Exit C adds 10K,
more than the 3KB it reserved. This is valid, because the total amount of data,
17 KB, is less than the 32KB maximum.
On WebSphere MQ for iSeries, UNIX systems, z/OS, and Windows systems, and
with WebSphere MQ clients, you can specify a list of message exit programs to be
run in succession.
Channel message exit programs are called at the following places in an MCA’s
processing cycle:
v At MCA initiation and termination
v Immediately after a sending MCA has issued an MQGET call
v Before a receiving MCA issues an MQPUT call
The message exit is passed an agent buffer containing the transmission queue
header, MQXQH, and the application message text as retrieved from the queue.
(The format of MQXQH is given in the WebSphere MQ Application Programming
Reference book.) If you use reference messages, that is messages that contain only a
header which points to some other object that is to be sent, the message exit
recognizes the header, MQRMH. It identifies the object, retrieves it in whatever
way is appropriate appends it to the header, and passes it to the MCA for
transmission to the receiving MCA. At the receiving MCA, another message exit
recognizes that this is a reference message, extracts the object, and passes the
header on to the destination queue. See the WebSphere MQ Application Programming
Guide for more information about reference messages and some sample message
exits that handle them.
Which headers are processed: A conversion routine runs in the receiver’s MCA
before the message exit is called. The conversion routine begins with the MQXQH
header at the top of the message. The conversion routine then processes through
the chained headers that follow the MQXQH, performing conversion where
necessary. The chained headers can extend beyond the offset contained in the
HeaderLength parameter of the MQCXP data that is passed to the receiver’s
message exit. The following headers will be converted in-place:
v MQXQH (format name ″MQXMIT ″)
v MQMD (this is part of the MQXQH and has no format name)
v MQMDE (format name ″MQHMDE ″)
The following headers will not be converted, but will be stepped over as the MCA
continues to process the chained headers:
v MQDLH (format name ″MQDEAD ″)
v any headers with format names beginning with the three characters ’MQH’ (eg.
″MQHRF ″) that are not otherwise mentioned above
How the headers are processed: The Format parameter of each MQ header is
read by the MCA. The Format parameter is 8 bytes within the header, which are 8
single-byte characters containing a name.
The MCA then interprets the data following each header as being of the named
type. If the Format is the name of a header type eligible for MQ data conversion, it
will be converted. If it is another name indicating non-MQ data (for example
MQFMT_NONE or MQFMT_STRING) then the MCA stops processing the headers
at this point.
MQWIH: As noted above, the chained headers can extend beyond the
HeaderLength into the user data area. The MQWIH header, if it is present, is one
of those that will appear beyond the HeaderLength.
This exit is also called at the receiving end of the channel at MCA initiation and
termination.
The exit is invoked for all reason codes; the exit determines for which reason codes
it wants the MCA to retry, for how many times, and at what intervals. (The value
of the message-retry count set when the channel was defined is passed to the exit
in the MQCD, but the exit can ignore this.)
The MsgRetryCount field in MQCXP is incremented by the MCA each time the exit
is invoked, and the exit returns either MQXCC_OK with the wait time contained in
the MsgRetryInterval field of MQCXP, or MQXCC_SUPPRESS_FUNCTION. Retries
continue indefinitely until the exit returns MQXCC_SUPPRESS_FUNCTION in the
If all the retries are unsuccessful, the message is written to the dead-letter queue. If
there is no dead-letter queue available, the channel stops.
If you do not define a message-retry exit for a channel and a failure occurs that is
likely to be temporary, for example MQRC_Q_FULL, the MCA uses the
message-retry count and message-retry intervals set when the channel was defined.
If the failure is of a more permanent nature and you have not defined an exit
program to handle it, the message is written to the dead-letter queue.
The channel auto-definition exit can also be called when a request is received to
start a cluster-sender channel. It can be called for cluster-sender and
cluster-receiver channels to allow definition modification for this instance of the
channel. In this case, the exit also applies to WebSphere MQ for z/OS. A common
use of the channel auto-definition exit is to change the name of the security exit
(SCYEXIT) because exit names have different formats on different platforms. If no
channel auto-definition exit is specified, the default behavior on z/OS is to
examine a distributed exit name of the form [path]/libraryname(function) and
take up to 8 chars of function, if present, or libraryname, . For more information
about this, see WebSphere MQ Queue Manager Clusters.
MQCD contains the values that are used in the default channel definition if they
are not altered by the exit. The exit may modify only a subset of the fields; see
“MQ_CHANNEL_AUTO_DEF_EXIT – Channel auto-definition exit” on page 447.
However, attempting to change other fields does not cause an error.
If the channel definition does not contain a user-exit program name, the user exit is
not called.
The channel auto-definition exit is the property of the queue manager, not the
individual channel. In order for this exit to be called, it must be named in the
queue manager definition. To alter a queue manager definition, use the MQSC
command ALTER QMGR.
User exits and channel-exit programs are able to make use of all MQI calls, except
as noted in the sections that follow. To get the connection handle, an MQCONN
must be issued, even though a warning, MQRC_ALREADY_CONNECTED, is
returned because the channel itself is connected to the queue manager.
For exits on client-connection channels, the queue manager to which the exit tries
to connect, depends on how the exit was linked. If the exit was linked with
MQM.LIB (or QMQM/LIBMQM on i5/OS) and you do not specify a queue
manager name on the MQCONN call, the exit will try to connect to the default
queue manager on your system. If the exit was linked with MQM.LIB (or
QMQM/LIBMQM on i5/OS) and you specify the name of the queue manager that
was passed to the exit through the QMgrName field of MQCD, the exit tries to
connect to that queue manager. If the exit was linked with MQIC.LIB or any other
library, the MQCONN call will fail whether you specify a queue manager name or
not.
Note: You are recommended to avoid issuing the following MQI calls in
channel-exit programs:
v MQCMIT
v MQBACK
v MQBEGIN
v MQDISC
An exit runs in the same thread as the MCA itself and uses the same connection
handle. So, it runs inside the same UOW as the MCA and any calls made under
syncpoint are committed or backed out by the channel at the end of the batch.
Therefore, a channel message exit could send notification messages that will only
be committed to that queue when the batch containing the original message is
committed. So, it is possible to issue syncpoint MQI calls from a channel message
exit.
Channel-exit programs should not modify the Channel data structure (MQCD).
They can actually change the BatchSize parameter and a security exit can set the
MCAUserIdentifier parameter, but ChannelType and ChannelName must not be
changed.
All exits are called with a channel exit parameter structure (MQCXP), a channel
definition structure (MQCD), a prepared data buffer, data length parameter, and
buffer length parameter. The buffer length must not be exceeded:
v For message exits, you should allow for the largest message required to be sent
across the channel, plus the length of the MQXQH structure.
v For send and receive exits, the largest buffer you should allow for is as follows:
LU 6.2:
32 KB
TCP:
i5/OS 16 KB
Others 32 KB
Note: The maximum usable length may be 2 bytes less than this. Check the
value returned in MaxSegmentLength for details. For more information on
MaxSegmentLength, see “MaxSegmentLength (MQLONG)” on page 499.
NetBIOS:
64 KB
SPX:
64 KB
Note: Receive exits on sender channels and sender exits on receiver channels
use 2 KB buffers for TCP.
v For security exits, the distributed queuing facility allocates a buffer of 4000
bytes.
It is permissible for the exit to return an alternate buffer, together with the relevant
parameters. See Chapter 34, “Channel-exit programs,” on page 415 for call details.
Note: Before using a channel-exit program for the first time on WebSphere MQ for
AIX, iSeries, HP-UX, Solaris, or Windows systems, you should relink it with
threaded libraries to make it thread-safe.
The link-edited modules must be placed in the data set specified by the CSQXLIB
DD statement of the channel initiator address space procedure; the names of the
load modules are specified as the exit names in the channel definition.
When writing channel exits for z/OS, the following rules apply:
v Exits must be written in assembler or C; if C is used, it must conform to the C
systems programming environment for system exits, described in the z/OS
C/C++ Programming Guide.
v Exits are loaded from the non-authorized libraries defined by a CSQXLIB DD
statement. Providing CSQXLIB has DISP=SHR, exits can be updated while the
channel initiator is running, with the new version used when the channel is
restarted.
v Exits must be reentrant, and capable of running anywhere in virtual storage.
v Exits must reset the environment, on return, to that at entry.
v Exits must free any storage obtained, or ensure that it will be freed by a
subsequent exit invocation.
For storage that is to persist between invocations, use the z/OS STORAGE
service; there is no suitable service in C.
The following exit samples are provided with WebSphere MQ for z/OS:
CSQ4BAX0
This sample is written in assembler, and illustrates the use of MQXWAIT.
CSQ4BCX1 and CSQ4BCX2
These samples are written in C and illustrate how to access the parameters.
Observe the following conditions when creating and compiling an exit program:
v The program must be made thread safe and created with the C/400, ILE
RPG/400, or ILE COBOL/400 compiler. For ILE RPG you must specify the
THREAD(*SERIALIZE) control specification, and for ILE COBOL you must
specify SERIALIZE for the THREAD option of the PROCESS statement. The
programs must also be bound to the threaded WebSphere MQ libraries:
QMQM/LIBMQM_R in the case of C/400 and ILE RPG/400, and AMQ0STUB_R
in the case of ILE COBOL/400. For additional information about making RPG or
COBOL applications thread safe, refer to the appropriate Programmer’s Guide
for the language.
v WebSphere MQ for iSeries requires that the exit programs are enabled for
teraspace support. (Teraspace is a form of shared memory introduced in i5/OS
V4R4.) In the case of the ILE RPG and COBOL compilers, any programs
compiled on &os400; V4R4 or later are so enabled. In the case of C, the
programs must be compiled with the TERASPACE(*YES *TSIFC) options
specified on CRTCMOD or CRTBNDC commands.
v An exit returning a pointer to its own buffer space must ensure that the object
pointed to exists beyond the timespan of the channel-exit program. In other
words, the pointer cannot be the address of a variable on the program stack, nor
of a variable in the program heap. Instead, the pointer must be obtained from
the system. An example of this is a user space created in the user exit. To ensure
that any data area allocated by the channel-exit program is still available for the
MCA when the program ends, the channel exit must run in the caller’s
activation group or a named activation group. Do this by setting the ACTGRP
parameter on CRTPGM to a user-defined value or *CALLER. If the program is
created in this way, the channel-exit program can allocate dynamic memory and
pass a pointer to this memory back to the MCA.
You can override this value by specifying a full path name on the DEFINE
CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry
point in the library. Figure 84 on page 434 shows how to set up an entry to your
program:
#include <cmqc.h>
#include <cmqxc.h>
The pointers pParms and pChDef can then be dereferenced to access individual
fields.
When writing channel exits for these products using Visual C++, you should do
the following:
v Add MQMVX.LIB to project as a source file1.
v Change the box labelled “Use Run-Time Library” from “Multithreaded” to
“Multithreaded using DLL” in the project settings under C/C++ code
generation.
v Do not change the box labelled “Entry-Point Symbol”. This box can be found in
the project settings, under the Link tab, when you select Category and then
Output.
v Write your own .DEF file; an example of this is shown in Figure 85 on page 435.
1. MQMVX.LIB is used for data conversion and is not available on client products.
LIBRARY exit
PROTMODE
HEAPSIZE 4096
STACKSIZE 8192
EXPORTS Retry
The exit is a dynamically loaded object that must be written in C. To ensure that it
can be loaded when required, put 32-bit exits in /var/mqm/exits and 64-bit exits
in /var/mqm/exits64. These are the default paths for exits in the ExitPath stanza
of the ’qm.ini’ file or the ClientExitPath stanza of the ’mqs.ini’ file and can be
changed if required. Exits on the server use the ’qm.ini’ file, those on the client use
the ’mqs.ini’ file. Alternatively you can specify the full path name in the MQCD if
MQCONNX is used or in the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry
point in the module. Figure 86 shows how to set up an entry to your program:
#include <cmqc.h>
#include <cmqxc.h>
Figure 87 on page 436 shows the compiler and linker commands for channel-exit
programs on AIX.
Figure 87. Sample compiler and linker commands for channel exits on AIX
In this case exit is the library name and ChannelExit is the function name. The
export file is called exit.exp. These names are used by the channel definition to
reference the exit program using the format described in “Exit name fields” on
page 453. See also the MSGEXIT parameter of the Define Channel command in
WebSphere MQ Script (MQSC) Command Reference
#!
channelExit
MQStart
On the client, a 32-bit or 64-bit exit can be used. This must be linked to mqic_r.
The exit is a dynamically loaded object that must be written in C. To ensure that it
can be loaded when required, put 32-bit exits in /var/mqm/exits and 64-bit exits
in /var/mqm/exits64. These are the default paths for exits in the ExitPath stanza
of the ’qm.ini’ file or the ClientExitPath stanza of the ’mqs.ini’ file and can be
changed if required. Exits on the server use the ’qm.ini’ file, those on the client use
the ’mqs.ini’ file. Alternatively you can specify the full path name in the MQCD if
MQCONNX is used or in the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry
point in the module. Figure 89 on page 437 shows how to set up an entry to your
program:
#include <cmqc.h>
#include <cmqxc.h>
Figure 90 shows the compiler and linker commands for channel-exit programs on
HP-UX.
Figure 90. Sample compiler and linker commands for channel exits on HP-UX
In this case exit is the library name and ChannelExit is the function name. These
names are used by the channel definition to reference the exit program using the
format described in “Exit name fields” on page 453. See also the MSGEXIT
parameter of the Define Channel command in WebSphere MQ Script (MQSC)
Command Reference
On the client, a 32-bit or 64-bit exit can be used. This must be linked to mqic_r.
The exit is a dynamically loaded object that must be written in C. To ensure that it
can be loaded when required, put 32-bit exits in /var/mqm/exits and 64-bit exits
in /var/mqm/exits64. These are the default paths for exits in the ExitPath stanza
of the ’qm.ini’ file or the ClientExitPath stanza of the ’mqs.ini’ file and can be
changed if required. Exits on the server use the ’qm.ini’ file, those on the client use
the ’mqs.ini’ file. Alternatively you can specify the full path name in the MQCD if
MQCONNX is used or in the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry
point in the module. Figure 91 on page 438 shows how to set up an entry to your
program:
#include <cmqc.h>
#include <cmqxc.h>
Figure 92 shows the compiler and linker commands for channel-exit programs on
Solaris.
Figure 92. Sample compiler and linker commands for channel exits on Solaris
In this case exit is the library name and ChannelExit is the function name. These
names are used by the channel definition to reference the exit program using the
format described in “Exit name fields” on page 453. See also the MSGEXIT
parameter of the Define Channel command in WebSphere MQ Script (MQSC)
Command Reference
On the client, a 32-bit or 64-bit exit can be used. This must be linked to mqic_r.
The exit is a dynamically loaded object that must be written in C. To ensure that it
can be loaded when required, put 32-bit exits in /var/mqm/exits and 64-bit exits
in /var/mqm/exits64. These are the default paths for exits in the ExitPath stanza
of the ’qm.ini’ file or the ClientExitPath stanza of the ’mqs.ini’ file and can be
changed if required. Exits on the server use the ’qm.ini’ file, those on the client use
the ’mqs.ini’ file. Alternatively you can specify the full path name in the MQCD if
MQCONNX is used or in the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry
point in the module. Figure 93 on page 439 shows how to set up an entry to your
program:
#include <cmqc.h>
#include <cmqxc.h>
void MQStart() {;} /* dummy entry point */
void MQENTRY ChannelExit ( PMQVOID pChannelExitParms,
PMQVOID pChannelDefinition,
PMQLONG pDataLength,
PMQLONG pAgentBufferLength,
PMQVOID pAgentBuffer,
PMQLONG pExitBufferLength,
PMQPTR pExitBufferAddr)
{
... Insert code here
}
Figure 94 shows the compiler and linker commands for channel-exit programs on
Linux:
Figure 94. Sample compiler and linker commands for channel-exits on Linux platforms where
the queue manager is 64-bit
In this case exit is the library name and ChannelExit is the function name. These
names are used by the channel definition to reference the exit program using the
format described in “Exit name fields” on page 453. See also the MSGEXIT
parameter of the Define Channel command in WebSphere MQ Script (MQSC)
Command Reference
On the client, a 32-bit or 64-bit exit can be used. This must be linked to mqic_r. For
WebSphere MQ for Linux (x86 platform), if you use a 32-bit server platform, then
use the compiler and linker commands shown in Figure 95.
Figure 95. Sample compiler and linker commands for channel-exits on Linux platforms where
the queue manager is 32-bit
The security packages are loaded from either security.dll or secur32.dll. These
DLLs are supplied with your operating system.
The security exit program is supplied in source and object format. You can use the
object code as it is, or you can use the source code as a starting point to create
your own user-exit programs. For more information on using the object or source
code of the SSPI security exit, see WebSphere MQ Application Programming Guide
You cannot write WebSphere MQ user exits in TAL or Visual Basic. However, a
declaration for the MQCD structure is provided in Visual Basic for use on the
MQCONNX call from an MQ client program.
In a number of cases, parameters are arrays or character strings whose size is not
fixed. For these, a lowercase “n” is used to represent a numeric constant. When the
declaration for that parameter is coded, the “n” must be replaced by the numeric
value required. For further information about the conventions used in these
descriptions, see the WebSphere MQ Application Programming Reference book.
The parameters are similar for each type of exit, and the description given here
applies to all of them, except where specifically noted.
Syntax
MQ_CHANNEL_EXIT (ChannelExitParms, ChannelDefinition, DataLength,
AgentBufferLength, AgentBuffer, ExitBufferLength, ExitBufferAddr)
Parameters
The MQ_CHANNEL_EXIT call has the following parameters.
This structure contains additional information relating to the invocation of the exit.
The exit sets information in this structure to indicate how the MCA should
proceed.
This structure contains parameters set by the administrator to control the behavior
of the channel.
When the exit is invoked, this contains the length of data in the AgentBuffer
parameter. The exit must set this to the length of the data in either the AgentBuffer
or the ExitBufferAddr (as determined by the ExitResponse2 field in the
ChannelExitParms parameter) that is to proceed.
v For a channel send or channel receive exit, when the exit is invoked this
contains the length of the transmission. The exit must set this field to the length
of the transmission in either AgentBuffer or ExitBufferAddr that is to proceed.
If a security exit sends a message, and there is no security exit at the other end of
the channel, or the other end sets an ExitResponse of MQXCC_OK, the initiating
exit is re-invoked with MQXR_SEC_MSG and a null response (DataLength=0).
For channel message, send, and receive exits, any unused space on invocation can
be used by the exit to expand the data in place. If this is done, the DataLength
parameter must be set appropriately by the exit.
On the first invocation of the exit, this is set to zero. Thereafter whatever value is
passed back by the exit, on each invocation, is presented to the exit next time it is
invoked. The value is not used by the MCA.
This is a pointer to the address of a buffer of storage managed by the exit, where it
can choose to return message or transmission data (depending upon the type of
exit) to the agent if the agent’s buffer is or may not be large enough, or if it is
more convenient for the exit to do so.
On the first invocation of the exit, the address passed to the exit is null. Thereafter
whatever address is passed back by the exit, on each invocation, is presented to the
exit the next time it is invoked.
Usage notes
1. The function performed by the channel exit is defined by the provider of the
exit. The exit, however, must conform to the rules defined here and in the
associated control block, the MQCXP.
2. The ChannelDefinition parameter passed to the channel exit may be one of
several versions. See the Version field in the MQCD structure for more
information.
3. If the channel exit receives an MQCD structure with the Version field set to a
value greater than MQCD_VERSION_1, the exit should use the ConnectionName
field in MQCD, in preference to the ShortConnectionName field.
4. In general, channel exits are allowed to change the length of message data. This
may arise as a result of the exit adding data to the message, or removing data
from the message, or compressing or encrypting the message. However, special
restrictions apply if the message is a segment that contains only part of a
logical message. In particular, there must be no net change in the length of the
message as a result of the actions of complementary sending and receiving
exits.
For example, it is permissible for a sending exit to shorten the message by
compressing it, but the complementary receiving exit must restore the original
length of the message by decompressing it, so that there is no net change in the
length of the message.
This restriction arises because changing the length of a segment would cause
the offsets of later segments in the message to be incorrect, and this would
inhibit the queue manager’s ability to recognize that the segments formed a
complete logical message.
C invocation
exitname (&ChannelExitParms, &ChannelDefinition,
&DataLength, &AgentBufferLength, AgentBuffer,
&ExitBufferLength, &ExitBufferAddr);
COBOL invocation
CALL ’exitname’ USING CHANNELEXITPARMS, CHANNELDEFINITION,
DATALENGTH, AGENTBUFFERLENGTH, AGENTBUFFER,
EXITBUFFERLENGTH, EXITBUFFERADDR.
C* Agent buffer
C PARM ABUF n
C* Length of exit buffer
C PARM EBUFL 90
C* Address of exit buffer
C PARM EBUF 16
Syntax
MQ_CHANNEL_AUTO_DEF_EXIT (ChannelExitParms, ChannelDefinition)
Parameters
The MQ_CHANNEL_AUTO_DEF_EXIT call has the following parameters.
This structure contains additional information relating to the invocation of the exit.
The exit sets information in this structure to indicate how the MCA should
proceed.
This structure contains parameters set by the administrator to control the behavior
of channels which are created automatically. The exit sets information in this
structure to modify the default behavior set by the administrator.
The MQCD fields listed below must not be altered by the exit:
ChannelName
ChannelType
StrucLength
Version
If other fields are changed, the value set by the exit must be valid. If the value is
not valid, an error message is written to the error log file or displayed on the
console (as appropriate to the environment).
Usage notes
1. The function performed by the channel exit is defined by the provider of the
exit. The exit, however, must conform to the rules defined here and in the
associated control block, the MQCXP.
2. The ChannelExitParms parameter passed to the channel auto-definition exit is
an MQCXP structure. The version of MQCXP passed depends on the
environment in which the exit is running; see the description of the Version
field in “MQCXP – Channel exit parameter” on page 492 for details.
3. The ChannelDefinition parameter passed to the channel auto-definition exit is
an MQCD structure. The version of MQCD passed depends on the
environment in which the exit is running; see the description of the Version
field in “MQCD – Channel definition” on page 451 for details.
C invocation
exitname (&ChannelExitParms, &ChannelDefinition);
COBOL invocation
CALL ’exitname’ USING CHANNELEXITPARMS, CHANNELDEFINITION.
Syntax
MQXWAIT (Hconn, WaitDesc, CompCode, Reason)
Parameters
The MQXWAIT call has the following parameters.
This handle represents the connection to the queue manager. The value of Hconn
was returned by a previous MQCONN call issued in the same or earlier invocation
of the exit.
This describes the event to wait for. See “MQXWD – Exit wait descriptor” on page
509 for details of the fields in this structure.
If CompCode is MQCC_OK:
MQRC_NONE
(0, X’000’) No reason to report.
If CompCode is MQCC_FAILED:
MQRC_ADAPTER_NOT_AVAILABLE
(2204, X’89C’) Adapter not available.
MQRC_OPTIONS_ERROR
(2046, X’7FE’) Options not valid or not consistent.
MQRC_XWAIT_CANCELED
(2107, X’83B’) MQXWAIT call canceled.
MQRC_XWAIT_ERROR
(2108, X’83C’) Invocation of MQXWAIT call not valid.
For more information on these reason codes, see the WebSphere MQ Application
Programming Reference.
C invocation
MQXWAIT (Hconn, &WaitDesc, &CompCode, &Reason);
The MQCD structure contains the parameters which control execution of a channel.
It is passed to each channel exit that is called from a Message Channel Agent
(MCA). See MQ_CHANNEL_EXIT.
blanks to make it 10 bytes. The library name can be *LIBL except when
calling a channel auto-definition exit, in which case a fully qualified name
is required.
Fields
ChannelName (MQCHAR20)
Channel definition name.
There must be a channel definition of the same name at the remote machine to be
able to communicate.
Version (MQLONG)
Structure version number.
MQCD_VERSION_7
Version-7 channel definition structure.
The field has this value on WebSphere MQ Version 5 Release 3 in the
following environments: AIX, HP-UX, Solaris, Windows, and on
WebSphere MQ for z/OS Version 5 Release 3 and Version 5 Release 3.1.
MQCD_VERSION_8
Version-8 channel definition structure.
The field has this value on WebSphere MQ Version 6.0 on all platforms.
Fields that exist only in the more-recent versions of the structure are identified as
such in the descriptions of the fields. The following constant specifies the version
number of the current version:
MQCD_CURRENT_VERSION
Current version of channel definition structure.
The value of this constant depends on the environment (see above).
Note: When a new version of the MQCD structure is introduced, the layout of the
existing part is not changed. The exit should therefore check that the version
number is equal to or greater than the lowest version which contains the
fields that the exit needs to use.
ChannelType (MQLONG)
Channel type.
TransportType (MQLONG)
Transport type.
Note that the value will not have been checked if the channel was initiated from
the other end.
MQXPT_TCP
TCP/IP transport protocol.
MQXPT_NETBIOS
NetBIOS transport protocol.
This value is supported in the following environments: Windows.
MQXPT_SPX
SPX transport protocol.
This value is supported in the following environments: Windows, plus
WebSphere MQ clients connected to these systems.
Desc (MQCHAR64)
Channel description.
This is a field that may be used for descriptive commentary. The content of the
field is of no significance to Message Channel Agents. However, it should contain
only characters that can be displayed. It cannot contain any null characters; if
necessary, it is padded to the right with blanks. In a DBCS installation, the field
can contain DBCS characters (subject to a maximum field length of 64 bytes).
Note: If this field contains characters that are not in the queue manager’s character
set (as defined by the CodedCharSetId queue manager attribute), those
characters may be translated incorrectly if this field is sent to another queue
manager.
QMgrName (MQCHAR48)
Queue-manager name.
XmitQName (MQCHAR48)
Transmission queue name.
The name of the transmission queue from which messages are retrieved.
ShortConnectionName (MQCHAR20)
First 20 bytes of connection name.
Note: The name of this field was changed for MQCD_VERSION_2 and subsequent
versions of MQCD; the field was previously called ConnectionName.
MCAName (MQCHAR20)
Reserved.
ModeName (MQCHAR8)
LU 6.2 Mode name.
On i5/OS, z/OS, UNIX systems, and MQSeries for Windows, this field is always
blank. The information is contained in the communications Side Object instead.
TpName (MQCHAR64)
LU 6.2 transaction program name.
On i5/OS, z/OS, UNIX systems, and MQSeries for Windows, this field is always
blank. The information is contained in the communications Side Object instead.
BatchSize (MQLONG)
Batch size.
The maximum number of messages that can be sent through a channel before
synchronizing the channel.
DiscInterval (MQLONG)
Disconnect interval.
The maximum time in seconds for which the channel waits for a message to arrive
on the transmission queue, before terminating the channel. A value of zero causes
the MCA to wait indefinitely.
For server-connection channels using the TCP protocol, the interval represents the
client inactivity disconnect value, specified in seconds. If a server-connection has
received no communication from its partner client for this duration, it will
terminate the connection. The server-connection inactivity interval only applies
between MQ API calls from a client, so no client will be disconnected during a
long-running MQGET with wait call.
This attribute is not applicable for server-connection channels using protocols other
than TCP.
ShortRetryCount (MQLONG)
Short retry count.
This is the maximum number of attempts that are made to connect to the remote
machine, at intervals specified by ShortRetryInterval, before the (normally longer)
LongRetryCount and LongRetryInterval are used.
ShortRetryInterval (MQLONG)
Short retry wait interval.
LongRetryCount (MQLONG)
Long retry count.
This count is used after the count specified by ShortRetryCount has been
exhausted. It specifies the maximum number of further attempts that are made to
connect to the remote machine, at intervals specified by LongRetryInterval, before
logging an error to the operator.
LongRetryInterval (MQLONG)
Long retry wait interval.
SecurityExit (MQCHARn)
Channel security exit name.
See“Exit name fields” on page 453 for a description of the content of this field in
various environments.
MsgExit (MQCHARn)
Channel message exit name.
See “Exit name fields” on page 453 for a description of the content of this field in
various environments.
SendExit (MQCHARn)
Channel send exit name.
See “Exit name fields” on page 453 for a description of the content of this field in
various environments.
ReceiveExit (MQCHARn)
Channel receive exit name.
See “Exit name fields” on page 453 for a description of the content of this field in
various environments.
SeqNumberWrap (MQLONG)
Highest allowable message sequence number.
This value is non-negotiable and must match in both the local and remote channel
definitions.
MaxMsgLength (MQLONG)
Maximum message length.
Specifies the maximum message length that can be transmitted on the channel.
This is compared with the value for the remote channel and the actual maximum
is the lower of the two values.
PutAuthority (MQLONG)
Put authority.
Specifies whether the user identifier in the context information associated with a
message should be used to establish authority to put the message to the
destination queue.
MQPA_ALTERNATE_OR_MCA
The user ID from the UserIdentifier field of the message descriptor is used.
Any user ID received from the network is not used. This value is
supported only on z/OS.
MQPA_ONLY_MCA
The default user ID is used. Any user ID received from the network is not
used. This value is supported only on z/OS.
DataConversion (MQLONG)
Data conversion.
This specifies whether the sending message channel agent should attempt
conversion of the application message data if the receiving message channel agent
is unable to perform this conversion. This applies only to messages that are not
segments of logical messages; the MCA never attempts to convert messages which
are segments.
SecurityUserData (MQCHAR32)
Channel security exit user data.
This is passed to the channel security exit in the ExitData field of the
ChannelExitParms parameter (see MQ_CHANNEL_EXIT).
This field initially contains the data that was set in the channel definition.
However, during the lifetime of this MCA instance, any changes made to the
contents of this field by an exit of any type are preserved by the MCA, and made
visible to subsequent invocations of exits (regardless of type) for this MCA
instance. Such changes have no effect on the channel definition used by other
MCA instances. Any characters (including binary data) can be used.
MsgUserData (MQCHAR32)
Channel message exit user data.
This is passed to the channel message exit in the ExitData field of the
ChannelExitParms parameter (see MQ_CHANNEL_EXIT).
This field initially contains the data that was set in the channel definition.
However, during the lifetime of this MCA instance, any changes made to the
contents of this field by an exit of any type are preserved by the MCA, and made
visible to subsequent invocations of exits (regardless of type) for this MCA
instance. Such changes have no effect on the channel definition used by other
MCA instances. Any characters (including binary data) can be used.
SendUserData (MQCHAR32)
Channel send exit user data.
This is passed to the channel send exit in the ExitData field of the
ChannelExitParms parameter (see MQ_CHANNEL_EXIT).
This field initially contains the data that was set in the channel definition.
However, during the lifetime of this MCA instance, any changes made to the
contents of this field by an exit of any type are preserved by the MCA, and made
visible to subsequent invocations of exits (regardless of type) for this MCA
instance. Such changes have no effect on the channel definition used by other
MCA instances. Any characters (including binary data) can be used.
ReceiveUserData (MQCHAR32)
Channel receive exit user data.
This is passed to the channel receive exit in the ExitData field of the
ChannelExitParms parameter (see MQ_CHANNEL_EXIT).
This field initially contains the data that was set in the channel definition.
However, during the lifetime of this MCA instance, any changes made to the
contents of this field by an exit of any type are preserved by the MCA, and made
visible to subsequent invocations of exits (regardless of type) for this MCA
instance. Such changes have no effect on the channel definition used by other
MCA instances. Any characters (including binary data) can be used.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_2.
UserIdentifier (MQCHAR12)
User identifier.
This is used by the message channel agent when attempting to initiate a secure
SNA session with a remote message channel agent.
This field can be nonblank only on UNIX systems and Windows, and is relevant
only for channels with a ChannelType of MQCHT_SENDER, MQCHT_SERVER,
MQCHT_REQUESTER or MQCHT_CLNTCONN. On z/OS this field is not
relevant.
The length of this field is given by MQ_USER_ID_LENGTH, however only the first
10 characters are used.
Password (MQCHAR12)
Password.
This is used by the message channel agent when attempting to initiate a secure
SNA session with a remote message channel agent.
This field can be nonblank only on UNIX systems, and Windows, and is relevant
only for channels with a ChannelType of MQCHT_SENDER, MQCHT_SERVER,
MQCHT_REQUESTER or MQCHT_CLNTCONN. On z/OS this field is not
relevant.
MCAUserIdentifier (MQCHAR12)
First 12 bytes of MCA user identifier.
There are two fields that contain the MCA user identifier:
v MCAUserIdentifier contains the first 12 bytes of the MCA user identifier, and is
padded with blanks if the identifier is shorter than 12 bytes. MCAUserIdentifier
can be completely blank.
v LongMCAUserIdPtr points to the full MCA user identifier, which can be longer
than 12 bytes. Its length is given by LongMCAUserIdLength. The full identifier
contains no trailing blanks, and is not null-terminated. If the identifier is
completely blank, LongMCAUserIdLength is zero, and the value of
LongMCAUserIdPtr is undefined.
If the MCA user identifier is nonblank, it specifies the user identifier to be used by
the message channel agent for authorization to access WebSphere MQ resources,
including (if PutAuthority is MQPA_DEFAULT) authorization to put the message
to the destination queue for receiver or requester channels.
If the MCA user identifier is blank, the message channel agent uses its default user
identifier.
The MCA user identifier can be set by a security exit to indicate the user identifier
that the message channel agent should use. The exit can change either
MCAUserIdentifier, or the string pointed at by LongMCAUserIdPtr. If both are
changed but differ from each other, the MCA uses LongMCAUserIdPtr in preference
to MCAUserIdentifier. If the exit changes the length of the string addressed by
LongMCAUserIdPtr, LongMCAUserIdLength must be set correspondingly. If the exit
wishes to increase the length of the identifier, the exit must allocate storage of the
required length, set that storage to the required identifier, and place the address of
that storage in LongMCAUserIdPtr. The exit is responsible for freeing that storage
when the exit is later invoked with the MQXR_TERM reason.
The MCA user identifier is not relevant for channels with a ChannelType of
MQCHT_CLNTCONN.
This is an input/output field to the exit. The length of this field is given by
MQ_USER_ID_LENGTH. This field is not present when Version is less than
MQCD_VERSION_2.
Chapter 35. Channel-exit calls and data structures 463
MQCD – MCAType field
MCAType (MQLONG)
Message channel agent type.
ConnectionName (MQCHAR264)
Connection name.
When defining a channel, this field is not relevant for channels with a ChannelType
of MQCHT_SVRCONN or MQCHT_RECEIVER. However, when the channel
definition is passed to an exit, this field contains the address of the partner,
whatever the channel type.
RemoteUserIdentifier (MQCHAR12)
First 12 bytes of user identifier from partner.
There are two fields that contain the remote user identifier:
v RemoteUserIdentifier contains the first 12 bytes of the remote user identifier,
and is padded with blanks if the identifier is shorter than 12 bytes.
RemoteUserIdentifier can be completely blank.
v LongRemoteUserIdPtr points to the full remote user identifier, which can be
longer than 12 bytes. Its length is given by LongRemoteUserIdLength. The full
The remote user identifier is relevant only for channels with a ChannelType of
MQCHT_CLNTCONN or MQCHT_SVRCONN.
v For a security exit on an MQCHT_CLNTCONN channel, this is a user identifier
that has been obtained from the environment. The exit can choose to send it to
the security exit at the server.
v For a security exit on an MQCHT_SVRCONN channel, this field may contain a
user identifier which has been obtained from the environment at the client, if
there is no client security exit. The exit may validate this user ID (possibly in
conjunction with the password in RemotePassword) and update the value in
MCAUserIdentifier.
If there is a security exit at the client, then this information can be obtained in a
security flow from the client.
RemotePassword (MQCHAR12)
Password from partner.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_3.
MsgRetryExit (MQCHARn)
Channel message retry exit name.
The message retry exit is an exit that is invoked by the MCA when the MCA
receives a completion code of MQCC_FAILED from an MQOPEN or MQPUT call.
The purpose of the exit is to specify a time interval for which the MCA should
wait before retrying the MQOPEN or MQPUT operation. Alternatively, the exit can
decide that the operation should not be retried.
The exit is invoked for all reason codes that have a completion code of
MQCC_FAILED — it is up to the exit to decide which reason codes it wants the
MCA to retry, for how many attempts, and at what time intervals.
When the exit decides that the operation should not be retried any more, the MCA
performs its normal failure processing; this includes generating an exception report
message (if specified by the sender), and either placing the original message on the
dead-letter queue or discarding the message (according to whether the sender
specified MQRO_DEAD_LETTER_Q or MQRO_DISCARD_MSG, respectively).
Note that failures involving the dead-letter queue (for example, dead-letter queue
full) do not cause the message-retry exit to be invoked.
If the exit name is nonblank, the exit is called at the following times:
v Immediately before performing the wait prior to retrying a message
v At initialization and termination of the channel
See “Exit name fields” on page 453 for a description of the content of this field in
various environments.
MsgRetryUserData (MQCHAR32)
Channel message retry exit user data.
This is passed to the channel message-retry exit in the ExitData field of the
ChannelExitParms parameter (see MQ_CHANNEL_EXIT).
This field initially contains the data that was set in the channel definition.
However, during the lifetime of this MCA instance, any changes made to the
contents of this field by an exit of any type are preserved by the MCA, and made
visible to subsequent invocations of exits (regardless of type) for this MCA
instance. Such changes have no effect on the channel definition used by other
MCA instances. Any characters (including binary data) can be used.
MsgRetryCount (MQLONG)
Number of times MCA will try to put the message, after the first attempt has
failed.
This indicates the number of times that the MCA will retry the open or put
operation, if the first MQOPEN or MQPUT fails with completion code
MQCC_FAILED. The effect of this attribute depends on whether MsgRetryExit is
blank or nonblank:
v If MsgRetryExit is blank, the MsgRetryCount attribute controls whether the MCA
attempts retries. If the attribute value is zero, no retries are attempted. If the
attribute value is greater than zero, the retries are attempted at intervals given
by the MsgRetryInterval attribute.
Retries are attempted only for the following reason codes:
MQRC_PAGESET_FULL
MQRC_PUT_INHIBITED
MQRC_Q_FULL
For other reason codes, the MCA proceeds immediately to its normal failure
processing, without retrying the failing message.
v If MsgRetryExit is nonblank, the MsgRetryCount attribute has no effect on the
MCA; instead it is the message-retry exit which determines how many times the
retry is attempted, and at what intervals; the exit is invoked even if the
MsgRetryCount attribute is zero.
The MsgRetryCount attribute is made available to the exit in the MQCD structure,
but the exit it not required to honor it — retries continue indefinitely until the
exit returns MQXCC_SUPPRESS_FUNCTION in the ExitResponse field of
MQCXP.
MsgRetryInterval (MQLONG)
Minimum interval in milliseconds after which the open or put operation will be
retried.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_4.
HeartbeatInterval (MQLONG)
Time in seconds between heartbeat flows.
passed from the sending MCA when there are no messages on the transmission
queue. This gives the receiving MCA the opportunity to quiesce the channel. To
be useful, HeartbeatInterval should be significantly less than DiscInterval.
v For a channel type of MQCHT_CLNTCONN or MQCHT_SVRCONN, this is the
time in seconds between heartbeat flows passed from the server MCA when that
MCA has issued an MQGET call with the MQGMO_WAIT option on behalf of a
client application. This allows the server MCA to handle situations where the
client connection fails during an MQGET with MQGMO_WAIT.
The value is in the range 0 through 999 999. A value of 0 means that no heartbeat
exchange occurs. The value that is actually used is the larger of the values
specified at the sending side and receiving side.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
BatchInterval (MQLONG)
Batch duration.
This is the approximate time in milliseconds that a channel will keep a batch open,
if fewer than BatchSize messages have been transmitted in the current batch.
This is an input field to the exit. The field is not present when Version is less than
MQCD_VERSION_4.
NonPersistentMsgSpeed (MQLONG)
Speed at which nonpersistent messages are sent.
This specifies the speed at which nonpersistent messages travel through the
channel.
these messages will not be lost if there is a channel failure. Also, persistent
and nonpersistent messages on the same transmission queue maintain their
order relative to each other.
MQNPMS_FAST
Fast speed.
If a channel is defined to be MQNPMS_FAST, nonpersistent messages
travel through the channel at fast speed. This improves the throughput of
the channel, but means that nonpersistent messages will be lost if there is a
channel failure. Also, it is possible for nonpersistent messages to jump
ahead of persistent messages waiting on the same transmission queue, that
is, the order of nonpersistent messages is not maintained relative to
persistent messages. However the order of nonpersistent messages relative
to each other is maintained. Similarly, the order of persistent messages
relative to each other is maintained.
StrucLength (MQLONG)
Length of MQCD structure.
This is the length in bytes of the MQCD structure. The length does not include any
of the strings addressed by pointer fields contained within the structure. The value
is one of the following:
MQCD_LENGTH_4
Length of version-4 channel definition structure.
MQCD_LENGTH_5
Length of version-5 channel definition structure.
MQCD_LENGTH_6
Length of version-6 channel definition structure.
MQCD_LENGTH_7
Length of version-7 channel definition structure.
MQCD_LENGTH_8
Length of version-8 channel definition structure.
ExitNameLength (MQLONG)
Length of exit name.
This is the length in bytes of each of the names in the lists of exit names addressed
by the MsgExitPtr, SendExitPtr, and ReceiveExitPtr fields. This length is not
necessarily the same as MQ_EXIT_NAME_LENGTH.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
ExitDataLength (MQLONG)
Length of exit user data.
This is the length in bytes of each of the user data items in the lists of exit user
data items addressed by the MsgUserDataPtr, SendUserDataPtr, and
ReceiveUserDataPtr fields. This length is not necessarily the same as
MQ_EXIT_DATA_LENGTH.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
MsgExitsDefined (MQLONG)
Number of message exits defined.
This is the number of channel message exits in the chain. It is greater than or equal
to zero.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
SendExitsDefined (MQLONG)
Number of send exits defined.
This is the number of channel send exits in the chain. It is greater than or equal to
zero.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
ReceiveExitsDefined (MQLONG)
Number of receive exits defined.
This is the number of channel receive exits in the chain. It is greater than or equal
to zero.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
MsgExitPtr (MQPTR)
Address of first MsgExit field.
If MsgExitsDefined is greater than zero, this is the address of the list of names of
each channel message exit in the chain.
Each name is in a field of length ExitNameLength, padded to the right with blanks.
There are MsgExitsDefined fields adjoining one another – one for each exit.
Any changes made to these names by an exit are preserved, although the message
channel exit takes no explicit action – it does not change which exits are invoked.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
MsgUserDataPtr (MQPTR)
Address of first MsgUserData field.
If MsgExitsDefined is greater than zero, this is the address of the list of user data
items for each channel message exit in the chain.
Each user data item is in a field of length ExitDataLength, padded to the right
with blanks. There are MsgExitsDefined fields adjoining one another – one for each
exit. If the number of user data items defined is less than the number of exit
names, undefined user data items are set to blanks. Conversely, if the number of
user data items defined is greater than the number of exit names, the excess user
data items are ignored and not presented to the exit.
Any changes made to these values by an exit are preserved. This allows one exit to
pass information to another exit. No validation is carried out on any changes so,
for example, binary data can be written to these fields if required.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
SendExitPtr (MQPTR)
Address of first SendExit field.
If SendExitsDefined is greater than zero, this is the address of the list of names of
each channel send exit in the chain.
Each name is in a field of length ExitNameLength, padded to the right with blanks.
There are SendExitsDefined fields adjoining one another – one for each exit.
Any changes made to these names by an exit are preserved, although the message
send exit takes no explicit action – it does not change which exits are invoked.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
SendUserDataPtr (MQPTR)
Address of first SendUserData field.
If SendExitsDefined is greater than zero, this is the address of the list of user data
items for each channel message exit in the chain.
Each user data item is in a field of length ExitDataLength, padded to the right
with blanks. There are MsgExitsDefined fields adjoining one another – one for each
exit. If the number of user data items defined is less than the number of exit
names, undefined user data items are set to blanks. Conversely, if the number of
user data items defined is greater than the number of exit names, the excess user
data items are ignored and not presented to the exit.
Any changes made to these values by an exit are preserved. This allows one exit to
pass information to another exit. No validation is carried out on any changes so,
for example, binary data can be written to these fields if required.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
ReceiveExitPtr (MQPTR)
Address of first ReceiveExit field.
If ReceiveExitsDefined is greater than zero, this is the address of the list of names
of each channel receive exit in the chain.
Each name is in a field of length ExitNameLength, padded to the right with blanks.
There are ReceiveExitsDefined fields adjoining one another – one for each exit.
Any changes made to these names by an exit are preserved, although the message
channel exit takes no explicit action – it does not change which exits are invoked.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
ReceiveUserDataPtr (MQPTR)
Address of first ReceiveUserData field.
If ReceiveExitsDefined is greater than zero, this is the address of the list of user
data item for each channel receive exit in the chain.
Each user data item is in a field of length ExitDataLength, padded to the right
with blanks. There are ReceiveExitsDefined fields adjoining one another – one for
each exit. If the number of user data items defined is less than the number of exit
names, undefined user data items are set to blanks. Conversely, if the number of
user data items defined is greater than the number of exit names, the excess user
data items are ignored and not presented to the exit.
Any changes made to these values by an exit are preserved. This allows one exit to
pass information to another exit. No validation is carried out on any changes so,
for example, binary data can be written to these fields if required.
On platforms where the programming language does not support the pointer data
type, this field is declared as a byte string of the appropriate length.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_4.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_5.
ClusterPtr (MQPTR)
Address of a list of cluster names.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_5.
ClustersDefined (MQLONG)
Number of clusters to which the channel belongs.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_5.
NetworkPriority (MQLONG)
Network priority.
This is the priority of the network connection for this channel. When multiple
paths to a particular destination are available, the path with the highest priority is
chosen. The value is in the range 0 through 9; 0 is the lowest priority.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_5.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_6.
LongMCAUserIdLength (MQLONG)
Length of long MCA user identifier.
This is the length in bytes of the full MCA user identifier pointed to by
LongMCAUserIdPtr.
This is an input/output field to the exit. The field is not present if Version is less
than MQCD_VERSION_6.
LongRemoteUserIdLength (MQLONG)
Length of long remote user identifier.
This is the length in bytes of the full remote user identifier pointed to by
LongRemoteUserIdPtr.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_6.
LongMCAUserIdPtr (MQPTR)
Address of long MCA user identifier.
If LongMCAUserIdLength is greater than zero, this is the address of the full MCA
user identifier. The length of the full identifier is given by LongMCAUserIdLength.
The first 12 bytes of the MCA user identifier are also contained in the field
MCAUserIdentifier.
See the description of the MCAUserIdentifier field for details of the MCA user
identifier.
This is an input/output field to the exit. The field is not present if Version is less
than MQCD_VERSION_6.
LongRemoteUserIdPtr (MQPTR)
Address of long remote user identifier.
See the description of the RemoteUserIdentifier field for details of the remote user
identifier.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_6.
MCASecurityId (MQBYTE40)
MCA security identifier.
MQSID_NONE
No security identifier specified.
The value is binary zero for the length of the field.
For the C programming language, the constant MQSID_NONE_ARRAY is
also defined; this has the same value as MQSID_NONE, but is an array of
characters instead of a string.
This is an input/output field to the exit. The length of this field is given by
MQ_SECURITY_ID_LENGTH. This field is not present if Version is less than
MQCD_VERSION_6.
RemoteSecurityId (MQBYTE40)
Remote security identifier.
This is an input field to the exit. The length of this field is given by
MQ_SECURITY_ID_LENGTH. This field is not present if Version is less than
MQCD_VERSION_6.
The following fields in this structure are not present if Version is less than
MQCD_VERSION_7.
SSLCipherSpec (MQCHAR32)
SSL CipherSpec is an optional field.
This parameter is valid for all channel types. It is supported on AIX, HP-UX,
Linux, i5/OS, Solaris, Windows, and z/OS. It is valid only for channel types of a
transport type (TRPTYPE) of TCP.
This is an input field to the exit. The length of this field is given by
MQ_SSL_CIPHER_SPEC_LENGTH. The field is not present if Version is less than
MQCD_VERSION_7.
SSLPeerNamePtr (MQPTR)
Address of the SSL peer name.
the local user’s channel definition. If a security exit is specified at this end of the
channel it will receive the Distinguished Name from the peer certificate in the
MQCD.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_7.
SSLPeerNameLength (MQLONG)
Length of SSL peer name.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_7.
SSLClientAuth (MQLONG)
Determines whether SSL client authentication is required.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_7.
KeepAliveInterval (MQLONG)
Keepalive interval.
This is the value passed to the communications stack for keepalive timing for the
channel. The value is applicable for the TCP/IP and SPX communications
protocols, though not all implementations support this parameter.
The value is in the range 0 through 99 999; the units are seconds. A value of zero
indicates that channel keepalive is not enabled, although keepalive may still occur
if TCP/IP keepalive (rather than channel keepalive) is enabled. The following
special value is also valid:
MQKAI_AUTO
Automatic.
This indicates that the keepalive interval is calculated from the negotiated
heartbeat interval, as follows:
v If the negotiated heartbeat interval is greater than zero, the keepalive
interval that is used is the heartbeat interval plus 60 seconds.
v If the negotiated heartbeat interval is zero, the keepalive interval that is
used is zero.
v On z/OS, TCP/IP keepalive occurs when TCPKEEP(YES) is specified on the
queue manager object.
v In other environments, TCP/IP keepalive occurs when the KEEPALIVE=YES
parameter is specified in the TCP stanza in the distributed queuing
configuration file.
This field is relevant only for channels that have a TransportType of MQXPT_TCP
or MQXPT_SPX.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_7.
LocalAddress (MQCHAR48)
Local communications address.
This is the local TCP/IP address defined for the channel for outbound
communications, or blank if no specific address is defined for outbound
communications. The address can optionally include a port number or range of
port numbers. The format of this address is:
[ip-addr][(low-port[,high-port])]
This field is relevant only for channels with a TransportType of MQXPT_TCP, and
a ChannelType of MQCHT_SENDER, MQCHT_SERVER, MQCHT_REQUESTER,
MQCHT_CLNTCONN, MQCHT_CLUSSDR, or MQCHT_CLUSRCVR.
BatchHeartbeat (MQLONG)
Batch heartbeat interval.
This specifies the time interval that is used to trigger a batch heartbeat for the
channel. Batch heartbeating allows sender channels to determine whether the
remote channel instance is still active before going indoubt. A batch heartbeat
occurs if a sender channel has not communicated with the remote channel instance
within the specified time interval.
The value is in the range 0 through 999 999; the units are milliseconds. A value of
zero indicates that batch heartbeating is not enabled.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_7.
The list of header data compression techniques which are supported by the
channel.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_8.
The list of message data compression techniques which are supported by the
channel.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_8.
CLWLChannelRank (MQLONG)
Cluster workload channel rank.
The workload manager choose algorithm selects a destination with the highest
rank. When the final destination is a queue manager on a different cluster, you can
set the rank of intermediate gateway queue managers (at the intersection of
neighbouring clusters) so the choose algorithm will correctly choose a destination
queue manager nearer the final destination.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_8.
CLWLChannelPriority (MQLONG)
Cluster workload channel priority.
The workload manager choose algorithm selects a destination with the highest
priority from the set of destinations selected on the basis of rank. If there are two
possible destination queue managers, this attribute can be used to make one queue
manager failover onto the other queue manager. All the messages will go to the
queue manager with the highest priority until that ends, then the messages will go
to the queue manager with the next highest priority.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_8.
CLWLChannelWeight (MQLONG)
Cluster workload channel weight.
The workload manager choose algorithm will use the channel’s ″weight″ attribute
to the skew the destination choice so that more messages can be sent to a
particular machine. For example, you can give a channel on a large Unix server a
larger ″weight″ than another channel on small desktop PC, and the choose
algorithm will choose the Unix server more frequently than the PC.
This is an input field to the exit. The field is not present if Version is less than
MQCD_VERSION_8.
ChannelMonitoring (MQLONG)
The current level of Monitoring data collection for the channel.
This is an input field to the exit. It is not present if Version is less than
MQCD_VERSION_8.
ChannelStatistics (MQLONG)
The current level of Statistics data collection for the channel.
v MQMON_OFF
v MQMON_LOW
v MQMON_MEDIUM
v MQMON_HIGH
This is an input field to the exit. It is not present if Version is less than
MQCD_VERSION_8.
C declaration
typedef struct tagMQCD MQCD;
struct tagMQCD {
MQCHAR ChannelName[20]; /* Channel definition name */
MQLONG Version; /* Structure version number */
MQLONG ChannelType; /* Channel type */
MQLONG TransportType; /* Transport type */
MQCHAR Desc[64]; /* Channel description */
MQCHAR QMgrName[48]; /* Queue-manager name */
MQCHAR XmitQName[48]; /* Transmission queue name */
MQCHAR ShortConnectionName[20]; /* First 20 bytes of connection
name */
MQCHAR MCAName[20]; /* Reserved */
MQCHAR ModeName[8]; /* LU 6.2 Mode name */
MQCHAR TpName[64]; /* LU 6.2 transaction program
name */
MQLONG BatchSize; /* Batch size */
MQLONG DiscInterval; /* Disconnect interval */
MQLONG ShortRetryCount; /* Short retry count */
MQLONG ShortRetryInterval; /* Short retry wait interval */
MQLONG LongRetryCount; /* Long retry count */
MQLONG LongRetryInterval; /* Long retry wait interval */
MQCHAR SecurityExit[n]; /* Channel security exit name */
MQCHAR MsgExit[n]; /* Channel message exit name */
MQCHAR SendExit[n]; /* Channel send exit name */
MQCHAR ReceiveExit[n]; /* Channel receive exit name */
MQLONG SeqNumberWrap; /* Highest allowable message
sequence number */
MQLONG MaxMsgLength; /* Maximum message length */
MQLONG PutAuthority; /* Put authority */
MQLONG DataConversion; /* Data conversion */
MQCHAR SecurityUserData[32]; /* Channel security exit user
data */
MQCHAR MsgUserData[32]; /* Channel message exit user
data */
MQCHAR SendUserData[32]; /* Channel send exit user data */
MQCHAR ReceiveUserData[32]; /* Channel receive exit user
data */
MQCHAR UserIdentifier[12]; /* User identifier */
MQCHAR Password[12]; /* Password */
MQCHAR MCAUserIdentifier[12]; /* First 12 bytes of MCA user
identifier */
MQLONG MCAType; /* Message channel agent type */
MQCHAR ConnectionName[264]; /* Connection name */
MQCHAR RemoteUserIdentifier[12]; /* First 12 bytes of user
identifier from partner */
MQCHAR RemotePassword[12]; /* Password from partner */
MQCHAR MsgRetryExit[n]; /* Channel message retry exit
name */
MQCHAR MsgRetryUserData[32]; /* Channel message retry exit
user data */
MQLONG MsgRetryCount; /* Number of times MCA will try
to put the message, after the
first attempt has failed */
MQLONG MsgRetryInterval; /* Minimum interval in
milliseconds after which the
COBOL declaration
** MQCD structure
10 MQCD.
** Channel definition name
15 MQCD-CHANNELNAME PIC X(20).
I B 29 320CDTRT
I* Channel description
I 33 96 CDDES
I* Queue-manager name
I 97 144 CDQM
I* Transmission queue name
I 145 192 CDXQ
I* First 20 bytes of connection name
I 193 212 CDSCN
I* Reserved
I 213 232 CDMCA
I* LU 6.2 Mode name
I 233 240 CDMOD
I* LU 6.2 transaction program name
I 241 304 CDTP
I* Batch size
I B 305 3080CDBS
I* Disconnect interval
I B 309 3120CDDI
I* Short retry count
I B 313 3160CDSRC
I* Short retry wait interval
I B 317 3200CDSRI
I* Long retry count
I B 321 3240CDLRC
I* Long retry wait interval
I B 325 3280CDLRI
I* Channel security exit name
I 329 348 CDSCX
I* Channel message exit name
I 349 368 CDMSX
I* Channel send exit name
I 369 388 CDSNX
I* Channel receive exit name
I 389 408 CDRCX
I* Highest allowable message sequence number
I B 409 4120CDSNW
I* Maximum message length
I B 413 4160CDMML
I* Put authority
I B 417 4200CDPA
I* Data conversion
I B 421 4240CDDC
I* Channel security exit user data
I 425 456 CDSCD
I* Channel message exit user data
I 457 488 CDMSD
I* Channel send exit user data
I 489 520 CDSND
I* Channel receive exit user data
I 521 552 CDRCD
I* User identifier
I 553 564 CDUID
I* Password
I 565 576 CDPW
I* First 12 bytes of MCA user identifier
I 577 588 CDAUI
I* Message channel agent type
I B 589 5920CDCAT
I* Connection name (characters 1 through 256)
I 593 848 CDCON
I* Connection name (characters 257 through 264)
I 849 856 CDCN2
I* First 12 bytes of user identifier from partner
I 857 868 CDRUI
I* Password from partner
I 869 880 CDRPW
* sequence number
MQCD_MAXMSGLENGTH DS F Maximum message length
MQCD_PUTAUTHORITY DS F Put authority
MQCD_DATACONVERSION DS F Data conversion
MQCD_SECURITYUSERDATA DS CL32 Channel security exit user data
MQCD_MSGUSERDATA DS CL32 Channel message exit user data
MQCD_SENDUSERDATA DS CL32 Channel send exit user data
MQCD_RECEIVEUSERDATA DS CL32 Channel receive exit user data
MQCD_USERIDENTIFIER DS CL12 User identifier
MQCD_PASSWORD DS CL12 Password
MQCD_MCAUSERIDENTIFIER DS CL12 First 12 bytes of MCA user
* identifier
MQCD_MCATYPE DS F Message channel agent type
MQCD_CONNECTIONNAME DS CL264 Connection name
MQCD_REMOTEUSERIDENTIFIER DS CL12 First 12 bytes of user
* identifier from partner
MQCD_REMOTEPASSWORD DS CL12 Password from partner
MQCD_MSGRETRYEXIT DS CLn Channel message retry exit name
MQCD_MSGRETRYUSERDATA DS CL32 Channel message retry exit user
* data
MQCD_MSGRETRYCOUNT DS F Number of times MCA will try to
* put the message, after the
* first attempt has failed
MQCD_MSGRETRYINTERVAL DS F Minimum interval in
* milliseconds after which the
* open or put operation will be
* retried
MQCD_HEARTBEATINTERVAL DS F Time in seconds between
* heartbeat flows
MQCD_BATCHINTERVAL DS F Batch duration
MQCD_NONPERSISTENTMSGSPEED DS F Speed at which nonpersistent
* messages are sent
MQCD_STRUCLENGTH DS F Length of MQCD structure
MQCD_EXITNAMELENGTH DS F Length of exit name
MQCD_EXITDATALENGTH DS F Length of exit user data
MQCD_MSGEXITSDEFINED DS F Number of message exits defined
MQCD_SENDEXITSDEFINED DS F Number of send exits defined
MQCD_RECEIVEEXITSDEFINED DS F Number of receive exits defined
MQCD_MSGEXITPTR DS F Address of first MSGEXIT field
MQCD_MSGUSERDATAPTR DS F Address of first MSGUSERDATA
* field
MQCD_SENDEXITPTR DS F Address of first SENDEXIT field
MQCD_SENDUSERDATAPTR DS F Address of first SENDUSERDATA
* field
MQCD_RECEIVEEXITPTR DS F Address of first RECEIVEEXIT
* field
MQCD_RECEIVEUSERDATAPTR DS F Address of first
* RECEIVEUSERDATA field
MQCD_CLUSTERPTR DS F Address of a list of cluster
* names
MQCD_CLUSTERSDEFINED DS F Number of clusters to which the
* channel belongs
MQCD_NETWORKPRIORITY DS F Network priority
MQCD_LONGMCAUSERIDLENGTH DS F Length of long MCA user
* identifier
MQCD_LONGREMOTEUSERIDLENGTH DS F Length of long remote user
* identifier
MQCD_LONGMCAUSERIDPTR DS F Address of long MCA user
* identifier
MQCD_LONGREMOTEUSERIDPTR DS F Address of long remote user
* identifier
MQCD_MCASECURITYID DS XL40 MCA security identifier
MQCD_REMOTESECURITYID DS XL40 Remote security identifier
MQCD_SSLCIPHERSPEC DS CL32 SSL CipherSpec
MQCD_SSLPEERNAMEPTR DS F Address of SSL peer name
MQCD_SSLPEERNAMELENGTH DS F Length of SSL peer name
MQCD_SSLCLIENTAUTH DS F Whether SSL client
* authentication is required
MQCD_KEEPALIVEINTERVAL DS F Keepalive interval
MQCD_LOCALADDRESS DS CL48 Local communications address
MQCD_BATCHHEARTBEAT DS F Batch heartbeat interval
MQCD_HDRCOMPLIST DS CL2 Header data compression list
MQCD_MSGCOMPLIST DS CL16 Message data compression list
MQCD_CLWLCHANNELRANK DS F Channel rank
MQCD_CLWLCHANNELPRIORITY DS F Channel priority
MQCD_CLWLCHANNELWEIGHT DS F Channel weight
MQCD_CHANNELMONITORING DS F Channel monitoring
MQCD_CHANNELSTATISTICS DS F Channel statistics
*
MQCD_LENGTH EQU *-MQCD
ORG MQCD
MQCD_AREA DS CL(MQCD_LENGTH)
The MQCXP structure is passed to each type of exit called by a Message Channel
Agent (MCA). See MQ_CHANNEL_EXIT.
The fields described as “input to the exit” in the descriptions that follow are
ignored by the MCA when the exit returns control to the MCA. The exit should
not expect that any input fields that it changes in the channel exit parameter block
will be preserved for its next invocation. Changes made to input/output fields (for
example, the ExitUserArea field), are preserved for invocations of that instance of
the exit only. Such changes cannot be used to pass data between different exits
defined on the same channel, or between the same exit defined on different
channels.
Fields
StrucId (MQCHAR4)
Structure identifier.
Version (MQLONG)
Structure version number.
Fields that exist only in the more-recent versions of the structure are identified as
such in the descriptions of the fields. The following constant specifies the version
number of the current version:
MQCXP_CURRENT_VERSION
Current version of channel exit parameter structure.
Note: When a new version of the MQCXP structure is introduced, the layout of
the existing part is not changed. The exit should therefore check that the
version number is equal to or greater than the lowest version which contains
the fields that the exit needs to use.
ExitId (MQLONG)
Type of exit.
This indicates the type of exit being called, and is set on entry to the exit routine.
Possible values are:
MQXT_CHANNEL_SEC_EXIT
Channel security exit.
MQXT_CHANNEL_MSG_EXIT
Channel message exit.
MQXT_CHANNEL_SEND_EXIT
Channel send exit.
MQXT_CHANNEL_RCV_EXIT
Channel receive exit.
MQXT_CHANNEL_MSG_RETRY_EXIT
Channel message-retry exit.
MQXT_CHANNEL_AUTO_DEF_EXIT
Channel auto-definition exit.
On z/OS, this type of exit is supported only for channels of type
MQCHT_CLUSSDR and MQCHT_CLUSRCVR.
ExitReason (MQLONG)
Reason for invoking exit.
This indicates the reason why the exit is being called, and is set on entry to the exit
routine. It is not used by the auto-definition exit. Possible values are:
MQXR_INIT
Exit initialization.
This indicates that the exit is being invoked for the first time. It allows the
exit to acquire and initialize any resources that it may need (for example:
main storage).
MQXR_TERM
Exit termination.
This indicates that the exit is about to be terminated. The exit should free
any resources that it may have acquired since it was initialized (for
example: main storage).
MQXR_MSG
Process a message.
This indicates that the exit is being invoked to process a message. This
occurs for channel message exits only.
MQXR_XMIT
Process a transmission.
This occurs for channel send and receive exits only.
MQXR_SEC_MSG
Security message received.
This occurs for channel security exits only.
MQXR_INIT_SEC
Initiate security exchange.
This occurs for channel security exits only.
The receiver’s security exit is always invoked with this reason immediately
after being invoked with MQXR_INIT, to give it the opportunity to initiate
a security exchange. If it declines the opportunity (by returning
MQXCC_OK instead of MQXCC_SEND_SEC_MSG or
MQXCC_SEND_AND_REQUEST_SEC_MSG), the sender’s security exit is
invoked with MQXR_INIT_SEC.
If the receiver’s security exit does initiate a security exchange (by returning
MQXCC_SEND_SEC_MSG or
MQXCC_SEND_AND_REQUEST_SEC_MSG), the sender’s security exit is
never invoked with MQXR_INIT_SEC; instead it is invoked with
MQXR_SEC_MSG to process the receiver’s message. (In either case it is
first invoked with MQXR_INIT.)
Unless one of the security exits requests termination of the channel (by
setting ExitResponse to MQXCC_SUPPRESS_FUNCTION or
MQXCC_CLOSE_CHANNEL), the security exchange must complete at the
side that initiated the exchange. Therefore, if a security exit is invoked with
MQXR_INIT_SEC and it does initiate an exchange, the next time the exit is
invoked it will be with MQXR_SEC_MSG. This happens whether or not
there is a security message for the exit to process. There will be a security
message if the partner returns MQXCC_SEND_SEC_MSG or
MQXCC_SEND_AND_REQUEST_SEC_MSG, but not if the partner returns
MQXCC_OK or there is no security exit at the partner. If there is no
security message to process, the security exit at the initiating end is
re-invoked with a DataLength of zero.
MQXR_RETRY
Retry a message.
This occurs for message-retry exits only.
MQXR_AUTO_CLUSSDR
Automatic definition of a cluster-sender channel.
This occurs for channel auto-definition exits only.
MQXR_AUTO_RECEIVER
Automatic definition of a receiver channel.
This occurs for channel auto-definition exits only.
MQXR_AUTO_SVRCONN
Automatic definition of a server-connection channel.
This occurs for channel auto-definition exits only.
MQXR_AUTO_CLUSRCVR
Automatic definition of a cluster-receiver channel.
ExitResponse (MQLONG)
Response from exit.
This is set by the exit to communicate with the MCA. It must be one of the
following:
MQXCC_OK
Exit completed successfully.
v For the channel security exit, this indicates that message transfer should
now proceed normally.
v For the channel message retry exit, this indicates that the MCA should
wait for the time interval returned by the exit in the MsgRetryInterval
field in MQCXP, and then retry the message.
The ExitResponse2 field may contain additional information.
MQXCC_SUPPRESS_FUNCTION
Suppress function.
v For the channel security exit, this indicates that the channel should be
terminated.
v For the channel message exit, this indicates that the message is not to
proceed any further towards its destination. Instead the MCA generates
an exception report message (if one was requested by the sender of the
original message), and places the message contained in the original
buffer on the dead-letter queue (if the sender specified
MQRO_DEAD_LETTER_Q), or discards it (if the sender specified
MQRO_DISCARD_MSG).
For persistent messages, if the sender specified
MQRO_DEAD_LETTER_Q, but the put to the dead-letter queue fails, or
there is no dead-letter queue, the original message is left on the
transmission queue and the report message is not generated. The
original message is also left on the transmission queue if the report
message cannot be generated successfully.
The Feedback field in the MQDLH structure at the start of the message
on the dead-letter queue indicates why the message was put on the
dead-letter queue; this feedback code is also used in the message
descriptor of the exception report message (if one was requested by the
sender).
v For the channel message retry exit, this indicates that the MCA should
not wait and retry the message; instead, the MCA continues immediately
with its normal failure processing (the message is placed on the
dead-letter queue or discarded, as specified by the sender of the
message).
v For the channel auto-definition exit, either MQXCC_OK or
MQXCC_SUPPRESS_FUNCTION must be specified. If neither of these is
specified, MQXCC_SUPPRESS_FUNCTION is assumed by default and
the auto-definition is abandoned.
This response is not supported for the channel send and receive exits.
MQXCC_SEND_SEC_MSG
Send security message.
This value can be set only by a channel security exit. It indicates that the
exit has provided a security message which should be transmitted to the
partner.
MQXCC_SEND_AND_REQUEST_SEC_MSG
Send security message that requires a reply.
This value can be set only by a channel security exit. It indicates
v that the exit has provided a security message which should be
transmitted to the partner, and
v that the exit requires a response from the partner. If no response is
received, the channel must be terminated, because the exit has not yet
decided whether communications can proceed.
MQXCC_SUPPRESS_EXIT
Suppress exit.
v This value can be set by all types of channel exit other than a security
exit or an auto-definition exit. It suppresses any further invocation of
that exit (as if its name had been blank in the channel definition), until
termination of the MCA, when the exit is again invoked with an
ExitReason of MQXR_TERM.
v If a message retry exit returns this value, message retries for subsequent
messages are controlled by the MsgRetryCount and MsgRetryInterval
channel attributes as normal. For the current message, the MCA
performs the number of outstanding retries, at intervals given by the
MsgRetryInterval channel attribute, but only if the reason code is one
that the MCA would normally retry (see the MsgRetryCount field
described in “MQCD – Channel definition” on page 451). The number of
outstanding retries is the value of the MsgRetryCount attribute, less the
number of times the exit returned MQXCC_OK for the current message;
if this number is negative, no further retries are performed by the MCA
for the current message.
MQXCC_CLOSE_CHANNEL
Close channel.
This value can be set by any type of channel exit except an auto-definition
exit. It causes the message channel agent (MCA) to close the channel.
ExitResponse2 (MQLONG)
Secondary response from exit.
This is set to zero on entry to the exit routine. It can be set by the exit to provide
further information to the MCA. It is not used by the auto-definition exit.
The exit can set one or more of the following. If more than one is required, the
values are added together. Combinations that are not valid are noted; other
combinations are allowed.
MQXR2_PUT_WITH_DEF_ACTION
Put with default action.
This is set by the receiver’s channel message exit. It indicates that the
message is to be put with the MCA’s default action, that is either the
MCA’s default user ID, or the context UserIdentifier in the MQMD
(message descriptor) of the message.
The value of this constant is zero, which corresponds to the initial value set
when the exit is invoked. The constant is provided for documentation
purposes.
MQXR2_PUT_WITH_DEF_USERID
Put with default user identifier.
This can only be set by the receiver’s channel message exit. It indicates that
the message is to be put with the MCA’s default user identifier.
MQXR2_PUT_WITH_MSG_USERID
Put with message’s user identifier.
This can only be set by the receiver’s channel message exit. It indicates that
the message is to be put with the context UserIdentifier in the MQMD
(message descriptor) of the message (this may have been modified by the
exit).
Feedback (MQLONG)
Feedback code.
The value returned in this field by channel security, send, receive, and
message-retry exits is not used by the MCA.
The value returned in this field by auto-definition exits is not used if ExitResponse
is MQXCC_OK, but otherwise is used for the AuxErrorDataInt1 parameter in the
event message.
MaxSegmentLength (MQLONG)
Maximum segment length.
This is the maximum length in bytes that can be sent in a single transmission. It is
not used by the auto-definition exit. It is of interest to a channel send exit, because
this exit must ensure that it does not increase the size of a transmission segment to
a value greater than MaxSegmentLength. The length includes the initial 8 bytes that
the exit must not change. The value is negotiated between the message channel
agents when the channel is initiated. See “Writing and compiling channel-exit
programs” on page 429 for more information about segment lengths.
ExitUserArea (MQBYTE16)
Exit user area.
This is a field that is available for the exit to use. (It is not used by the
auto-definition exit.) It is initialized to binary zero before the first invocation of the
exit (which has an ExitReason set to MQXR_INIT), and thereafter any changes
made to this field by the exit are preserved across invocations of the exit.
MQXUA_NONE
No user information.
The value is binary zero for the length of the field.
For the C programming language, the constant MQXUA_NONE_ARRAY is
also defined; this has the same value as MQXUA_NONE, but is an array of
characters instead of a string.
ExitData (MQCHAR32)
Exit data.
This is set on entry to the exit routine to information that the MCA took from the
channel definition. If no such information is available, this field is all blanks.
The following fields in this structure are not present if Version is less than
MQCXP_VERSION_2.
MsgRetryCount (MQLONG)
Number of times the message has been retried.
The first time the exit is invoked for a particular message, this field has the value
zero (no retries yet attempted). On each subsequent invocation of the exit for that
message, the value is incremented by one by the MCA.
This is an input field to the exit. The value in this field is not meaningful if
ExitReason is MQXR_INIT. The field is not present if Version is less than
MQCXP_VERSION_2.
MsgRetryInterval (MQLONG)
Minimum interval in milliseconds after which the put operation should be retried.
The first time the exit is invoked for a particular message, this field contains the
value of the MsgRetryInterval channel attribute. The exit can leave the value
unchanged, or modify it to specify a different time interval in milliseconds. If the
exit returns MQXCC_OK in ExitResponse, the MCA will wait for at least this time
interval before retrying the MQOPEN or MQPUT operation. The time interval
specified must be zero or greater.
The second and subsequent times the exit is invoked for that message, this field
contains the value returned by the previous invocation of the exit.
If the value returned in the MsgRetryInterval field is less than zero or greater than
999 999 999, and ExitResponse is MQXCC_OK, the MCA ignores the
MsgRetryInterval field in MQCXP and waits instead for the interval specified by
the MsgRetryInterval channel attribute.
This is an input/output field to the exit. The value in this field is not meaningful if
ExitReason is MQXR_INIT. The field is not present if Version is less than
MQCXP_VERSION_2.
MsgRetryReason (MQLONG)
Reason code from previous attempt to put the message.
This is the reason code from the previous attempt to put the message; it is one of
the MQRC_* values.
This is an input field to the exit. The value in this field is not meaningful if
ExitReason is MQXR_INIT. The field is not present if Version is less than
MQCXP_VERSION_2.
The following fields in this structure are not present if Version is less than
MQCXP_VERSION_3.
HeaderLength (MQLONG)
Length of header information.
This field is relevant only for a message exit and a message-retry exit. The value is
the length of the routing header structures at the start of the message data; these
are the MQXQH structure, the MQMDE (message description extension header),
and (for a distribution-list message) the MQDH structure and arrays of MQOR and
MQPMR records that follow the MQXQH structure.
The message exit can examine this header information, and modify it if necessary,
but the data that the exit returns must still be in the correct format. The exit must
not, for example, encrypt or compress the header data at the sending end, even if
the message exit at the receiving end makes compensating changes.
If the message exit modifies the header information in such a way as to change its
length (for example, by adding another destination to a distribution-list message),
it must change the value of HeaderLength correspondingly before returning.
This is an input/output field to the exit. The value in this field is not meaningful if
ExitReason is MQXR_INIT. The field is not present if Version is less than
MQCXP_VERSION_3.
PartnerName (MQCHAR48)
Partner Name.
When the exit is initialized this field is blank because the queue manager does not
know the name of the partner until after initial negotiation has taken place.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_3.
FAPLevel (MQLONG)
Negotiated Formats and Protocols level.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_3.
CapabilityFlags (MQLONG)
Capability flags.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_3.
ExitNumber (MQLONG)
Exit number.
The ordinal number of the exit, within the type defined in ExitId. For example, if
the exit being invoked is the third message exit defined, this field contains the
value 3. If the exit type is one for which a list of exits cannot be defined (for
example, a security exit), this field has the value 1.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_3.
The following fields in this structure are not present if Version is less than
MQCXP_VERSION_5.
ExitSpace (MQLONG)
Number of bytes in transmission buffer reserved for exit to use.
This field is relevant only for a send exit. It specifies the amount of space in bytes
that the MCA will reserve in the transmission buffer for the exit to use. This allows
the exit to add to the transmission buffer a small amount of data (typically not
exceeding a few hundred bytes) for use by a complementary receive exit at the
other end. The data added by the send exit must be removed by the receive exit.
Note: This facility should not be used to send large amounts of data, as this may
degrade performance, or even inhibit operation of the channel.
By setting ExitSpace the exit is guaranteed that there will always be at least that
number of bytes available in the transmission buffer for the exit to use. However,
the exit can use less than the amount reserved, or more than the amount reserved
if there is space available in the transmission buffer. The exit space in the buffer is
provided following the existing data.
ExitSpace can be set by the exit only when ExitReason has the value MQXR_INIT;
in all other cases the value returned by the exit is ignored. On input to the exit,
ExitSpace is zero for the MQXR_INIT call, and is the value returned by the
MQXR_INIT call in other cases.
If the value returned by the MQXR_INIT call is negative, or there are fewer than
1024 bytes available in the transmission buffer for message data after reserving the
requested exit space for all of the send exits in the chain, the MCA outputs an
error message and closes the channel. Similarly, if during data transfer the exits in
the send exit chain allocate more user space than they reserved such that fewer
than 1024 bytes remain in the transmission buffer for message data, the MCA
outputs an error message and closes the channel. The limit of 1024 allows the
channel’s control and administrative flows to be processed by the chain of send
exits, without the need for the flows to be segmented.
SSLCertUserId (MQCHAR12)
This field specifies the UserId associated with the remote certificate. It is blank on
all platforms except z/OS
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_6.
SSLRemCertIssNameLength (MQLONG)
This field contains length in bytes of the full Distinguished Name of the issuer of
the remote certificate pointed to by SSLCertRemoteIssuerNamePtr.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_6.
SSLRemCertIssNamePtr (PMQVOID)
This field contains the address of the full Distinguished Name of the issuer of the
remote certificate. Its value is the null pointer if the channel is not SSL.
This is an input field to the exit. The field is not present if Version is less than
MQCXP_VERSION_6.
SecurityParms (PMQCSP)
Address of the MQCSP structure used to specify a user ID and password. The
initial value of this field is the null pointer.
This is an input/output field to the exit. The field is not present if Version is less
than MQCXP_VERSION_6.
CurHdrCompression (MQLONG)
Current header data compression.
This field specifies which technique is currently being used to compress the header
data.
The value can be altered by a sending channel’s message exit to one of the
negotiated supported values accessed from the HdrCompList field of the MQCD.
This enables the technique used to compress the header data to be decided for
each message based on the content of the message. The altered value is used for
the current message only. The channel ends if the attribute is altered to an
unsupported value. The value is ignored if altered outside a sending channel’s
message exit.
This is an input/output field to the exit. The field is not present if Version is less
than MQCXP_VERSION_6.
CurMsgCompression (MQLONG)
Current message compression.
This field specifies which technique is currently being used to compress the
message data.
The value can be altered by a sending channel’s message exit to one of the
negotiated supported values accessed from the MsgCompList field of the MQCD.
This enables the technique used to compress the message data to be decided for
each message based on the content of the message. The altered value is used for
the current message only. The channel ends if the attribute is altered to an
unsupported value. The value is ignored if altered outside a sending channel’s
message exit.
This is an input/output field to the exit. The field is not present if Version is less
than MQCXP_VERSION_6.
C declaration
typedef struct tagMQCXP MQCXP;
struct tagMQCXP {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG ExitId; /* Type of exit */
MQLONG ExitReason; /* Reason for invoking exit */
MQLONG ExitResponse; /* Response from exit */
MQLONG ExitResponse2; /* Secondary response from exit */
MQLONG Feedback; /* Feedback code */
MQLONG MaxSegmentLength; /* Maximum segment length */
MQBYTE16 ExitUserArea; /* Exit user area */
MQCHAR32 ExitData; /* Exit data */
MQLONG MsgRetryCount; /* Number of times the message has been
retried */
MQLONG MsgRetryInterval; /* Minimum interval in milliseconds after
which the put operation should be
retried */
MQLONG MsgRetryReason; /* Reason code from previous attempt to
put the message */
MQLONG HeaderLength; /* Length of header information */
COBOL declaration
** MQCXP structure
10 MQCXP.
** Structure identifier
15 MQCXP-STRUCID PIC X(4).
** Structure version number
15 MQCXP-VERSION PIC S9(9) BINARY.
** Type of exit
15 MQCXP-EXITID PIC S9(9) BINARY.
** Reason for invoking exit
15 MQCXP-EXITREASON PIC S9(9) BINARY.
** Response from exit
15 MQCXP-EXITRESPONSE PIC S9(9) BINARY.
** Secondary response from exit
15 MQCXP-EXITRESPONSE2 PIC S9(9) BINARY.
** Feedback code
15 MQCXP-FEEDBACK PIC S9(9) BINARY.
** Maximum segment length
15 MQCXP-MAXSEGMENTLENGTH PIC S9(9) BINARY.
** Exit user area
15 MQCXP-EXITUSERAREA PIC X(16).
** Exit data
15 MQCXP-EXITDATA PIC X(32).
** Number of times the message has been retried
15 MQCXP-MSGRETRYCOUNT PIC S9(9) BINARY.
** Minimum interval in milliseconds after which the put operation
** should be retried
15 MQCXP-MSGRETRYINTERVAL PIC S9(9) BINARY.
** Reason code from previous attempt to put the message
15 MQCXP-MSGRETRYREASON PIC S9(9) BINARY.
** Length of header information
15 MQCXP-HEADERLENGTH PIC S9(9) BINARY.
** Partner Name
15 MQCXP-PARTNERNAME PIC X(48).
** Negotiated Formats and Protocols level
15 MQCXP-FAPLEVEL PIC S9(9) BINARY.
** Capability flags
15 MQCXP-CAPABILITYFLAGS PIC S9(9) BINARY.
** Exit number
15 MQCXP-EXITNUMBER PIC S9(9) BINARY.
** Number of bytes in transmission buffer reserved for exit to use
15 MQCXP-EXITSPACE PIC S9(9) BINARY.
** User Id associated with remote certificate
15 MQCXP-SSLCERTUSERID PIC X(12).
Fields
StrucId (MQCHAR4)
Structure identifier.
Version (MQLONG)
Structure version number.
Reserved1 (MQLONG)
Reserved.
Reserved2 (MQLONG)
Reserved.
Reserved3 (MQLONG)
Reserved.
ECB (MQLONG)
Event control block to wait on.
This is the event control block (ECB) to wait on. It should be set to zero before the
MQXWAIT call is issued; on successful completion it will contain the post code.
C declaration
typedef struct tagMQXWD MQXWD;
struct tagMQXWD {
MQCHAR4 StrucId; /* Structure identifier */
MQLONG Version; /* Structure version number */
MQLONG Reserved1; /* Reserved */
MQLONG Reserved2; /* Reserved */
MQLONG Reserved3; /* Reserved */
MQLONG ECB; /* Event control block to wait on */
};
However, this could be difficult in a network where the problem may arise at an
intermediate system that is staging some of your messages. An error situation,
such as transmission queue full, followed by the dead-letter queue filling up,
would result in your channel to that site closing down.
In this example, the error message you receive in your error log will indicate a
problem originating from the remote site, but may not be able to tell you any
details about the error at that site.
You need to contact your counterpart at the remote site to obtain details of the
problem, and to receive notification of that channel becoming available again.
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 z/OS and
i5/OS, you can also use the panel interface to select this option.
On UNIX platforms, Windows, and i5/OS, you can also use the MQSC command
PING QMGR to test whether the queue manager is responsive to commands. See
the WebSphere MQ Script (MQSC) Command Reference for more information about
this.
If a channel ceases to run for any reason, applications will probably continue to
place messages on transmission queues, creating a potential overflow situation.
Applications can monitor transmission queues to find the number of messages
waiting to be sent, but this would not be a normal function for them to carry out.
When this occurs in a message-originating node, and the local transmission queue
is full, the application’s PUT fails.
When this occurs in a staging or destination node, there are three ways that the
MCA copes with the situation:
1. By calling the message-retry exit, if one is defined.
2. By directing all overflow messages to a dead-letter queue (DLQ), returning an
exception report to applications that requested these reports.
Validation checks
A number of validation checks are made when creating, altering, and deleting
channels, and where appropriate, an error message returned.
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” on page 68 for information about this.
Note: This does not start the channel, it merely resets the status. The channel
must still be started from the sender end.
Triggered channels
If a triggered channel refuses to run, the possibility of in-doubt messages should be
investigated as described above.
Another possibility is that the trigger control parameter on the transmission queue
has been set to NOTRIGGER by the channel. This happens when:
v There is a channel error
v The channel was stopped because of a request from the receiver
v The channel was stopped because of a problem on the sender that requires
manual intervention
After diagnosing and fixing the problem, you must start the channel manually.
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 OS/390 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” on page 64, and “KeepAlive Interval (KAINT)” on page 88.
Adopting an MCA
The Adopt MCA function enables WebSphere MQ to cancel a receiver channel and
to start a new one in its place.
For more information about this function, see “Adopting an MCA” on page 65. For
details of its parameters, see WebSphere MQ for z/OS System Setup Guide.
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.
This problem does not occur when a WebSphere MQ for iSeries, 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.
You need to be aware that such situations can arise, often characterized by a
system that appears to be busy but is not actually moving messages. You need to
work with your counterpart at the far end of the link to help detect the problem
and correct it.
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
iSeries, 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. Details can be found in Chapter 35, “Channel-exit calls
and data structures,” on page 441 and in the WebSphere MQ Application
Programming Reference book.
You might need to use a trace facility of your host system to identify the problem.
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 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
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.
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
v Queue manager name error
v Connection broken
Look in the client error log for a message explaining the cause of the failure. There
may also be errors logged at the server, depending on the nature of the failure.
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
v UNIX systems
v z/OS
The location the error logs are stored in depends on whether the queue manager
name is known and whether the error is associated with a client.
v If the queue manager name is known and the queue manager is available:
mqmtop\QMGRS\QMgrName\ERRORS\AMQERR01.LOG
v If the queue manager is not available:
mqmtop\QMGRS\@SYSTEM\ERRORS\AMQERR01.LOG
v If an error has occurred with a client application:
mqmtop\ERRORS\AMQERR01.LOG
On Windows, you should also examine the Windows application event log for
relevant messages.
If you are using the z/OS message processing facility to suppress messages, the
console messages may be suppressed. See the WebSphere MQ for z/OS Concepts and
Planning Guide for more information.
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.
One of the more obvious errors is to allocate items more than once:
Communications connections identifiers
Allocate only once. It may be possible to share connections between
channels when using LU 6.2.
Channel names
Allocate only once.
Transmission queues
Allocate to only one channel. It is possible to allocate to more than one
channel for standby purposes, but ensure that only one is active.
Remote queue definition
The name must be unique.
Queue manager alias name
The name must be unique.
Reply-to queue name
The name must be unique.
Reply-to queue alias name
The name must be unique.
Adjacent channel system name
The name must be unique.
Proceed as follows:
1. Start with one adjacent system, define the first outward channel to that
system, and give it a name.
2. Fill in the channel name on the form with the channel type, transmission
queue name, adjacent system name, and remote queue manager name.
3. For each class-of-service, logically-named connection, fill in the logical queue
manager name to list the queue manager name resolutions using this channel.
4. Allocate a communication connection and fill in the name and profile, where
applicable.
5. Record the names of all the queues that your applications are going to use on
this channel, using the columns provided on the form. This is necessary where
remote queue definitions are used, so that the name resolutions are listed.
6. Do not forget to include the reply-to alias queue names in this list.
7. Move to the next channel and continue until all outward channels have been
completed for this adjacent system.
8. When this has been completed, repeat from the beginning for incoming
channels from this adjacent system.
9. Move on to the next adjacent system, and repeat.
10. Check the complete list for unwanted multiple assignments of names, objects
and connections.
When the list is complete and checked out, use it as an aid in creating the objects,
and defining the channels listed.
523
Table 43. Channel planning form. System name: QM2 Queue manager name: QM2 Page no: 1
524
Channel name Channel CICS Transmission Connection Profile, Adjacent Logical Logical Physical Physical
type system ID queue name name or mode, system queue queue queue queue
(where name name manager name manager name
needed) name name
QM1.to.QM2 SENDER (none) QM2 QM2D (none) QM2 QM2 Payroll QM2 Payroll
QM2.to.QM1 RECEIVER (none) (none) (none) (none) QM2 (none) (none) (none) (none)
Channel planning form
WebSphere MQ Intercommunication
Appendix B. Queue name resolution
This appendix describes queue name resolution as performed by queue managers
at both sending and receiving ends of a channel.
In larger networks, the use of queue managers has a number of advantages over
other forms of communication. These advantages derive from the name resolution
function in DQM and the main benefits are:
v Applications do not need to make routing decisions
v Applications do not need to know the network structure
v Network links are created by systems administrators
v Network structure is controlled by network planners
v Multiple channels can be used between nodes to partition traffic
Machine A Machine B
Application Application
Putting Getting
application application
Channel
Queue name Queue name
resolution resolution
process process
MCA MCA
MQGET MQPUT
call call
Queue transmission Sending Network Receiving Queue 'Target'
Referring to Figure 96, the basic mechanism for putting messages on a remote
queue, as far as the application is concerned, is the same as for putting messages
on a local queue:
v The application putting the message issues MQOPEN and MQPUT calls to put
messages on the target queue.
v The application getting the messages issues MQOPEN and MQGET calls to get
the messages from the target queue.
If both applications are connected to the same queue manager then no inter-queue
manager communication is required, and the target queue is described as local to
both applications.
However, if the applications are connected to different queue managers, two MCAs
and their associated network connection are involved in the transfer, as shown in
the figure. In this case, the target queue is considered to be a remote queue to the
putting application.
Note: Only step 1 and step 5 involve application code; steps 2 through 4 are
performed by the local queue managers and the MCA programs. The
putting application is unaware of the location of the target queue, which
could be in the same processor, or in another processor on another
continent.
The combination of sending MCA, the network connection, and the receiving
MCA, is called a message channel, and is inherently a unidirectional device.
Normally, it is necessary to move messages in both directions, and two channels
are set up for this, one in each direction.
In order to uncouple from the application design the exact path over which the
data travels, it is necessary to introduce a level of indirection between the name
used by the application when it refers to the target queue, and the naming of the
channel over which the flow occurs. This indirection is achieved using the queue
name resolution mechanism.
Not only is it possible for the forward path from one queue manager to another to
be partitioned into different types of traffic, but the return message that is sent to
the reply-to queue definition in the outbound message can also use the same traffic
partitioning. Queue name resolution satisfies this requirement and the application
designer need not be involved in these traffic partitioning decisions.
The point that the mapping is carried out at both the sending and receiving queue
managers is an important aspect of the way name resolution works. This allows
the queue name supplied by the putting application to be mapped to a local queue
or a transmission queue at the sending queue manager, and again remapped to a
local queue or a transmission queue at the receiving queue manager.
Reply messages from receiving applications or MCAs have the name resolution
carried out in exactly the same way, allowing return routing over specific paths by
means of queue definitions at all the queue managers on route.
Figure 97 on page 530 shows the values that you can set using these stanzas. When
you are defining one of these stanzas, you do not need to start each item on a new
line. You can use either a semicolon (;) or a hash character (#) to indicate a
comment.
CHANNELS:
MAXCHANNELS=n ; Maximum number of channels allowed, the
; default value is 100
MAXACTIVECHANNELS=n ; Maximum number of channels allowed to be active at
; any time, the default is the value of MaxChannels
MAXINITIATORS=n ; Maximum number of initiators allowed, the
; default value is 3
(see note 1)
MQIBINDTYPE=type ; Whether the binding for applications is to be
; “fastpath” or “standard”.
;The default is “standard”.
(see note 2)
ADOPTNEWMCA=chltype ; Stops previous process if channel fails to start.
; The default is “NO”.
ADOPTNEWMCATIMEOUT=n ; Specifies the amount of time that the new
; process should wait for the old process to end.
; The default is 60.
ADOPTNEWMCACHECK= ; Specifies the type checking required.
typecheck ; For FAP1, FAP2, and FAP3, “NAME” and
; “ADDRESS” is the default.
; For FAP4 and later, “NAME”,
; “ADDRESS”, and “QM” is the
; default.
TCP: ; TCP entries
PORT=n ; Port number, the default is 1414
KEEPALIVE=Yes ; Switch TCP/IP KeepAlive on
IPADDR=Addr/Name ; TCP/IP address or name for Listener
LIBRARY2=DLLName2 ; Same as above if code is in two libraries )
EXITPATH: ; Location of user exits (MQSeries for AIX,
; HP-UX, and Solaris only)
EXITPATHS= ; String of directory paths
Notes:
1. MAXINITIATORS applies only to WebSphere MQ for AIX, WebSphere MQ for
iSeries, WebSphere MQ for HP-UX, and WebSphere MQ for Solaris.
2. MQIBINDTYPE applies only to WebSphere MQ for AIX, WebSphere MQ for
iSeries, WebSphere MQ for HP-UX, and WebSphere MQ for Solaris.
For more information about the qm.ini file and the other stanzas in it, refer to the
WebSphere MQ System Administration Guide for WebSphere MQ for UNIX systems,
and Windows systems, and to the WebSphere MQ for iSeries V6 System
Administration Guide for WebSphere MQ for iSeries.
IBM may have patents or pending patent applications covering subject matter
described in this information. The furnishing of this information does not give 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:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, 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.
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.
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 United Kingdom Laboratories,
Mail Point 151,
Hursley Park,
Winchester,
Hampshire,
England
SO21 2JN.
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 Programming License Agreement, or any equivalent agreement
between us.
COPYRIGHT LICENSE:
Trademarks
The following terms are trademarks of International Business Machines
Corporation in the United States, or other countries, or both:
Microsoft, Windows, Windows NT, and the Windows logo 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.
Index 537
configuration (continued)
WebSphere MQ for z/OS 294, 318
D display channel (continued)
UNIX systems 117
configuration file 71 data Windows systems 117
UNIX systems 71 compression 423 z/OS 269
configurations conversion 426 display channel initiator
intra-group queuing 332 decompression 423 z/OS 270
CONNAME attribute 83 encryption 426 display channel status
connection negotiation 19, 58 z/OS 278
APPC/MVS, z/OS 285, 311 data compression 85 Display channel status
deciding upon data conversion 73 UNIX systems 118
i5/OS 377 data types, detailed description Windows systems 118
z/OS 285, 311 MQCD 451 display DQM 270
defining APPC/MVS (LU 6.2) 288, MQCXP 492 disposition 87
312 MQXWD 509 distributed queuing
defining LU 6.2 DataConversion field 461 components 7, 13
i5/OS 379 DataLength parameter 442 functions 55
UNIX systems 166 DDNS with intra-group queuing 332
Windows systems 133 registration time for 515 distributed queuing with queue-sharing
LU 6.2 dead-letter queue 50 groups 305
i5/OS 377 overview 13 distributed-queuing management in
UNIX systems 163 problem determination 512 WebSphere MQ for iSeries 369
Windows 131 processing 512 distribution lists 44, 57
z/OS 285, 311 UNIX systems 127 diverting message flows 43
NetBIOS WebSphere MQ for iSeries 375 DQM
Windows 131 Windows systems 127 display, z/OS 270
SPX z/OS 127
Windows 131 decompression of data 423
default channel values
switching 517
TCP i5/OS 363 E
default object creation 116 ECB field 510
i5/OS 377
define channel edit
UNIX systems 163
z/OS 268 change
Windows 131
defining i5/OS 364
z/OS 285, 311
an LU 6.2 connection UNIX systems 119
UDP
i5/OS 379 Windows systems 119
UNIX systems 163
UNIX systems 166 copy
connection name 83
Windows systems 133 i5/OS 364
ConnectionName field 464
APPC/MVS (LU 6.2) connection create
context security 97
z/OS 288, 312 i5/OS 363
control commands, channel 58
objects UNIX systems 119
conversion failure, problem
z/OS 281 Windows systems 119
determination 514
queues delete
conversion of data 57
z/OS 281 i5/OS 365
CONVERT attribute 85
z/OS 268 UNIX systems 119
convert message 85
definition file Windows systems 119
coordination with adjacent systems 42
i5/OS 351 enabling a channel to transmit
Copy option 364
UNIX systems 113 messages 59
Create option 363
Windows systems 113 encryption
creating
delete channel in send exit 425
channel
distributed platforms 119 encryption of messages 415
i5/OS 354
i5/OS 365 end 121
UNIX systems 117
z/OS 269 End option 366
Windows systems 117
delivery, messages 21 ending a channel 121, 366
defaults 363
Desc field 456 ENDMQLSR command 127
objects
DESCR attribute 85 error
i5/OS 354
description, channel 85 at remote sites 511
UNIX systems 116
destination queue 40 channel 63
Windows systems 116
dial-up support 515 logs 121, 518
queues 125, 369
disabled receiver channels 120, 365 message from channel control 511
transmission queue 125, 369
disaster recovery 516 recovery 511
CRTCSI command 380
DISCINT attribute 86 example
CRTMQM command 116
DiscInterval field 457 alias walk-through 49
CurHdrCompression field 503
disconnect interval 86 channel initiators 11
CurMsgCompression field 504
display channel listeners 11
current channels
option 365 channel names 28
specifying maximum number 62
z/OS, DQM 270 channel planning
display channel for distributed platforms 255
i5/OS 365 for i5/OS 407
Index 539
fields (continued) fields (continued) initiator for channel
LongMCAUserIdLength 473 StrucId (continued) AIX, HP-UX, Solaris, and Windows
LongMCAUserIdPtr 474 MQXWD structure 509 systems 126
LongRemoteUserIdLength 474 StrucLength 469 UNIX systems and Windows
LongRemoteUserIdPtr 474 TpName 457 systems 126
LongRetryCount 458 TransportType z/OS 270
LongRetryInterval 458 MQCD structure 455 integrity of delivery 21
MaxMsgLength 460 UserIdentifier 462 intercommunication
MaxSegmentLength 499 Version concepts 3, 16, 21
MCAName 457 MQCD structure 454 example configuration 105
MCASecurityId 474 MQCXP structure 493 intercommunication examples
MCAType 464 MQXWD structure 509 WebSphere MQ for AIX 169
MCAUserIdentifier 463 XmitQName 456 WebSphere MQ for HP-UX 187
ModeName 457 flow control 33 WebSphere MQ for iSeries 387
MsgCompList 478 for shared queuing WebSphere MQ for Linux 233
MsgExit 459 listeners 306 WebSphere MQ for Solaris 211
MsgExitPtr 470 functions available WebSphere MQ for Windows 141
MsgExitsDefined 470 UNIX systems 114 WebSphere MQ for z/OS 289, 313
MsgRetryCount Windows systems 114 interface
MQCD structure 466 generic 305
MQCXP structure 500 intra-group queuing
MsgRetryExit 465
MsgRetryInterval
G agent 329
benefits 329
generic
MQCD structure 467 concepts of 327
interface 305
MQCXP structure 500 configurations 332
Generic interface 305
MsgRetryReason 501 example 341
getting started
MsgRetryUserData 466 getting started 331
intra-group queuing 331
MsgUserData 461 intra-group queuing agent 327
Getting started with intra-group
MsgUserDataPtr 471 limitations 330
queuing 331
NetworkPriority 473 messages 336
NonPersistentMsgSpeed 468 security 338
PartnerName 501 shared transmission queue 329
Password 462 H specific properties 338
PutAuthority 460 HBINT attribute 87 terminology 328
QMgrName 456 Hconn parameter 449 with clustering 334
ReceiveExit 460 HdrCompList field 477 with distributed queuing 332
ReceiveExitPtr 472 header compression 87 intra-group queuing agent
ReceiveExitsDefined 470 HeaderLength field 501 intra-group queuing 327
ReceiveUserData 462 heartbeat interval 87 Intra-group queuing agent 329
ReceiveUserDataPtr 472 HeartbeatInterval field 467 Intra-group queuing and the intra-group
RemotePassword 465 how to use queuing agent 327
RemoteSecurityId 475 channel planning form 521 Intra-group queuing benefits 329
RemoteUserIdentifier 464 Intra-group queuing concepts 327
Reserved1 509 Intra-group queuing configurations 332
Reserved2 509
Reserved3 510
I intra-group queuing example 341
Intra-group queuing limitations 330
i5/OS
SecurityExit 459 Intra-group queuing security 338
KEEPALIVE 378
SecurityParms 503 Intra-group queuing specific
IBM Communications Server for
SecurityUserData 461 properties 338
Windows NT 146
SendExit 459 Intra-group queuing terminology 328
in-doubt 80
SendExitPtr 471 Intra-group queuing with clustering 334
in-doubt channels, manual
SendExitsDefined 470 Intra-group queuing with distributed
resynchronization 68
SendUserData 462 queuing 332
in-doubt message on channel, resolve on
SendUserDataPtr 471
z/OS 276
SeqNumberWrap 460
in-doubt messages, commit or back out
ShortConnectionName 456
ShortRetryCount 458
i5/OS 367 J
UNIX systems 122 journaling 426
ShortRetryInterval 458
Windows systems 122
SSLCertUserId 503
INACTIVE channel state 60, 63
SSLCipherSpec 475
SSLClientAuth 476
inbound channels
with shared queuing 307
K
SSLPeerNameLength 476 KAINT attribute 88
Inbound channels with shared
SSLPeerNamePtr 475 KEEPALIVE 64
queuing 307
SSLRemCertIssNameLength 503 i5/OS 378
ini file 71
SSLRemCertIssNamePtr 503 UNIX systems 166
initial data negotiation 19, 58
StrucId KeepAlive interval 88
initialization data set, z/OS 71
MQCXP structure 493 KeepAliveInterval field 476
initialization file 71
Index 541
MQCXP_* values 493 NetBIOS connection panels (continued)
MQCXP, channel exit parameter WebSphere MQ for Windows 154 ping
structure 430 Windows 131 i5/OS 365
MQFB_* values 499 NetBIOS products, in example reset
MQI channels 8 configurations 106 i5/OS 367
MQIBindType 129 NetBIOS, example configurations 106 selecting a channel
MQRMH, reference-message header 427 network infrastructure, example i5/OS 358
mqs.ini 72 configurations 106 using, z/OS 266
MQSINI 72 network planner 29 Work with channel status
MQXCC_* values network-connection priority 95 i5/OS 360
MQCXP structure 496 networking 39 work-with-channel choices
MQXCP_VERSION_5, of MQCXP networking considerations 50 i5/OS 362
structure 425 NetworkPriority field 473 parameters
MQXQH, transmission header 427, 428 networks 27 AgentBuffer 443
MQXR_* values node centric 34 AgentBufferLength 443
MQCXP structure 494 nonpersistent message speed 96 ChannelDefinition
MQXR_INIT, ExitReason value 425 NonPersistentMsgSpeed field 468 MQ_CHANNEL_EXIT call 442
MQXR_XMIT, ExitReason value 425 ChannelExitParms
MQXR2_* values 498 MQ_CHANNEL_EXIT call 442
MQXT_* values 494
MQXUA_* values
O CompCode 449
DataLength 442
objects
MQTXP structure 499 ExitBufferAddr 444
creating
MQXWAIT call 449 ExitBufferLength 443
default 116
MQXWD structure 509 Hconn 449
i5/OS 354
MQXWD_* values 509 Reason 449
UNIX systems 116
MRDATA attribute 94 WaitDesc 449
Windows systems 116
MREXIT attribute 94 parameters, receiving 57
defining
MRRTY attribute 94 PartnerName field 501
z/OS 281
MRTMR attribute 95 Password attribute
security 127, 375
MsgCompList field 478 encrypted value 103
operator commands
MSGDATA attribute 94 introduction 96
i5/OS 352
MSGEXIT attribute 93 Password field 462
options
MsgExit field 459 PAUSED channel state 60, 63
change 364
MsgExitPtr field 470 peer recovery
copy 364
MsgExitsDefined field 470 with queue-sharing 308
create 363
MsgRetryCount field Peer recovery 308
display 365
MQCD structure 466 peer-shared-channel retry on z/OS
display status 365
MQCXP structure 500 about 516
end 366
MsgRetryExit field 465 performance
ping 365
MsgRetryInterval field channel 162
reset 367
MQCD structure 467 ping 365
resolve 122
MQCXP structure 500 problem determination 511
i5/OS 367
MsgRetryReason field 501 UNIX systems 120
start 365
MsgRetryUserData field 466 Windows systems 120
outbound channels
MsgUserData field 461 ping channel
with shared queuing 307
MsgUserDataPtr field 471 z/OS 275
Outbound channels with shared
multi-hopping 14 ping with LU 6.2 120, 365
queuing 307
multiple message channels per pipelining
transmission queue in MCA message transfer 162
UNIX systems 59 parameter in qm.ini file 162
Windows systems 59 P planning form 521
multiple queue managers 134 panel data, validation 69 port 218
panels in qm.ini file 529
browsing a channel WebSphere MQ for AIX 176
N i5/OS 358
channel start
WebSphere MQ for HP-UX 193
WebSphere MQ for iSeries 377
name resolution
i5/OS 365 WebSphere MQ for Linux (x86
conflicts 51
creating a channel platform) 239
convention 51
i5/OS 354 WebSphere MQ for Windows
description 525
display systems 132
introduction 24
i5/OS 365 WebSphere MQ for z/OS 270, 294,
location 39
display channel status 365 318
queue name translations 51
ending channel preparation
restriction 46
i5/OS 366 getting started
negotiations on startup 58, 513
i5/OS i5/OS 354
NetBIOS 4, 135
resolve 367 UNIX systems 116
NETBIOS
work with status 365 Windows systems 116
stanza of qm.ini file 529
Index 543
restarting sender channel definition SNA (continued)
channels 59 example products, in example
restarting stopped channels 67 i5/OS 409, 411 configurations 106
RETRY channel state 60, 63 UNIX systems 257, 258 SNAP-IX
retry considerations 515 Windows 257, 258 configuration parameters 211
retrying the link, problem z/OS 301, 302 establishing a session 215
determination 515 overview 5 explanation of terms 214
return routing 51 SENDEXIT attribute 99 operation 228
return to sender 70 SendExit field 459 sender-channel definitions 232
route tracing 519 SendExitPtr field 471 SNAplus2 191
routing entry SendExitsDefined field 470 SO_KEEPALIVE
add 383 sending i5/OS 378
class 385 messages 17, 56 UNIX systems 166
routing entry class 385 on SPX Windows systems 133
routing messages 37 Windows 137 source queue manager 3
run channel 118, 356 on TCP specific properties
run channel initiator 126 Windows 132 intra-group queuing 338
runmqchi command sending on TCP 163 splitting messages 57
AIX, HP-UX, Solaris, and Windows SendUserData field 462 SPX 4
systems 126 SendUserDataPtr field 471 connection
UNIX systems and Windows SeqNumberWrap field 460 WebSphere MQ for Windows 155
systems 126 sequence number wrap 100 example configurations 106
RUNMQCHI command 127 sequence numbering 53 products, in example
RUNMQCHL command 127 sequence numbers 57 configurations 106
RUNMQLSR command 127 reset, z/OS 275 stanza of qm.ini file 529
sequential retrieval of messages 53 Windows 131
SEQWRAP attribute 100 SSLCAUTH attribute 101
S server
channel 8
SSLCertUserId field 503
SSLCIPH attribute 101
sample security exit 440
server-connection channel 8 SSLCipherSpec field 475
scenarios, problem determination 511
service SSLClientAuth field 476
SCYDATA attribute 99
class of 305 SSLPEER attribute 102
SCYEXIT attribute 99
service, class of 45 SSLPeerNameLength field 476
security
setting up SSLPeerNamePtr field 475
context 97
communication SSLRemCertIssNameLength field 503
exit 12
i5/OS 377 SSLRemCertIssNamePtr field 503
exit name 99
UNIX systems 163 SSPI (Security Services Programming
exit program 417
Windows 131 Interface) 440
exit program, overview 416
shared stanza file 71
exit user data 99
queuing 305 stanza, in qm.ini file
intra-group queuing 338
shared queuing Channels 162
levels for exit programs 129
benefits of 308 start
message channel agent 97
components of 305 channel 59
objects
concepts of 305 UNIX systems 118
UNIX systems 127
inbound channels 307 Windows systems 118
WebSphere MQ for iSeries 375
message channel agents with 307 z/OS 273
Windows systems 127
outbound channels 307 channel initiator, z/OS 270
process 97
synchronization queue 307 channel listener, z/OS 272
security exit
transmission 306 option 365
sample 440
triggering with 306 STARTING channel state 60
Security Services Programming Interface
shared transmission queue startup dialog 416
(SSPI) 440
intra-group queuing 329 STATCHL attribute 81
SecurityExit field 459
Shared transmission queue for state, channel 59
SecurityParms field 503
intra-group queuing 329 status
SecurityUserData field 461
SHAREPORT 318 display channel 118
segregating messages 15
sharing channels 14 work with channel 360
selecting a channel 358
short retry status panels 365
send
count 100 status, channel 57
exit 12
interval 101 stop
exit name 99
ShortConnectionName field 456 channel 66, 121
exit program 423
ShortRetryCount field 458 channel initiator, z/OS 271
message 55
ShortRetryInterval field 458 channel listener, OS/390 273
send exit
SHORTRTY attribute 100 channel, z/OS 276
multiple send exits 426
SHORTTMR attribute 101 controlled 367
send exit user data 99
side object immediate 367
SENDDATA attribute 99
i5/OS 380 quiesce 121, 122
sender channel 8
SNA 4 stop channel initiator 126
Index 545
WebSphere MQ for HP-UX (continued) worksheet (continued)
channel-exit programs 436 WebSphere MQ for Windows
configuration 206 configuration 141
intercommunication example 187, WebSphere MQ for z/OS
211 configuration 290, 314
LU 6.2 connection 187 writing your own message channel
TCP connection 205 agents 73
WebSphere MQ for iSeries WRKCLS command 385
channel configuration 401 WRKSBSD command 383
channel-exit programs 432
configuration 400
intercommunication example 387,
405
X
XMITQ attribute 102
LU 6.2 connection 387
XmitQName field 456
TCP connection 398
WebSphere MQ for Linux
channel configuration 251
configuration 251
intercommunication example 233,
255
TCP connection 249
WebSphere MQ for Solaris
channel configuration 229
channel-exit programs 437
configuration 229
intercommunication example 211,
233
TCP connection 228
WebSphere MQ for Windows
channel configuration 158
channel-exit programs 433
configuration 157
intercommunication example 141,
162
LU 6.2 connection 141
NetBIOS connection 154
SPX connection 155
TCP connection 154
WebSphere MQ for z/OS
channel configuration 295, 319
channel-exit programs 431
configuration 294, 318
intercommunication example 289
LU 6.2 connection 289, 313
reset channel sequence numbers 275
resolving in-doubt message on
channel 276
TCP connection 294, 317
weighting 83
wide-band links 29
work with channel status 360
work with status 365
work-with-channel choices 362
workload
balanced 308
Workload-balanced channel start 308
worksheet
WebSphere MQ for AIX
configuration 169
WebSphere MQ for HP-UX
configuration 187
WebSphere MQ for iSeries
configuration 387
WebSphere MQ for Linux
configuration 233
WebSphere MQ for Solaris
configuration 211
Feel free to comment on what you regard as specific errors or omissions, and on
the accuracy, organization, subject matter, or completeness of this book.
Please limit your comments to the information in this book and the way in which
the information is presented.
To make comments about the functions of IBM products or systems, talk to your
IBM representative or to your IBM authorized remarketer.
When you send comments to IBM, you grant IBM a nonexclusive right to use or
distribute your comments in any way it believes appropriate, without incurring
any obligation to you.
You can send your comments to IBM in any of the following ways:
v By mail, to this address:
User Technologies Department (MP095)
IBM United Kingdom Laboratories
Hursley Park
WINCHESTER,
Hampshire
SO21 2JN
United Kingdom
v By fax:
– From outside the U.K., after your international access code use
44–1962–816151
– From within the U.K., use 01962–816151
v Electronically, use the appropriate network ID:
– IBM Mail Exchange: GBIBM2Q9 at IBMMAIL
– IBMLink™: HURSLEY(IDRCF)
– Internet: [email protected]
SC34-6587-00
Spine information: