MQ RPG
MQ RPG
                                    SC34-5559-00
MQSeries® for AS/400®          IBM
                                    SC34-5559-00
   Note!
  Before using this information and the product it supports, be sure to read the general information under “Appendix G.
  Notices” on page 483.
Chapter 17. MQRR - Response record                              177       Chapter 26. MQCMIT - Commit
Overview. . . . .           . . . .         .   .   .   .   .   .   177   changes . . . . . . . . . . . . . 217
Fields . . . . . .          . . . .         .   .   .   .   .   .   177   Syntax. . . .     .   .   .   .   .   .   .   .    .   .   .   .   217
Initial values and RPG     declaration      .   .   .   .   .   .   177   Parameters . .    .   .   .   .   .   .   .   .    .   .   .   .   217
   RPG declaration .        . . . .         .   .   .   .   .   .   178   Usage notes . .   .   .   .   .   .   .   .   .    .   .   .   .   218
                                                                          RPG invocation.   .   .   .   .   .   .   .   .    .   .   .   .   219
Chapter 18. MQTM - Trigger message                              179
Overview. . . . .           . . . .         .   .   .   .   .   .   179   Chapter 27. MQCONN - Connect
Fields . . . . . .          . . . .         .   .   .   .   .   .   180   queue manager . . . . . . . . . . 221
Initial values and RPG     declaration      .   .   .   .   .   .   182   Syntax. . . .     .   .   .   .   .   .   .   .    .   .   .   .   221
   RPG declaration .        . . . .         .   .   .   .   .   .   183   Parameters . .    .   .   .   .   .   .   .   .    .   .   .   .   221
                                                                          Usage notes . .   .   .   .   .   .   .   .   .    .   .   .   .   224
Chapter 19. MQTMC2 - Trigger                                              RPG invocation.   .   .   .   .   .   .   .   .    .   .   .   .   225
message (character format) . . . . . 185
Overview. . . . .           . . . .         .   .   .   .   .   .   185   Chapter 28. MQCONNX - Connect
Fields . . . . . .          . . . .         .   .   .   .   .   .   186   queue manager (extended) . . . . . 227
Initial values and RPG     declaration      .   .   .   .   .   .   187   Syntax. . . .     .   .   .   .   .   .   .   .    .   .   .   . 227
   RPG declaration .        . . . .         .   .   .   .   .   .   187   Parameters . .    .   .   .   .   .   .   .   .    .   .   .   . 227
                                                                          RPG invocation.   .   .   .   .   .   .   .   .    .   .   .   . 228
Chapter 20. MQWIH - Work
information header . . . . . . . . . 189                                  Chapter 29. MQDISC - Disconnect
Overview. . . . .           . . . .         .   .   .   .   .   .   189   queue manager . . . . . . . . . . 229
Fields . . . . . .          . . . .         .   .   .   .   .   .   189   Syntax. . . .     .   .   .   .   .   .   .   .    .   .   .   .   229
Initial values and RPG     declaration      .   .   .   .   .   .   191   Parameters . .    .   .   .   .   .   .   .   .    .   .   .   .   229
   RPG declaration .        . . . .         .   .   .   .   .   .   192   Usage notes . .   .   .   .   .   .   .   .   .    .   .   .   .   230
                                                                          RPG invocation.   .   .   .   .   .   .   .   .    .   .   .   .   230
Chapter 21. MQXQH - Transmission
queue header . . . . . . . . . . . 193                                    Chapter 30. MQGET - Get message                                231
Overview. . . . .           . . . .         .   .   .   .   .   .   193   Syntax. . . .     .   .   .   .   .   .   .   .    .   .   .   .   231
Fields . . . . . .          . . . .         .   .   .   .   .   .   196   Parameters . .    .   .   .   .   .   .   .   .    .   .   .   .   231
Initial values and RPG     declaration      .   .   .   .   .   .   197   Usage notes . .   .   .   .   .   .   .   .   .    .   .   .   .   235
   RPG declaration .        . . . .         .   .   .   .   .   .   197   RPG invocation.   .   .   .   .   .   .   .   .    .   .   .   .   239
Chapter 33. MQPUT - Put message                               265           Chapter 45. Sample programs . . . . 341
                                                                            Features demonstrated in the sample programs              .   .   342
Syntax. . . .     .   .   .   .   .   .   .   .   .   .   .   .   265
                                                                            Preparing and running the sample programs .               .   .   343
Parameters . .    .   .   .   .   .   .   .   .   .   .   .   .   265
                                                                               Running the sample programs. . . . .                   .   .   343
Usage notes . .   .   .   .   .   .   .   .   .   .   .   .   .   270
                                                                            The Put sample program . . . . . . .                      .   .   343
RPG invocation.   .   .   .   .   .   .   .   .   .   .   .   .   273
                                                                               Design of the Put sample program . . .                 .   .   344
                                                                            The Browse sample program . . . . . .                     .   .   344
Chapter 34. MQPUT1 - Put one                                                   Design of the Browse sample program . .                .   .   344
message . . . . . . . . . . . . . 275                                       The Get sample program . . . . . . .                      .   .   345
Syntax. . . .     .   .   .   .   .   .   .   .   .   .   .   .   275          Design of the Get sample program . . .                 .   .   345
Parameters . .    .   .   .   .   .   .   .   .   .   .   .   .   275       The Request sample program . . . . . .                    .   .   346
Usage notes . .   .   .   .   .   .   .   .   .   .   .   .   .   279          Using triggering with the Request sample .             .   .   346
RPG invocation.   .   .   .   .   .   .   .   .   .   .   .   .   281          Design of the Request sample program . .               .   .   347
                                                                            The Echo sample program . . . . . . .                     .   .   348
Chapter 35. MQSET - Set object                                                 Design of the Echo sample program . . .                .   .   349
attributes . . . . . . . . . . . . . 283                                    The Inquire sample program . . . . . .                    .   .   349
Syntax. . . .     .   .   .   .   .   .   .   .   .   .   .   .   283          Design of the Inquire sample program . .               .   .   350
Parameters . .    .   .   .   .   .   .   .   .   .   .   .   .   283       The Set sample program. . . . . . . .                     .   .   351
Usage notes . .   .   .   .   .   .   .   .   .   .   .   .   .   286          Design of the Set sample program . . .                 .   .   351
RPG invocation.   .   .   .   .   .   .   .   .   .   .   .   .   287       The Triggering sample programs . . . . .                  .   .   352
                                                                               The AMQ3TRG4 sample trigger monitor .                  .   .   352
                                                                               The AMQ3SRV4 sample trigger server . .                 .   .   352
Part 3. Attributes of objects . . . . 289                                      Ending the Triggering sample programs .                .   .   353
                                                                            Running the samples using remote queues .                 .   .   353
Chapter 36. Attributes of MQSeries
objects . . . . . . . . . . . . . . 291                                     Part 5. Appendixes . . . . . . . . 355
Chapter 37. Attributes for all queues                         293           Appendix A. Return codes . . . . . . 357
                                                                            Completion codes .   .   .   .   .   .   .   .   .    .   .   . 357
Chapter 38. Attributes for local                                            Reason codes . .     .   .   .   .   .   .   .   .    .   .   . 357
queues and model queues. . . . . . 299
                                                                            Appendix B. MQSeries constants . . . 421
Chapter 39. Attributes for local                                            List of constants . . . . . . . . . . . .                         421
definitions of remote queues. . . . . 313                                      LN* (Lengths of character string and byte fields)              421
                                                                               AC* (Accounting token) . . . . . . . . .                       422
                                                                        |      ATT* (Accounting token type) . . . . . . .                     422
Chapter 40. Attributes for alias                                               AT* (Application type) . . . . . . . . .                       423
queues . . . . . . . . . . . . . . 315                                         BND* (Binding) . . . . . . . . . . .                           423
                                                                               BO* (Begin options) . . . . . . . . . .                        423
Chapter 41. Attributes for namelists                          317              BO* (Begin options structure identifier). . . .                423
                                                                               BO* (Begin options version) . . . . . . .                      423
Chapter 42. Attributes for process                                             CA* (Character attribute selector). . . . . .                  424
                                                                               AD* (CICS header ADS descriptor) . . . . .                     424
definitions. . . . . . . . . . . . . 319                                       CC* (Completion code) . . . . . . . . .                        425
                                                                               CS* (Coded character set identifier) . . . . .                 425
                                                                               CT* (CICS header conversational task) . . . .                  425
                                                                               FC* (CICS header facility) . . . . . . . .                     425
                                                                                                                                 Contents      v
     CF* (CICS header function name) . . . .           .   425       ME* (Message descriptor extension structure
     WI* (CICS header get-wait interval) . . . .       .   425       identifier). . . . . . . . . . . . . .             436
     CI* (Correlation identifier) . . . . . . .        .   425       ME* (Message descriptor extension version) . .     436
     MQ* (Call identifier) . . . . . . . . .           .   426       MEF* (Message descriptor extension flags) . .      437
     CIF* (CICS header flags). . . . . . . .           .   426       MS* (Message delivery sequence). . . . . .         437
     CI* (CICS header length) . . . . . . .            .   426       MF* (Message flags) . . . . . . . . . .            437
     CI* (CICS header structure identifier) . . .      .   426       MF* (Message-flags masks) . . . . . . . .          437
     CI* (CICS header version) . . . . . . .           .   426       MI* (Message identifier) . . . . . . . . .         437
     LT* (CICS header link type) . . . . . .           .   426       MO* (Match options) . . . . . . . . . .            437
     CMLV* (Command level) . . . . . . .               .   427       MT* (Message type) . . . . . . . . . .             438
     CN* (Connect options) . . . . . . . .             .   427   |   MTK* (Message token) . . . . . . . . .             438
     CN* (Connect options structure identifier) . .    .   427   |   NC* (Name count) . . . . . . . . . .               438
     CN* (Connect options version) . . . . .           .   427       OD* (Object descriptor length) . . . . . .         438
     CO* (Close options) . . . . . . . . .             .   427       OD* (Object descriptor structure identifier) . .   438
     OL* (CICS header output data length) . . .        .   427       OD* (Object descriptor version) . . . . . .        438
     CRC* (CICS header return code) . . . . .          .   427       OII* (Object instance identifier) . . . . . .      438
     SC* (CICS header transaction start code) . .      .   428       OL* (Original length) . . . . . . . . . .          439
     TE* (CICS header task end status) . . . .         .   428       OO* (Open options) . . . . . . . . . .             439
     CU* (CICS header unit-of-work control) . .        .   428       OT* (Object type) . . . . . . . . . . .            439
     DCC* (Convert-characters masks and factors)           428       PE* (Persistence) . . . . . . . . . . .            439
     DCC* (Convert-characters options) . . . .         .   428       PL* (Platform) . . . . . . . . . . . .             439
     DH* (Distribution header structure identifier)        429       PM* (Put message options) . . . . . . . .          440
     DH* (Distribution header version) . . . .         .   429       PM* (Put message options structure length) . .     440
     DHF* (Distribution header flags) . . . . .        .   429       PM* (Put message options structure identifier)     440
     DL* (Distribution list support). . . . . .        .   429       PM* (Put message options version) . . . . .        440
     DL* (Dead-letter header structure identifier) .   .   429       PF* (Put message record field flags) . . . . .     440
     DL* (Dead-letter header version) . . . . .        .   429       PR* (Priority) . . . . . . . . . . . .             441
     DX* (Data-conversion-exit parameter structure                   QA* (Inhibit get) . . . . . . . . . . .            441
     identifier). . . . . . . . . . . . .              . 430         QA* (Inhibit put) . . . . . . . . . . .            441
     DX* (Data-conversion-exit parameter structure                   QA* (Backout hardening) . . . . . . . .            441
     version) . . . . . . . . . . . . .                .   430       QA* (Queue shareability) . . . . . . . .           441
     EI* (Expiry interval) . . . . . . . . .           .   430       QD* (Queue definition type) . . . . . . .          441
     EN* (Encoding). . . . . . . . . . .               .   430       QSIE* (Service interval events) . . . . . .        441
     EN* (Encoding masks) . . . . . . . .              .   430       QT* (Queue type) . . . . . . . . . . .             442
     EN* (Encoding for packed-decimal integers) .      .   430       RC* (Reason code). . . . . . . . . . .             442
     EN* (Encoding for floating-point numbers) .       .   430   |   RL* (Returned length) . . . . . . . . .            446
     EN* (Encoding for binary integers) . . . .        .   431       RM* (Reference message header structure
     EV* (Event reporting) . . . . . . . .             .   431       identifier). . . . . . . . . . . . . .             446
     FB* (Feedback) . . . . . . . . . . .              .   431       RM* (Reference message header version) . . .       446
     FM* (Format) . . . . . . . . . . .                .   432       RM* (Reference message header flags) . . . .       446
     GI* (Group identifier) . . . . . . . .            .   432       RO* (Report options) . . . . . . . . . .           446
     GM* (Get message options). . . . . . .            .   432       RO* (Report-options masks) . . . . . . .           447
     GM* (Get message options structure identifier)        433       SCO* (Queue scope) . . . . . . . . . .             447
     GM* (Get message options version) . . . .         .   433       SEG* (Segmentation) . . . . . . . . . .            447
     GS* (Group status) . . . . . . . . .              .   433   |   SI* (Security identifier) . . . . . . . . .        447
     HC* (Connection handle) . . . . . . .             .   433   |   SIT* (Security identifier type) . . . . . . .      447
     HO* (Object handle) . . . . . . . . .             .   433       SP* (Syncpoint) . . . . . . . . . . . .            448
     IA* (Integer attribute selector) . . . . . .      .   433       SS* (Segment status) . . . . . . . . . .           448
     IAU* (IMS authenticator) . . . . . . .            .   435       TC* (Trigger control) . . . . . . . . . .          448
     IAV* (Integer attribute value) . . . . . .        .   435       TM* (Trigger message structure identifier) . . .   448
     ICM* (IMS commit mode) . . . . . . .              .   435       TM* (Trigger message version) . . . . . .          448
     II* (IMS header flags). . . . . . . . .           .   435       TC* (Trigger message character format structure
     II* (IMS header length) . . . . . . . .           .   435       identifier). . . . . . . . . . . . . .             448
     II* (IMS header structure identifier) . . . .     .   435       TC* (Trigger message character format version)     448
     II* (IMS header version) . . . . . . . .          .   435       TT* (Trigger type) . . . . . . . . . . .           449
     ISS* (IMS security scope) . . . . . . .           .   435       US* (Usage) . . . . . . . . . . . . .              449
     ITI* (IMS transaction instance identifier) . .    .   436       WI* (Wait interval) . . . . . . . . . .            449
     ITS* (IMS transaction state) . . . . . . .        .   436   |   WI* (Workload information header flags) . . .      449
     MD* (Message descriptor structure identifier)         436   |   WI* (Workload information header structure
     MD* (Message descriptor version) . . . .          .   436   |   length) . . . . . . . . . . . . . .                449
     ME* (Message descriptor extension length) .       .   436
                                                                                                                       Contents        vii
viii   MQSeries for AS/400, V5.1 APR (ILE RPG)
Tables
 1.   Elementary data types . . . . . . . . . 5            31.   MQPUT options relating to messages in
 2.   RPG COPY files . . . . . . . . . . . 8                     groups and segments of logical messages . .    153
 3.   ILE RPG bound calls supported by each                32.   Outcome when MQPUT or MQCLOSE call
      service program . . . . . . . . . . . 11                   not consistent with group and segment
 4.   Fields in MQBO . . . . . . . . . . . 15                    information . . . . . . . . . . . .            155
 5.   Initial values of fields in MQBO. . . . . . 16       33.   Initial values of fields in MQPMO . . . .      163
 6.   Fields in MQCIH. . . . . . . . . . . 17              34.   Fields in MQPMR . . . . . . . . . .            165
 7.   Contents of error information fields in MQCIH        35.   Fields in MQRMH . . . . . . . . . .            169
      structure . . . . . . . . . . . . . 18               36.   Initial values of fields in MQRMH . . . .      175
 8.   Initial values of fields in MQCIH . . . . . 28       37.   Fields in MQRR. . . . . . . . . . .            177
 9.   Fields in MQCNO . . . . . . . . . . 31               38.   Initial values of fields in MQRR . . . . .     177
10.   Initial values of fields in MQCNO . . . . . 35       39.   Fields in MQTM . . . . . . . . . .             179
11.   Fields in MQDH . . . . . . . . . . . 37              40.   Initial values of fields in MQTM . . . . .     182
12.   Initial values of fields in MQDH . . . . . 41        41.   Fields in MQTMC2 . . . . . . . . .             185
13.   Fields in MQDLH . . . . . . . . . . 43               42.   Initial values of fields in MQTMC2 . . . .     187
14.   Initial values of fields in MQDLH . . . . . 49       43.   Fields in MQWIH . . . . . . . . . .            189
15.   Fields in MQGMO . . . . . . . . . . 51           |   44.   Initial values of fields in MQWIH. . . . .     191
16.   MQGET options relating to messages in                45.   Fields in MQXQH . . . . . . . . . .            193
      groups and segments of logical messages . . 63       46.   Initial values of fields in MQXQH . . . .      197
17.   Outcome when MQGET or MQCLOSE call not               47.   Effect of MQCLOSE options on various types
      consistent with group and segment                          of object and queue . . . . . . . . .          212
      information . . . . . . . . . . . . 65               48.   Valid MQOPEN options for each queue type       256
18.   Initial values of fields in MQGMO . . . . . 74       49.   Attributes for all queues . . . . . . . .      293
19.   Fields in MQIIH . . . . . . . . . . . 77             50.   Attributes for local and model queues          299
20.   Initial values of fields in MQIIH . . . . . 81       51.   Attributes for local definitions of remote
21.   Fields in MQMD . . . . . . . . . . . 83                    queues . . . . . . . . . . . . . .             313
22.   Initial values of fields in MQMD . . . . . 129       52.   Attributes for namelists . . . . . . . .       317
23.   Fields in MQMDE . . . . . . . . . . 131              53.   Attributes for process definitions . . . . .   319
24.   Queue-manager action when MQMDE                      54.   Attributes for the queue manager . . . . .     323
      specified on MQPUT or MQPUT1. . . . . 132            55.   Names of the sample programs . . . . .         341
25.   Initial values of fields in MQMDE . . . . 135        56.   Sample programs demonstrating use of the
26.   Fields in MQOD . . . . . . . . . . 137                     MQI . . . . . . . . . . . . . .                342
27.   Initial values of fields in MQOD . . . . . 145       57.   Client/Server sample program details           348
28.   Fields in MQOR . . . . . . . . . . 147               58.   Summary of encodings for machine
29.   Initial values of fields in MQOR . . . . . 148             architectures . . . . . . . . . . . .          456
30.   Fields in MQPMO . . . . . . . . . . 149              59.   Fields in MQDXP . . . . . . . . . .            468
                             This book:
                             v Gives a full description of the MQSeries for AS/400 programming interface in
                               the RPG programming language.
                             v Contains information on how to build an executable application.
                             v Contains descriptions of sample programs.
                                 Notes to users
|                               1. This book describes the MQSeries for AS/400 programming interface only
|                                  in the RPG–ILE programming language. If you require details of the
|                                  RPG–OPM programming language, you should refer to the MQSeries
|                                  Application Programming Reference (RPG) V4R2 manual.
|                               2. There are two approaches that can be taken when using the MQI from
|                                  within an RPG program:
|                                  v Dynamic calls to the QMQM program interface.
|                                  v Static Bound Calls to the MQI procedures.
|                                  Using bound calls is generally the preferred method, particulary when the
|                                  program is making repeated calls to the MQI, as it requires less resource.
                             For information on how to design and write applications that use the services
                             MQSeries provides, see the MQSeries Application Programming Guide.
                             To understand this book, you do not need to have written message queuing
                             programs before.
                         Also, we use the following shortened name for this language compiler:
                         RPG Means the IBM ILE RPG for OS/400™ compiler
Chapter 3. MQBO - Begin options       . . . . . . 15         Chapter 12. MQOD - Object descriptor            . . . . 137
Overview . . . . . . . . .             . . . . . . 15        Overview. . . . . . . . . . .                    . . . . 137
Fields . . . . . . . . . .             . . . . . . 15        Fields . . . . . . . . . . . .                   . . . . 138
Initial values and RPG declaration.    . . . . . . 16        Initial values and RPG declaration . .           . . . . 145
   RPG declaration . . . . . .         . . . . . . 16           RPG declaration . . . . . . .                 . . . . 146
Chapter 4. MQCIH - CICS bridge header       . . . . 17       Chapter 13. MQOR - Object record . . . . . 147
Overview . . . . . . . . . . .               . . . . 18      Overview. . . . . . . . . . . . . . . 147
Fields . . . . . . . . . . . .               . . . . 19      Fields . . . . . . . . . . . . . . . . 147
Initial values and RPG declaration. . .      . . . . 28      Initial values and RPG declaration . . . . . . 148
   RPG declaration . . . . . . . .           . . . . 29         RPG declaration . . . . . . . . . . . 148
Chapter 5. MQCNO - Connect options. . . . . 31               Chapter 14. MQPMO - Put message            options       . . 149
Overview . . . . . . . . . . . . . . . 31                    Overview. . . . . . . . . .                 . . .         . . 149
Fields . . . . . . . . . . . . . . . . 31                    Fields . . . . . . . . . . .                . . .         . . 150
Initial values and RPG declaration. . . . . . . 35           Initial values and RPG declaration .        . . .         . . 163
   RPG declaration . . . . . . . . . . . . 35                   RPG declaration . . . . . .              . . .         . . 164
Chapter 6. MQDH - Distribution header . . . . 37             Chapter 15. MQPMR - Put-message        record . . 165
Overview . . . . . . . . . . . . . . . 37                    Overview. . . . . . . . . .             . . . . . 165
Fields . . . . . . . . . . . . . . . . 38                    Fields . . . . . . . . . . .            . . . . . 165
Initial values and RPG declaration. . . . . . . 41           Initial values and RPG declaration .    . . . . . 167
   RPG declaration . . . . . . . . . . . . 41                   RPG declaration . . . . . .          . . . . . 167
                         The benefits of the second option are that the definitions can be used as a ‘FIELD
                         REFERENCE FILE’ for other AS/400 objects. If an MQ data type definition
                         changes, it is a relatively simple matter to recreate these objects.
              MQBYTE - Byte
                         The MQBYTE data type represents a single byte of data. No particular
                         interpretation is placed on the byte—it is treated as a string of bits, and not as a
                         binary number or character. No special alignment is required.
                         If the data in the string is shorter than the defined length of the string, the data
                         must be padded with nulls to fill the string.
                         When the queue manager returns byte strings to the application (for example, on
                         the MQGET call), the queue manager always pads with nulls to the defined length
                         of the string.
                         Constants are available that define the lengths of byte string fields; see “LN*
                         (Lengths of character string and byte fields)” on page 421.
             MQCHAR – character
                         The MQCHAR data type represents a single character. The coded character set
                         identifier of the character is that of the queue manager (see the CodedCharSetId
                         attribute on page 326). No special alignment is required.
                         Note: Application message data specified on the MQGET, MQPUT, and MQPUT1
                               calls is described by the MQBYTE data type, not the MQCHAR data type.
                         If the data in the string is shorter than the defined length of the string, the data
                         must be padded with blanks to fill the string. In some cases a null character can be
                         used to end the string prematurely, instead of padding with blanks; the null
                         character and characters following it are treated as blanks, up to the defined length
                         of the string. The places where a null can be used are identified in the call and
                         data type descriptions.
                         When the queue manager returns character strings to the application (for example,
                         on the MQGET call), the queue manager always pads with blanks to the defined
                         length of the string; the queue manager does not use the null character to delimit
                         the string.
                         Constants are available that define the lengths of character string fields; see “LN*
                         (Lengths of character string and byte fields)” on page 421.
Note: Applications must test variables of this type for equality only.
                         The MQI also uses the following structure data types, which are included in this
                         chapter for completeness, but they are not part of the application programming
                         interface.
                         v MQCIH – CICS bridge header
                         v MQDH – Distribution header
                         v MQDLH – Dead-letter (undelivered-message) header
                         v MQIIH – IMS™ bridge header
                         v MQTM – Trigger message
                         v MQTMC2 – Trigger message (character format 2)
                         v MQWIH – Work Information header
                         v MQXQH – Transmission queue header
                                   There is also a description of the purpose of the field, together with a list
                                   of any values that the field can take. Names of constants are shown in
                                   uppercase; for example, GMSIDV. A set of constants having the same prefix
                                   is shown using the * character, for example: IA*.
Language considerations
                         This section contains information to help you use the MQI from the RPG
                         programming language.
             COPY files
                         Various COPY files are provided as part of the definition of the message queue
                         interface (MQI), to assist with the writing of RPG application programs that use
                         message queuing. There are two sets of COPY files:
                         v COPY files with names ending with the letter “G” are for use with programs
                            that use static linkage.
                         v COPY files with names ending with the letter “R” are for use with programs
                           that use dynamic linkage.
                         For each set of COPY files, there are two files containing named constants, and one
                         file for each of the structures. The COPY files are summarized in Table 2.
Table 2. RPG COPY files
Filename (static   Filename           Contents
linkage)           (dynamic
                   linkage)
CMQBOG             –                  Begin options structure
CMQCIHG            CMQCIHR            CICS information header structure
CMQCNOG            –                  Connect options structure
CMQDHG             CMQDHR             Distribution header structure
CMQDLHG            CMQDLHR            Dead-letter (undelivered-message) header structure
CMQDXPG            CMQDXPR            Data-conversion-exit parameter structure
CMQGMOG            CMQGMOR            Get-message options structure
CMQIIHG            CMQIIHR            IMS information header structure
CMQMDG             CMQMDR             Message descriptor structure
CMQMDEG            CMQMDER            Message descriptor extension structure
CMQMD1G            CMQMD1R            Message descriptor structure version 1
CMQODG             CMQODR             Object descriptor structure
CMQORG             CMQORR             Object record structure
             Calls
                       In “Chapter 22. Call descriptions” on page 201, the calls are described using their
                       individual names. In RPG using dynamic linkage, all calls are made to the single
                       name QMQM, and the particular function required is specified by coding an
                       additional parameter which precedes the normal parameters for that call. The
                       following named constants may be used for this additional parameter, in order to
                       identify the function required:
                       Named constant
                             Function required
                       MQCLOS
                             Close object.
                       MQCONN
                             Connect queue manager.
                       MQDISC
                             Disconnect queue manager.
                       MQGET
                             Get message.
                       MQINQ
                             Inquire about object attributes.
                       MQOPEN
                             Open object.
                       MQPUT
                             Put message.
                       MQPUT1
                             Put one message.
                       MQSET
                             Set object attributes.
                       These constants have names which are the same as the calls they identify, with the
                       exception of the constant for the MQCLOSE call, which is abbreviated to
                       MQCLOS.
                       Note: The calls MQBACK, MQCMIT, and MQCONNX, are not available to
                             applications running in compatibility mode.
             Notational conventions
                        The sections that follow show how the:
                        v Calls should be invoked
                        v Parameters should be declared
                        v Various data types should be declared
                        In a number of cases, parameters are arrays or character strings whose size is not
                        fixed. For these, a lower case “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.
             MQI procedures
                        When using the ILE bound calls, you must bind to the MQI procedures when you
                        create your program. These procedures are exported from the following service
                        programs as appropriate:
                        QMQM/AMQZSTUB
                            This service program provides compatibility bindings for applications
                            written prior to version 5.1 that do not require access to any of the new
                            capabilities provided in version 5.1. The signature of this service program
                            matches that contained in version 4.2.1.
                        QMQM/LIBMQM
                            This service program contains the single-threaded bindings for version 5.1.
                            See below for special considerations when writing threaded applications.
                        QMQM/LIBMQM_R
                            This service program contains the multi-threaded bindings for version 5.1.
                            See below for special considerations when writing threaded applications.
                        Use the CRTPGM command to create your programs. For example, the following
                        command would create a single-threaded program that uses the ILE bound calls:
                        CRTPGM   PGM(MYPROGRAM) BNDSRVPGM(QMQM/LIBMQM)
             Threading considerations
                        In general, RPG programs should not use the multi-threaded service programs.
                        Exceptions are RPG programs created using the version 4.4 ILE RPG compiler and
                        containing the THREAD(*SERIALIZE) keyword in the control specification. However,
                        even though these programs are thread-safe, careful consideration must be given to
                        the overall application design, as THREAD(*SERIALIZE) forces serialization of RPG
                        procedures at the module level, and this may have an adverse affect on overall
                        performance.
      For further information about threading, see the AS/400 ILE RPG/400 Reference, and
      the AS/400 ILE RPG/400 Programmer’s Guide.
Named constants
      There are a large number of different integer and character values that provide
      data interchange between your application program and the MQI. To facilitate a
      more readable and consistent approach to using these values, they have all been
      allocated named constants.
      You are recommended to use these named constants and not the values they
      represent, as this improves the readibility of the program source code. Also, if the
      value of any of these constants should change, you will only need to recompile
      your program to incorporate the changes.
Commitment control
      The MQI syncpoint functions MQCMIT and MQBACK are available to ILE RPG
      programs running in normal mode; these calls allow the program to commit and
      back out changes to MQ resources.
      The MQCMIT and MQBACK calls are not available to ILE RPG programs running
      in compatibility mode. For these programs you should use the operation codes
      COMMIT and ROLBK.
                        For example the MQOPEN call requires the inclusion of the following code:
                            D******************************************************************
                            D** MQOPEN Call -- Open Object (From COPY file CMQG)             **
                            D******************************************************************
                            D*
                            D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                            DMQOPEN           PR                   EXTPROC('MQOPEN')
                            D* Connection handle
                            D HCONN                          10I 0 VALUE
                            D* Object descriptor
                            D OBJDSC                       224A
                            D* Options that control the action of MQOPEN
                            D OPTS                           10I 0 VALUE
                            D* Object handle
                            D HOBJ                           10I 0
                            D* Completion code
                            D CMPCOD                         10I 0
                            D* Reason code qualifying CMPCOD
                            D REASON                         10I 0
                            D*
                        To call the procedure, after initializing the various parameters, you need the
                        following code:
                         ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+....8
                             C                   CALLP     MQOPEN(HCONN : MQOD : OPTS : HOBJ :
                             C                             CMPCOD : REASON)
                        Here, the structure MQOD is defined using the COPY member CMQODG which
                        breaks it down into its components.
Note: Function that is new in version 5 release 1 cannot be accessed by calls that
      use dynamic linkage. For example, the MQBACK, MQBEGIN, MQCMIT,
      and MQCONNX calls can be used only with static linkage.
    Overview
                             The MQBO structure is an input/output parameter for the MQBEGIN call.
    Fields
                             BOSID (4-byte character string)
                                 Structure identifier.
                                 This is always an input field. The initial value of this field is BOSIDV.
                             BOVER (10-digit signed integer)
                                 Structure version number.
                                 The following constant specifies the version number of the current version:
                                 BOVERC
                                      Current version of begin-options structure.
                                 This is always an input field. The initial value of this field is BOVER1.
                             BOOPT (10-digit signed integer)
                                 Options that control the action of MQBEGIN.
This is always an input field. The initial value of this field is BONONE.
             RPG declaration
                              D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              D* MQBO Structure
                              D*
                              D* Structure identifier
                              D BOSID                   1      4
                              D* Structure version number
                              D BOVER                   5      8I 0
                              D* Options that control the action of MQBEGIN
                              D BOOPT                   9     12I 0
Overview
                           The MQCIH structure describes the information that can be present at the start of a
                           message sent to the CICS bridge through MQSeries for OS/390™. The structure can
                           be omitted if the values required by the application are the same as the initial
                           values shown in Table 8 on page 28 and the bridge is running with AUTH=LOCAL
                           or IDENTIFY. The format name of this structure is FMCICS.
                           The current version of MQCIH is CIVER2. Fields that exist only in the version-2
                           structure are identified as such in the descriptions that follow. The declaration of
                           MQCIH provided in the COPY file contains the new fields, with the initial value of
                           the CIVER field set to GMVER2.
                           Special conditions apply to the character set and encoding used for the MQCIH
                           structure and application message data:
                           v Applications that connect to the queue manager which owns the CICS bridge
                              queue must provide an MQCIH structure that is in the character set and
                              encoding of the queue manager. This is because data conversion of the MQCIH
                              structure is not performed in this case.
                           v Applications that connect to other queue managers can provide an MQCIH
                              structure that is in any of the supported character sets and encodings;
                              conversion of the MQCIH and application message data is performed by the
                              queue manager as necessary.
                             Note: There is one exception to this. If the queue manager which owns the CICS
                                     bridge queue is using CICS for distributed queuing, the MQCIH must be
                                     in the character set and encoding of that queue manager.
                           v The application message data following the MQCIH structure must be in the
                             same character set and encoding as the MQCIH structure. The CICSI and CIENC
                             fields in the MQCIH structure cannot be used to specify the character set and
                             encoding of the application message data.
                           The application must ensure that fields documented as “request” fields have
                           appropriate values in the message that the application sends to the CICS bridge;
                           these fields are input to the bridge. Fields documented as “response” fields are set
                           by the CICS bridge in the reply message that the bridge sends to the application.
                           Error information is returned in the CIRET, CIFNC, CICC, CIREA, and CIAC fields.
                           Which of them is set depends on the value of the CIRET field; see Table 7.
Table 7. Contents of error information fields in MQCIH structure
CIRET                                                CIFNC               CICC             CIREA        CIAC
CRC000                                                 –                  –                –               –
CRC003                                                 –                  –               FBC*             –
CRC002 CRC008                                     MQ call name        MQ CMPCOD       MQ REASON            –
CRC001 CRC006 CRC007 CRC009                       CICS EIBFN         CICS EIBRESP   CICS EIBRESP2          –
CRC004 CRC005                                          –                  –                –        CICS ABCODE
Fields
         CISID (4-byte character string)
             Structure identifier.
             The following constant specifies the version number of the current version:
             CIVERC
                   Current version of CICS information header structure.
             This is a reserved field; its value is not significant. The initial value of this field
             is 0.
         CICSI (10-digit signed integer)
             Reserved.
             This is a reserved field; its value is not significant. The initial value of this field
             is 0.
                             This is the MQ format name of the data that follows the MQCIH structure. The
                             rules for coding this are the same as those for the MDFMT field in MQMD.
                             This format name is also used for the reply message, if the CIRFM field has the
                             value FMNONE.
                             If the request message results in the generation of an error reply message, the
                             error reply message has a format name of FMSTR.
                             This is a request field. The length of this field is given by LNFMT. The initial
                             value of this field is FMNONE.
                        CIFLG (10-digit signed integer)
                            Flags.
                             This is the return code from the CICS bridge describing the outcome of the
                             processing performed by the bridge. The CIFNC, CICC, CIREA, and CIAC fields
                             may contain additional information (see Table 7 on page 18). The value is one
                             of the following:
                             CRC000
                                   (0, X'000') No error.
                             CRC001
                                   (1, X'001') EXEC CICS statement detected an error.
                             CRC002
                                   (2, X'002') MQ call detected an error.
                             CRC003
                                   (3, X'003') CICS bridge detected an error.
                             CRC004
                                   (4, X'004') CICS bridge ended abnormally.
                             CRC005
                                   (5, X'005') Application ended abnormally.
                             CRC006
                                   (6, X'006') Security error occurred.
                             CRC007
                                   (7, X'007') Program not available.
                             CRC008
                                   (8, X'008') Second or later message within current unit of work not
                                   received within specified time.
The value returned in this field is dependent on CIRET; see Table 7 on page 18.
The value returned in this field is dependent on CIRET; see Table 7 on page 18.
    This controls the unit-of-work processing performed by the CICS bridge. You
    can request the bridge to run a single transaction, or one or more programs
    within a unit of work. The field indicates whether the CICS bridge should start
    a unit of work, perform the requested function within the current unit of work,
    or end the unit of work by committing it or backing it out. Various
    combinations are supported, to optimize the data transmission flows.
    This field is applicable only when CIUOW has the value CUFRST. It allows the
    sending application to specify the approximate time in milliseconds that the
    MQGET calls issued by the bridge should wait for second and subsequent
                             This indicates the type of object that the bridge should try to link. The value
                             must be one of the following:
                             LTPROG
                                  DPL program.
                             LTTRAN
                                  3270 transaction.
                             This is the length of the user data to be returned to the client in a reply
                             message. This length includes the 8-byte program name. The length of the
                             COMMAREA passed to the linked program is the maximum of this field and
                             the length of the user data in the request message, minus 8.
                             Note: The length of the user data in a message is the length of the message
                                   excluding the MQCIH structure.
                             If the length of the user data in the request message is smaller than CIODL, the
                             DATALENGTH option of the LINK command is used; this allows the LINK to be
                             function-shipped efficiently to another CICS region.
                             This is a request field used only for DPL programs. The initial value of this
                             field OLINPT.
                        CIFKT (10-digit signed integer)
                            Bridge facility release time.
                             This is the length of time in seconds that the bridge facility will be kept after
                             the user transaction has ended.
    This is a request field used only for 3270 transactions. The initial value of this
    field is ADNONE.
CICT (10-digit signed integer)
    Whether task can be conversational.
    This is a request field used only for 3270 transactions. The initial value of this
    field is CTNO.
CITES (10-digit signed integer)
    Status at end of task.
    This field shows the status of the user transaction at end of task. One of the
    following values is returned:
    TENOSY
         Not synchronized.
            The user transaction has not yet completed and has not syncpointed.
    TECMIT
         Commit unit of work.
            The user transaction has not yet completed, but has syncpointed the
            first unit of work.
    TEBACK
         Back out unit of work.
            The user transaction has not yet completed. The current unit of work
            will be backed out.
                             This is a response field used only for 3270 transactions. The initial value of this
                             field is TENOSY.
                        CIFAC (8-byte bit string)
                            BVT token value.
                             This is both a request and a response field used only for 3270 transactions. The
                             length of this field is given by LNFAC. The initial value of this field is
                             FCNONE.
                        CIFNC (4-byte character string)
                            MQ call name or CICS EIBFN function.
                             The value returned in this field is dependent on CIRET; see Table 7 on page 18.
                             The following values are possible when CIFNC contains an MQ call name:
                             CFCONN
                                  MQCONN call.
                             CFGET
                                      MQGET call.
                             CFINQ
                                      MQINQ call.
                             CFOPEN
                                  MQOPEN call.
                             CFPUT
                                      MQPUT call.
                             CFPUT1
                                   MQPUT1 call.
                             CFNONE
                                  No call.
                             This is a response field. The length of this field is given by LNFUNC. The
                             initial value of this field is CFNONE.
                        CIAC (4-byte character string)
                            Abend code.
    This is a response field. The length of this field is given by LNABNC. The
    initial value of this field is 4 blank characters.
CIAUT (8-byte character string)
    Password or passticket.
    This is a request field. The length of this field is given by LNAUTH. The initial
    value of this field is 8 blanks.
CIRS1 (8-byte character string)
    Reserved.
    This is the MQ format name of the reply message which will be sent in
    response to the current message. The rules for coding this are the same as
    those for the MDFMT field in MQMD.
    This is a request field used only for DPL programs. The length of this field is
    given by LNFMT. The initial value of this field is FMNONE.
CIRSI (4-byte character string)
    Remote sysid to use.
    This is a reserved field. The value must be 4 blanks. The length of this field is
    given by LNRSID.
CIRTI (4-byte character string)
    Remote transid to attach.
    This is a reserved field. The value must be 4 blanks. The length of this field is
    given by LNTRID.
CITI (4-byte character string)
    Transaction to attach.
    If CILT has the value LTTRAN, CITI is the transaction identifier of the user
    transaction to be run; a nonblank value must be specified in this case.
    If CILT has the value LTPROG, CITI is the transaction code under which all
    programs within the unit of work are to be run. If the value specified is blank,
    the CICS DPL bridge default transaction code (CKBP) is used. If the value is
    nonblank, it must have been defined to CICS as a local TRANSACTION whose
    initial program is CSQCBP00. This field is applicable only when CIUOW has the
    value CUFRST or CUONLY.
    This is a request field. The length of this field is given by LNTRID. The initial
    value of this field is 4 blanks.
                             This is the name of an installed terminal that is to be used as a model for the
                             bridge facility. A value of blanks means that CIFL is taken from the bridge
                             transaction profile definition, or a default value is used.
                             This is a request field used only for 3270 transactions. The length of this field
                             is given by LNFACL. The initial value of this field is 4 blanks.
                        CIAI (4-byte character string)
                            AID key.
                             This is the initial value of the AID key when the transaction is started. It is a
                             1-byte value, left justified.
                             This is a request field used only for 3270 transactions. The length of this field
                             is given by LNATID. The initial value of this field is 4 blanks.
                        CISC (4-byte character string)
                            Transaction start code.
                             In the response from the bridge, this field is set to the start code appropriate to
                             the next transaction ID contained in the CINTI field. The following start codes
                             are possible in the response:
                                 SCSTRT
                                 SCDATA
                                 SCTERM
                             For CICS Transaction Server Version 1.2, this field is a request field only; its
                             value in the response is undefined.
                             For CICS Transaction Server Version 1.3 and subsequent releases, this is both a
                             request and a response field.
                             This field is used only for 3270 transactions. The length of this field is given by
                             LNSTCO. The initial value of this field is SCNONE.
                        CICNC (4-byte character string)
                            Abend transaction code.
    This is the name of the next transaction returned by the user transaction
    (usually by EXEC CICS RETURN TRANSID). If there is no next transaction,
    this field is set to blanks.
    This is a response field used only for 3270 transactions. The length of this field
    is given by LNTRID. The initial value of this field is 4 blanks.
CIRS2 (8-byte character string)
    Reserved.
The remaining fields are not present if CIVER is less than CIVER2.
CICP (10-digit signed integer)
    Cursor position.
    This is the initial cursor position when the transaction is started. Subsequently,
    for conversational transactions, the cursor position is in the RECEIVE vector.
    This is a request field used only for 3270 transactions. The initial value of this
    field is 0. This field is not present if CIVER is less than CIVER2.
CIEO (10-digit signed integer)
    Offset of error in message.
    This is the position of invalid data detected by the bridge exit. This field
    provides the offset from the start of the message to the location of the invalid
    data.
    This is a response field used only for 3270 transactions. The initial value of this
    field is 0. This field is not present if CIVER is less than CIVER2.
CIII (10-digit signed integer)
    Item number of last message read.
    This is a reserved field. The value must be 0. This field is not present if CIVER
    is less than CIVER2.
CIRS4 (10-digit signed integer)
    Reserved.
    This is a reserved field. The value must be 0. This field is not present if CIVER
    is less than CIVER2.
RPG declaration
           D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
           D* MQCIH Structure
           D*
           D* Structure identifier
           D CISID                   1      4
           D* Structure version number
           D CIVER                   5      8I 0
           D* Length of MQCIH structure
           D CILEN                   9     12I 0
           D* Reserved
           D CIENC                  13     16I 0
           D* Reserved
           D CICSI                  17     20I 0
           D* MQ format name of data that follows MQCIH
           D CIFMT                  21     28
           D* Flags
           D CIFLG                  29     32I 0
           D* Return code from bridge
           D CIRET                  33     36I 0
           D* MQ completion code or CICS EIBRESP
           D CICC                   37     40I 0
           D* MQ reason or feedback code, or CICS EIBRESP2
           D CIREA                  41     44I 0
           D* Unit-of-work control
           D CIUOW                  45     48I 0
           D* Wait interval for MQGET call issued by bridge task
           D CIGWI                  49     52I 0
           D* Link type
           D CILT                   53     56I 0
           D* Output COMMAREA data length
           D CIODL                  57     60I 0
           D* Bridge facility release time
           D CIFKT                  61     64I 0
           D* Send/receive ADS descriptor
           D CIADS                  65     68I 0
           D* Whether task can be conversational
           D CICT                   69     72I 0
           D* Status at end of task
           D CITES                  73     76I 0
           D* BVT token value
           D CIFAC                  77     84
           D* MQ call name or CICS EIBFN function
           D CIFNC                  85     88
           D* Abend code
           D CIAC                   89     92
           D* Password or passticket
           D CIAUT                  93    100
           D* Reserved
           D CIRS1                 101    108
           D* MQ format name of reply message
           D CIRFM                 109    116
           D* Remote sysid to use
           D CIRSI                 117    120
           D* Remote transid to attach
           D CIRTI                 121    124
           D* Transaction to attach
           D CITI                  125    128
Overview
                         The MQCNO structure is an input/output parameter for the MQCONNX call.
Fields
                         CNSID (4-byte character string)
                             Structure identifier.
                             This is always an input field. The initial value of this field is CNSIDV.
                         CNVER (10-digit signed integer)
                             Structure version number.
                             The following constant specifies the version number of the current version:
                             CNVERC
                                  Current version of connect-options structure.
                             This is always an input field. The initial value of this field is CNVER1.
                         CNOPT (10-digit signed integer)
                             Options that control the action of MQCONNX.
This is always an input field. The initial value of this field is CNNONE.
                The remaining fields are not present if CNVER is less than CNVER2.
                CNCCO (10-digit signed integer)
                    Offset of MQCD structure for client connection.
                   This is the offset in bytes of an MQCD channel definition structure from the
                   start of the MQCNO structure. The offset can be positive or negative.
                   CNCCO is used only when the application issuing the MQCONNX call is
                   running as an MQ client. For information on how to use this field, see the
                   description of the CNCCP field.
                   This is an input field. The initial value of this field is 0. This field is not
                   present if CNVER is less than CNVER2.
                CNCCP (pointer)
                    Address of MQCD structure for client connection.
                   CNCCO and CNCCP are used only when the application issuing the MQCONNX
                   call is running as an MQ client. By specifying one or other of these fields, the
                   application can control the definition of the client connection channel by
                   providing an MQCD channel definition structure that contains the values
                   required.
If the application is not running as an MQ client, CNCCO and CNCCP are ignored.
                   If the application provides an MQCD structure, the fields listed below must be
                   set to the values required; other fields in MQCD are ignored. Character strings
                   can be padded with blanks to the length of the field, or terminated by a null
                   character. Refer to the MQSeries Intercommunication book for more information
                   about the fields in the MQCD structure.
                                Whichever technique is chosen, only one of CNCCO and CNCCP can be used; the
                                call fails with reason code RC2278 if both are nonzero.
                                Once the MQCONNX called has completed, the MQCD structure is not
                                referenced again.
                                This is an input field. The initial value of this field is the null pointer. This
                                field is not present if CNVER is less than CNVER2.
            RPG declaration
                        D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                        D* MQCNO Structure
                        D*
                        D* Structure identifier
                        D CNSID                   1      4
                        D* Structure version number
                        D CNVER                   5      8I 0
                        D* Options that control the action of MQCONNX
                        D CNOPT                   9     12I 0
                        D* Offset of MQCD structure for client connection
                        D CNCCO                  13     16I 0
                        D* Address of MQCD structure for client connection
                        D CNCCP                  17     32*
Overview
                         The MQDH structure describes the data that is present in a message on a
                         transmission queue when that message is a distribution-list message (that is, the
                         message is being sent to multiple destination queues). This structure is for use by
                         specialized applications that put messages directly on transmission queues, or
                         which remove messages from transmission queues (for example: message channel
                         agents).
                         This structure should not be used by normal applications which simply want to
                         put messages to distribution lists. Those applications should use the MQOD
                         structure to define the destinations in the distribution list, and the MQPMO
                         structure to specify message properties or receive information about the messages
                         sent to the individual destinations.
                         When an application puts a message to a distribution list, and some or all of the
                         destinations are remote, the queue manager prefixes the application message data
                         with the MQXQH and MQDH structures, and places the message on the relevant
                         transmission queue. The data therefore occurs in the following sequence when the
                         message is on a transmission queue:
                         v MQXQH structure
                         v MQDH structure
                         v Application message data
Fields
                        DHSID (4-byte character string)
                            Structure identifier.
                             The following constant specifies the version number of the current version:
                             DHVERC
                                  Current version of distribution header structure.
                             This is the number of bytes from the start of the MQDH structure to the start
                             of the message data following the arrays of MQOR and MQPMR records. The
                             data occurs in the following sequence:
                             v MQDH structure
                             v Array of MQOR records
                             v Array of MQPMR records
                             v Message data
                             The arrays of MQOR and MQPMR records are addressed by offsets contained
                             within the MQDH structure. If these offsets result in unused bytes between one
                             This field gives the offset in bytes of the first record in the array of MQOR
                             object records containing the names of the destination queues. There are DHCNT
                             records in this array. These records (plus any bytes skipped between the first
                             object record and the previous field) are included in the length given by the
                             DHLEN field.
                             A distribution list must always contain at least one destination, so DHORO must
                             always be greater than zero.
                             This field gives the offset in bytes of the first record in the array of MQPMR
                             put message records containing the message properties. If present, there are
                             DHCNT records in this array. These records (plus any bytes skipped between the
                             first put message record and the previous field) are included in the length
                             given by the DHLEN field.
        RPG declaration
                    D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                    D* MQDH Structure
                    D*
                    D* Structure identifier
                    D DHSID                   1      4
                    D* Structure version number
                    D DHVER                   5      8I 0
                    D* Length of MQDH structure plus following records
                    D DHLEN                   9     12I 0
                    D* Numeric encoding of data that follows array of MQPMR records
                    D DHENC                  13     16I 0
                    D* Character set identifier of data that follows array of MQPMR
                    D* records
                    D DHCSI                  17     20I 0
                    D* Format name of data that follows array of MQPMR records
                    D DHFMT                  21     28
                    D* General flags
                    D DHFLG                  29     32I 0
                    D* Flags indicating which MQPMR fields are present
                    D DHPRF                  33     36I 0
                    D* Number of object records present
                    D DHCNT                  37     40I 0
                    D* Offset of first object record from start of MQDH
                    D DHORO                  41     44I 0
                    D* Offset of first put message record from start of MQDH
                    D DHPRO                  45     48I 0
Overview
                         The MQDLH structure describes the information that is prefixed to the application
                         message data of messages on the dead-letter (undelivered-message) queue. A
                         message can arrive on the dead-letter queue either because the queue manager or
                         message channel agent has redirected it to the queue, or because an application has
                         put the message directly on the queue.
                         Applications that put messages directly on the dead-letter queue should prefix the
                         message data with an MQDLH structure, and initialize the fields with appropriate
                         values. However, the queue manager does not check that an MQDLH structure is
                         present, or that valid values have been specified for the fields.
                         If a message is too long to put on the dead-letter queue, the application should
                         consider doing one of the following:
                         v Truncate the message data to fit on the dead-letter queue.
                         v Record the message on auxiliary storage and place an exception report message
                           on the dead-letter queue indicating this.
                        When a message is put on the dead-letter queue, all of the fields in the message
                        descriptor MQMD should be copied from those in the original message descriptor
                        (if there is one), with the exception of the following:
                        v The MDCSI and MDENC fields should be set to whatever character set and encoding
                           are used for fields in the MQDLH structure.
                        v The MDFMT field should be set to FMDLH to indicate that the data begins with a
                           MQDLH structure.
                        v The context fields:
                               MDUID
                               MDACC
                               MDAID
                               MDPAT
                               MDPAN
                               MDPD
                               MDPT
                               MDAOD
                           should be set by using a context option appropriate to the nature of the
                           program:
                           – A program putting on the dead-letter queue a message that is not related to
                             any preceding message should use the PMDEFC option; this causes the queue
                             manager to set all of the context fields in the message descriptor to their
                             default values.
                           – A program putting on the dead-letter queue a message it has just received
                             should use the PMPASA option, in order to preserve the original context
                             information.
                           – A program putting on the dead-letter queue a reply to a message it has just
                             received should use the PMPASI option; this preserves the identity
                             information but sets the origin information to be that of the server.
                           – A message channel agent putting on the dead-letter queue a message it
                             received from its communication channel should use the PMSETA option, to
                             preserve the original context information.
                        Character data in the MQDLH structure should be in the character set defined by
                        the MDCSI field of the message descriptor. Numeric data in the MQDLH structure
                        should be in the data encoding defined by the MDENC field of the message
                        descriptor. The application should ensure that all fields have valid values, and that
             Applications that get messages from the dead-letter queue should verify that the
             messages begin with an MQDLH structure. The application can determine whether
             an MQDLH structure is present by examining the MDFMT field in the message
             descriptor MQMD; if the field has the value FMDLH, the message data begins
             with an MQDLH structure. Applications that get messages from the dead-letter
             queue should also be aware that such messages may have been truncated if they
             were originally too long for the queue.
    Fields
             DLSID (4-byte character string)
                 Structure identifier.
                 The following constant specifies the version number of the current version:
                 DLVERC
                      Current version of dead-letter header structure.
                 This identifies the reason why the message was placed on the dead-letter
                 queue instead of on the original destination queue. It should be one of the FB*
                 or RC* values (for example, RC2053). See the description of the MDFB field in
                 “Chapter 10. MQMD - Message descriptor” on page 83 for details of the
                 common FB* values that can occur.
                 If the value is in the range FBIFST through FBILST, the actual IMS error code
                 can be determined by subtracting FBIERR from the value of the DLREA field.
|                Some FB* values occur only in this field. They relate to repository messages,
                 trigger messages, or transmission-queue messages that have been transferred to
                 the dead-letter queue. These are:
                 FBABEG
                      Application cannot be started.
                                 This is the name of the message queue that was the original destination for the
                                 message.
                                 The length of this field is given by LNQN. The initial value of this field is 48
                                 blank characters.
                            DLDM (48-byte character string)
                                Name of original destination queue manager.
                                 This is the name of the queue manager that was the original destination for the
                                 message.
                                 The length of this field is given by LNQMN. The initial value of this field is 48
                                 blank characters.
                            DLENC (10-digit signed integer)
                                Numeric encoding of data that follows MQDLH.
                                 This specifies the data encoding used for numeric data in the original message.
                                 It applies to the message data which follows the MQDLH structure; it does not
                                 apply to numeric data in the MQDLH structure itself.
   The value ENNAT can be used for the DLENC field in both the MQDLH and
   MQMD structures.
   This specifies the coded character set identifier of character data in the original
   message. It applies to the message data which follows the MQDLH structure; it
   does not apply to character data in the MQDLH structure itself.
   When an MQDLH structure is prefixed to the message data, the original coded
   character set identifier should be preserved by copying it from the MDCSI field
   in the message descriptor MQMD to the DLCSI field in the MQDLH structure.
   The MDCSI field in the message descriptor should then be set to the value
   appropriate to the character data in the MQDLH structure.
   The value CSQM can be used for the MDCSI field in the MQMD structure, but
   should not be used for the DLCSI field in the MQDLH structure, as the queue
   manager does not replace the value CSQM in the latter field by the value that
   applies to the queue manager.
   This is the format name of the application data in the original message. It
   applies to the message data which follows the MQDLH structure; it does not
   apply to the MQDLH structure itself.
   The length of this field is given by LNFMT. The initial value of this field is
   FMNONE.
DLPAT (10-digit signed integer)
    Type of application that put message on dead-letter (undelivered-message)
    queue.
   This field has the same meaning as the MDPAT field in the message descriptor
   MQMD (see “Chapter 10. MQMD - Message descriptor” on page 83 for details).
   If it is the queue manager that redirects the message to the dead-letter queue,
   DLPAT has the value ATQM.
                             The format of the name depends on the DLPAT field. See, also, the description
                             of the MDPAN field in “Chapter 10. MQMD - Message descriptor” on page 83.
                             If it is the queue manager that redirects the message to the dead-letter queue,
                             DLPAN contains the first 28 characters of the queue-manager name, padded with
                             blanks if necessary.
                             The length of this field is given by LNPAN. The initial value of this field is 28
                             blank characters.
                        DLPD (8-byte character string)
                            Date when message was put on dead-letter (undelivered-message) queue.
                             The format used for the date when this field is generated by the queue
                             manager is:
                                 YYYYMMDD
                             where   the characters represent:
                             YYYY     year (four numeric digits)
                             MM       month of year (01 through 12)
                             DD       day of month (01 through 31)
                             Greenwich Mean Time (GMT) is used for the DLPD and DLPT fields, subject to
                             the system clock being set accurately to GMT.
                             The length of this field is given by LNPDAT. The initial value of this field is 8
                             blank characters.
                        DLPT (8-byte character string)
                            Time when message was put on the dead-letter (undelivered-message) queue.
                             The format used for the time when this field is generated by the queue
                             manager is:
                                HHMMSSTH
                             where   the characters represent (in order):
                             HH       hours (00 through 23)
                             MM       minutes (00 through 59)
                             SS       seconds (00 through 59; see note below)
                             T        tenths of a second (0 through 9)
                             H        hundredths of a second (0 through 9)
                             The length of this field is given by LNPTIM. The initial value of this field is 8
                             blank characters.
        RPG declaration
                      D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                      D* MQDLH Structure
                      D*
                      D* Structure identifier
                      D DLSID                   1      4
                      D* Structure version number
                      D DLVER                   5      8I 0
                      D* Reason message arrived on dead-letter (undelivered-message)
                      D* queue
                      D DLREA                   9     12I 0
                      D* Name of original destination queue
                      D DLDQ                   13     60
                      D* Name of original destination queue manager
                      D DLDM                   61    108
                      D* Numeric encoding of data that follows MQDLH
                      D DLENC                 109    112I 0
                      D* Character set identifier of data that follows MQDLH
                      D DLCSI                 113    116I 0
                      D* Format name of data that follows MQDLH
                      D DLFMT                 117    124
                      D* Type of application that put message on dead-letter
                      D* (undelivered-message) queue
                      D DLPAT                 125    128I 0
                      D* Name of application that put message on dead-letter
                      D* (undelivered-message) queue
                      D DLPAN                 129    156
                      D* Date when message was put on dead-letter (undelivered-message)
                      D* queue
                      D DLPD                  157    164
                      D* Time when message was put on the dead-letter
                      D* (undelivered-message) queue
                      D DLPT                  165    172
    Overview
                             The current version of MQGMO is given by GMVERC. Fields that exist only in the
                             more-recent versions of the structure are identified as such in the descriptions that
                             follow. The declaration of MQGMO provided in the COPY file contains the
                             additional fields, but the initial value provided for the GMVER field is GMVER1. To
                             use the additional fields, the application must set the version number to GMVERC.
                             Applications which are intended to be portable between several environments
                             should use a more-recent version MQGMO only if all of those environments
                             support that version.
    Fields
                             GMSID (4-byte character string)
                                 Structure identifier.
                                 The following constant specifies the version number of the current version:
                                 GMVERC
                                      Current version of get-message options structure.
                                 This is always an input field. The initial value of this field is GMVER1.
                            GMOPT (10-digit signed integer)
                                Options that control the action of MQGET.
                                 Zero or more of the options described below can be specified. If more than one
                                 is required the values can be added together (do not add the same constant
                                 more than once). Combinations of options that are not valid are noted; all
                                 other combinations are valid.
                                 GMWT
                                          Wait for message to arrive.
                                          The application is to wait until a suitable message arrives. The
                                          maximum time the application waits is specified in GMWI.
                                          If MQGET requests are inhibited, or MQGET requests become inhibited
                                          while waiting, the wait is canceled and the call completes with CCFAIL
                                          and reason code RC2016, regardless of whether there are suitable
                                          messages on the queue.
                                          This option can be used with the GMBRWF or GMBRWN options.
                                          If several applications are waiting on the same shared queue, the
                                          application, or applications, that are activated when a suitable message
                                          arrives are described below.
                                      Note that the browse cursor is not moved by nonbrowse MQGET calls
                                      using the same HOBJ handle.
                                      The GMLK option can be specified together with this option, to cause
                                      the message that is browsed to be locked.
                                      Only one message can be locked per handle, but this can be a logical
                                      message or a physical message:
                                      v If GMCMPM is specified, all of the message segments that comprise
                                        the logical message are locked to the queue handle (provided that
                                        they are all present on the queue and available for retrieval).
                                      v If GMCMPM is not specified, only a single physical message is
                                        locked to the queue handle. If this message happens to be a segment
                                        of a logical message, the locked segment prevents other applications
                                        using GMCMPM to retrieve or browse the logical message.
      If the application decides not to remove the message from the queue,
      the lock is released by:
      v Issuing another MQGET call for this handle, with either GMBRWF
         or GMBRWN specified (with or without GMLK); the message is
         unlocked if the call completes with CCOK or CCWARN, but remains
         locked if the call completes with CCFAIL. However, the following
         exceptions apply:
         – The message is not unlocked if CCWARN is returned with
            RC2080.
        – The message is unlocked if CCFAIL is returned with RC2033.
Group and segment options: The options described below control the way
that messages in groups and segments of logical messages are returned by the
MQGET call. The following definitions may be of help in understanding these
options:
Physical message
       This is the smallest unit of information that can be placed on or
       removed from a queue; it often corresponds to the information
       specified or retrieved on a single MQPUT, MQPUT1, or MQGET call.
       Every physical message has its own message descriptor (MQMD).
       Generally, physical messages are distinguished by differing values for
       the message identifier (MDMID field in MQMD), although this is not
       enforced by the queue manager.
Logical message
        This is a single unit of application information. In the absence of
        system constraints, a logical message would be the same as a physical
        message. But where logical messages are extremely large, system
        constraints may make it advisable or necessary to split a logical
        message into two or more physical messages, called segments.
       A logical message that has been segmented consists of two or more
       physical messages that have the same nonnull group identifier (MDGID
       field in MQMD), and the same message sequence number (MDSEQ field
       in MQMD). The segments are distinguished by differing values for the
       segment offset (MDOFF field in MQMD), which gives the offset of the
       data in the physical message from the start of the data in the logical
       message. Because each segment is a physical message, the segments in
       a logical message usually have differing message identifiers.
       A logical message that has not been segmented, but for which
       segmentation has been permitted by the sending application, also has a
       nonnull group identifier, although in this case there is only one
       physical message with that group identifier if the logical message does
       not belong to a message group. Logical messages for which
       segmentation has been inhibited by the sending application have a null
       group identifier (GINONE), unless the logical message belongs to a
       message group.
Message group
      This is a set of one or more logical messages that have the same
      nonnull group identifier. The logical messages in the group are
      distinguished by differing values for the message sequence number,
      which is an integer in the range 1 through n, where n is the number of
      logical messages in the group. If one or more of the logical messages is
      segmented, there will be more than n physical messages in the group.
                                         Table 16 shows the values of the MDMID, MDCID, MDGID, MDSEQ, and MDOFF
                                         fields that the queue manager looks for when attempting to find a
                                         message to return on the MQGET call. This applies both to removing
|                                        messages from the queue, and browsing messages on the queue. The
|                                        columns in the table have the following meanings:
|                                        LOG ORD
|                                             A “U” means that the row applies only when the GMLOGO
|                                             option is specified.
|                                        Cur grp
|                                               A “U” means that the row applies only when a current
|                                               message group exists prior to the call.
|                                                     A “(U)” means that the row applies whether or not a current
|                                                     message group exists prior to the call.
|                                        Cur log msg
|                                               A “U” means that the row applies only when a current logical
|                                               message exists prior to the call.
|                                                     A “(U)” means that the row applies whether or not a current
|                                                     logical message exists prior to the call.
|                                        Other columns
|                                               These show the values that the queue manager looks for.
|                                               “Previous” denotes the value returned for the field in the
|                                               previous message for the queue handle.
    Table 16. MQGET options relating to messages in groups and segments of logical messages
    Options    Group and log-msg                                 Values the queue manager looks for
      you      status prior to call
    specify
      LOG      Cur grp     Cur log       MDMID               MDCID             MDGID             MDSEQ             MDOFF
      ORD                   msg
       U                              Controlled by       Controlled by    Controlled by              1              0
                                          GMMO                GMMO             GMMO
       U                      U       Any message        Any correlation   Previous group             1       Previous offset +
                                       identifier          identifier         identifier                      previous segment
                                                                                                                   length
       U         U                    Any message        Any correlation   Previous group       Previous             0
                                       identifier          identifier         identifier    sequence number
                                                                                                   +1
       U         U            U       Any message        Any correlation   Previous group       Previous    Previous offset +
                                       identifier          identifier         identifier    sequence number previous segment
                                                                                                                 length
                 (U)         (U)      Controlled by       Controlled by    Controlled by     Controlled by     Controlled by
                                          GMMO                GMMO             GMMO              GMMO              GMMO
                                      If GMLOGO is not specified for successive MQGET calls for the queue
                                      handle, messages are returned without regard for whether they belong
                                      to message groups, or whether they are segments of logical messages.
                                      This means that messages or segments from a particular group or
                                      logical message may be returned out of order, or they may be
                                      intermingled with messages or segments from other groups or logical
                                      messages, or with messages that are not in groups and are not
                                      segments. In this situation, the particular messages that are returned by
                                      successive MQGET calls is controlled by the MO* options specified on
                                      those calls (see the GMMO field described in “Chapter 8. MQGMO -
                                      Get-message options” on page 51 for details of these options).
                                      The group and segment information that the queue manager retains for
                                      the MQGET call is separate from the group and segment information
                                      that it retains for the MQPUT call. In addition, the queue manager
                                      retains separate information for:
                                      v MQGET calls that remove messages from the queue.
                                      v MQGET calls that browse messages on the queue.
                                        Note: The queue manager does not check the group and segment
                                              information when browsing a queue, or when closing a queue
                                              that was opened for browse but not input; in those cases the
                                              completion code is always CCOK (assuming no other errors).
Table 17. Outcome when MQGET or MQCLOSE call not consistent with group and segment information
            Current call                                             Previous call
                                              MQGET with GMLOGO                      MQGET without GMLOGO
       MQGET with GMLOGO                             CCFAIL                                 CCFAIL
      MQGET without GMLOGO                          CCWARN                                  CCOK
 MQCLOSE with an unterminated group                 CCWARN                                  CCOK
        or logical message
                                      Note: This is the only option that causes the queue manager to
                                            reassemble message segments. If not specified, segments are
                                            returned individually to the application if they are present on
                                            the queue (and they satisfy the other selection criteria specified
                                            on the MQGET call). Applications that do not wish to receive
                                            individual segments should therefore always specify GMCMPM.
                                      To use this option, the application must provide a buffer which is big
                                      enough to accommodate the complete message, or specify the GMATM
                                      option.
                                      For nonpersistent messages, the queue manager does not require a unit
                                      of work to be available in order to perform reassembly.
                                      GMAMSA can be specified with any of the other GM* options, and
                                      with any of the MO* options.
                             GMASGA
                                 All segments in a logical message must be available.
                                      This option specifies that segments in a logical message become
                                      available for retrieval only when all segments in the logical message
                                      are available. If the queue contains segmented messages with some of
                                      the segments missing (perhaps because they have been delayed in the
                                      network and have not yet arrived), specifying GMASGA prevents
                                      retrieval of segments belonging to incomplete logical messages.
                                      However those segments still contribute to the value of the
                                      CurrentQDepth queue attribute; this means that there may be no
                                      retrievable logical messages, even though CurrentQDepth is greater than
                                      zero. If there are no other messages that are retrievable, reason code
                                      RC2033 is returned after the specified wait interval (if any) has expired.
                                      The processing of GMASGA depends on whether GMLOGO is also
                                      specified:
                                      v If both options are specified, GMASGA has an effect only when there
                                        is no current logical message. If there is a current logical message,
                                        GMASGA is ignored. This means that GMASGA can remain on
                                        when processing messages in logical order.
            GMASGA can be specified with any of the other GM* options, and
            with any of the MO* options.
    GMNONE
        No options specified.
            This value can be used to indicate that no other options have been
            specified; all options assume their default values. GMNONE is defined
            to aid program documentation; it is not intended that this option be
            used with any other, but as its value is zero, such use cannot be
            detected.
    This is the approximate time, expressed in milliseconds, that the MQGET call
    waits for a suitable message to arrive (that is, a message satisfying the selection
    criteria specified in the MSGDSC parameter of the MQGET call; see the MDMID
    field described in “Chapter 10. MQMD - Message descriptor” on page 83 for
    more details). If no suitable message has arrived after this time has elapsed,
    the call completes with CCFAIL and reason code RC2033.
    GMWI is used in conjunction with the GMWT option. It is ignored if this option
    is not specified. If it is specified, GMWI must be greater than or equal to zero, or
    the following special value:
    WIULIM
         Unlimited wait interval.
                             This is a reserved field; its value is not significant. The initial value of this field
                             is 0.
                        GMSG2 (10-digit signed integer)
                            Signal identifier.
                             This is an output field which is set by the queue manager to the local name of
                             the queue from which the message was retrieved, as defined to the local queue
                             manager. This will be different from the name used to open the queue if:
                             v An alias queue was opened (in which case, the name of the local queue to
                               which the alias resolved is returned), or
                             v A model queue was opened (in which case, the name of the dynamic local
                               queue is returned).
                             The length of this field is given by LNQN. The initial value of this field is 48
                             blank characters.
                        The remaining fields are not present if GMVER is less than GMVER2.
                        GMMO (10-digit signed integer)
                            Options controlling selection criteria used for MQGET.
                             These options allow the application to choose which fields in the MSGDSC
                             parameter will be used to select the message returned by the MQGET call. The
                             application sets the required options in this field, and then sets the
                             corresponding fields in the MSGDSC parameter to the values required for those
                             fields. Only messages that have those values in the MQMD for the message are
                             candidates for retrieval using that MSGDSC parameter on the MQGET call. Fields
                             for which the corresponding match option is not specified are ignored when
                             selecting the message to be returned. If no selection criteria are to be used on
                             the MQGET call (that is, any message is acceptable), GMMO should be set to
                             MONONE.
                             If GMLOGO is specified, only certain messages are eligible for return by the
                             next MQGET call:
                             v If there is no current group or logical message, only messages that have
                                MDSEQ equal to 1 and MDOFF equal to 0 are eligible for return. In this situation,
                                one or more of the following match options can be used to select which of
                                the eligible messages is the one actually returned:
                                   MOMSGI
                                   MOCORI
                                   MOGRPI
                             v If there is a current group or logical message, only the next message in the
                                group or next segment in the logical message is eligible for return, and this
                                cannot be altered by specifying MO* options.
                             In both of the above cases, match options which are not applicable can still be
                             specified, but the value of the relevant field in the MSGDSC parameter must
                             If none of the options described above is specified, the following option can be
                             used:
                             MONONE
                                 No matches.
                                      This option specifies that no matches are to be used in selecting the
                                      message to be returned; therefore, all messages on the queue are
                                      eligible for retrieval (but subject to control by the GMAMSA,
                                      GMASGA, and GMCMPM options).
                                      MONONE is defined to aid program documentation. It is not intended
                                      that this option be used with any other, but as its value is zero, such
                                      use cannot be detected.
                             This is an input field. The initial value of this field is MOMSGI with MOCORI.
                             This field is not present if GMVER is less than GMVER2.
                             Note: The initial value of the GMMO field is defined for compatibility with
                                   earlier MQSeries queue managers. However, when reading a series of
                                   messages from a queue without using selection criteria, this initial value
                                   requires the application to reset the MDMID and MDCID fields to MINONE
                                   and CINONE prior to each MQGET call. The need to reset MDMID and
                                   MDCID can be avoided by setting GMVER to GMVER2, and GMMO to
                                   MONONE.
                        GMGST (1-byte character string)
                            Flag indicating whether message retrieved is in a group.
                             This is an output field. The initial value of this field is GSNIG. This field is not
                             present if GMVER is less than GMVER2.
        This is an output field. The initial value of this field is SSNSEG. This field is
        not present if GMVER is less than GMVER2.
    GMSEG (1-byte character string)
        Flag indicating whether further segmentation is allowed for the message
        retrieved.
        This is an output field. The initial value of this field is SEGIHB. This field is
        not present if GMVER is less than GMVER2.
    GMRE1 (1-byte character string)
        Reserved.
        This is a reserved field. The initial value of this field is a blank character. This
        field is not present if GMVER is less than GMVER2.
|   The remaining fields are not present if GMVER is less than GMVER3.
    GMTOK (16-byte bit string)
        Message token.
        This is a reserved field; its value is not significant. The following special value
        is defined:
        MTKNON
            No message token.
                The value is binary zero for the length of the field.
        The length of this field is given by LNMTOK. The initial value of this field is
|       MTKNON. This field is not present if GMVER is less than GMVER3.
|   GMRL (10-digit signed integer)
|       Length of message data returned (bytes).
| On OS/390, the value returned for the GMRL field is always RLUNDF.
|                                The initial value of this field is RLUNDF. This field is not present if GMVER is
|                                less than GMVER3.
                 RPG declaration
                                    D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                                    D* MQGMO Structure
                                    D*
                                    D* Structure identifier
                                    D GMSID                   1      4
                                    D* Structure version number
                                    D GMVER                   5      8I 0
                                    D* Options that control the action of MQGET
                                    D GMOPT                   9     12I 0
                                    D* Wait interval
                                    D GMWI                   13     16I 0
                                    D* Signal
                                    D GMSG1                  17     20I 0
                                    D* Signal identifier
                                    D GMSG2                  21     24I 0
                                    D* Resolved name of destination queue
                                    D GMRQN                  25     72
                                    D* Options controlling selection criteria used for MQGET
                                    D GMMO                   73     76I 0
Overview
                         The MQIIH structure describes the information that must be present at the start of
                         a message sent to the IMS bridge through MQSeries for OS/390. The format name
                         of this structure is FMIMS.
                         Special conditions apply to the character set and encoding used for the MQIIH
                         structure and application message data:
                         v Applications that connect to the queue manager which owns the IMS bridge
                            queue must provide an MQIIH structure that is in the character set and
                            encoding of the queue manager. This is because data conversion of the MQIIH
                            structure is not performed in this case.
                         v Applications that connect to other queue managers can provide an MQIIH
                            structure that is in any of the supported character sets and encodings;
                            conversion of the MQIIH and application message data is performed by the
                            queue manager as necessary.
                           Note: There is one exception to this. If the queue manager which owns the IMS
                                   bridge queue is using CICS for distributed queuing, the MQIIH must be
                                   in the character set and encoding of that queue manager.
                         v The application message data following the MQIIH structure must be in the
                           same character set and encoding as the MQIIH structure. The IICSI and IIENC
                           fields in the MQIIH structure cannot be used to specify the character set and
                           encoding of the application message data.
Fields
                        IISID (4-byte character string)
                            Structure identifier.
                             The following constant specifies the version number of the current version:
                             IIVERC
                                   Current version of IMS information header structure.
                             This is a reserved field; its value is not significant. The initial value of this field
                             is 0.
                        IICSI (10-digit signed integer)
                            Reserved.
                             This is a reserved field; its value is not significant. The initial value of this field
                             is 0.
                        IIFMT (8-byte character string)
                            MQ format name of data that follows MQIIH.
                             This is the MQ format name of the application message data which follows the
                             MQIIH structure. The rules for coding this are the same as those for the MDFMT
                             field in MQMD.
                             The length of this field is given by LNFMT. The initial value of this field is
                             FMNONE.
                        IIFLG (10-digit signed integer)
                            Flags.
    This is placed in the IO PCB field. It is optional; if it is not specified the TPIPE
    name is used. It is ignored if the first byte is blank, or null.
    The length of this field is given by LNLTOV. The initial value of this field is 8
    blank characters.
IIMMN (8-byte character string)
    Message format services map name.
    The length of this field is given by LNMFMN. The initial value of this field is 8
    blank characters.
IIRFM (8-byte character string)
    MQ format name of reply message.
    This is the MQ format name of the reply message which will be sent in
    response to the current message. The rules for coding this are the same as
    those for the MDFMT field in MQMD.
    The length of this field is given by LNFMT. The initial value of this field is
    FMNONE.
IIAUT (8-byte character string)
    RACF password or passticket.
    This is optional; if specified, it is used with the user ID in the MQMD security
    context to build a Utoken that is sent to IMS to provide a security context. If it
    is not specified, the user ID is used without verification. This depends on the
    setting of the RACF switches, which may require an authenticator to be
    present.
    This is ignored if the first byte is blank or null. The following special value
    may be used:
    IAUNON
         No authentication.
    The length of this field is given by LNAUTH. The initial value of this field is
    IAUNON.
IITID (16-byte bit string)
    Transaction instance identifier.
    This field is used by output messages from IMS so is ignored on first input. If
    IITST is set to ITSIC, this must be provided in the next input, and all
                                 The length of this field is given by LNTIID. The initial value of this field is
                                 ITINON.
                            IITST (1-byte character string)
                                Transaction state.
                                 This indicates the IMS conversation state. This is ignored on first input because
                                 no conversation exists. On subsequent inputs it indicates whether a
                                 conversation is active or not. On output it is set by IMS. The value must be
                                 one of the following:
                                 ITSIC In conversation.
                                 ITSNIC
                                       Not in conversation.
                                 ITSARC
                                       Return transaction state data in architected form.
                                          This value is used only with the IMS /DISPLAY TRAN command. It
                                          causes the transaction state data to be returned in the IMS architected
                                          form instead of character form. See the MQSeries Application
                                          Programming Guide for further details.
                                 See the OTMA Reference for more information about IMS commit modes. The
                                 value must be one of the following:
                                 ICMCTS
                                      Commit then send.
                                          This mode implies double queuing of output, but shorter region
                                          occupancy times. Fast-path and conversational transactions cannot run
                                          with this mode.
                                 ICMSTC
                                      Send then commit.
|                                This indicates the desired IMS security processing. The following values are
|                                defined:
                                 ISSCHK
                                       Check security scope.
                                          An ACEE is built in the control region, but not in the dependent
                                          region.
| If neither ISSCHK nor ISSFUL is specified for this field, ISSCHK is assumed.
Overview
                        The MQMD structure contains the control information that accompanies the
                        application data when a message travels between the sending and receiving
                        applications.
                        Character data in the message descriptor is in the character set of the queue
                        manager to which the application is connected; this is given by the CodedCharSetId
                        queue-manager attribute. Numeric data in the message descriptor is in the native
                        machine encoding (given by ENNAT).
                        If the sending and receiving queue managers use different character sets or
                        encodings, the data in the message descriptor is converted automatically—it is not
                        necessary for the receiving application to perform these conversions.
                        When a message is on a transmission queue, some of the fields in MQMD are set
                        to particular values; see “Chapter 21. MQXQH - Transmission queue header” on
                        page 193 for details.
                        The current version of MQMD is MDVER2. Fields that exist only in the version-2
                        structure are identified as such in the descriptions that follow. The declaration of
                        MQMD provided in the COPY file contains the new fields, but the initial value
                        provided for the MDVER field is MDVER1; this ensures compatibility with existing
                        applications. To use the new fields, the application must set the version number to
                        MDVER2. A declaration for the version-1 structure is available with the name
                        MQMD1. Applications which are intended to be portable between several
                        environments should use a version-2 MQMD only if all of those environments
                        support version 2.
                           Note: Several of the fields that exist in the version-2 MQMD but not the
                                 version-1 MQMD are input/output fields on MQPUT and MQPUT1.
                                 However, the queue manager does not return any values in the equivalent
                                 fields in the MQMDE on output from the MQPUT and MQPUT1 calls; if
                                 the application requires those output values, it must use a version-2
                                 MQMD.
         The default values that the queue manager used for the fields in the MQMDE are
         the same as the initial values of those fields, shown in Table 25 on page 135.
Fields
         MDSID (4-byte character string)
             Structure identifier.
             This is always an input field. The initial value of this field is MDSIDV.
         MDVER (10-digit signed integer)
             Structure version number.
             The following constant specifies the version number of the current version:
             MDVERC
                  Current version of message descriptor structure.
             This is always an input field. The initial value of this field is MDVER1.
         MDREP (10-digit signed integer)
             Options for report messages.
                             The application that receives the report message can determine the reason the
                             report was generated by examining the MDFB field in the MQMD; see the MDFB
                             field for more details.
                             Exception options: You can specify one of the options listed below to request
                             an exception report message.
                             ROEXC
                                      Exception reports required.
                                      This type of report can be generated by a message channel agent when
                                      a message is sent to another queue manager and the message cannot
                                      be delivered to the specified destination queue. For example, the
                                      destination queue or an intermediate transmission queue might be full,
                                      or the message might be too big for the queue.
                                      Generation of the exception report message depends on the persistence
                                      of the original message, and the speed of the message channel (normal
                                      or fast) through which the original message travels:
                                      v For all persistent messages, and for nonpersistent messages traveling
                                         through normal message channels, the exception report is generated
                                         only if the action specified by the sending application for the error
                                         condition can be completed successfully. The sending application can
                                         specify one of the following actions to control the disposition of the
                                         original message when the error condition arises:
                                         – RODLQ (this causes the original message to be placed on the
                                            dead-letter queue).
                                         – RODISC (this causes the original message to be discarded).
                                        If the action specified by the sending application cannot be
                                        completed successfully, the original message is left on the
                                        transmission queue, and no exception report message is generated.
                                      v For nonpersistent messages traveling through fast message channels,
                                        the original message is removed from the transmission queue and
                                        the exception report generated even if the specified action for the
                                        error condition cannot be completed successfully. For example, if
                                        RODLQ is specified, but the original message cannot be placed on
                                        the dead-letter queue because (say) that queue is full, the exception
                                        report message is generated and the original message discarded.
                                        Refer to the MQSeries Intercommunication book for more information
                                        about normal and fast message channels.
        Message data from the original message is not included with the report
        message.
Expiration options: You can specify one of the options listed below to request
an expiration report message.
ROEXP
        Expiration reports required.
        This type of report is generated by the queue manager if the message
        is discarded prior to delivery to an application because its expiry time
        has passed (see the MDEXP field). If this option is not set, no report
        message is generated if a message is discarded for this reason (even if
        one of the ROEXC* options is specified).
        Message data from the original message is not included with the report
        message.
        Do not specify more than one of ROEXP, ROEXPD, and ROEXPF.
ROEXPD
     Expiration reports with data required.
        This is the same as ROEXP, except that the first 100 bytes of the
        application message data from the original message are included in the
        report message. If the length of the message data in the original
        message is less than 100 bytes, the length of the message data in the
        report is the same length as the original message.
        Do not specify more than one of ROEXP, ROEXPD, and ROEXPF.
ROEXPF
     Expiration reports with full data required.
        This is the same as ROEXP, except that all of the application message
        data from the original message is included in the report message.
        Do not specify more than one of ROEXP, ROEXPD, and ROEXPF.
                             Confirm-on-delivery options: You can specify one of the options listed below
                             to request a confirm-on-delivery report message.
                             ROCOD
                                  Confirm-on-delivery reports required.
                                      This type of report is generated by the queue manager when an
                                      application retrieves the message from the destination queue in a way
                                      that causes the message to be deleted from the queue. Message data
                                      from the original message is not included with the report message.
                                      If the message is retrieved as part of a unit of work, the report
                                      message is generated within the same unit of work, so that the report
                                      is not available until the unit of work is committed. If the unit of work
                                      is backed out, the report is not sent.
                                      A COD report is not generated if the MDFMT field in the message
                                      descriptor is FMDLH. This prevents a COD report being generated if
                                      the message is undeliverable and put on a dead-letter queue.
                                      ROCOD is not valid if the destination queue is an XCF queue.
    Action-notification options: You can specify one or both of the options listed
    below to request that the receiving application send a positive-action or
    negative-action report message.
    ROPAN
         Positive action notification reports required.
            This type of report is generated by the application that retrieves the
            message and acts upon it. It indicates that the action requested in the
            message has been performed successfully. The application generating
            the report determines whether or not any data is to be included with
            the report.
            Other than conveying this request to the application retrieving the
            message, the queue manager takes no action based upon this option. It
            is the responsibility of the retrieving application to generate the report
            if appropriate.
    RONAN
         Negative action notification reports required.
            This type of report is generated by the application that retrieves the
            message and acts upon it. It indicates that the action requested in the
            message has not been performed successfully. The application
            generating the report determines whether or not any data is to be
                             Message-identifier options: You can specify one of the options listed below to
                             control how the MDMID of the report message (or of the reply message) is to be
                             set.
                             RONMI
                                  New message identifier.
                                      This is the default action, and indicates that if a report or reply is
                                      generated as a result of this message, a new MDMID is to be generated
                                      for the report or reply message.
                             ROPMI
                                      Pass message identifier.
                                      If a report or reply is generated as a result of this message, the MDMID
                                      of this message is to be copied to the MDMID of the report or reply
                                      message.
                                      If this option is not specified, RONMI is assumed.
                             Correlation-identifier options: You can specify one of the options listed below
                             to control how the MDCID of the report message (or of the reply message) is to
                             be set.
                             ROCMTC
                                 Copy message identifier to correlation identifier.
                                      This is the default action, and indicates that if a report or reply is
                                      generated as a result of this message, the MDMID of this message is to be
                                      copied to the MDCID of the report or reply message.
                             ROPCI
                                      Pass correlation identifier.
                                      If a report or reply is generated as a result of this message, the MDCID
                                      of this message is to be copied to the MDCID of the report or reply
                                      message.
                                      If this option is not specified, ROCMTC is assumed.
Default option: You can specify the following if no report options are required:
RONONE
    No reports required.
        This value can be used to indicate that no other options have been
        specified. RONONE is defined to aid program documentation. It is not
        intended that this option be used with any other, but as its value is
        zero, such use cannot be detected.
Some report options can be specified even though the local queue manager
does not recognize them; this is useful when the option is to be processed by
the destination queue manager. See “Appendix E. Report options” on page 457
for more details.
If a report message is requested, the name of the queue to which the report
should be sent must be specified in the MDRQ field. When a report message is
received, the nature of the report can be determined by examining the MDFB
field in the message descriptor.
If the queue manager or MCA that generates a report message is unable to put
the report message on the reply queue (for example, because the reply queue
or transmission queue is full), the report message is placed instead on the
dead-letter queue. If that also fails, or there is no dead-letter queue, the action
taken depends on the type of the report message:
|                                When the report is generated, the MDRQ queue is opened and the report
|                                message put using the authority of the MDUID in the MQMD of the message
|                                causing the report, except in the following cases:
|                                v Exception reports generated by a receiving MCA are put with whatever
|                                  authority the MCA used when it tried to put the message causing the report.
|                                  The CDPA channel attribute determines the user identifier used.
|                                v COA reports generated by the queue manager are put with whatever
|                                  authority was used when the message causing the report was put on the
|                                  queue manager generating the report. For example, if the message was put
|                                  by a receiving MCA using the MCA’s user identifier, the queue manager
|                                  puts the COA report using the MCA’s user identifier.
                                 Applications generating reports should normally use the same authority as
                                 they would have used to generate a reply; this should normally be the
                                 authority of the user identifier in the original message.
                                 If the report has to travel to a remote destination, senders and receivers can
                                 decide whether or not to accept it, in the same way as they do for other
                                 messages.
Exception report messages may be held up in the same way for reasons 1, 2,
and 3 above. However, when an MCA is unable to generate an exception
report message (the report message cannot be put either on the reply queue or
the dead-letter queue), the original message remains on the transmission queue
at the sender, and the channel is closed. This occurs irrespective of whether the
report message was to be generated at the sending or the receiving end of the
channel.
Report messages for message segments: Report messages can be requested for
messages that have segmentation allowed (see the description of the MFSEGA
flag). If the queue manager finds it necessary to segment the message, a report
message can be generated for each of the segments that subsequently
encounters the relevant condition. Applications should therefore be prepared to
receive multiple report messages for each type of report message requested.
The MDGID field in the report message can be used to correlate the multiple
reports with the group identifier of the original message, and the MDFB field
used to identify the type of each report message.
Applications that themselves put segments can specify different report options
for each segment. However, the following points should be noted:
v If the segments are retrieved using the GMCMPM option, only the report
  options in the first segment are honored by the queue manager.
v If the segments are retrieved one by one, and most of them have one of the
  ROCOD* options, but at least one segment does not, it will not be possible
                             Contents of the message descriptor for a report message: When the queue
                             manager or message channel agent (MCA) generates a report message, it sets
                             the fields in the message descriptor to the following values, and then puts the
                             message in the normal way:
                             Field in MQMD
                                     Value used
                             MDSID MDSIDV
                             MDVER MDVER2
                             MDREP RONONE
                             MDMT    MTRPRT
                             MDEXP EIULIM
                             MDFB    As appropriate for the nature of the report (FBCOA, FBCOD, FBEXP,
                                     or an RC* value)
                             MDENC Copied from the original message descriptor
                             MDCSI Copied from the original message descriptor
                             MDFMT Copied from the original message descriptor
                             MDPRI Copied from the original message descriptor
                             MDPER Copied from the original message descriptor
                             MDMID As specified by the report options in the original message descriptor
                             MDCID As specified by the report options in the original message descriptor
                             MDBOC 0
                             MDRQ    Blanks
                             MDRM    Name of queue manager
                             MDUID As set by the PMPASI option
                             MDACC As set by the PMPASI option
                             MDAID As set by the PMPASI option
                             MDPAT ATQM, or as appropriate for the message channel agent
                             MDPAN First 28 bytes of the queue-manager name or message channel agent
                                     name. For report messages generated by the IMS bridge, this field
                                     contains the XCF group name and XCF member name of the IMS
                                     system to which the message relates.
                             MDPD    Date when report message is sent
                             MDPT    Time when report message is sent
                             MDAOD Blanks
                             MDGID Copied from the original message descriptor
                             MDSEQ Copied from the original message descriptor
                             MDOFF Copied from the original message descriptor
                             MDMFL Copied from the original message descriptor
    Analyzing the report field: The MDREP field contains subfields; because of this,
    applications that need to check whether the sender of the message requested a
    particular report should use one of the techniques described in “Analyzing the
    report field” on page 458.
    This is an output field for the MQGET call, and an input field for the MQPUT
    and MQPUT1 calls. The initial value of this field is RONONE.
MDMT (10-digit signed integer)
    Message type.
    This indicates the type of the message. Message types are grouped as follows:
    MTSFST
         Lowest value for system-defined message types.
    MTSLST
         Highest value for system-defined message types.
    The following values are currently defined within the system range:
    MTDGRM
        Message not requiring a reply.
            The message is one that does not require a reply.
    MTRQST
         Message requiring a reply.
            The message is one that requires a reply.
            The name of the queue to which the reply should be sent must be
            specified in the MDRQ field. The MDREP field indicates how the MDMID and
            MDCID of the reply are to be set.
    MTRPLY
         Reply to an earlier request message.
            The message is the reply to an earlier request message (MTRQST). The
            message should be sent to the queue indicated by the MDRQ field of the
            request message. The MDREP field of the request should be used to
            control how the MDMID and MDCID of the reply are set.
                                 Other values within the system range may be defined in future versions of the
                                 MQI, and are accepted by the MQPUT and MQPUT1 calls without error.
                                 For the MQPUT and MQPUT1 calls, the MDMT value must be within either the
                                 system-defined range or the application-defined range; if it is not, the call fails
                                 with reason code RC2029.
                                 This is an output field for the MQGET call, and an input field for MQPUT and
                                 MQPUT1 calls. The initial value of this field is MTDGRM.
                            MDEXP (10-digit signed integer)
                                Message lifetime.
                                 The value is decremented to reflect the time the message spends on the
                                 destination queue, and also on any intermediate transmission queues if the put
                                 is to a remote queue. It may also be decremented by message channel agents
                                 to reflect transmission times, if these are significant. Likewise, an application
                                 forwarding this message to another queue might decrement the value if
                                 necessary, if it has retained the message for a significant time. However, the
                                 expiration time is treated as approximate, and the value need not be
                                 decremented to reflect small time intervals.
                                 When the message is retrieved by an application using the MQGET call, the
                                 MDEXP field represents the amount of the original expiry time that still remains.
    Any other program that discards messages based on expiry time must also
    send an appropriate report message if one was requested.
    Notes:
    1. If a message is put with an MDEXP time of zero, the MQPUT or MQPUT1
       call fails with reason code RC2013; no report message is generated in this
       case.
    2. Since a message whose expiry time has elapsed may not actually be
       discarded until later, there may be messages on a queue that have passed
       their expiry time, and which are not therefore eligible for retrieval. These
       messages nevertheless count towards the number of messages on the queue
       for all purposes, including depth triggering.
    3. An expiration report is generated, if requested, when the message is
       actually discarded, not when it becomes eligible for discarding.
    4. Discarding of an expired message, and the generation of an expiration
       report if requested, are never part of the application’s unit of work, even if
       the message was scheduled for discarding as a result of an MQGET call
       operating within a unit of work.
    5. If a nearly-expired message is retrieved by an MQGET call within a unit of
       work, and the unit of work is subsequently backed out, the message may
       become eligible to be discarded before it can be retrieved again.
    6. If a nearly-expired message is locked by an MQGET call with GMLK, the
       message may become eligible to be discarded before it can be retrieved by
       an MQGET call with GMMUC; reason code RC2034 is returned on this
       subsequent MQGET call if that happens.
    7. When a request message with an expiry time greater than zero is retrieved,
       the application can take one of the following actions when it sends the
       reply message:
       v Copy the remaining expiry time from the request message to the reply
         message.
       v Set the expiry time in the reply message to an explicit value greater than
         zero.
       v Set the expiry time in the reply message to EIULIM.
       The action to take depends on the design of the application suite. However,
       the default action for putting messages to a dead-letter
                             This is an output field for the MQGET call, and an input field for the MQPUT
                             and MQPUT1 calls. The initial value of this field is EIULIM.
                        MDFB (10-digit signed integer)
                            Feedback or reason code.
                             This is used with a message of type MTRPRT to indicate the nature of the
                             report, and is only meaningful with that type of message. The field can contain
                             one of the FB* values, or one of the RC* values. Feedback codes are grouped as
                             follows:
                             FBNONE
                                  No feedback provided.
    Applications that generate report messages should not use feedback codes in
    the system range (other than FBQUIT), unless they wish to simulate report
    messages generated by the queue manager or message channel agent.
    On the MQPUT or MQPUT1 calls, the value specified must either be FBNONE,
    or be within the system range or application range. This is checked whatever
    the value of MDMT.
For a full list of reason codes, see “Reason codes” on page 357.
                            This is an output field for the MQGET call, and an input field for MQPUT and
                            MQPUT1 calls. The initial value of this field is FBNONE.
                        MDENC (10-digit signed integer)
                            Numeric encoding of message data.
                            This identifies the representation used for numeric values in the application
                            message data; this applies to binary integer data, packed-decimal integer data,
                            and floating-point data. The following value is defined:
                            ENNAT
                                 Native machine encoding.
                                     The encoding is the default for the programming language and
                                     machine on which the application is running.
The queue manager does not validate the contents of this field.
                            Otherwise, this is an output field for the MQGET call, and an input field for
                            the MQPUT and MQPUT1 calls. The initial value of this field is ENNAT.
                        MDCSI (10-digit signed integer)
                            Character set identifier of message data.
   Note that character data in the message descriptor and the other MQI data
   structures must be in the character set used by the queue manager. This is
   defined by the queue manager’s CodedCharSetId attribute; see “Chapter 43.
   Attributes for the queue manager” on page 323 for details of this attribute.
   On the MQPUT and MQPUT1 calls, the queue manager changes the value
   CSQM in the MDCSI field in the MQMD sent with the message to the value of
   the queue manager’s CodedCharSetId attribute; as a result, the value CSQM is
   never returned by the MQGET call. The MDCSI field in the MQMD specified on
   the MQPUT or MQPUT1 call is not altered. No other check is carried out on
   the value specified.
   Applications that retrieve messages should compare this field against the value
   the application is expecting; if the values differ, the application may need to
   convert character data in the message.
   Otherwise, this is an output field for the MQGET call, and an input field for
   the MQPUT and MQPUT1 calls. The initial value of this field is CSQM.
MDFMT (8-byte character string)
    Format name of message data.
                            The name should be padded with blanks to the length of the field, or a null
                            character used to terminate the name before the end of the field; the null and
                            any subsequent characters are treated as blanks. Do not specify a name with
                            leading or embedded blanks. For the MQGET call, the queue manager returns
                            the name padded with blanks to the length of the field.
                            The queue manager does not check that the name complies with the
                            recommendations described above.
                            Names beginning “MQ” have meanings that are defined by the queue
                            manager; you should not use names beginning with these letters for your own
                            formats. The queue manager built-in formats are:
                            FMNONE
                                No format name.
                                     The nature of the application message data is undefined. This means
                                     that the data cannot be converted when the message is retrieved from
                                     a queue.
        This is an output field for the MQGET call, and an input field for the MQPUT
        and MQPUT1 calls. The length of this field is given by LNFMT. The initial
        value of this field is FMNONE.
    MDPRI (10-digit signed integer)
        Message priority.
        For the MQPUT and MQPUT1 calls, the value must be greater than or equal to
        zero; zero is the lowest priority.
                                        The value of DefPriority is copied into the MDPRI field when the
                                        message is put. If DefPriority is changed subsequently, messages
                                        that have already been put are not affected.
                            When replying to a message, applications should normally use for the reply
                            message the priority of the request message. In other situations, defaulting to
                            the queue definition allows priority tuning to be carried out without changing
                            the application.
                            If a message is put with a priority greater than the maximum supported by the
                            local queue manager (this maximum is given by the MaxPriority
                            queue-manager attribute), the message is accepted by the queue manager, but
                            placed on the queue at the queue manager’s maximum priority; the MQPUT
                            or MQPUT1 call completes with CCWARN and reason code RC2049. However,
                            the MDPRI field retains the value specified by the application which put the
                            message.
                            The value returned by the MQGET call is always greater than or equal to zero;
                            the value PRQDEF is never returned.
                            This is an output field for the MQGET call, and an input field for the MQPUT
                            and MQPUT1 calls. The initial value of this field is PRQDEF.
                        MDPER (10-digit signed integer)
                            Message persistence.
                            For the MQPUT and MQPUT1 calls, the value must be one of the following:
                            PEPER
                                     Message is persistent.
                                     The message survives restarts of the queue manager. Because
                                     temporary dynamic queues do not survive restarts of the queue
                                     manager, persistent messages cannot be placed on temporary dynamic
                                     queues; persistent messages can however be placed on permanent
                                     dynamic queues, and predefined queues.
                                     Once a persistent message has been put (or the unit of work
                                     committed, if the MQPUT or MQPUT1 call is part of a unit of work),
                                     the message is available on auxiliary storage until such time as the
                                     message is removed from the queue (or the unit of work committed, if
                                     the MQGET call is part of a unit of work).
                                     When a persistent message is sent to a remote queue, a
                                     store-and-forward mechanism is used to hold the message at each
                                     queue manager along the route to the destination, until the message is
                                     known to have arrived at the next queue manager.
                            PENPER
                                 Message is not persistent.
                                     The message does not survive restarts of the queue manager. This
                                     applies even if an intact copy of the message is found on auxiliary
                                     storage during the restart procedure.
                            PEQDEF
                                 Message has default persistence.
                                                 The value of DefPersistence is copied into the MDPER field when the
                                                 message is put. If DefPersistence is changed subsequently, messages
                                                 that have already been put are not affected.
Both persistent and nonpersistent messages can exist on the same queue.
                                     When replying to a message, applications should normally use for the reply
                                     message the persistence of the request message. In other situations, defaulting
                                     to the queue definition allows persistence to be changed without changing the
                                     application.
                                     This is an output field for the MQGET call, and an input field for the MQPUT
                                     and MQPUT1 calls. The initial value of this field is PEQDEF.
                                MDMID (24-byte bit string)
                                    Message identifier.
                                     This is a byte string that is used to distinguish one message from another.
                                     Generally, no two messages should have the same message identifier, although
                                     this is not disallowed by the queue manager. The message identifier is a
                                     permanent property of the message, and persists across restarts of the queue
                                     manager. Because the message identifier is a byte string and not a character
                                     string, the message identifier is not converted between character sets when the
                                     message flows from one queue manager to another.
    1. A MDMID generated by the queue manager consists of a 4-byte product identifier (‘AMQb’ or ‘CSQb’ in either ASCII or EBCDIC,
       where ‘b’ represents a blank), followed by a product-specific implementation of a unique string. In MQSeries this contains the
       first 12 characters of the queue-manager name, and a value derived from the system clock. All queue managers that can
                                If the message is being put to a distribution list, the queue manager generates
                                unique message identifiers as necessary, but the value of the MDMID field in
                                MQMD is unchanged on return from the call, even if MINONE or PMNMID
                                was specified. If the application needs to know the message identifiers
                                generated by the queue manager, the application must provide MQPMR
                                records containing the PRMID field.
                                The sending application can also specify a particular value for the message
                                identifier, other than MINONE; this stops the queue manager generating a
                                unique message identifier. An application that is forwarding a message can use
                                this facility to propagate the message identifier of the original message.
                                The queue manager does not itself make any use of this field except to:
                                v Generate a unique value if requested, as described above
                                v Deliver the value to the application that issues the get request for the
                                  message
                                v Copy the value to the MDCID field of any report message that it generates
                                  about this message (depending on the MDREP options)
                                For the MQGET call, MDMID is one of the five fields that can be used to select a
                                particular message to be retrieved from the queue. Normally the MQGET call
                                returns the next message on the queue, but if a particular message is required,
                                this can be obtained by specifying one or more of the five selection criteria, in
                                any combination; these fields are:
                                    MDMID
                                    MDCID
                                    MDGID
                                    MDSEQ
                                    MDOFF
                                The application sets one or more of these field to the values required, and then
                                sets the corresponding MO* match options in the GMMO field in MQGMO to
                                indicate that those fields should be used as selection criteria. Only messages
                                that have the specified values in those fields are candidates for retrieval. The
                                default for the GMMO field (if not altered by the application) is to match both the
                                message identifier and the correlation identifier.
                                Normally, the message returned is the first message on the queue that satisfies
                                the selection criteria. But if GMBRWN is specified, the message returned is the
 intercommunicate must therefore have names that differ in the first 12 characters, in order to ensure that message identifiers are
 unique. The ability to generate a unique string also depends upon the system clock not being changed backward. To eliminate the
 possibility of a message identifier generated by the queue manager duplicating one generated by the application, the application
 should avoid generating identifiers with initial characters in the range A through I in ASCII or EBCDIC (X'41' through X'49' and
 X'C1' through X'C9'). However, the application is not prevented from generating identifiers with initial characters in these ranges.
    Note: The queue is scanned sequentially for a message that satisfies the
          selection criteria, so retrieval times will be slower than if no selection
          criteria are specified, especially if many messages have to be scanned
          before a suitable one is found.
    See Table 16 on page 63 for more information about how selection criteria are
    used in various situations.
    Specifying MINONE as the message identifier has the same effect as not
    specifying MOMSGI, that is, any message identifier will match.
    This field is ignored if the GMMUC option is specified in the GMO parameter on
    the MQGET call.
    On return from an MQGET call, the MDMID field is set to the message identifier
    of the message returned (if any).
    This is an input/output field for the MQGET, MQPUT, and MQPUT1 calls.
    The length of this field is given by LNMID. The initial value of this field is
    MINONE.
MDCID (24-byte bit string)
    Correlation identifier.
    This is a byte string that the application can use to relate one message to
    another, or to relate the message to other work that the application is
    performing. The correlation identifier is a permanent property of the message,
    and persists across restarts of the queue manager. Because the correlation
    identifier is a byte string and not a character string, the correlation identifier is
    not converted between character sets when the message flows from one queue
    manager to another.
    For the MQPUT and MQPUT1 calls, the application can specify any value. The
    queue manager transmits this value with the message and delivers it to the
    application that issues the get request for the message.
    For the MQGET call, MDCID is one of the five fields that can be used to select a
    particular message to be retrieved from the queue. See the description of the
    MDMID field for details of how to specify values for this field.
                             If the GMMUC option is specified in the GMO parameter on the MQGET call,
                             this field is ignored.
                             On return from an MQGET call, the MDCID field is set to the correlation
                             identifier of the message returned (if any).
                             For the MQGET call, this is an input/output field. For the MQPUT and
                             MQPUT1 calls, this is an input field if PMNCID is not specified, and an output
                             field if PMNCID is specified. The length of this field is given by LNCID. The
                             initial value of this field is CINONE.
                        MDBOC (10-digit signed integer)
                            Backout counter.
                             This is a count of the number of times the message has been previously
                             returned by the MQGET call as part of a unit of work, and subsequently
                             backed out. It is provided as an aid to the application in detecting processing
                             errors that are based on message content. The count excludes MQGET calls
                             that specified any of the GMBRW* options.
                             This is an output field for the MQGET call. It is ignored for the MQPUT and
                             MQPUT1 calls. The initial value of this field is 0.
                        MDRQ (48-byte character string)
                            Name of reply queue.
                             This is the name of the message queue to which the application that issued the
                             get request for the message should send MTRPLY and MTRPRT messages. The
                             name is the local name of a queue that is defined on the queue manager
                             identified by MDRM. This queue should not be a model queue, although the
                             sending queue manager does not verify this when the message is put.
                             For the MQPUT and MQPUT1 calls, this field must not be blank if the MDMT
                             field has the value MTRQST, or if any reports are requested by the MDREP field.
                             However, the value specified (or substituted; see below) is passed on to the
                             application that issues the get request for the message, whatever the message
                             type.
   If the name is specified, it may contain trailing blanks; the first null character
   and characters following it are treated as blanks. Otherwise, however, no check
   is made that the name satisfies the naming rules for queues; this is also true
   for the name transmitted, if the MDRQ is replaced in the transmitted message.
   The only check made is that a name has been specified, if the circumstances
   require it.
   For the MQGET call, the queue manager always returns the name padded with
   blanks to the length of the field.
   If a message that requires a report message cannot be delivered, and the report
   message also cannot be delivered to the queue specified, both the original
   message and the report message go to the dead-letter (undelivered-message)
   queue (see the DeadLetterQName attribute described in “Chapter 43. Attributes
   for the queue manager” on page 323).
   This is an output field for the MQGET call, and an input field for the MQPUT
   and MQPUT1 calls. The length of this field is given by LNQN. The initial
   value of this field is 48 blank characters.
MDRM (48-byte character string)
    Name of reply queue manager.
   This is the name of the queue manager to which the reply message or report
   message should be sent. MDRQ is the local name of a queue that is defined on
   this queue manager.
   If the MDRM field is blank, the local queue manager looks up the MDRQ name in
   its queue definitions. If a local definition of a remote queue exists with this
   name, the MDRM value in the transmitted message is replaced by the value of
   the RemoteQMgrName attribute from the definition of the remote queue, and this
   value will be returned in the message descriptor when the receiving
   application issues an MQGET call for the message. If a local definition of a
   remote queue does not exist, the MDRM that is transmitted with the message is
   the name of the local queue manager.
   If the name is specified, it may contain trailing blanks; the first null character
   and characters following it are treated as blanks. Otherwise, however, no check
   is made that the name satisfies the naming rules for queue managers, or that
   this name is known to the sending queue manager; this is also true for the
   name transmitted, if the MDRM is replaced in the transmitted message. For more
   information about names, see the MQSeries Application Programming Guide.
                                 For the MQGET call, the queue manager always returns the name padded with
                                 blanks to the length of the field.
                                 This is an output field for the MQGET call, and an input field for the MQPUT
                                 and MQPUT1 calls. The length of this field is given by LNQMN. The initial
                                 value of this field is 48 blank characters.
                            MDUID (12-byte character string)
                                User identifier.
                                 The fields from MDUID to MDAOD contain the identity context and origin context
                                 of the message. Usually:
                                 v Identity context relates to the application that originally put the message
                                 v Origin context relates to the application that most-recently put the message.
                                 These two applications can be the same application, but they can also be
                                 different applications (for example, when a message is forwarded from one
                                 application to another).
                                 Although identity and origin context usually have the meanings described
                                 above, the content of both types of context actually depends on the PM*
                                 options that are specified when the message is put. As a result, identity context
                                 does not necessarily relate to the application that originally put the message,
                                 and origin context does not necessarily relate to the application that
                                 most-recently put the message — it depends on the design of the application
                                 suite.
                                 There is one class of application that never alters message context, namely the
                                 message channel agent (MCA). MCAs that receive messages from remote
                                 queue managers use the context option PMSETA on the MQPUT or MQPUT1
                                 call. This allows the receiving MCA to preserve exactly the message context
                                 that travelled with the message from the sending MCA. However, the result is
                                 that the origin context does not relate to the application that most-recently put
                                 the message (the receiving MCA), but instead relates to an earlier application
                                 that put the message (possibly the originating application itself).
                                 In the descriptions that follow, the context fields are described as though they
                                 are used in the normal way. For more information about message context, see
                                 the MQSeries Application Programming Guide.
                                 MDUID is part of the identity context of the message. It specifies the user
                                 identifier of the application that originated the message. The queue manager
                                 treats this information as character data, but does not define the format of it.
                                 After a message has been received, MDUID can be used in the ODAU field of the
                                 OBJDSC parameter of a subsequent MQOPEN or MQPUT1 call, so that the
                                 authorization check is performed for the MDUID user instead of the application
                                 performing the open.
        For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETI or
        PMSETA is specified in the PMO parameter. Any information following a null
        character within the field is discarded. The null character and any following
        characters are converted to blanks by the queue manager. If PMSETI or
        PMSETA is not specified, this field is ignored on input and is an output-only
        field.
        This is an output field for the MQGET call. The length of this field is given by
        LNUID. The initial value of this field is 12 blank characters.
    MDACC (32-byte bit string)
        Accounting token.
        This is part of the identity context of the message. For more information about
        message context, see the description of the MDUID field above; also see the
        MQSeries Application Programming Guide.
                                 For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETI or
                                 PMSETA is specified in the PMO parameter. If neither PMSETI nor PMSETA is
                                 specified, this field is ignored on input and is an output-only field. For more
                                 information on message context, see the MQSeries Application Programming
                                 Guide.
                                 This field is not subject to any translation based on the character set of the
                                 queue manager—the field is treated as a string of bits, and not as a string of
                                 characters.
                                 The queue manager does nothing with the information in this field. The
                                 application must interpret the information if it wants to use the information for
                                 accounting purposes.
                                 The following special value may be used for the MDACC field:
                                 ACNONE
                                      No accounting token is specified.
                                          The value is binary zero for the length of the field.
                                 The length of this field is given by LNACCT. The initial value of this field is
                                 ACNONE.
                            MDAID (32-byte character string)
                                Application data relating to identity.
                                 This is part of the identity context of the message. For more information about
                                 message context, see the description of the MDUID field above; also see the
                                 MQSeries Application Programming Guide.
                                 MDAID is information that is defined by the application suite, and can be used
                                 to provide additional information about the message or its originator. The
       For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETI or
       PMSETA is specified in the PMO parameter. If a null character is present, the
       null and any following characters are converted to blanks by the queue
       manager. If neither PMSETI nor PMSETA is specified, this field is ignored on
       input and is an output-only field. For more information on message context,
       see the MQSeries Application Programming Guide.
       This is an output field for the MQGET call. The length of this field is given by
       LNAIDD. The initial value of this field is 32 blank characters.
    MDPAT (10-digit signed integer)
        Type of application that put the message.
       This is part of the origin context of the message. For more information about
       message context, see the description of the MDUID field above; also see the
       MQSeries Application Programming Guide.
       MDPAT may have one of the following standard types. User-defined types can
       also be used but should be restricted to values in the range ATUFST through
       ATULST.
       ATAIX
               AIX application (same value as ATUNIX).
       ATCICS
             CICS transaction.
|      ATCICB
|            CICS bridge.
|      ATVSE
|              CICS/VSE transaction.
       ATDOS
            DOS client application.
|      ATGUAR
|           Tandem Guardian application (same value as ATNSK).
       ATIMS
               IMS application.
       ATIMSB
            IMS bridge.
       ATMVS
            OS/390 or TSO application (same value as AT390).
|      ATNOTE
|           Lotus Notes Agent application.
   For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETA is
   specified in the PMO parameter. If PMSETA is not specified, this field is ignored
   on input and is an output-only field.
   This is an output field for the MQGET call. The initial value of this field is
   ATNCON.
MDPAN (28-byte character string)
    Name of application that put the message.
   This is part of the origin context of the message. For more information about
   message context, see the description of the MDUID field above; also see the
   MQSeries Application Programming Guide.
   When this field is set by the queue manager (that is, for all options except
   PMSETA), it is set to value which is determined by the environment:
   v On OS/400, the queue manager uses the fully-qualified job name.
   For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETA is
   specified in the PMO parameter. Any information following a null character
   within the field is discarded. The null character and any following characters
   are converted to blanks by the queue manager. If PMSETA is not specified, this
   field is ignored on input and is an output-only field.
   This is an output field for the MQGET call. The length of this field is given by
   LNPAN. The initial value of this field is 28 blank characters.
MDPD (8-byte character string)
    Date when message was put.
   This is part of the origin context of the message. For more information about
   message context, see the description of the MDUID field above; also see the
   MQSeries Application Programming Guide.
   The format used for the date when this field is generated by the queue
   manager is:
       YYYYMMDD
   where   the characters represent:
   YYYY     year (four numeric digits)
   MM       month of year (01 through 12)
   DD       day of month (01 through 31)
                                If the message was put as part of a unit of work, the date is that when the
                                message was put, and not the date when the unit of work was committed.
                                For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETA is
                                specified in the PMO parameter. The contents of the field are not checked by the
                                queue manager, except that any information following a null character within
                                the field is discarded. The null character and any following characters are
                                converted to blanks by the queue manager. If PMSETA is not specified, this
                                field is ignored on input and is an output-only field.
                                This is an output field for the MQGET call. The length of this field is given by
                                LNPDAT. The initial value of this field is 8 blank characters.
                            MDPT (8-byte character string)
                                Time when message was put.
                                This is part of the origin context of the message. For more information about
                                message context, see the description of the MDUID field above; also see the
                                MQSeries Application Programming Guide.
                                The format used for the time when this field is generated by the queue
                                manager is:
                                   HHMMSSTH
                                where   the characters represent (in order):
                                HH       hours (00 through 23)
                                MM       minutes (00 through 59)
                                SS       seconds (00 through 59; see note below)
                                T        tenths of a second (0 through 9)
                                H        hundredths of a second (0 through 9)
                                If the message was put as part of a unit of work, the time is that when the
                                message was put, and not the time when the unit of work was committed.
                                For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETA is
                                specified in the PMO parameter. The contents of the field are not checked by the
                                queue manager, except that any information following a null character within
                                the field is discarded. The null character and any following characters are
                                converted to blanks by the queue manager. If PMSETA is not specified, this
                                field is ignored on input and is an output-only field.
        This is an output field for the MQGET call. The length of this field is given by
        LNPTIM. The initial value of this field is 8 blank characters.
    MDAOD (4-byte character string)
        Application data relating to origin.
        This is part of the origin context of the message. For more information about
        message context, see the description of the MDUID field above; also see the
        MQSeries Application Programming Guide.
        MDAOD is information that is defined by the application suite that can be used to
        provide additional information about the origin of the message. For example, it
        could be set by suitably authorized applications to indicate whether the
        identity data is trusted.
        The queue manager treats this information as character data, but does not
        define the format of it. When the queue manager generates this information, it
        is entirely blank.
        For the MQPUT and MQPUT1 calls, this is an input/output field if PMSETA is
        specified in the PMO parameter. Any information following a null character
        within the field is discarded. The null character and any following characters
        are converted to blanks by the queue manager. If PMSETA is not specified, this
        field is ignored on input and is an output-only field.
        This is an output field for the MQGET call. The length of this field is given by
        LNAORD. The initial value of this field is 4 blank characters.
    The remaining fields are not present if MDVER is less than MDVER2.
    MDGID (24-byte bit string)
        Group identifier.
        This is a byte string that is used to identify the particular message group or
        logical message to which the physical message belongs. MDGID is also used if
        segmentation is allowed for the message. In all of these cases, MDGID has a
        non-null value, and one or more of the following flags is set in the MDMFL field:
           MFMIG
           MFLMIG
           MFSEG
           MFLSEG
           MFSEGA
        If none of these flags is set, MDGID has the special null value GINONE.
                            Message groups and segments can be processed correctly only if the group
                            identifier is unique. For this reason, applications should not generate their own
                            group identifiers; instead, applications should do one of the following:
                            v If PMLOGO is specified, the queue manager automatically generates a
                              unique group identifier for the first message in the group or segment of the
                              logical message, and uses that group identifier for the remaining messages
                              in the group or segments of the logical message, so the application does not
                              need to take any special action. This is the recommended procedure.
                            v If PMLOGO is not specified, the application should request the queue
                              manager to generate the group identifier, by setting MDGID to GINONE on
                              the first MQPUT or MQPUT1 call for a message in the group or segment of
                              the logical message. The group identifier returned by the queue manager on
                              output from that call should then be used for the remaining messages in the
                              group or segments of the logical message. If a message group contains
                              segmented messages, the same group identifier must be used for all
                              segments and messages in the group.
                              When PMLOGO is not specified, messages in groups and segments of
                              logical messages can be put in any order (for example, in reverse order), but
                              the group identifier must be allocated by the first MQPUT or MQPUT1 call
                              that is issued for any of those messages.
                            On input to the MQPUT and MQPUT1 calls, the queue manager uses the value
                            detailed in Table 31 on page 153. On output from the MQPUT and MQPUT1
                            calls, the queue manager sets this field to the value that was sent with the
                            message if the object opened is a single queue and not a distribution list, but
                            leaves it unchanged if the object opened is a distribution list. In the latter case,
                            if the application needs to know the group identifiers generated, the
                            application must provide MQPMR records containing the PRGID field.
                            On input to the MQGET call, the queue manager uses the value detailed in
                            Table 16 on page 63. On output from the MQGET call, the queue manager sets
                            this field to the value for the message retrieved.
                            The length of this field is given by LNGID. The initial value of this field is
                            GINONE. This field is not present if MDVER is less than MDVER2.
                        MDSEQ (10-digit signed integer)
                            Sequence number of logical message within group.
    This field need not be set by the application on the MQPUT or MQGET call if:
    v On the MQPUT call, PMLOGO is specified.
    v On the MQGET call, MOSEQN is not specified.
    These are the recommended ways of using these calls for messages that are not
    report messages. However, if the application requires more control, or the call
    is MQPUT1, the application must ensure that MDSEQ is set to an appropriate
    value.
    On input to the MQPUT and MQPUT1 calls, the queue manager uses the value
    detailed in Table 31 on page 153. On output from the MQPUT and MQPUT1
    calls, the queue manager sets this field to the value that was sent with the
    message.
    On input to the MQGET call, the queue manager uses the value detailed in
    Table 16 on page 63. On output from the MQGET call, the queue manager sets
    this field to the value for the message retrieved.
    The initial value of this field is one. This field is not present if MDVER is less
    than MDVER2.
MDOFF (10-digit signed integer)
    Offset of data in physical message from start of logical message.
    This is the offset in bytes of the data in the physical message from the start of
    the logical message of which the data forms part. This data is called a segment.
    The offset is in the range 0 through 999 999 999. A physical message which is
    not a segment of a logical message has an offset of zero.
    This field need not be set by the application on the MQPUT or MQGET call if:
    v On the MQPUT call, PMLOGO is specified.
    v On the MQGET call, MOOFFS is not specified.
    These are the recommended ways of using these calls for messages that are not
    report messages. However, if the application does not comply with these
    conditions, or the call is MQPUT1, the application must ensure that MDOFF is set
    to an appropriate value.
    On input to the MQPUT and MQPUT1 calls, the queue manager uses the value
    detailed in Table 31 on page 153. On output from the MQPUT and MQPUT1
    calls, the queue manager sets this field to the value that was sent with the
    message.
    On input to the MQGET call, the queue manager uses the value detailed in
    Table 16 on page 63. On output from the MQGET call, the queue manager sets
    this field to the value for the message retrieved.
    The initial value of this field is zero. This field is not present if MDVER is less
    than MDVER2.
                            These are flags that specify attributes of the message, or control its processing.
                            The flags are divided into the following categories:
                            v Segmentation flag
                            v Status flags
                            These are described in turn.
                            Segmentation flag: When a message is too big for a queue, an attempt to put
                            the message on the queue usually fails. Segmentation is a technique whereby
                            the queue manager or application splits the message into smaller pieces called
                            segments, and places each segment on the queue as a separate physical
                            message. The application which retrieves the message can either retrieve the
                            segments one by one, or request the queue manager to reassemble the
                            segments into a single message which is returned by the MQGET call. The
                            latter is achieved by specifying the GMCMPM option on the MQGET call, and
                            supplying a buffer that is big enough to accommodate the complete message.
                            (See “Chapter 8. MQGMO - Get-message options” on page 51 for details of the
                            GMCMPM option.) Segmentation of a message can occur at the sending queue
                            manager, at an intermediate queue manager, or at the destination queue
                            manager.
                            You can specify one of the following to control the segmentation of a message:
                            MFSEGI
                                 Segmentation inhibited.
                                     This option prevents the message being broken into segments by the
                                     queue manager. If specified for a message that is already a segment,
                                     this option prevents the segment being broken into smaller segments.
                                     The value of this flag in binary zero. This is the default.
                            MFSEGA
                                 Segmentation allowed.
                                     This option allows the message to be broken into segments by the
                                     queue manager. If specified for a message that is already a segment,
                                     this option allows the segment to be broken into smaller segments.
                                     MFSEGA can be set without either MFSEG or MFLSEG being set.
                                     When the queue manager segments a message, the queue manager
                                     turns on the MFSEG flag in the copy of the MQMD that is sent with
                                     each segment, but does not alter the settings of these flags in the
                                     MQMD provided by the application on the MQPUT or MQPUT1 call.
                                     For the last segment in the logical message, the queue manager also
                                     turns on the MFLSEG flag in the MQMD that is sent with the segment.
                                     Note: Care is needed when messages are put with MFSEGA but
                                           without PMLOGO. If the message is:
                                           v Not a segment, and
                                           v Not in a group, and
                                           v Not being forwarded,
                                                the application must remember to reset the MDGID field to
                                                GINONE prior to each MQPUT or MQPUT1 call, in order to
                                                cause a unique group identifier to be generated by the queue
                                                manager for each message. If this is not done, unrelated
                                     For nonpersistent messages, the queue manager does not require a unit
                                     of work to be available in order to perform segmentation.
                            This flag is an input flag on the MQPUT and MQPUT1 calls, and an output
                            flag on the MQGET call. On the latter call, the queue manager also echoes the
                            value of the flag to the GMSEG field in MQGMO.
                            Status flags: These are flags that indicate whether the physical message
                            belongs to a message group, is a segment of a logical message, both, or neither.
                            One or more of the following can be specified on the MQPUT or MQPUT1 call,
                            or returned by the MQGET call:
The application must ensure that these flags are set correctly when putting
messages. If PMLOGO is specified, or was specified on the preceding MQPUT
call for the queue handle, the settings of the flags must be consistent with the
group and segment information retained by the queue manager for the queue
handle. The following conditions apply to successive MQPUT calls for the
queue handle when PMLOGO is specified:
v If there is no current group or logical message, all of these flags (and
  combinations of them) are valid.
v Once MFMIG has been specified, it must remain on until MFLMIG is
  specified. The call fails with reason code RC2241 if this condition is not
  satisfied.
v Once MFSEG has been specified, it must remain on until MFLSEG is
  specified. The call fails with reason code RC2242 if this condition is not
  satisfied.
v Once MFSEG has been specified without MFMIG, MFMIG must remain off
  until after MFLSEG has been specified. The call fails with reason code
  RC2242 if this condition is not satisfied.
Table 31 on page 153 shows the valid combinations of the flags, and the values
used for various fields.
                            Default flags: The following can be specified to indicate that the message has
                            default attributes:
                            MFNONE
                                No message flags (default message attributes).
                                     This inhibits segmentation, and indicates that the message is not in a
                                     group and is not a segment of a logical message. MFNONE is defined
                                     to aid program documentation. It is not intended that this flag be used
                                     with any other, but as its value is zero, such use cannot be detected.
                            The MDMFL field is partitioned into subfields; for details see “Appendix E.
                            Report options” on page 457.
                            The initial value of this field is MFNONE. This field is not present if MDVER is
                            less than MDVER2.
                        MDOLN (10-digit signed integer)
                            Length of original message.
                            This field is of relevance only for report messages; it specifies the length of the
                            message to which the report relates. If the report message is reporting on a
                            segment, MDOLN is the length of the segment, and not the length of the logical
                            message of which the segment forms part, nor the length of the data in the
                            report message.
                            MDOLN should be set by the program which generates the report, but if that
                            program does not set the field, MDOLN has the following special value:
                            OLUNDF
                                 Original length of message not defined.
                            This is an input field on the MQPUT and MQPUT1 calls, but the value
                            provided by the application is used only in particular circumstances:
                            v If the message being put is a segment but not a report message, the queue
                              manager ignores the field and uses the length of the application message
                              data instead.
                            v If the message being put is a report message reporting on a segment, the
                              queue manager accepts the value specified. The value must be:
                              – Greater than zero if the segment is not the last segment
                              – Not less than zero if the segment is the last segment
                              – Not less than the length of data present in the message
                               If these conditions are not satisfied, the call fails with reason code RC2252.
                            v In all other cases, the queue manager ignores the field and uses the value
                              OLUNDF instead.
                            The initial value of this field is OLUNDF. This field is not present if MDVER is
                            less than MDVER2.
Overview
                         The MQMDE structure describes the data that sometimes occurs preceding the
                         application message data. Normal applications should use a version-2 MQMD, in
                         which case they will not encounter an MQMDE structure. However, specialized
                         applications, and applications that continue to use a version-1 MQMD, may
                         encounter an MQMDE in some situations.
                         The MQMDE structure contains those MQMD fields that exist in the version-2
                         MQMD, but not in the version-1 MQMD. It can occur in the following
                         circumstances:
                         v Specified on the MQPUT and MQPUT1 calls
                         v Returned by the MQGET call
                         v In messages on transmission queues
                         These are described below.
                         If the application provides a version-2 MQMD and prefixes the application message
                         data with an MQMDE, the structures are processed as shown in Table 24 on
                         page 132.
                        The data in the MQMDE structure must be in the queue manager’s character set
                        and encoding. The former is given by the CodedCharSetId queue-manager attribute
                        (see “Chapter 43. Attributes for the queue manager” on page 323), while in most
                        cases the latter is given by the value of ENNAT. If this condition is not satisfied,
                        the MQMDE is accepted but not honored, that is, the MQMDE is treated as
                        message data.
                        Note: On OS/2 and Windows NT, applications compiled with Micro Focus
                              COBOL use a value of ENNAT that is different from the queue-manager’s
                              encoding. Although numeric fields in the MQMD structure on the MQPUT,
                              MQPUT1, and MQGET calls must be in the Micro Focus COBOL encoding,
                              numeric fields in the MQMDE structure must be in the queue-manager’s
                              encoding. This latter is given by ENNAT for the C programming language,
                              and has the value 546.
                        Several of the fields that exist in the version-2 MQMD but not the version-1
                        MQMD are input/output fields on MQPUT and MQPUT1. However, the queue
                        manager does not return any values in the equivalent fields in the MQMDE on
                        output from the MQPUT and MQPUT1 calls; if the application requires those
                        output values, it must use a version-2 MQMD.
         If the application provides an MQMDE at the start of the BUFFER parameter, the
         MQMDE is ignored. On return from the MQGET call, it is replaced by the
         MQMDE for the message (if one is needed), or overwritten by the application
         message data (if the MQMDE is not needed).
         If an MQMDE is returned by the MQGET call, the data in the MQMDE is usually
         in the queue manager’s character set and encoding. However the MQMDE may be
         in some other character set and encoding if:
         v The MQMDE was treated as data on the MQPUT or MQPUT1 call (see Table 24
             on page 132 for the circumstances that can cause this).
         v The message was received from a remote queue manager connected by a TCP
            connection, and the receiving message channel agent (MCA) was not set up
            correctly (see the MQSeries Intercommunication manual for further information).
         Note: On OS/2 and Windows NT, applications compiled with Micro Focus
               COBOL use a value of ENNAT that is different from the queue-manager’s
               encoding (see above).
         Other MQ header structures can also occur between the MQXQH structure and the
         application message data. For example, when the dead-letter header MQDLH is
         present, and the message is not a segment, the order is:
         v MQXQH (containing a version-1 MQMD)
         v MQMDE
         v MQDLH
         v application message data
Fields
         MESID (4-byte character string)
             Structure identifier.
                            The queue manager does not check the value of this field. See the MDENC field
                            described in “Chapter 10. MQMD - Message descriptor” on page 83 for more
                            information about data encodings.
The queue manager does not check the value of this field.
                            The queue manager does not check the value of this field. See the MDFMT field
                            described in “Chapter 10. MQMD - Message descriptor” on page 83 for more
                            information about format names.
                            See the MDGID field described in “Chapter 10. MQMD - Message descriptor” on
                            page 83. The initial value of this field is GINONE.
                        MESEQ (10-digit signed integer)
                            Sequence number of logical message within group.
                   See the MDOFF field described in “Chapter 10. MQMD - Message descriptor” on
                   page 83. The initial value of this field is 0.
               MEMFL (10-digit signed integer)
                   Message flags.
                   See the MDMFL field described in “Chapter 10. MQMD - Message descriptor” on
                   page 83. The initial value of this field is MFNONE.
               MEOLN (10-digit signed integer)
                   Length of original message.
                   See the MDOLN field described in “Chapter 10. MQMD - Message descriptor” on
                   page 83. The initial value of this field is OLUNDF.
    Overview
                             The MQOD structure is used to specify an object by name. The following types of
                             object are valid:
                             v Queue or distribution list
                             v Process definition
                             v Queue manager
                             The current version of MQOD is given by ODVERC. Fields that exist only in the
                             more-recent versions of the structure are identified as such in the descriptions that
                             follow. The declaration of MQOD provided in the COPY file contains the
                             additional fields, but the initial value provided for the ODVER field is ODVER1. To
                             use the additional fields, the application must set the version number to ODVERC.
                             Applications which are intended to be portable between several environments
                             should use a more-recent version MQOD only if all of those environments support
                             that version.
    Fields
                            ODSID (4-byte character string)
                                Structure identifier.
                                This is always an input field. The initial value of this field is ODSIDV.
                            ODVER (10-digit signed integer)
                                Structure version number.
                                The following constant specifies the version number of the current version:
                                ODVERC
                                     Current version of object descriptor structure.
                                This is always an input field. The initial value of this field is ODVER1.
                            ODOT (10-digit signed integer)
                                Object type.
                                This is always an input field. The initial value of this field is OTQ.
                            ODON (48-byte character string)
                                Object name.
       If ODOT is OTQM, special rules apply; in this case the name must be entirely
       blank up to the first null character or the end of the field.
       If ODON is the name of a model queue, the queue manager creates a dynamic
       queue with the attributes of the model queue, and returns in the ODON field the
       name of the queue created. A model queue can be specified only for the
       MQOPEN call.
       If a distribution list is being opened (that is, ODREC is present and greater than
       zero), ODON must be blank or the null string. If this condition is not satisfied,
       the call fails with reason code RC2152.
       This is an input/output field for the MQOPEN call when ODON is the name of a
       model queue, and an input-only field in all other cases. The length of this field
       is given by LNQN. The initial value of this field is 48 blank characters.
    ODMN (48-byte character string)
        Object queue manager name.
       This is the name of the queue manager on which the ODON object is defined.
       The characters that are valid in the name are the same as those for ODON (see
       above).
       A name that is entirely blank up to the first null character or the end of the
       field denotes the queue manager to which the application is connected.
|      If ODOT is OTNLST, OTPRO, or OTQM, the name of the local queue manager
       must either be specified explicitly, or specified as blank.
       If ODON is the name of a model queue, the queue manager creates a dynamic
       queue with the attributes of the model queue, and returns in the ODMN field the
       name of the queue manager on which the queue is created; this is the name of
       the local queue manager. A model queue can be specified only for the
       MQOPEN call.
|      If ODON is the name of a cluster queue, and ODMN is blank, the actual destination
|      of messages sent using the queue handle returned by the MQOPEN call is
|      chosen by the queue manager (or by a cluster workload exit if there is one):
                                If a distribution list is being opened (that is, ODREC is greater than zero), ODMN
                                must be blank or the null string. If this condition is not satisfied, the call fails
                                with reason code RC2153.
                                This is an input/output field for the MQOPEN call when ODON is the name of a
                                model queue, and an input-only field in all other cases. The length of this field
                                is given by LNQMN. The initial value of this field is 48 blank characters.
                            ODDN (48-byte character string)
                                Dynamic queue name.
                                The characters that are valid in the name are the same as those for ODON (see
                                above), except that an asterisk is also valid (see below). A name that is
                                completely blank (or one in which only blanks appear before the first null
                                character) is not valid if ODON is the name of a model queue.
                                If the last nonblank character in the name is an asterisk (*), the queue manager
                                replaces the asterisk with a string of characters that guarantees that the name
                                generated for the queue is unique at the local queue manager. To allow a
                                sufficient number of characters for this, the asterisk is valid only in positions 1
                                through 33. There must be no characters other than blanks or a null character
                                following the asterisk.
                                It is valid for the asterisk to appear in the first character position, in which
                                case the name consists solely of the characters generated by the queue
                                manager.
                                This is an input field. The length of this field is given by LNQN. The initial
                                value of this field is 'AMQ.*', padded with blanks.
                            ODAU (12-byte character string)
                                Alternate user identifier.
                                If OOALTU is specified for the MQOPEN call, or PMALTU for the MQPUT1
                                call, this field contains an alternate user identifier that is to be used to check
                                the authorization for the open, in place of the user identifier that the
                                application is currently running under. Some checks, however, are still carried
                                out with the current user identifier (for example, context checks).
   This is an input field. The length of this field is given by LNUID. The initial
   value of this field is 12 blank characters.
The remaining fields are not present if ODVER is less than ODVER2.
ODREC (10-digit signed integer)
    Number of object records present.
   This is the number of MQOR object records that have been provided by the
   application. If this number is greater than zero, it indicates that a distribution
   list is being opened, with ODREC being the number of destination queues in the
   list. It is valid for a distribution list to contain only one destination.
   The value of ODREC must not be less than zero, and if it is greater than zero
   ODOT must be OTQ; the call fails with reason code RC2154 if these conditions
   are not satisfied.
   This is an input field. The initial value of this field is 0. This field is not
   present if ODVER is less than ODVER2.
ODKDC (10-digit signed integer)
    Number of local queues opened successfully.
   This is the number of queues in the distribution list that resolve to local
   queues and that were opened successfully. The count does not include queues
   that resolve to remote queues (even though a local transmission queue is used
   initially to store the message). If present, this field is also set when opening a
   single queue which is not in a distribution list.
   This is an output field. The initial value of this field is 0. This field is not
   present if ODVER is less than ODVER2.
ODUDC (10-digit signed integer)
    Number of remote queues opened successfully
   This is the number of queues in the distribution list that resolve to remote
   queues and that were opened successfully. If present, this field is also set when
   opening a single queue which is not in a distribution list.
   This is an output field. The initial value of this field is 0. This field is not
   present if ODVER is less than ODVER2.
ODIDC (10-digit signed integer)
    Number of queues that failed to open.
   This is the number of queues in the distribution list that failed to open
   successfully. If present, this field is also set when opening a single queue which
   is not in a distribution list.
   Note: If present, this field is set only if the CMPCOD parameter on the MQOPEN
         or MQPUT1 call is CCOK or CCWARN; it is not set if the CMPCOD
         parameter is CCFAIL.
                            This is the offset in bytes of the first MQOR object record from the start of the
                            MQOD structure. The offset can be positive or negative. ODORO is used only
                            when a distribution list is being opened. The field is ignored if ODREC is zero.
                            When a distribution list is being opened, an array of one or more MQOR object
                            records must be provided in order to specify the names of the destination
                            queues in the distribution list. This can be done in one of two ways:
                            v By using the offset field ODORO
                              In this case, the application should declare its own structure containing an
                              MQOD followed by the array of MQOR records (with as many array
                              elements as are needed), and set ODORO to the offset of the first element in
                              the array from the start of the MQOD. Care must be taken to ensure that
                              this offset is correct.
                            v By using the pointer field ODORP
                               In this case, the application can declare the array of MQOR structures
                               separately from the MQOD structure, and set ODORP to the address of the
                               array.
                            Whichever technique is chosen, one of ODORO and ODORP must be used; the call
                            fails with reason code RC2155 if both are zero, or both are nonzero.
                            This is an input field. The initial value of this field is 0. This field is not
                            present if ODVER is less than ODVER2.
                        ODRRO (10-digit signed integer)
                            Offset of first response record from start of MQOD.
                            This is the offset in bytes of the first MQRR response record from the start of
                            the MQOD structure. The offset can be positive or negative. ODRRO is used only
                            when a distribution list is being opened. The field is ignored if ODREC is zero.
                            The response records can be provided in the same way as the object records,
                            either by specifying an offset in ODRRO, or by specifying an address in ODRRP;
                            see the description of ODORO above for details of how to do this. However, no
                            more than one of ODRRO and ODRRP can be used; the call fails with reason code
                            RC2156 if both are nonzero.
        This is an input field. The initial value of this field is 0. This field is not
        present if ODVER is less than ODVER2.
    ODORP (pointer)
        Address of first object record.
        This is the address of the first MQOR object record. ODORP is used only when a
        distribution list is being opened. The field is ignored if ODREC is zero.
        Either ODORP or ODORO can be used to specify the object records, but not both;
        see the description of the ODORO field above for details. If ODORP is not used, it
        must be set to the null pointer or null bytes.
        This is an input field. The initial value of this field is the null pointer. This
        field is not present if ODVER is less than ODVER2.
    ODRRP (pointer)
        Address of first response record.
        This is the address of the first MQRR response record. ODRRP is used only when
        a distribution list is being opened. The field is ignored if ODREC is zero.
        Either ODRRP or ODRRO can be used to specify the response records, but not both;
        see the description of the ODRRO field above for details. If ODRRP is not used, it
        must be set to the null pointer or null bytes.
        This is an input field. The initial value of this field is the null pointer. This
        field is not present if ODVER is less than ODVER2.
|   The remaining fields are not present if ODVER is less than ODVER3.
    ODASI (40-byte bit string)
        Alternate security identifier.
        This is a security identifier that is passed with the ODAU to the authorization
        service to allow appropriate authorization checks to be performed. ODASI is
        used only if:
        v OOALTU is specified on the MQOPEN call, or
        v PMALTU is specified on the MQPUT1 call,
        and the ODAU field is not entirely blank up to the first null character or the end
        of the field.
                                This is an input field. The length of this field is given by LNSCID. The initial
                                value of this field is SINONE. This field is not present if ODVER is less than
|                               ODVER3.
|                           ODRQN (48-byte character string)
|                               Resolved queue name.
|                               This is the name of the final destination queue, as known to the local queue
|                               manager. It is set to a nonblank value by the queue manager only for queues
|                               that are opened for browse, input, or output (or any combination).
|                               This is an output field. The length of this field is given by LNQN. The initial
|                               value of this field is the null string in C, and 48 blank characters in other
|                               programming languages. This field is not present if ODVER is less than
|                               ODVER3.
|                           ODRMN (48-byte character string)
|                               Resolved queue manager name.
|                               This is the name of the final destination queue manager, as known to the local
|                               queue manager. It is set to a nonblank value by the queue manager only for
|                               queues that are opened for browse, input, or output (or any combination).
|                               This is an output field. The length of this field is given by LNQN. The initial
|                               value of this field is the null string in C, and 48 blank characters in other
|                               programming languages. This field is not present if ODVER is less than
|                               ODVER3.
Overview
                         The MQOR structure is used to specify the queue name and queue-manager name
                         of a single destination queue. By providing an array of these structures on the
                         MQOPEN call, it is possible to open a list of queues; this list is called a distribution
                         list. Each message put using the queue handle returned by that MQOPEN call is
                         placed on each of the queues in the list, provided that the queue was opened
                         successfully.
Fields
                         ORON (48-byte character string)
                             Object name.
                             This is the same as the ODON field in the MQOD structure (see MQOD for
                             details), except that:
                             v It must be the name of a queue.
                             v It must not be the name of a model queue.
                             This is always an input field. The initial value of this field is 48 blank
                             characters.
                         ORMN (48-byte character string)
                             Object queue manager name.
                             This is the same as the ODMN field in the MQOD structure (see MQOD for
                             details).
                             This is always an input field. The initial value of this field is 48 blank
                             characters.
             RPG declaration
                                D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                                D* MQOR Structure
                                D*
                                D* Object name
                                D ORON                    1     48
                                D* Object queue manager name
                                D ORMN                   49     96
Overview
                         The current version of MQPMO is given by PMVERC. Fields that exist only in the
                         more-recent versions of the structure are identified as such in the descriptions that
                         follow. The declaration of MQPMO provided in the COPY file contains the
                         additional fields, but the initial value provided for the PMVER field is PMVER1. To
                         use the additional fields, the application must set the version number to PMVERC.
                         Applications which are intended to be portable between several environments
                         should use a more-recent version MQPMO only if all of those environments
                         support that version.
Fields
                        PMSID (4-byte character string)
                            Structure identifier.
                            This is always an input field. The initial value of this field is PMSIDV.
                        PMVER (10-digit signed integer)
                            Structure version number.
                            The following constant specifies the version number of the current version:
                            PMVERC
                                 Current version of put-message options structure.
                            This is always an input field. The initial value of this field is PMVER1.
                        PMOPT (10-digit signed integer)
                            Options that control the action of MQPUT and MQPUT1.
                            Any or none of the following can be specified. If more than one is required the
                            values can be added together (do not add the same constant more than once).
                            Combinations that are not valid are noted; any other combinations are valid.
                            PMSYP
                                     Put message with syncpoint control.
                                     The request is to operate within the normal unit-of-work protocols. The
                                     message is not visible outside the unit of work until the unit of work is
                                     committed. If the unit of work is backed out, the message is deleted.
                                     If neither this option nor PMNSYP is specified, the put request is not
                                     within a unit of work.
                                     PMSYP must not be specified with PMNSYP.
                            PMNSYP
                                 Put message without syncpoint control.
                                     The request is to operate outside the normal unit-of-work protocols.
                                     The message is available immediately, and it cannot be deleted by
                                     backing out a unit of work.
                                     If neither this option nor PMSYP is specified, the put request is not
                                     within a unit of work.
                                     PMNSYP must not be specified with PMSYP.
Group and segment option: The option described below relates to messages in
groups and segments of logical messages. The following definitions may be of
help in understanding this option:
Physical message
       This is the smallest unit of information that can be placed on or
       removed from a queue; it often corresponds to the information
       specified or retrieved on a single MQPUT, MQPUT1, or MQGET call.
       Every physical message has its own message descriptor (MQMD).
       Generally, physical messages are distinguished by differing values for
       the message identifier (MDMID field in MQMD), although this is not
       enforced by the queue manager.
Logical message
        This is a single unit of application information. In the absence of
        system constraints, a logical message would be the same as a physical
        message. But where logical messages are extremely large, system
        constraints may make it advisable or necessary to split a logical
        message into two or more physical messages, called segments.
       A logical message that has been segmented consists of two or more
       physical messages that have the same nonnull group identifier (MDGID
       field in MQMD), and the same message sequence number (MDSEQ field
       in MQMD). The segments are distinguished by differing values for the
       segment offset (MDOFF field in MQMD), which gives the offset of the
       data in the physical message from the start of the data in the logical
       message. Because each segment is a physical message, the segments in
       a logical message usually have differing message identifiers.
       A logical message that has not been segmented, but for which
       segmentation has been permitted by the sending application, also has a
                                     Because the application has told the queue manager how it will put
                                     messages in groups and segments of logical messages, the application
                                     does not have to maintain and update the group and segment
                                     information on each MQPUT call, as the queue manager does this.
                                     Specifically, it means that the application does not need to set the
                                     MDGID, MDSEQ, and MDOFF fields in MQMD, as the queue manager sets
                                     these to the appropriate values. The application need set only the
                                     MDMFL field in MQMD, to indicate when messages belong to groups or
                                     are segments of logical messages, and to indicate the last message in a
                                     group or last segment of a logical message.
                                            Table 31 shows the combinations of options and flags that are valid,
                                            and the values of the MDGID, MDSEQ, and MDOFF fields that the queue
                                            manager uses in each case. Combinations of options and flags that are
|                                           not shown in the table are not valid. The columns in the table have the
|                                           following meanings:
|                                           LOG ORD
|                                                A “U” means that the row applies only when the PMLOGO
|                                                option is specified.
|                                           MIG        A “U” means that the row applies only when the MFMIG or
|                                                      MFLMIG option is specified.
|                                           SEG        A “U” means that the row applies only when the MFSEG or
|                                                      MFLSEG option is specified.
|                                                      A “(U)” means that the row applies whether or not the
|                                                      MFSEG or MFLSEG option is specified.
|                                           SEG OK
|                                                A “U” means that the row applies only when the MFSEGA
|                                                option is specified.
|                                                      A “(U)” means that the row applies whether or not the
|                                                      MFSEGA option is specified.
|                                           Cur grp
|                                                  A “U” means that the row applies only when a current
|                                                  message group exists prior to the call.
|                                                      A “(U)” means that the row applies whether or not a current
|                                                      message group exists prior to the call.
|                                           Cur log msg
|                                                  A “U” means that the row applies only when a current logical
|                                                  message exists prior to the call.
|                                                      A “(U)” means that the row applies whether or not a current
|                                                      logical message exists prior to the call.
|                                           Other columns
|                                                  These show the values that the queue manager uses.
|                                                  “Previous” denotes the value used for the field in the previous
|                                                  message for the queue handle.
    Table 31. MQPUT options relating to messages in groups and segments of logical messages
             Options you specify            Group and log-msg                          Values the queue manager uses
                                            status prior to call
     LOG      MIG        SEG       SEG OK   Cur grp     Cur log         MDGID                      MDSEQ                  MDOFF
     ORD                                                 msg
      U                                                                GINONE                       1                       0
      U                              U                              New group id                    1                       0
      U                   U         (U)                             New group id                    1                       0
      U                   U         (U)                   U        Previous group id                1                 Previous offset +
                                                                                                                  previous segment length
      U         U         (U)       (U)                             New group id                    1                       0
      U         U         (U)       (U)       U                    Previous group id         Previous sequence              0
                                                                                                number + 1
                                      The group and segment information that the queue manager retains for
                                      the MQPUT call is separate from the group and segment information
                                      that it retains for the MQGET call.
                                      For any given queue handle, the application is free to mix MQPUT
                                      calls that specify PMLOGO with MQPUT calls that do not, but the
                                      following points should be noted:
                                      v Each successful MQPUT call that does not specify PMLOGO causes
                                         the queue manager to set the group and segment information for the
                                         queue handle to the values specified by the application; this replaces
                                         the existing group and segment information retained by the queue
                                         manager for the queue handle.
                                      v If PMLOGO is not specified, the call does not fail if there is a current
                                         message group or logical message, but the message or segment put
                                         is not the next one in the group or logical message. The call may
                                         however succeed with an CCWARN completion code. Table 32
                                         shows the various cases that can arise. In these cases, if the
                                         completion code is not CCOK, the reason code is one of the
                                         following (as appropriate):
                                             RC2241
                                             RC2242
                                             RC2185
                                             RC2245
                                        Note: The queue manager does not check the group and segment
                                              information for the MQPUT1 call.
Table 32. Outcome when MQPUT or MQCLOSE call not consistent with group and segment information
            Current call                                              Previous call
                                               MQPUT with PMLOGO                      MQPUT without PMLOGO
       MQPUT with PMLOGO                             CCFAIL                                  CCFAIL
      MQPUT without PMLOGO                           CCWARN                                  CCOK
 MQCLOSE with an unterminated group                  CCWARN                                  CCOK
        or logical message
Only one of the PM* context options can be specified. If none of these options
is specified, PMDEFC is assumed.
PMALTU
     Validate with specified user identifier.
                            This is an input field. The initial value of the PMOPT field is PMNONE.
                        PMTO (10-digit signed integer)
                            Reserved.
                            This is a reserved field; its value is not significant. The initial value of this field
                            is −1.
                        PMCT (10-digit signed integer)
                            Object handle of input queue.
                            If PMPASI or PMPASA is specified, this field must contain the input queue
                            handle from which context information to be associated with the message
                            being put is taken.
                            This is the number of messages that the current MQPUT or MQPUT1 call has
                            sent successfully to queues in the distribution list that are local queues. The
                            count does not include messages sent to queues that resolve to remote queues
                            (even though a local transmission queue is used initially to store the message).
                            This field is also set when putting a message to a single queue which is not in
                            a distribution list.
                            This is an output field. The initial value of this field is 0. This field is not set if
                            PMVER is less than PMVER2.
   This is the number of messages that the current MQPUT or MQPUT1 call has
   sent successfully to queues in the distribution list that resolve to remote
   queues. Messages that the queue manager retains temporarily in
   distribution-list form count as the number of individual destinations that those
   distribution lists contain. This field is also set when putting a message to a
   single queue which is not in a distribution list.
   This is an output field. The initial value of this field is 0. This field is not set if
   PMVER is less than PMVER2.
PMIDC (10-digit signed integer)
    Number of messages that could not be sent.
   This is the number of messages that could not be sent to queues in the
   distribution list. The count includes queues that failed to open, as well as
   queues that were opened successfully but for which the put operation failed.
   This field is also set when putting a message to a single queue which is not in
   a distribution list.
   Note: This field is set only if the CMPCOD parameter on the MQPUT or MQPUT1
         call is CCOK or CCWARN; it is not set if the CMPCOD parameter is
         CCFAIL.
   This is an output field. The initial value of this field is 0. This field is not set if
   PMVER is less than PMVER2.
PMRQN (48-byte character string)
    Resolved name of destination queue.
   This is an output field that is set by the queue manager to the name of the
   queue (after alias resolution) on which the message will be placed. This can be
   either the name of a local queue, or the name of a remote queue. If the
   destination queue opened was a model queue, the name of the dynamic local
   queue that was created is returned. In all cases, the name returned is the name
   of a queue that is defined on the queue manager identified by PMRMN.
   This is an output field. The length of this field is given by LNQN. The initial
   value of this field is 48 blank characters.
PMRMN (48-byte character string)
    Resolved name of destination queue manager.
   This is the name of the queue manager (after alias resolution) that owns the
   queue specified by PMRQN.
   This is an output field. The length of this field is given by LNQMN. The initial
   value of this field is 48 blank characters.
                            The value of PMREC need not be the same as the number of destinations in the
                            distribution list. If too many records are provided, the excess are not used; if
                            too few records are provided, default values are used for the message
                            properties for those destinations that do not have put message records (see
                            PMPRO below).
                            If PMREC is less than zero, or is greater than zero but the message is not being
                            put to a distribution list, the call fails with reason code RC2154.
                            This is an input field. The initial value of this field is 0. This field is not
                            present if PMVER is less than PMVER2.
                        PMPRF (10-digit signed integer)
                            Flags indicating which MQPMR fields are present.
                            This field contains flags that must be set to indicate which MQPMR fields are
                            present in the put message records provided by the application. PMPRF is used
                            only when the message is being put to a distribution list. The field is ignored if
                            PMREC is zero, or both PMPRO and PMPRP are zero.
                            For fields that are present, the queue manager uses for each destination the
                            values from the fields in the corresponding put message record. For fields that
                            are absent, the queue manager uses the values from the MQMD structure.
                            One or more of the following flags can be specified to indicate which fields are
                            present in the put message records:
                            PFMID
                                     Message-identifier field is present.
                            PFCID
                                     Correlation-identifier field is present.
                            PFGID
                                     Group-identifier field is present.
                            PFFB     Feedback field is present.
                            PFACC
                                     Accounting-token field is present.
                                     If this flag is specified, either PMSETI or PMSETA must be specified in
                                     the PMOPT field; if this condition is not satisfied, the call fails with
                                     reason code RC2158.
   If PMPRF contains flags which are not valid, or put message records are
   provided but PMPRF has the value PFNONE, the call fails with reason code
   RC2158.
   This is an input field. The initial value of this field is PFNONE. This field is
   not present if PMVER is less than PMVER2.
PMPRO (10-digit signed integer)
    Offset of first put message record from start of MQPMO.
   This is the offset in bytes of the first MQPMR put message record from the
   start of the MQPMO structure. The offset can be positive or negative. PMPRO is
   used only when the message is being put to a distribution list. The field is
   ignored if PMREC is zero.
   When the message is being put to a distribution list, an array of one or more
   MQPMR put message records can be provided in order to specify certain
   properties of the message for each destination individually; these properties
   are:
   v message identifier
   v correlation identifier
   v group identifier
   v feedback value
   v accounting token
   Usually, there should be as many put message records as there are object
   records specified by MQOD when the distribution list is opened; each put
   message record supplies the message properties for the queue identified by the
   corresponding object record. Queues in the distribution list which fail to open
   must still have put message records allocated for them at the appropriate
   positions in the array, although the message properties are ignored in this case.
   It is possible for the number of put message records to differ from the number
   of object records. If there are fewer put message records than object records,
   the message properties for the destinations which do not have put message
   records are taken from the corresponding fields in the message descriptor
   MQMD. If there are more put message records than object records, the excess
   are not used (although it must still be possible to access them). Put message
   records are optional, but if they are supplied there must be PMREC of them.
   The put message records can be provided in a similar way to the object records
   in MQOD, either by specifying an offset in PMPRO, or by specifying an address
                            No more than one of PMPRO and PMPRP can be used; the call fails with reason
                            code RC2159 if both are nonzero.
                            This is an input field. The initial value of this field is 0. This field is not
                            present if PMVER is less than PMVER2.
                        PMRRO (10-digit signed integer)
                            Offset of first response record from start of MQPMO.
                            This is the offset in bytes of the first MQRR response record from the start of
                            the MQPMO structure. The offset can be positive or negative. PMRRO is used
                            only when the message is being put to a distribution list. The field is ignored if
                            PMREC is zero.
                            When the message is being put to a distribution list, an array of one or more
                            MQRR response records can be provided in order to identify the queues to
                            which the message was not sent successfully (RRCC field in MQRR), and the
                            reason for each failure (RRREA field in MQRR). The message may not have been
                            sent either because the queue failed to open, or because the put operation
                            failed. The queue manager sets the response records only when the outcome of
                            the call is mixed (that is, some messages were sent successfully while others
                            failed, or all failed but for differing reasons); reason code RC2136 from the call
                            indicates this case. If the same reason code applies to all queues, that reason is
                            returned in the REASON parameter of the MQPUT or MQPUT1 call, and the
                            response records are not set.
                            Usually, there should be as many response records as there are object records
                            specified by MQOD when the distribution list is opened; when necessary, each
                            response record is set to the completion code and reason code for the put to
                            the queue identified by the corresponding object record. Queues in the
                            distribution list which fail to open must still have response records allocated
                            for them at the appropriate positions in the array, although they are set to the
                            completion code and reason code resulting from the open operation, rather
                            than the put operation.
                            It is possible for the number of response records to differ from the number of
                            object records. If there are fewer response records than object records, it may
                            not be possible for the application to identify all of the destinations for which
                            the put operation failed, or the reasons for the failures. If there are more
                            response records than object records, the excess are not used (although it must
                            still be possible to access them). Response records are optional, but if they are
                            supplied there must be PMREC of them.
                            The response records can be provided in a similar way to the object records in
                            MQOD, either by specifying an offset in PMRRO, or by specifying an address in
                            PMRRP; for details of how to do this, see the ODORO field described in
                            “Chapter 12. MQOD - Object descriptor” on page 137. However, no more than
                            one of PMRRO and PMRRP can be used; the call fails with reason code RC2156 if
                            both are nonzero.
                            For the MQPUT1 call, this field must be zero. This is because the response
                            information (if requested) is returned in the response records specified by the
                            object descriptor MQOD.
                   This is the address of the first MQPMR put message record. PMPRP is used only
                   when the message is being put to a distribution list. The field is ignored if
                   PMREC is zero.
                   Either PMPRP or PMPRO can be used to specify the put message records, but not
                   both; see the description of the PMPRO field above for details. If PMPRP is not
                   used, it must be set to the null pointer or null bytes.
                   This is an input field. The initial value of this field is the null pointer. This
                   field is not present if PMVER is less than PMVER2.
               PMRRP (pointer)
                   Address of first response record.
                   This is the address of the first MQRR response record. PMRRP is used only when
                   the message is being put to a distribution list. The field is ignored if PMREC is
                   zero.
                   Either PMRRP or PMRRO can be used to specify the response records, but not both;
                   see the description of the PMRRO field above for details. If PMRRP is not used, it
                   must be set to the null pointer or null bytes.
                   For the MQPUT1 call, this field must be the null pointer or null bytes. This is
                   because the response information (if requested) is returned in the response
                   records specified by the object descriptor MQOD.
                   This is an input field. The initial value of this field is the null pointer. This
                   field is not present if PMVER is less than PMVER2.
             RPG declaration
                              D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              D* MQPMO Structure
                              D*
                              D* Structure identifier
                              D PMSID                   1      4
                              D* Structure version number
                              D PMVER                   5      8I 0
                              D* Options that control the action of MQPUT and MQPUT1
                              D PMOPT                   9     12I 0
                              D* Reserved
                              D PMTO                   13     16I 0
                              D* Object handle of input queue
                              D PMCT                   17     20I 0
                              D* Number of messages sent successfully to local queues
                              D PMKDC                  21     24I 0
                              D* Number of messages sent successfully to remote queues
                              D PMUDC                  25     28I 0
                              D* Number of messages that could not be sent
                              D PMIDC                  29     32I 0
                              D* Resolved name of destination queue
                              D PMRQN                  33     80
                              D* Resolved name of destination queue manager
                              D PMRMN                  81    128
                              D* Number of put message records or response records present
                              D PMREC                 129    132I 0
                              D* Flags indicating which MQPMR fields are present
                              D PMPRF                 133    136I 0
                              D* Offset of first put message record from start of MQPMO
                              D PMPRO                 137    140I 0
                              D* Offset of first response record from start of MQPMO
                              D PMRRO                 141    144I 0
                              D* Address of first put message record
                              D PMPRP                 145    160*
                              D* Address of first response record
                              D PMRRP                 161    176*
Overview
                         The MQPMR structure is used to specify various message properties for a single
                         destination. By providing an array of these structures on the MQPUT or MQPUT1
                         call, it is possible to specify different values for each destination queue in a
                         distribution list. Some of the fields are input only, others are input/output.
                         Note: This structure is unusual in that it does not have a fixed layout. The fields
                               in this structure are optional, and the presence or absence of each field is
                               indicated by the flags in the PMPRF field in MQPMO. Fields that are present
                               must occur in the order shown below. Fields that are absent occupy no space
                               in the record.
Fields
                         PRMID (24-byte bit string)
                             Message identifier.
                             This is the message identifier to be used for the message sent to the queue
                             whose name was specified by the corresponding element in the array of
                             MQOR structures provided on the MQOPEN or MQPUT1 call. It is processed
                             in the same way as the MDMID field in MQMD for a put to a single queue.
                             If this field is not present in the MQPMR record, or there are fewer MQPMR
                             records than destinations, the value in MQMD is used for those destinations
                             that do not have an MQPMR record containing a PRMID field. If that value is
                             MINONE, a new message identifier is generated for each of those destinations
                             (that is, no two of those destinations have the same message identifier).
                            This is the correlation identifier to be used for the message sent to the queue
                            whose name was specified by the corresponding element in the array of
                            MQOR structures provided on the MQOPEN or MQPUT1 call. It is processed
                            in the same way as the MDCID field in MQMD for a put to a single queue.
                            If this field is not present in the MQPMR record, or there are fewer MQPMR
                            records than destinations, the value in MQMD is used for those destinations
                            that do not have an MQPMR record containing a PRCID field.
                            This is the group identifier to be used for the message sent to the queue whose
                            name was specified by the corresponding element in the array of MQOR
                            structures provided on the MQOPEN or MQPUT1 call. It is processed in the
                            same way as the MDGID field in MQMD for a put to a single queue.
                            If this field is not present in the MQPMR record, or there are fewer MQPMR
                            records than destinations, the value in MQMD is used for those destinations
                            that do not have an MQPMR record containing a PRGID field. The value is
                            processed as documented in Table 31 on page 153, but with the following
                            differences:
                            v In those cases where a new group identifier would be used, the queue
                               manager generates a different group identifier for each destination (that is,
                               no two destinations have the same group identifier).
                            v In those cases where the value in the field would be used, the call fails with
                              reason code RC2258.
                            This is the feedback code to be used for the message sent to the queue whose
                            name was specified by the corresponding element in the array of MQOR
                            structures provided on the MQOPEN or MQPUT1 call. It is processed in the
                            same way as the MDFB field in MQMD for a put to a single queue. If this field
                            is not present, the value in MQMD is used.
                       This is the accounting token to be used for the message sent to the queue
                       whose name was specified by the corresponding element in the array of
                       MQOR structures provided on the MQOPEN or MQPUT1 call. It is processed
|                      in the same way as the MDACC field in MQMD for a put to a single queue. See
|                      the description of MDACC in “Chapter 10. MQMD - Message descriptor” on
|                      page 83 for information about the content of this field.
            RPG declaration
                        D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                        D* MQPMR Structure
                        D*
                        D* Message identifier
                        D PRMID                   1     24
                        D* Correlation identifier
                        D PRCID                  25     48
                        D* Group identifier
                        D PRGID                  49     72
                        D* Feedback or reason code
                        D PRFB                   73     76I 0
                        D* Accounting token
                        D PRACC                  77    108
Overview
                         The MQRMH structure defines the format of a reference message header. An
                         application can put a message in this format, omitting the bulk data. When the
                         message is read from the transmission queue by a message channel agent (MCA), a
                         user-supplied message exit is invoked to process the reference message header. The
                         exit can append to the reference message the bulk data identified by the MQRMH
                         structure, before the MCA sends the message through the channel to the next
                         queue manager.
                         At the receiving end, a message exit that waits for reference messages should exist.
                         When a reference message is received, the exit should create the object from the
                         bulk data that follows the MQRMH in the message, and then pass on the reference
                         message without the bulk data. The reference message can later be retrieved by an
                         application reading the reference message (without the bulk data) from a queue.
                        A reference message can also be sent to a distribution list. In this case, the MQDH
                        structure and its related records precede the MQRMH structure when the message
                        is on a transmission queue.
                        The format name of an MQRMH structure is FMRMH. The fields in the MQRMH
                        structure, and the strings addressed by the offset fields, are in the character set and
                        encoding given by the MDCSI and MDENC fields in the header structure that precedes
                        the MQRMH, or by those fields in the MQMD structure if the MQRMH is at the
                        start of the application message data.
Fields
                        RMSID (4-byte character string)
                            Structure identifier.
                            The following constant specifies the version number of the current version:
                            RMVERC
                                 Current version of reference message header structure.
    This identifies the representation used for numeric values in the bulk data; this
    applies to binary integer data, packed-decimal integer data, and floating-point
    data.
    This specifies the coded character set identifier of character data in the bulk
    data.
    Note that character data in the MQ data structures must be in the character set
    used by the queue manager. This is defined by the queue manager’s
    CodedCharSetId attribute; see “Chapter 43. Attributes for the queue manager”
    on page 323 for details of this attribute.
    This is a name that the sender of the message may use to indicate to the
    receiver the nature of the bulk data. Any characters that are in the queue
    manager’s character set may be specified for the name, but it is recommended
    that the name be restricted to the following:
    v Uppercase A through Z
    v Numeric digits 0 through 9
    If other characters are used, it may not be possible to translate the name
    between the character sets of the sending and receiving queue managers.
    The name should be padded with blanks to the length of the field. Do not use
    a null character to terminate the name before the end of the field, as the queue
    manager does not change the null and subsequent characters to blanks in the
    MQRMH structure. Do not specify a name with leading or embedded blanks.
                            This is a name that can be used by the message exit to recognize types of
                            reference message that it supports. It is recommended that the name conform
                            to the same rules as the RMFMT field described above.
                            The length of this field is given by LNOIID. The initial value of this field is
                            OIINON.
                        RMSEL (10-digit signed integer)
                            Length of source environment data.
If this field is zero, there is no source environment data, and RMSEO is ignored.
                            This field specifies the offset of the source environment data from the start of
                            the MQRMH structure. Source environment data can be specified by the
                            creator of the reference message, if that data is known to the creator. For
                            example, on OS/2 the source environment data might be the directory path of
                            the object containing the bulk data. However, if the creator does not know the
                            source environment data, it is the responsibility of the user-supplied message
                            exit to determine any environment information needed.
                            The length of the source environment data is given by RMSEL; if this length is
                            zero, there is no source environment data, and RMSEO is ignored. If present, the
                            source environment data must reside completely within RMLEN bytes from the
                            start of the structure.
                            Applications should not assume that the environment data starts immediately
                            after the last fixed field in the structure or that it is contiguous with any of the
                            data addressed by the RMSNO, RMDEO, and RMDNO fields.
If this field is zero, there is no source object name, and RMSNO is ignored.
    This field specifies the offset of the source object name from the start of the
    MQRMH structure. The source object name can be specified by the creator of
    the reference message, if that data is known to the creator. However, if the
    creator does not know the source object name, it is the responsibility of the
    user-supplied message exit to identify the object to be accessed.
    The length of the source object name is given by RMSNL; if this length is zero,
    there is no source object name, and RMSNO is ignored. If present, the source
    object name must reside completely within RMLEN bytes from the start of the
    structure.
    Applications should not assume that the source object name is contiguous with
    any of the data addressed by the RMSEO, RMDEO, and RMDNO fields.
    This field specifies the offset of the destination environment data from the start
    of the MQRMH structure. Destination environment data can be specified by
    the creator of the reference message, if that data is known to the creator. For
    example, on OS/2 the destination environment data might be the directory
    path of the object where the bulk data is to be stored. However, if the creator
    does not know the destination environment data, it is the responsibility of the
    user-supplied message exit to determine any environment information needed.
    The length of the destination environment data is given by RMDEL; if this length
    is zero, there is no destination environment data, and RMDEO is ignored. If
    present, the destination environment data must reside completely within RMLEN
    bytes from the start of the structure.
                            This field specifies the offset of the destination object name from the start of
                            the MQRMH structure. The destination object name can be specified by the
                            creator of the reference message, if that data is known to the creator. However,
                            if the creator does not know the destination object name, it is the responsibility
                            of the user-supplied message exit to identify the object to be created or
                            modified.
                            The length of the destination object name is given by RMDNL; if this length is
                            zero, there is no destination object name, and RMDNO is ignored. If present, the
                            destination object name must reside completely within RMLEN bytes from the
                            start of the structure.
                            Applications should not assume that the destination object name is contiguous
                            with any of the data addressed by the RMSEO, RMSNO, and RMDEO fields.
                            The RMDL field specifies the length of the bulk data referenced by the MQRMH
                            structure.
                            If the bulk data is actually present in the message, the data begins at an offset
                            of RMLEN bytes from the start of the MQRMH structure. The length of the entire
                            message minus RMLEN gives the length of the bulk data present.
                            If data is present in the message, RMDL specifies the amount of that data that is
                            relevant. The normal case is for RMDL to have the same value as the length of
                            data actually present in the message.
                            If the MQRMH structure represents the remaining data in the object (starting
                            from the specified logical offset), the value zero can be used for RMDL, provided
                            that the bulk data is not actually present in the message.
                            If no data is present, the end of MQRMH coincides with the end of the
                            message.
                            This field specifies the low offset of the bulk data from the start of the object of
                            which the bulk data forms part. The offset of the bulk data from the start of
                            the object is called the logical offset. This is not the physical offset of the bulk
                            data from the start of the MQRMH structure – that offset is given by RMLEN.
                            To allow large objects to be sent using reference messages, the logical offset is
                            divided into two fields, and the actual logical offset is given by the sum of
                            these two fields:
                   This field specifies the high offset of the bulk data from the start of the object
                   of which the bulk data forms part. It is a value in the range 0 through
                   999 999 999. See RMDO for details.
Overview
                         The MQRR structure is used to receive the completion code and reason code
                         resulting from the open or put operation for a single destination queue. By
                         providing an array of these structures on the MQOPEN and MQPUT calls, or on
                         the MQPUT1 call, it is possible to determine the completion codes and reason
                         codes for all of the queues in a distribution list, when the outcome of the call is
                         mixed, that is, when the call succeeds for some queues in the list, but fails for
                         others. Reason code RC2136 from the call indicates that the response records (if
                         provided by the application) have been set by the queue manager.
MQRR is an output structure for the MQOPEN, MQPUT, and MQPUT1 calls.
Fields
                         RRCC (10-digit signed integer)
                             Completion code for queue.
                             This is the completion code resulting from the open or put operation for the
                             queue whose name was specified by the corresponding element in the array of
                             MQOR structures provided on the MQOPEN or MQPUT1 call.
                             This is always an output field. The initial value of this field is CCOK.
                         RRREA (10-digit signed integer)
                             Reason code for queue.
                             This is the reason code resulting from the open or put operation for the queue
                             whose name was specified by the corresponding element in the array of
                             MQOR structures provided on the MQOPEN or MQPUT1 call.
This is always an output field. The initial value of this field is RCNONE.
Overview
                         The MQTM structure describes the data in the trigger message that is sent by the
                         queue manager to a trigger-monitor application when a trigger event occurs for a
                         queue. This structure is part of the MQSeries Trigger Monitor Interface (TMI),
                         which is one of the MQSeries framework interfaces.
For information about triggers, see the MQSeries Application Programming Guide.
                         The fields in the message descriptor of the trigger message are set as follows:
                         Field in MQMD
                                 Value used
                         MDSID MDSIDV
                         MDVER MDVER1
                         MDREP RONONE
                         MDMT    MTDGRM
                         MDEXP EIULIM
                         MDFB    FBNONE
                         MDENC ENNAT
                         MDCSI Queue manager’s CodedCharSetId attribute
                         MDFMT FMTM
                         MDPRI Initiation queue’s DefPriority attribute
                         MDPER PENPER
Fields
                        TMSID (4-byte character string)
                            Structure identifier.
                            The following constant specifies the version number of the current version:
                            TMVERC
                                 Current version of trigger message structure.
                            This is the name of the queue for which a trigger event occurred, and is used
                            by the application started by the trigger-monitor application. The queue
                            manager initializes this field with the value of the QName attribute of the
                            triggered queue; see “Chapter 37. Attributes for all queues” on page 293 for
                            details of this attribute.
        The length of this field is given by LNQN. The initial value of this field is 48
        blank characters.
    TMPN (48-byte character string)
        Name of process object.
        This is the name of the queue-manager process object specified for the
        triggered queue, and can be used by the trigger-monitor application that
        receives the trigger message. The queue manager initializes this field with the
        value of the ProcessName attribute of the queue identified by the TMQN field; see
        “Chapter 38. Attributes for local queues and model queues” on page 299 for
        details of this attribute.
        Names that are shorter than the defined length of the field are always padded
        to the right with blanks; they are not ended prematurely by a null character.
        The length of this field is given by LNPRON. The initial value of this field is
        48 blank characters.
    TMTD (64-byte character string)
        Trigger data.
        This is free-format data for use by the trigger-monitor application that receives
        the trigger message. The queue manager initializes this field with the value of
        the TriggerData attribute of the queue identified by the TMQN field; see
        “Chapter 38. Attributes for local queues and model queues” on page 299 for
        details of this attribute. The content of this data is of no significance to the
        queue manager.
        The length of this field is given by LNTRGD. The initial value of this field is
        64 blank characters.
    TMAT (10-digit signed integer)
        Application type.
        This identifies the nature of the program to be started, and is used by the
        trigger-monitor application that receives the trigger message. The queue
        manager initializes this field with the value of the ApplType attribute of the
        process object identified by the TMPN field; see “Chapter 42. Attributes for
        process definitions” on page 319 for details of this attribute. The content of this
        data is of no significance to the queue manager.
        TMAT can have one of the following standard values. User-defined types can
        also be used, but should be restricted to values in the range ATUFST through
        ATULST:
        ATCICS
                CICS transaction.
|       ATVSE
|               CICS/VSE transaction.
        AT400 OS/400 application.
        ATUFST
                Lowest value for user-defined application type.
        ATULST
                Highest value for user-defined application type.
                            The length of this field is given by LNPROA. The initial value of this field is
                            256 blank characters.
                        TMED (128-byte character string)
                            Environment data.
                            The length of this field is given by LNPROE. The initial value of this field is
                            128 blank characters.
                        TMUD (128-byte character string)
                            User data.
                            The length of this field is given by LNPROU. The initial value of this field is
                            128 blank characters.
RPG declaration
             D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
             D* MQTM Structure
             D*
             D* Structure identifier
             D TMSID                   1      4
             D* Structure version number
             D TMVER                   5      8I 0
             D* Name of triggered queue
             D TMQN                    9     56
             D* Name of process object
             D TMPN                   57    104
             D* Trigger data
             D TMTD                  105    168
             D* Application type
             D TMAT                  169    172I 0
             D* Application identifier
             D TMAI                  173    428
             D* Environment data
             D TMED                  429    556
             D* User data
             D TMUD                  557    684
    Overview
                             When a trigger-monitor application retrieves a trigger message (MQTM) from an
                             initiation queue, the trigger monitor may need to pass some or all of the
                             information in the trigger message to the application that is started by the trigger
                             monitor. Information that may be needed by the started application includes TC2QN,
                             TC2TD, and TC2UD. The trigger monitor application can pass the MQTM structure
                             directly to the started application, or an MQTMC2 structure, depending on what is
                             most convenient for the started application.
                             This structure is part of the MQSeries Trigger Monitor Interface (TMI), which is
                             one of the MQSeries framework interfaces.
                             v On OS/390, for an ATIMS application that is started using the CSQQTRMN
                               application, an MQTMC2 structure is made available to the started application.
|                            v On VSE/ESA, this structure is not supported.
                             v On 16-bit Windows and 32-bit Windows, there is no trigger monitor application,
                               and this structure is not supported.
                             The MQTMC2 structure is very similar to the format of the trigger message
                             (MQTM structure). The difference is that the non-character fields in MQTM are
                             changed in MQTMC2 to character fields of the same length, and the queue
                             manager name is added at the end of the structure.
                             See “Chapter 18. MQTM - Trigger message” on page 179 for details of the fields
                             that are the same in this structure.
Fields
                        TC2SID (4-byte character string)
                            Structure identifier.
                            The following constant specifies the version number of the current version:
                            TCVERC
                                 Current version of trigger message (character format) structure.
                        TC2QN (48-byte character string)
                            Name of triggered queue.
                            This field always contains blanks, whatever the value in the TMAT field in the
                            MQTM structure of the original trigger message.
                        TC2AI (256-byte character string)
                            Application identifier.
        RPG declaration
                   D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                   D* MQTMC2 Structure
                   D*
                   D* Structure identifier
                   D TC2SID                  1      4
                   D* Structure version number
                   D TC2VER                  5      8
                   D* Name of triggered queue
                   D TC2QN                   9     56
                   D* Name of process object
                   D TC2PN                  57    104
                   D* Trigger data
                   D TC2TD                 105    168
                   D* Application type
                   D TC2AT                 169    172
                   D* Application identifier
                   D TC2AI                 173    428
                   D* Environment data
                   D TC2ED                 429    556
                   D* User data
                   D TC2UD                 557    684
                   D* Queue manager name
                   D TC2QMN                685    732
Overview
                         The MQWIH structure describes the information that must be present at the start
                         of a message that is to be handled by the OS/390 workload manager. The format
                         name of this structure is FMWIH.
Fields
                         WISID (4-byte character string)
                             Structure identifier.
                             The following constant specifies the version number of the current version:
                             WIVERC
                                  Current version of work information header structure.
                            This is the numeric encoding of the data that follows the MQWIH structure.
                            The initial value of this field is 0.
                        WICSI (10-digit signed integer)
                            Character-set identifier of data that follows MQWIH.
                            This is the coded character-set identifier of the data that follows the MQWIH
                            structure. The initial value of this field is 0.
                        WIFMT (8-byte character string)
                            Format name of data that follows MQWIH.
                            This is the MQ format name of the data that follows the MQWIH structure.
                            The rules for coding this are the same as those for the MDFMT field in MQMD.
                            The length of this field is given by LNFMT. The initial value of this field is
                            FMNONE.
                        WIFLG (10-digit signed integer)
                            Flags
                            The length of this field is given by LNSVNM. The initial value of this field is
                            32 blank characters.
                        WISST (8-byte character string)
                            Service step name.
This is the name of the step of WISNM to which the message relates.
                       For the MQPUT and MQPUT1 calls, this field is ignored. The length of this
                       field is given by LNMTOK. The initial value of this field is MTKNON.
                   WIRSV (32-byte character string)
                       Reserved.
Overview
                         The MQXQH structure describes the information that is prefixed to the application
                         message data of messages when they are on transmission queues. A transmission
                         queue is a special type of local queue that temporarily holds messages destined for
                         remote queues (that is, destined for queues that do not belong to the local queue
                         manager). A transmission queue is denoted by the Usage queue attribute having
                         the value USTRAN.
                         The fields in the embedded message descriptor have the same values as those in
                         the MSGDSC parameter of the MQPUT or MQPUT1 call, with the exception of the
                         following:
                         v The MDVER field always has the value MDVER1.
                         v If the MDPRI field has the value PRQDEF, it is replaced by the value of the
                            queue’s DefPriority attribute.
                         v If the MDPER field has the value PEQDEF, it is replaced by the value of the
                            queue’s DefPersistence attribute.
                         v If the MDMID field has the value MINONE, or the PMNMID option was specified,
                           or the message is a distribution-list message, MDMID is replaced by a new
                           message identifier generated by the queue manager.
                            When a distribution-list message is split into smaller distribution-list messages
                            placed on different transmission queues, the MDMID field in each of the new
                            embedded message descriptors is the same as that in the original distribution-list
                            message.
                         v If the PMNCID option was specified, MDCID is replaced by a new correlation
                           identifier generated by the queue manager.
                         v The context fields are set as indicated by the PM* context options specified in
                           the PMO parameter; the context fields are the fields MDUID through MDAOD in the
                           list below.
                         v The version-2 fields (if they were present) are removed from the MQMD, and
                           moved into an MQMDE structure, if one or more of the version-2 fields has a
                           nondefault value.
                         The fields in the separate message descriptor are set by the queue manager as
                         shown below. If the queue manager does not support the version-2 MQMD, a
                         version-1 MQMD is used without loss of function.
                     Character data in the MQXQH structure created by the application must be in the
                     character set of the local queue manager (defined by the CodedCharSetId
                     queue-manager attribute), and integer data must be in the native machine
                     encoding. In addition, character data in the MQXQH structure must be padded
                     with blanks to the defined length of the field; the data must not be ended
                     prematurely by using a null character, because the queue manager does not
                     convert the null and subsequent characters to blanks in the MQXQH structure.
                     Note however that the queue manager does not check that an MQXQH structure is
                     present, or that valid values have been specified for the fields.
                     Getting messages from transmission queues: Applications that get messages from
                     a transmission queue must process the information in the MQXQH structure in an
                     appropriate fashion. The presence of the MQXQH structure at the beginning of the
                     application message data is indicated by the value FMXQH being returned in the
                     MDFMT field in the MSGDSC parameter of the MQGET call. The values returned in the
                     MDCSI and MDENC fields in the MSGDSC parameter indicate the character set and
                     encoding of the character and integer data in the MQXQH structure, respectively.
                     The character set and encoding of the application message data are defined by the
                     MDCSI and MDENC fields in the embedded message descriptor.
Fields
                        XQSID (4-byte character string)
                            Structure identifier.
                            The following constant specifies the version number of the current version:
                            XQVERC
                                 Current version of transmission-queue header structure.
                            This is the name of the message queue that is the apparent eventual
                            destination for the message (this may prove not to be the actual eventual
                            destination if, for example, this queue is defined at XQRQM to be a local
                            definition of another remote queue).
                            If the message is a distribution-list message (that is, the MDFMT field in the
                            embedded message descriptor is FMDH), XQRQ is blank.
                            The length of this field is given by LNQN. The initial value of this field is 48
                            blank characters.
                        XQRQM (48-byte character string)
                            Name of destination queue manager.
                            This is the name of the queue manager that owns the queue that is the
                            apparent eventual destination for the message.
                            The length of this field is given by LNQMN. The initial value of this field is 48
                            blank characters.
                        XQMD (MQMD1)
                            Original message descriptor.
                            This is the embedded message descriptor, and is a close copy of the message
                            descriptor MQMD that was specified as the MSGDSC parameter on the MQPUT
                            or MQPUT1 call when the message was originally put to the remote queue.
                  The initial values of the fields in this structure are the same as those in the
                  MQMD structure.
        RPG declaration
                      D*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                      D* MQXQH Structure
                      D*
                      D* Structure identifier
                      D XQSID                   1      4
                      D* Structure version number
                      D XQVER                   5      8I 0
                      D* Name of destination queue
                      D XQRQ                    9     56
                      D* Name of destination queue manager
                      D XQRQM                  57    104
                      D* Original message descriptor
                      D*
                      D*     Structure identifier
                      D XQ1SID                105    108
                      D*     Structure version number
                      D XQ1VER                109    112I 0
                      D*     Report options
                      D XQ1REP                113    116I 0
                      D*     Message type
                      D XQ1MT                 117    120I 0
                      D*     Expiry time
                      D XQ1EXP                121    124I 0
                      D*     Feedback or reason code
                      D XQ1FB                 125    128I 0
                      D*     Numeric encoding of message data
                      D XQ1ENC                129    132I 0
                      D*     Character set identifier of message data
                      D XQ1CSI                133    136I 0
                      D*     Format name of message data
                      D XQ1FMT                137    144
                      D*     Message priority
                      D XQ1PRI                145    148I 0
                      D*     Message persistence
                      D XQ1PER                149    152I 0
                      D*     Message identifier
                      D XQ1MID                153    176
                      D*     Correlation identifier
                      D XQ1CID                177    200
                                   The last two parameters in each call are a completion code and a reason
                                   code. The completion code indicates whether the call completed
                                   successfully, partially, or not at all. Further information about the partial
                                   success or the failure of the call is given in the reason code. You will find
                                   more information about each completion and reason code in “Appendix A.
                                   Return codes” on page 357.
Syntax
Parameters
                         HCONN (10-digit signed integer) – input
                             Connection handle.
                             This handle represents the connection to the queue manager. The value of
                             HCONN was returned by a previous MQCONN or MQCONNX call.
                         COMCOD (10-digit signed integer) – output
                             Completion code.
                             If COMCOD is CCOK:
                             RCNONE
                                     (0, X'000') No reason to report.
                             If COMCOD is CCFAIL:
                             RC2219
                                     (2219, X'8AB') MQI call reentered before previous call complete.
                             RC2009
                                     (2009, X'7D9') Connection to queue manager lost.
                             RC2018
                                     (2018, X'7E2') Connection handle not valid.
                             RC2101
                                     (2101, X'835') Object damaged.
                             RC2123
                                     (2123, X'84B') Result of commit or back-out operation is mixed.
                             RC2162
                                     (2162, X'872') Queue manager shutting down.
                             RC2102
                                     (2102, X'836') Insufficient system resources available.
Usage notes
                        1. This call can be used only when the queue manager itself coordinates the unit
                           of work. This is a local unit of work, where the changes affect only MQ
                           resources.
                           In environments where the queue manager does not coordinate the unit of
                           work, the appropriate back-out call must be used instead of MQBACK. The
                           environment may also support an implicit back out caused by the application
                           terminating abnormally.
                           v On OS/400, this call can be used for local units of work coordinated by the
                              queue manager. This means that a commitment definition must not exist at
                              job level, that is, the STRCMTCTL command with the CMTSCOPE(*JOB) parameter
                              must not have been issued for the job.
                        2. When an application puts or gets messages in groups or segments of logical
                           messages, the queue manager retains information relating to the message group
                           and logical message for the last successful MQPUT and MQGET calls. This
                           information is associated with the queue handle, and includes such things as:
                           v The values of the MDGID, MDSEQ, MDOFF, and MDMFL fields in MQMD.
                           v Whether the message is part of a unit of work.
                           v For the MQPUT call: whether the message is persistent or nonpersistent.
                            The queue manager keeps three sets of group and segment information, one set
                            for each of the following:
                            v The last successful MQPUT call (this can be part of a unit of work).
                            v The last successful MQGET call that removed a message from the queue (this
                               can be part of a unit of work).
                            v The last successful MQGET call that browsed a message on the queue (this
                               cannot be part of a unit of work).
                            If the application puts or gets the messages as part of a unit of work, and the
                            application then decides to back out the unit of work, the group and segment
                            information is restored to the value that it had previously:
                            v The information associated with the MQPUT call is restored to the value that
                               it had prior to the first successful MQPUT call for that queue handle in the
                               current unit of work.
                            v The information associated with the MQGET call is restored to the value that
                              it had prior to the first successful MQGET call for that queue handle in the
                              current unit of work.
                            Queues which were updated by the application after the unit of work had
                            started, but outside the scope of the unit of work, do not have their group and
                            segment information restored if the unit of work is backed out.
                            Restoring the group and segment information to its previous value when a unit
                            of work is backed out allows the application to spread a large message group
                            or large logical message consisting of many segments across several units of
                            work, and to restart at the correct point in the message group or logical
             The remaining usage notes apply only when the queue manager coordinates the
             units of work:
             3. A unit of work has the same scope as a connection handle. This means that all
                MQ calls which affect a particular unit of work must be performed using the
                same connection handle. Calls issued using a different connection handle (for
                example, calls issued by another application) affect a different unit of work. See
                the HCONN parameter described in “Chapter 27. MQCONN - Connect queue
                manager” on page 221 for information about the scope of connection handles.
             4. Only messages that were put or retrieved as part of the current unit of work
                are affected by this call.
             5. A long-running application that issues MQGET, MQPUT, or MQPUT1 calls
                within a unit of work, but which never issues a commit or backout call, will
                cause queues to fill up with messages that are not available to other
                applications.
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQBACK(HCONN : COMCOD : REASON)
|                            This call is supported in the following environments: AIX, HP-UX, OS/2, OS/400,
                             Sun Solaris, Windows NT.
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
                                 HCONN was returned by a previous MQCONN or MQCONNX call.
                             BEGOP (MQBO) – input/output
                                 Options that control the action of MQBEGIN.
                                 If CMPCOD is CCOK:
                                 RCNONE
                                         (0, X'000') No reason to report.
                                 If CMPCOD is CCWARN:
                                 RC2121
                                         (2121, X'849') No participating resource managers registered.
                                 RC2122
                                         (2122, X'84A') Participating resource manager not available.
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
Usage notes
                        1. The MQBEGIN call can be used to start a unit of work that is coordinated by
                           the queue manager and that may involve changes to resources owned by other
                           resource managers.
                           The queue manager supports three types of unit-of-work:
                            Queue-manager-coordinated local unit of work
                                  This is a unit of work in which the queue manager is the only resource
                                  manager participating, and so the queue manager acts as the
                                  unit-of-work coordinator.
                                  v To start this type of unit of work, the PMSYP or GMSYP option
                                    should be specified on the first MQPUT, MQPUT1, or MQGET call in
                                    the unit of work.
                                    It is not necessary for the application to issue the MQBEGIN call to
                                    start the unit of work. However, if MQBEGIN is used, the unit of
                                    work is started but the call completes with CCWARN and reason
                                    code RC2121.
                                     v To commit or back out this type of unit of work, the MQCMIT and
                                       MQBACK calls must be used. If the application issues neither call,
                                       the unit of work is committed if the application issues the MQDISC
                                       call, but backed out if the application ends without issuing the
                                       MQDISC call.
                            Queue-manager-coordinated global unit of work
                                  This is a unit of work in which the queue manager acts as the
                                  unit-of-work coordinator, both for MQ resources and for resources
                                  belonging to other resource managers. Those resource managers
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This handle represents the object that is being closed. The object can be of any
                                 type. The value of HOBJ was returned by a previous MQOPEN call.
                                 On successful completion of the call, the queue manager sets this parameter to
                                 a value that is not a valid handle for the environment. This value is:
                                 HOUNUH
                                     Unusable object handle.
                             OPTS (10-digit signed integer) – input
                                 Options that control the action of MQCLOSE.
                                 The OPTS parameter controls how the object is closed. Only permanent
                                 dynamic queues can be closed in more than one way, being either retained or
                                 deleted; these are queues whose DefinitionType attribute has the value
                                 QDPERM (see the DefinitionType attribute described in “Chapter 38.
                                 Attributes for local queues and model queues” on page 299). The close options
                                 are summarized in Table 47 on page 212.
   If CMPCOD is CCOK:
   RCNONE
           (0, X'000') No reason to report.
   If CMPCOD is CCWARN:
   RC2241
           (2241, X'8C1') Message group not complete.
   RC2242
           (2242, X'8C2') Logical message not complete.
   If CMPCOD is CCFAIL:
   RC2219
           (2219, X'8AB') MQI call reentered before previous call complete.
   RC2009
           (2009, X'7D9') Connection to queue manager lost.
   RC2018
           (2018, X'7E2') Connection handle not valid.
   RC2019
           (2019, X'7E3') Object handle not valid.
   RC2035
           (2035, X'7F3') Not authorized for access.
   RC2101
           (2101, X'835') Object damaged.
   RC2045
           (2045, X'7FD') Option not valid for object type.
   RC2046
           (2046, X'7FE') Options not valid or not consistent.
   RC2058
           (2058, X'80A') Queue manager name not valid or not known.
   RC2059
           (2059, X'80B') Queue manager not available for connection.
   RC2162
           (2162, X'872') Queue manager shutting down.
   RC2055
           (2055, X'807') Queue contains one or more messages or uncommitted
           put or get requests.
   RC2102
           (2102, X'836') Insufficient system resources available.
   RC2063
           (2063, X'80F') Security error occurred.
   RC2071
           (2071, X'817') Insufficient storage available.
   RC2195
           (2195, X'893') Unexpected error occurred.
Usage notes
                        1. When an application issues the MQDISC call, or ends either normally or
                           abnormally, any objects that were opened by the application and are still open
                           are closed automatically with the CONONE option.
                        2. The following points apply if the object being closed is a queue:
                           v If operations on the queue were performed as part of a unit of work, the
                             queue can be closed before or after the syncpoint occurs without affecting the
                             outcome of the syncpoint.
                           v If the queue was opened with the OOBRW option, the browse cursor is
                             destroyed. If the queue is subsequently reopened with the OOBRW option, a
                             new browse cursor is created (see the OOBRW option described in
                             MQOPEN).
                           v If a message is currently locked for this handle at the time of the MQCLOSE
                             call, the lock is released (see the GMLK option described in “Chapter 8.
                             MQGMO - Get-message options” on page 51).
                        3. The following points apply if the object being closed is a dynamic queue (either
                           permanent or temporary):
                           v For a dynamic queue, the options CODEL or COPURG can be specified
                             regardless of the options specified on the corresponding MQOPEN call.
                           v When a dynamic queue is deleted, all MQGET calls with the GMWT option
                             that are outstanding against the queue are canceled and reason code RC2052
                             is returned. See the GMWT option described in “Chapter 8. MQGMO -
                             Get-message options” on page 51.
                             After a dynamic queue has been deleted, any call (other than MQCLOSE)
                             that attempts to reference the queue using a previously acquired HOBJ handle
                             fails with reason code RC2052.
                             Be aware that although a deleted queue cannot be accessed by applications,
                             the queue is not removed from the system, and associated resources are not
                             freed, until such time as all handles that reference the queue have been
                             closed, and all units of work that affect the queue have been either
                             committed or backed out.
                           v When a permanent dynamic queue is deleted, if the HOBJ handle specified on
                             the MQCLOSE call is not the one that was returned by the MQOPEN call
                             that created the queue, a check is made that the user identifier which was
                             used to validate the MQOPEN call is authorized to delete the queue. If the
                             OOALTU option was specified on the MQOPEN call, the user identifier
                             checked is the ODAU.
                               This check is not performed if:
                               – The handle specified is the one returned by the MQOPEN call that created
                                 the queue.
                              – The queue being deleted is a temporary dynamic queue.
                            v When a temporary dynamic queue is closed, if the HOBJ handle specified on
                              the MQCLOSE call is the one that was returned by the MQOPEN call that
                              created the queue, the queue is deleted. This occurs regardless of the close
                              options specified on the MQCLOSE call. If there are messages on the queue,
                              they are discarded; no report messages are generated.
                              If there are uncommitted units of work that affect the queue, the queue and
                              its messages are still deleted, but this does not cause the units of work to fail.
                              However, as described above, the resources associated with the units of work
                              are not freed until each of the units of work has been either committed or
                              backed out.
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQCLOSE(HCONN : HOBJ : OPTS :
                  C                                       CMPCOD : REASON)
Syntax
Parameters
                         HCONN (10-digit signed integer) – input
                             Connection handle.
                             This handle represents the connection to the queue manager. The value of
                             HCONN was returned by a previous MQCONN or MQCONNX call.
                         COMCOD (10-digit signed integer) – output
                             Completion code.
                             If COMCOD is CCOK:
                             RCNONE
                                     (0, X'000') No reason to report.
                             If COMCOD is CCWARN:
                             RC2003
                                     (2003, X'7D3') Unit of work encountered fatal error or backed out.
                             RC2124
                                     (2124, X'84C') Result of commit operation is pending.
                             If COMCOD is CCFAIL:
                             RC2219
                                     (2219, X'8AB') MQI call reentered before previous call complete.
                             RC2009
                                     (2009, X'7D9') Connection to queue manager lost.
Usage notes
                        1. This call can be used only when the queue manager itself coordinates the unit
                           of work. This is a local unit of work, where the changes affect only MQ
                           resources.
                           In environments where the queue manager does not coordinate the unit of
                           work, the appropriate commit call must be used instead of MQCMIT. The
                           environment may also support an implicit commit caused by the application
                           terminating normally.
                           v On OS/400, this call can be used for local units of work coordinated by the
                              queue manager. This means that a commitment definition must not exist at
                              job level, that is, the STRCMTCTL command with the CMTSCOPE(*JOB) parameter
                              must not have been issued for the job.
                        2. When an application puts or gets messages in groups or segments of logical
                           messages, the queue manager retains information relating to the message group
                           and logical message for the last successful MQPUT and MQGET calls. This
                           information is associated with the queue handle, and includes such things as:
                           v The values of the MDGID, MDSEQ, MDOFF, and MDMFL fields in MQMD.
                           v Whether the message is part of a unit of work.
                           v For the MQPUT call: whether the message is persistent or nonpersistent.
                            When a unit of work is committed, the queue manager retains the group and
                            segment information, and the application can continue putting or getting
                            messages in the current message group or logical message.
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQCMIT(HCONN : COMCOD : REASON)
Syntax
Parameters
                         QMNAME (48-byte character string) – input
                             Name of queue manager.
                             This is the name of the queue manager to which the application wishes to
                             connect. The name can contain the following characters:
                             v Uppercase alphabetic characters (A through Z)
                             v Lowercase alphabetic characters (a through z)
                             v Numeric digits (0 through 9)
                             v Period (.), forward slash (/), underscore (_), percent (%)
                             The name must not contain leading or embedded blanks, but may contain
                             trailing blanks. A null character can be used to indicate the end of significant
                             data in the name; the null and any characters following it are treated as blanks.
                             If the name consists entirely of blanks, the name of the default queue manager
                             is used.
                             The name specified for QMNAME must be the name of a connectable queue
                             manager.
                            Queue-manager groups: If the specified name starts with an asterisk (*), the
                            actual queue manager to which connection is made may have a name that is
                            different from that specified by the application. The specified name (without
                            the asterisk) defines a group of queue managers that are eligible for connection.
                            The implementation selects one from the group by trying each one in turn (in
                            no defined order) until one is found to which a connection can be made. If
                            none of the queue managers in the group is available for connection, the call
                            fails. Each queue manager is tried once only. If an asterisk alone is specified for
                            the name, an implementation-defined default queue-manager group is used.
                            Prefixing an asterisk to the connection name in this way implies that the
                            application is not sensitive to which queue manager in the group the
                            application is connected. This will not be suitable for certain types of
                            application, for example those which need to get messages from a particular
                            queue at a particular queue manager; such applications should not prefix the
                            name with an asterisk. Use of queue-manager groups is suitable for
                            applications that put messages, and/or get messages from temporary dynamic
                            queues which they have created.
       If CMPCOD is CCOK:
       RCNONE
               (0, X'000') No reason to report.
       If CMPCOD is CCWARN:
       RC2002
               (2002, X'7D2') Application already connected.
       If CMPCOD is CCFAIL:
       RC2219
               (2219, X'8AB') MQI call reentered before previous call complete.
|      RC2267
|              (2267, X'8DB') Unable to load cluster workload exit.
       RC2009
               (2009, X'7D9') Connection to queue manager lost.
|      RC2273
|              (2273, X'8E1') Error processing MQCONN call.
       RC2018
               (2018, X'7E2') Connection handle not valid.
       RC2035
               (2035, X'7F3') Not authorized for access.
|      RC2137
|              (2137, X'859') Object not opened successfully.
       RC2058
               (2058, X'80A') Queue manager name not valid or not known.
       RC2059
               (2059, X'80B') Queue manager not available for connection.
       RC2161
               (2161, X'871') Queue manager quiescing.
       RC2162
               (2162, X'872') Queue manager shutting down.
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
Usage notes
                        1. The queue manager to which connection is made using the MQCONN call is
                           called the local queue manager.
                        2. Queues that belong to the local queue manager appear to the application as
                           local queues. It is possible to put messages on and get messages from local
                           queues.
                           Queues belonging to remote queue managers appear as remote queues. It is
                           possible to put messages on remote queues, but not possible to get messages
                           from remote queues.
                        3. If the queue manager fails while an application is running, the application must
                           issue the MQCONN call again in order to obtain a new connection handle to
                           use on subsequent MQ calls. The application can issue the MQCONN call
                           periodically until the call succeeds.
                           If an application is not sure whether it is connected to the queue manager, the
                           application can safely issue an MQCONN call in order to obtain a connection
                           handle. If the application is already connected, the handle returned is the same
                           as that returned by the previous MQCONN call, but with completion code
                           CCWARN and reason code RC2002.
                        4. When the application has finished using MQ calls, the application should use
                           the MQDISC call to disconnect from the queue manager.
                        5. On OS/400, applications written for previous releases of the queue manager
                           can run without the need for recompilation. This is called compatibility mode.
                           This mode of operation provides a compatible run-time environment for
                           applications. It comprises the following:
                            v The service program AMQZSTUB residing in the library QMQM.
                              AMQZSTUB provides the same public interface as previous releases, and has
                              the same signature. This service program can be used to access the MQI
                              through bound procedure calls.
                            v The program QMQM residing in the library QMQM.
                              QMQM provides a means of accessing the MQI through dynamic program
                              calls.
                            v Programs MQCLOSE, MQCONN, MQDISC, MQGET, MQINQ, MQOPEN,
                              MQPUT, MQPUT1, and MQSET residing in the library QMQM.
                              These programs also provide a means of accessing the MQI through dynamic
                              program calls, but with a parameter list that corresponds to the standard
                              descriptions of the MQ calls.
                 Support for the new MQ calls in single-threaded applications, and for all MQ
                 calls in multi-threaded applications, is provided through the service programs
                 LIBMQM and LIBMQM_R respectively.
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQCONN(QMNAME : HCONN : CMPCOD :
                  C                                      REASON)
                         The MQCONNX call is similar to the MQCONN call, except that MQCONNX
                         allows options to be specified to control the way that the call works.
                         v On OS/400, this call is not supported for applications running in compatibility
                            mode.
Syntax
Parameters
                         QMNAME (48-byte character string) – input
                             Name of queue manager.
                             See the HCONN parameter described in “Chapter 27. MQCONN - Connect queue
                             manager” on page 221 for details.
                         CMPCOD (10-digit signed integer) – output
                             Completion code.
The following additional reason codes can be returned by the MQCONNX call:
                             If CMPCOD is CCFAIL:
                             RC2278
                                     (2278, X'8E6') Client connection fields not valid.
                             RC2139
                                     (2139, X'85B') Connect-options structure not valid.
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
RPG invocation
                              C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              C                     CALLP     MQCONNX(QMNAME : CNOPT : HCONN :
                              C                                       CMPCOD : REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input/output
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 On successful completion of the call, the queue manager sets HCONN to a value
                                 that is not a valid handle for the environment. This value is:
                                 HCUNUH
                                      Unusable connection handle.
                             CMPCOD (10-digit signed integer) – output
                                 Completion code.
                                 If CMPCOD is CCOK:
                                 RCNONE
                                         (0, X'000') No reason to report.
If CMPCOD is CCFAIL:
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
Usage notes
                        1. If an MQDISC call is issued when the application still has objects open, these
                           objects are implicitly closed, with the close options set to CONONE.
                        2. On OS/400 for applications running in compatibility mode, this call need not
                           be used; see the MQCONN call for more details.
RPG invocation
                              C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              C                     CALLP     MQDISC(HCONN : CMPCOD : REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This handle represents the queue from which a message is to be retrieved. The
                                 value of HOBJ was returned by a previous MQOPEN call. The queue must have
                                 been opened with one or more of the following options (see “Chapter 32.
                                 MQOPEN - Open object” on page 251 for details):
                                    OOINPS
                                    OOINPX
                                    OOINPQ
                                    OOBRW
                             MSGDSC (MQMD) – input/output
                                 Message descriptor.
                                 This structure describes the attributes of the message required, and the
                                 attributes of the message retrieved. See “Chapter 10. MQMD - Message
                                 descriptor” on page 83 for details.
                                 If BUFLEN is less than the message length, MSGDSC is still filled in by the queue
                                 manager, whether or not GMATM is specified on the GMO parameter (see the
                                 GMOPT field described in “Chapter 8. MQGMO - Get-message options” on
                                 page 51).
                            Zero can be specified for messages that have no data, or if the message is to be
                            removed from the queue and the data discarded (GMATM must be specified in
                            this case).
                            Note: The length of the longest message that it is possible to read from the
                                  queue is given by the MaxMsgLength local queue attribute; see
                                  “Chapter 38. Attributes for local queues and model queues” on page 299.
                        BUFFER (1-byte bit string×BUFLEN) – output
                            Area to contain the message data.
                            If BUFLEN is less than the message length, as much of the message as possible is
                            moved into BUFFER; this happens whether or not GMATM is specified on the
                            GMO parameter (see the GMOPT field described in “Chapter 8. MQGMO -
                            Get-message options” on page 51 for more information).
                            The character set and encoding of the data in BUFFER are given (respectively)
                            by the MDCSI and MDENC fields returned in the MSGDSC parameter. If these are
                            different from the values required by the receiver, the receiver must convert the
                            application message data to the character set and encoding required. The
                            GMCONV option can be used with a user-written exit to perform the
                            conversion of the message data (see “Chapter 8. MQGMO - Get-message
                            options” on page 51 for details of this option).
                            Note: All of the other parameters on the MQGET call are in the character set
                                  and encoding of the local queue manager (given by the CodedCharSetId
                                  queue-manager attribute and ENNAT, respectively).
                            If the call fails, the contents of the buffer may still have changed.
                        DATLEN (10-digit signed integer) – output
                            Length of the message.
                            This is the length in bytes of the application data in the message. If this is
                            greater than BUFLEN, only BUFLEN bytes are returned in the BUFFER parameter
                            (that is, the message is truncated). If the value is zero, it means that the
                            message contains no application data.
                            If BUFLEN is less than the message length, DATLEN is still filled in by the queue
                            manager, whether or not GMATM is specified on the GMO parameter (see the
                            GMOPT field described in “Chapter 8. MQGMO - Get-message options” on
                            page 51 for more information). This allows the application to determine the
                            size of the buffer required to accommodate the message data, and then reissue
                            the call with a buffer of the appropriate size.
                            However, if the GMCONV option is specified, and the converted message data
                            is too long to fit in BUFFER, the value returned for DATLEN is:
                            v The length of the unconverted data, for queue-manager defined formats.
       The reason codes listed below are the ones that the queue manager can return
       for the REASON parameter. If the application specifies the GMCONV option, and
       a user-written exit is invoked to convert some or all of the message data, it is
       the exit that decides what value is returned for the REASON parameter. As a
       result, values other than those documented below are possible.
       If CMPCOD is CCOK :
       RCNONE
               (0, X'000') No reason to report.
       If CMPCOD is CCWARN:
       RC2120
               (2120, X'848') Converted data too big for buffer.
|      RC2190
|              (2190, X'88E') Converted string too big for field.
|      RC2150
|              (2150, X'866') DBCS string not valid.
       RC2110
               (2110, X'83E') Message format not valid.
       RC2243
               (2243, X'8C3') Message segments have differing CCSIDs.
       RC2244
               (2244, X'8C4') Message segments have differing encodings.
       RC2209
               (2209, X'8A1') No message locked.
       RC2119
               (2119, X'847') Message data not converted.
|      RC2145
|              (2145, X'861') Source buffer parameter not valid.
       RC2111
               (2111, X'83F') Source coded character set identifier not valid.
       RC2113
               (2113, X'841') Packed-decimal encoding in message not recognized.
       RC2114
               (2114, X'842') Floating-point encoding in message not recognized.
       RC2112
               (2112, X'840') Source integer encoding not recognized.
                                If CMPCOD is CCFAIL:
                                RC2004
                                        (2004, X'7D4') Buffer parameter not valid.
                                RC2005
                                        (2005, X'7D5') Buffer length parameter not valid.
                                RC2219
                                        (2219, X'8AB') MQI call reentered before previous call complete.
                                RC2009
                                        (2009, X'7D9') Connection to queue manager lost.
                                RC2010
                                        (2010, X'7DA') Data length parameter not valid.
                                RC2016
                                        (2016, X'7E0') Gets inhibited for the queue.
                                RC2186
                                        (2186, X'88A') Get-message options structure not valid.
                                RC2018
                                        (2018, X'7E2') Connection handle not valid.
                                RC2019
                                        (2019, X'7E3') Object handle not valid.
                                RC2241
                                        (2241, X'8C1') Message group not complete.
                                RC2242
                                        (2242, X'8C2') Logical message not complete.
                                RC2259
                                        (2259, X'8D3') Inconsistent browse specification.
                                RC2245
                                        (2245, X'8C5') Inconsistent unit-of-work specification.
                                RC2246
                                        (2246, X'8C6') Message under cursor not valid for retrieval.
                                RC2247
                                        (2247, X'8C7') Match options not valid.
                                RC2026
                                        (2026, X'7EA') Message descriptor not valid.
                                RC2250
                                        (2250, X'8CA') Message sequence number not valid.
                                RC2033
                                        (2033, X'7F1') No message available.
                 For more information on these reason codes, see “Appendix A. Return codes”
                 on page 357.
Usage notes
              1. The message retrieved is normally deleted from the queue. This deletion can
                 occur as part of the MQGET call itself, or as part of a syncpoint. Message
                 deletion does not occur if an GMBRWF or GMBRWN option is specified on the
                 GMO parameter (see the GMOPT field described in “Chapter 8. MQGMO -
                 Get-message options” on page 51).
                 If the GMLK option is specified with one of the browse options, the browsed
                 message is locked so that it is visible only to this handle.
                           If the sending application put the messages as a message group, the messages
                           will be presented to the receiving application in the correct order provided that
                           the receiving application specifies the GMLOGO option on the MQGET call.
                           For more information about message groups, see:
                           v MDMFL field in MQMD
                           v PMLOGO option in MQPMO
                           v GMLOGO option in MQGMO
                        4. Applications should test for the feedback code FBQUIT in the MDFB field of the
                           MSGDSC parameter. If this value is found, the application should end. See the
                           MDFB field described in “Chapter 10. MQMD - Message descriptor” on page 83
                           for more information.
                        5. If the queue identified by HOBJ was opened with the OOSAVA option, and the
                           completion code from the MQGET call is CCOK or CCWARN, the context
                           associated with the queue handle HOBJ is set to the context of the message that
                           has been retrieved (unless the GMBRWF or GMBRWN option is set, in which
                           case it is marked as not available). This context can be used on a subsequent
         Note: If GMCONV is specified on the MQGET call for a message that has a
               format name of FMNONE, and the character set or encoding of the
               message differs from that specified in the MSGDSC parameter, the
               message is still returned in the BUFFER parameter (assuming no other
               errors), but the call completes with completion code CCWARN and
               reason code RC2110.
         FMNONE can be used either when the nature of the message data means
         that it does not require conversion, or when the sending and receiving
         applications have agreed between themselves the form in which the message
         data should be sent.
       v All other format names cause the message to be passed to a user-written exit
         for conversion. The exit has the same name as the format, apart from
|                               User data in the message can be converted between any supported character
|                               sets and encodings. However, be aware that if the message contains one or
|                               more MQ header structures, the message cannot be converted from or to a
|                               character set that has double-byte or multi-byte characters for any of the
|                               characters that are valid in queue names. Reason code RC2111 or RC2115
|                               results if this is attempted, and the message is returned unconverted. Unicode
|                               character set UCS-2 is an example of such a character set.
                                On return from MQGET, the following reason code indicates that the message
                                was converted successfully:
                                  RCNONE
                                The following reason code indicates that the message may have been converted
                                successfully; the application should check the MDCSI and MDENC fields in the
                                MSGDSC parameter to find out:
                                   RC2079
                                All other reason codes indicate that the message was not converted.
                               Note: The interpretation of the reason code described above will be true for
                                       conversions performed by user-written exits only if the exit conforms to
                                       the processing guidelines described in “Appendix F. Data conversion” on
                                       page 461.
                            7. For the built-in formats listed above, the queue manager may perform default
                               conversion of character strings in the message when the GMCONV option is
                               specified. Default conversion allows the queue manager to use an
                               installation-specified default character set that approximates the actual
                               character set, when converting string data. As a result, the MQGET call can
                               succeed with completion code CCOK, instead of completing with CCWARN
                               and reason code RC2111 or RC2115.
                                Note: The result of using an approximate character set to convert string data is
                                      that some characters may be converted incorrectly. This can be avoided
                                      by using in the string only characters which are common to both the
                                      actual character set and the default character set.
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQGET(HCONN : HOBJ : MSGDSC : GMO :
                  C                                     BUFLEN : BUFFER : DATLEN :
                  C                                     CMPCOD : REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This handle represents the object (of any type) whose attributes are required.
                                 The handle must have been returned by a previous MQOPEN call that
                                 specified the OOINQ option.
                             SELCNT (10-digit signed integer) – input
                                 Count of selectors.
                                 This is the count of selectors that are supplied in the SELS array. It is the
                                 number of attributes that are to be returned. Zero is a valid value. The
                                 maximum number allowed is 256.
                             SELS (10-digit signed integer×SELCNT) – input
                                 Array of attribute selectors.
                                 Each selector must be valid for the type of object that HOBJ represents,
                                 otherwise the call fails with completion code CCFAIL and reason code RC2067.
                                For the CA* selectors in the following descriptions, the constant that defines
                                the length in bytes of the resulting string in CHRATR is given in parentheses.
                                Selectors for queue manager
|                                       CAALTD
|                                               Date of most-recent alteration (LNDATE).
|                                       CAALTT
|                                               Time of most-recent alteration (LNTIME).
                                        CACADX
                                                Automatic channel definition exit name (LNEXN).
|                                       CACLWD
|                                               Data passed to cluster workload exit (LNEXDA).
|                                       CACLWX
|                                               Name of cluster workload exit (LNEXN).
                                        CACMDQ
                                                System command input queue name (LNQN).
                                        CADLQ
                                                Name of dead-letter queue (LNQN).
                                        CADXQN
                                                Default transmission queue name (LNQN).
                                        CAQMD
                                                Queue manager description (LNQMD).
|                                       CAQMID
|                                               Queue-manager identifier (LNQMID).
                                        CAQMN
                                                Name of local queue manager (LNQMN).
|                                       CARPN
|                                               Name of cluster for which queue manager provides repository
|                                               services (LNQMN).
|                                       CARPNL
|                                               Name of namelist object containing names of clusters for which
|                                               queue manager provides repository services (LNNLN).
                                        IAAUTE
                                                Control attribute for authority events.
                                        IACAD
                                                Control attribute for automatic channel definition.
This is the number of elements in the INTATR array. Zero is a valid value.
                                If this is at least the number of IA* selectors in the SELS parameter, all integer
                                attributes requested are returned.
                            INTATR (10-digit signed integer×IACNT) – output
                                Array of integer attributes.
                                Integer attribute values are returned in the same order as the IA* selectors in
                                the SELS parameter. If the array contains more elements than the number of
                                IA* selectors, the excess elements are unchanged.
                                This must be at least the sum of the lengths of the requested character
                                attributes (see SELS). Zero is a valid value.
   This is the buffer in which the character attributes are returned, concatenated
   together. The length of the buffer is given by the CALEN parameter.
   Character attributes are returned in the same order as the CA* selectors in the
   SELS parameter. The length of each attribute string is fixed for each attribute
   (see SELS), and the value in it is padded to the right with blanks if necessary. If
   the buffer is larger than that needed to contain all of the requested character
   attributes (including padding), the bytes beyond the last attribute value
   returned are unchanged.
   If CMPCOD is CCOK:
   RCNONE
           (0, X'000') No reason to report.
   If CMPCOD is CCWARN:
   RC2008
           (2008, X'7D8') Not enough space allowed for character attributes.
   RC2022
           (2022, X'7E6') Not enough space allowed for integer attributes.
   RC2068
           (2068, X'814') Selector not applicable to queue type.
   If CMPCOD is CCFAIL:
   RC2219
           (2219, X'8AB') MQI call reentered before previous call complete.
   RC2006
           (2006, X'7D6') Length of character attributes not valid.
   RC2007
           (2007, X'7D7') Character attributes string not valid.
   RC2009
           (2009, X'7D9') Connection to queue manager lost.
   RC2018
           (2018, X'7E2') Connection handle not valid.
   RC2019
           (2019, X'7E3') Object handle not valid.
                                For more information on these reason codes, see “Appendix A. Return codes”
                                on page 357.
    Usage notes
                            1. The values returned are a snapshot of the selected attributes. There is no
                               guarantee that the attributes will not change before the application can act
                               upon the returned values.
                            2. When you open a model queue, even for inquiring about its attributes, a
                               dynamic queue is created. The attributes of the dynamic queue (except for
                               CreationDate, CreationTime, and DefinitionType) are the same as those of the
                               model queue at the time the dynamic queue is created. If you subsequently use
                               the MQINQ call with the same object handle, the queue manager returns the
                               attributes of the dynamic queue, not those of the model queue.
                            3. If the object being inquired is an alias queue, the attribute values returned by
                               the MQINQ call are those of the alias queue, and not those of the base queue to
                               which the alias resolves.
|                           4. If the object being inquired is a cluster queue, the attributes that can be
|                              inquired depend on how the queue is opened:
|                              v If the cluster queue is opened for inquire plus one or more of input, browse,
|                                 or set, there must be a local instance of the cluster queue in order for the
|                                 open to succeed. In this case the attributes that can be inquired are those
|                                 valid for local queues.
|        If the cluster queue is opened with no fixed binding (that is, OOBNDN
|        specified on the MQOPEN call, or OOBNDQ specified when the DefBind
|        attribute has the value BNDNOT), successive MQINQ calls for the queue
|        may inquire different instances of the cluster queue, although usually all of
|        the instances have the same attribute values.
|      For more information about cluster queues, refer to the MQSeries Queue
|      Manager Clusters book.
    5. If a number of attributes are to be inquired, and subsequently some of them are
       to be set using the MQSET call, it may be convenient to position at the
       beginning of the selector arrays the attributes that are to be set, so that the
       same arrays (with reduced counts) can be used for MQSET.
    6. If more than one of the warning situations arise (see the CMPCOD parameter), the
       reason code returned is the first one in the following list that applies:
       a. RC2068
       b. RC2022
       c. RC2008
    7. For more information about object attributes, see Chapter 36. Attributes of
       MQSeries objects.
RPG invocation
                              C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              C                     CALLP     MQINQ(HCONN : HOBJ : SELCNT :
                              C                                     SELS(1) : IACNT : INTATR(1) :
                              C                                     CALEN : CHRATR : CMPCOD :
                              C                                     REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This is a structure that identifies the object to be opened; see “Chapter 12.
                                 MQOD - Object descriptor” on page 137 for details.
                                 If the ODON field in the OBJDSC parameter is the name of a model queue, a
                                 dynamic local queue is created with the attributes of the model queue; this
                                 happens irrespective of the open options specified by the OPTS parameter.
                                 Subsequent operations using the HOBJ returned by the MQOPEN call are
                                 performed on the new dynamic queue, and not on the model queue. This is
                                 true even for the MQINQ and MQSET calls. The name of the model queue in
                                 the OBJDSC parameter is replaced with the name of the dynamic queue created.
                                 The type of the dynamic queue is determined by the value of the
                                 DefinitionType attribute of the model queue (see “Chapter 38. Attributes for
                                 local queues and model queues” on page 299). For information about the close
                                 options applicable to dynamic queues, see the description of the MQCLOSE
                                 call.
                             OPTS (10-digit signed integer) – input
                                 Options that control the action of MQOPEN.
                            Access options: The following options control the type of operations that can
                            be performed on the object:
                            OOINPQ
                                 Open queue to get messages using queue-defined default.
                                     The queue is opened for use with subsequent MQGET calls. The type
                                     of access is either shared or exclusive, depending on the value of the
                                     DefInputOpenOption queue attribute; see “Chapter 38. Attributes for
                                     local queues and model queues” on page 299 for details.
                                     This option is valid only for local, alias, and model queues; it is not
                                     valid for remote queues, distribution lists, and objects that are not
                                     queues.
                            OOINPS
                                 Open queue to get messages with shared access.
                                     The queue is opened for use with subsequent MQGET calls. The call
                                     can succeed if the queue is currently open by this or another
                                     application with OOINPS, but fails with reason code RC2042 if the
                                     queue is currently open with OOINPX.
                                     This option is valid only for local, alias, and model queues; it is not
                                     valid for remote queues, distribution lists, and objects that are not
                                     queues.
                            OOINPX
                                 Open queue to get messages with exclusive access.
                                     The queue is opened for use with subsequent MQGET calls. The call
                                     fails with reason code RC2042 if the queue is currently open by this or
                                     another application for input of any type (OOINPS or OOINPX).
                                     This option is valid only for local, alias, and model queues; it is not
                                     valid for remote queues, distribution lists, and objects that are not
                                     queues.
        This option is valid only for local, alias, and model queues; it is not
        valid for remote queues, distribution lists, and objects which are not
        queues. It is also not valid if ODMN is the name of a queue manager
        alias; this is true even if the value of the RemoteQMgrName attribute in
        the local definition of a remote queue used for queue-manager aliasing
        is the name of the local queue manager.
OOOUT
    Open queue to put messages.
        The queue is opened for use with subsequent MQPUT calls.
        An MQOPEN call with this option can succeed even if the InhibitPut
        queue attribute is set to QAPUTI (although subsequent MQPUT calls
        will fail while the attribute is set to this value).
        This option is valid for all types of queue, including distribution lists.
OOINQ
     Open object to inquire attributes.
        The queue, namelist, process definition, or queue manager is opened
        for use with subsequent MQINQ calls.
        This option is valid for all types of object other than distribution lists.
        It is not valid if ODMN is the name of a queue manager alias; this is true
        even if the value of the RemoteQMgrName attribute in the local definition
        of a remote queue used for queue-manager aliasing is the name of the
        local queue manager.
OOSET
        Open queue to set attributes.
        The queue is opened for use with subsequent MQSET calls.
        This option is valid for all types of queue other than distribution lists.
        It is not valid if ODMN is the name of a local definition of a remote
        queue; this is true even if the value of the RemoteQMgrName attribute in
|                               Binding options: The following options apply when the object being opened is
                                a cluster queue; these options control the binding of the queue handle to a
|                               particular instance of the cluster queue:
|                               OOBNDO
|                                    Bind handle to destination when queue is opened.
|                                        This causes the local queue manager to bind the queue handle to a
|                                        particular instance of the destination queue when the queue is opened.
|                                        As a result, all messages put using this handle are sent to the same
|                                        instance of the destination queue, and by the same route.
|                                        This option is valid only for queues, and affects only cluster queues. If
|                                        specified for a queue that is not a cluster queue, the option is ignored.
|                               OOBNDN
|                                    Do not bind to a specific destination.
|                                        This stops the local queue manager binding the queue handle to a
|                                        particular instance of the destination queue. As a result, successive
|                                        MQPUT calls using this handle may result in the messages being sent
|                                        to different instances of the destination queue, or being sent to the same
|                                        instance but by different routes. It also allows the instance selected to
|                                        be changed subsequently by the local queue manager, by a remote
|                                        queue manager, or by a message channel agent (MCA), according to
|                                        network conditions.
|                                        OOBNDN is valid only for queues, and affects only cluster queues. If
|                                        specified for a queue that is not a cluster queue, the option is ignored.
|                               OOBNDQ
|                                    Use default binding for queue.
|                                        This causes the local queue manager to bind the queue handle in the
|                                        way defined by the DefBind queue attribute. The value of this attribute
|                                        is either BNDOPN or BNDNOT.
|                                        OOBNDQ is the default if neither OOBNDO nor OOBNDN is
|                                        specified.
This option is valid for all types of queue, including distribution lists.
                                Other options: The following options control authorization checking, and what
                                happens when the queue manager is quiescing:
                                OOALTU
                                     Validate with specified user identifier.
                                         This indicates that the ODAU field in the OBJDSC parameter contains a
                                         user identifier that is to be used to validate this MQOPEN call. The call
                                         can succeed only if this ODAU is authorized to open the object with the
                                         specified options, regardless of whether the user identifier under which
                                         the application is running is authorized to do so. (This does not apply
                                         to any context options specified, however, which are always checked
                                         against the user identifier under which the application is running.)
                                         This option is valid for all types of object.
                                OOFIQ
                                         Fail if queue manager is quiescing.
                                         This option forces the MQOPEN call to fail if the queue manager is in
                                         quiescing state.
                                         This option is valid for all types of object.
    Table 48. Valid MQOPEN options for each queue type
    Option                                          Alias (see   Local and    Remote      Nonlocal   Distribution
                                                     note 1)      Model                    Cluster       list
|   OOINPQ                                             U            U           —            —           —
|   OOINPS                                             U            U           —            —           —
|   OOINPX                                             U            U           —            —           —
|   OOBRW                                              U            U           —            —           —
|   OOOUT                                              U            U           U            U           U
|   OOINQ                                              U            U        see note 2      U           —
|   OOSET                                              U            U        see note 2      —           —
                                     This handle represents the access that has been established to the object. It
                                     must be specified on subsequent message queuing calls that operate on the
                                     object. It ceases to be valid when the MQCLOSE call is issued, or when the
                                     unit of processing that defines the scope of the handle terminates.
                                     The scope of the handle is restricted to the smallest unit of parallel processing
                                     supported by the platform on which the application is running; the handle is
                                     not valid outside the unit of parallel processing from which the MQOPEN call
                                     was issued:
                                     v On OS/400, the scope of the handle is the job issuing the call.
                                CMPCOD (10-digit signed integer) – output
                                    Completion code.
                                     If CMPCOD is CCOK:
                                     RCNONE
                                             (0, X'000') No reason to report.
                                     If CMPCOD is CCWARN:
                                     RC2136
                                             (2136, X'858') Multiple reason codes returned.
                    For more information on these reason codes, see “Appendix A. Return codes”
                    on page 357.
    Usage notes
                  1. The object opened is one of the following:
                     v A queue, in order to:
                       – Get or browse messages (using the MQGET call)
                       – Put messages (using the MQPUT call)
                       – Inquire about the attributes of the queue (using the MQINQ call)
                       – Set the attributes of the queue (using the MQSET call)
                       If the queue named is a model queue, a dynamic local queue is created. See
                       the OBJDSC parameter described in “Chapter 32. MQOPEN - Open object” on
                       page 251.
                                 However, be aware that subsequent MQINQ or MQSET calls for the handle
                                 relate solely to the name that has been opened, and not to the object resulting
                                 after name resolution has occurred. For example, if the object opened is an
                                 alias, the attributes returned by the MQINQ call are the attributes of the alias,
                                 not the attributes of the base queue to which the alias resolves. Name
                                 resolution checking is still carried out, however, regardless of what is specified
                                 for the OPTS parameter on the corresponding MQOPEN.
|                                If the object being opened is a cluster queue, name resolution can occur at the
|                                time of the MQOPEN call, or be deferred until later. The point at which
|                                resolution occurs is controlled by the OOBND* options specified on the
|                                MQOPEN call:
|                                    OOBNDO
|                                    OOBNDN
|                                    OOBNDQ
|                               Refer to the MQSeries Queue Manager Clusters book for more information
|                               about name resolution for cluster queues.
                             4. The attributes of an object can change while an application has the object
                                open. In many cases, the application does not notice this, but for certain
                                attributes the queue manager marks the handle as no longer valid. These are:
                                v Any attribute that affects the name resolution of the object. This applies
                                   regardless of the open options used, and includes the following:
                                    – A change to the BaseQName attribute of an alias queue that is open.
                                    – A change to the RemoteQName or RemoteQMgrName remote-queue attributes,
                                      for any handle that is open for this queue, or for a queue which resolves
                                      through this definition as a queue-manager alias.
                                    – Any change that causes a currently-open handle for a remote queue to
                                      resolve to a different transmission queue, or to fail to resolve to one at all.
                                      For example, a change to the XmitQName attribute of the local definition of
                                      a remote queue, whether the definition is being used for a queue, or for
                                      a queue-manager alias.
                                      There is one exception to this, namely the creation of a new transmission
                                      queue. A handle that would have resolved to this queue had it been
                                      present when the handle was opened, but instead resolved to the default
                                      transmission queue, is not made invalid.
                                A version-2 MQOD can also be used to open a single queue that is not in
                                a distribution list, by ensuring that ODREC is zero.
                             b. Only the following open options are valid in the OPTS parameter:
                                   OOOUT
                                   OOPAS*
                                   OOSET*
                                   OOALTU
                                   OOFIQ
                             c. The destination queues in the distribution list can be local, alias, or remote
                                queues, but they cannot be model queues. If a model queue is specified,
                                that queue fails to open, with reason code RC2057. However, this does not
                                prevent other queues in the list being opened successfully.
                             d. The completion code and reason code parameters are set as follows:
                                v If the open operations for the queues in the distribution list all succeed
                                  or fail in the same way, the completion code and reason code
                                  parameters are set to describe the common result. The MQRR response
                                  records (if provided by the application) are not set in this case.
                                  For example, if every open succeeds, the completion code and reason
                                  code are set to CCOK and RCNONE respectively; if every open fails
                                  because none of the queues exists, the parameters are set to CCFAIL and
                                  RC2085.
                                 v If the open operations for the queues in the distribution list do not all
                                   succeed or fail in the same way:
                                   – The completion code parameter is set to CCWARN if at least one
                                       open succeeded, and to CCFAIL if all failed.
                                   – The reason code parameter is set to RC2136.
                                   – The response records (if provided by the application) are set to the
                                       individual completion codes and reason codes for the queues in the
                                       distribution list.
                             e. When a distribution list has been opened successfully, the handle HOBJ
                                returned by the call can be used on subsequent MQPUT calls to put
                                messages to queues in the distribution list, and on an MQCLOSE call to
                                relinquish access to the distribution list. The only valid close option for a
                                distribution list is CONONE.
|                               For more information about cluster queues, refer to the MQSeries Queue
|                               Manager Clusters book.
                            11. Applications started by a trigger monitor are passed the name of the queue
                                that is associated with the application when the application is started. This
                                queue name can be specified in the OBJDSC parameter to open the queue. See
                                the description of the MQTMC structure for further details.
                            12. On OS/400, applications running in compatibility mode are connected
                                automatically to the queue manager by the first MQOPEN call issued by the
                                application (if the application has not already connected to the queue manager
                                by using the MQCONN call).
                                Applications not running in compatibility mode must issue the MQCONN or
                                MQCONNX call to connect to the queue manager explicitly, before using the
                                MQOPEN call to open an object.
    RPG invocation
                                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                                  C                     CALLP     MQOPEN(HCONN : OBJDSC : OPTS :
                                  C                                      HOBJ : CMPCOD : REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This handle represents the queue to which the message is added. The value of
                                 HOBJ was returned by a previous MQOPEN call that specified the OOOUT
                                 option.
                             MSGDSC (MQMD) – input/output
                                 Message descriptor.
                                 This structure describes the attributes of the message being sent, and receives
                                 information about the message after the put request is complete. See
                                 “Chapter 10. MQMD - Message descriptor” on page 83 for details.
                                 See “Chapter 14. MQPMO - Put message options” on page 149 for details.
                             BUFLEN (10-digit signed integer) – input
                                 Length of the message in BUFFER.
Zero is valid, and indicates that the message contains no application data.
                                If one or both of the above conditions is not satisfied, BUFLEN cannot exceed the
                                smaller of the queue’s MaxMsgLength attribute and queue-manager’s
                                MaxMsgLength attribute.
                                If BUFFER contains character and/or numeric data, the MDCSI and MDENC fields in
                                the MSGDSC parameter should be set to the values appropriate to the data; this
                                will enable the receiver of the message to convert the data (if necessary) to the
                                character set and encoding used by the receiver.
                                Note: All of the other parameters on the MQPUT call must be in the character
                                      set and encoding of the local queue manager (given by the
                                      CodedCharSetId queue-manager attribute and ENNAT, respectively).
       If CMPCOD is CCOK:
       RCNONE
               (0, X'000') No reason to report.
       If CMPCOD is CCWARN:
       RC2136
               (2136, X'858') Multiple reason codes returned.
       RC2049
               (2049, X'801') Message Priority exceeds maximum value supported.
       RC2104
               (2104, X'838') Report option(s) in message descriptor not recognized.
       If CMPCOD is CCFAIL:
       RC2004
               (2004, X'7D4') Buffer parameter not valid.
       RC2005
               (2005, X'7D5') Buffer length parameter not valid.
       RC2219
               (2219, X'8AB') MQI call reentered before previous call complete.
|      RC2266
|              (2266, X'8DA') Cluster workload exit failed.
|      RC2189
|              (2189, X'88D') Cluster name resolution failed.
       RC2269
               (2269, X'8DD') Cluster resource error.
       RC2009
               (2009, X'7D9') Connection to queue manager lost.
       RC2097
               (2097, X'831') Queue handle referred to does not save context.
       RC2098
               (2098, X'832') Context not available for queue handle referred to.
       RC2135
               (2135, X'857') Distribution header structure not valid.
       RC2013
               (2013, X'7DD') Expiry time not valid.
       RC2014
               (2014, X'7DE') Feedback code not valid.
       RC2258
               (2258, X'8D2') Group identifier not valid.
       RC2018
               (2018, X'7E2') Connection handle not valid.
Usage notes
                        1. Both the MQPUT and MQPUT1 calls can be used to put messages on a queue;
                           which call to use depends on the circumstances:
                           v The MQPUT call should be used when multiple messages are to be placed
                             on the same queue.
                             An MQOPEN call specifying the OOOUT option is issued first, followed by
                             one or more MQPUT requests to add messages to the queue; finally the
                             queue is closed with an MQCLOSE call. This gives better performance than
                             repeated use of the MQPUT1 call.
                           v The MQPUT1 call should be used when only one message is to be put on a
                             queue.
                             This call encapsulates the MQOPEN, MQPUT, and MQCLOSE calls into a
                             single call, thereby minimizing the number of calls that must be issued.
                        2. If an application puts a sequence of messages on the same queue without using
                           message groups, the order of those messages is preserved provided that the
                           conditions detailed below are satisfied. Some conditions apply to both local and
                           remote destination queues; other conditions apply only to remote destination
                           queues.
                           Conditions for local and remote destination queues
                           v All of the MQPUT calls are within the same unit of work, or none of them is
                              within a unit of work.
                              Be aware that when messages are put onto a particular queue within a single
                              unit of work, messages from other applications may be interspersed with the
                              sequence of messages on the queue.
                           v All of the MQPUT calls are made using the same object handle HOBJ.
                              In some environments, message sequence is also preserved when different
                              object handles are used, provided the calls are made from the same
                              application. The meaning of “same application” is determined by the
                              environment:
                              – On OS/400, the application is the job.
                            v The messages all have the same priority.
   If these conditions are not satisfied, message groups can be used to preserve
   message order, but note that this requires both the sending and receiving
   applications to use the message-grouping support. For more information about
   message groups, see:
   v MDMFL field in MQMD
   v PMLOGO option in MQPMO
   v GMLOGO option in MQGMO
3. The following notes apply to the use of distribution lists.
   a. Messages can be put to a distribution list using either a version-1 or a
       version-2 MQPMO. If a version-1 MQPMO is used (or a version-2 MQPMO
       with PMREC equal to zero), no put message records or response records can
       be provided by the application. This means that it will not be possible to
       identify the queues which encounter errors, if the message is sent
       successfully to some queues in the distribution list and not others.
       If put message records or response records are provided by the application,
       the PMVER field must be set to PMVER2.
       A version-2 MQPMO can also be used to send messages to a single queue
       that is not in a distribution list, by ensuring that PMREC is zero.
   b. The completion code and reason code parameters are set as follows:
       v If the puts to the queues in the distribution list all succeed or fail in the
          same way, the completion code and reason code parameters are set to
          describe the common result. The MQRR response records (if provided by
          the application) are not set in this case.
          For example, if every put succeeds, the completion code and reason code
          are set to CCOK and RCNONE respectively; if every put fails because all
          of the queues are inhibited for puts, the parameters are set to CCFAIL
          and RC2051.
       v If the puts to the queues in the distribution list do not all succeed or fail
          in the same way:
          – The completion code parameter is set to CCWARN if at least one put
             succeeded, and to CCFAIL if all failed.
          – The reason code parameter is set to RC2136.
          – The response records (if provided by the application) are set to the
             individual completion codes and reason codes for the queues in the
             distribution list.
         If the put to a destination fails because the open for that destination
         failed, the fields in the response record are set to CCFAIL and RC2137;
         that destination is included in PMIDC.
   c. If a destination in the distribution list resolves to a local queue, the message
      is placed on that queue in normal form (that is, not as a distribution-list
      message). If more than one destination resolves to the same local queue, one
      message is placed on the queue for each such destination.
      If a destination in the distribution list resolves to a remote queue, a message
      is placed on the appropriate transmission queue. Where several destinations
      resolve to the same transmission queue, a single distribution-list message
      containing those destinations may be placed on the transmission queue,
      even if those destinations were not adjacent in the list of destinations
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQPUT(HCONN : HOBJ : MSGDSC : PMO :
                  C                                     BUFLEN : BUFFER : CMPCOD :
                  C                                     REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This is a structure which identifies the queue to which the message is added.
                                 See “Chapter 12. MQOD - Object descriptor” on page 137 for details.
                                 The application must be authorized to open the queue for output. The queue
                                 must not be a model queue.
                             MSGDSC (MQMD) – input/output
                                 Message descriptor.
                                 This structure describes the attributes of the message being sent, and receives
                                 feedback information after the put request is complete. See “Chapter 10.
                                 MQMD - Message descriptor” on page 83 for details.
                                 See “Chapter 14. MQPMO - Put message options” on page 149 for details.
                             BUFLEN (10-digit signed integer) – input
                                 Length of the message in BUFFER.
                            If BUFFER contains character and/or numeric data, the MDCSI and MDENC fields in
                            the MSGDSC parameter should be set to the values appropriate to the data; this
                            will enable the receiver of the message to convert the data (if necessary) to the
                            character set and encoding used by the receiver.
                            Note: All of the other parameters on the MQPUT1 call must be in the
                                  character set and encoding of the local queue manager (given by the
                                  CodedCharSetId queue-manager attribute and ENNAT, respectively).
                        CMPCOD (10-digit signed integer) – output
                            Completion code.
                            If CMPCOD is CCOK:
                            RCNONE
                                    (0, X'000') No reason to report.
                            If CMPCOD is CCWARN:
                            RC2136
                                    (2136, X'858') Multiple reason codes returned.
                            RC2241
                                    (2241, X'8C1') Message group not complete.
                            RC2242
                                    (2242, X'8C2') Logical message not complete.
                            RC2049
                                    (2049, X'801') Message Priority exceeds maximum value supported.
                            RC2104
                                    (2104, X'838') Report option(s) in message descriptor not recognized.
                            If CMPCOD is CCFAIL:
                            RC2001
                                    (2001, X'7D1') Alias base queue not a valid type.
                            RC2004
                                    (2004, X'7D4') Buffer parameter not valid.
                            RC2005
                                    (2005, X'7D5') Buffer length parameter not valid.
                            RC2219
                                    (2219, X'8AB') MQI call reentered before previous call complete.
                     For more information on these reason codes, see “Appendix A. Return codes”
                     on page 357.
    Usage notes
                  1. Both the MQPUT and MQPUT1 calls can be used to put messages on a queue;
                     which call to use depends on the circumstances:
                     v The MQPUT call should be used when multiple messages are to be placed
                        on the same queue.
                        An MQOPEN call specifying the OOOUT option is issued first, followed by
                        one or more MQPUT requests to add messages to the queue; finally the
                        queue is closed with an MQCLOSE call. This gives better performance than
                        repeated use of the MQPUT1 call.
                     v The MQPUT1 call should be used when only one message is to be put on a
                        queue.
                        This call encapsulates the MQOPEN, MQPUT, and MQCLOSE calls into a
                        single call, thereby minimizing the number of calls that must be issued.
                  2. If an application puts a sequence of messages on the same queue without using
                     message groups, the order of those messages is preserved provided that certain
RPG invocation
                  C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                  C                     CALLP     MQPUT1(HCONN : OBJDSC : MSGDSC :
                  C                                      PMO : BUFLEN : BUFFER :
                  C                                      CMPCOD : REASON)
Syntax
    Parameters
                             HCONN (10-digit signed integer) – input
                                 Connection handle.
                                 This handle represents the connection to the queue manager. The value of
|                                HCONN was returned by a previous MQCONN or MQCONNX call.
                                 This handle represents the queue object whose attributes are to be set. The
                                 handle was returned by a previous MQOPEN call that specified the OOSET
                                 option.
                             SELCNT (10-digit signed integer) – input
                                 Count of selectors.
                                 This is the count of selectors that are supplied in the SELS array. It is the
                                 number of attributes that are to be set. Zero is a valid value. The maximum
                                 number allowed is 256.
                             SELS (10-digit signed integer×SELCNT) – input
                                 Array of attribute selectors.
                                 Each selector must be valid for the type of queue that HOBJ represents. Only
                                 certain IA* and CA* values are allowed; these values are listed below.
                            For the CA* selectors in the following descriptions, the constant that defines
                            the length in bytes of the string that is required in CHRATR is given in
                            parentheses.
                            Selectors for all types of queue
                                    IAIPUT
                                             Whether put operations are allowed.
                            Selectors for local queues
                                    CATRGD
                                            Trigger data (LNTRGD).
                                    IADIST
                                            Distribution list support.
                                    IAIGET
                                            Whether get operations are allowed.
                                    IATRGC
                                            Trigger control.
                                    IATRGD
                                            Trigger depth.
                                    IATRGP
                                            Threshold message priority for triggers.
                                    IATRGT
                                            Trigger type.
                            Selectors for alias queues
                                    IAIGET
                                             Whether get operations are allowed.
                            This is the number of elements in the INTATR array, and must be at least the
                            number of IA* selectors in the SELS parameter. Zero is a valid value if there are
                            none.
                        INTATR (10-digit signed integer×IACNT) – input
                            Array of integer attributes.
                            This is an array of IACNT integer attribute values. These attribute values must
                            be in the same order as the IA* selectors in the SELS array.
                        CALEN (10-digit signed integer) – input
                            Length of character attributes buffer.
   The characters attributes must be specified in the same order as the CA*
   selectors in the SELS array. The length of each character attribute is fixed (see
   SELS). If the value to be set for an attribute contains fewer nonblank characters
   than the defined length of the attribute, the value in CHRATR must be padded to
   the right with blanks to make the attribute value match the defined length of
   the attribute.
CMPCOD (10-digit signed integer) – output
    Completion code.
   If CMPCOD is CCOK:
   RCNONE
           (0, X'000') No reason to report.
   If CMPCOD is CCFAIL:
   RC2219
           (2219, X'8AB') MQI call reentered before previous call complete.
   RC2006
           (2006, X'7D6') Length of character attributes not valid.
   RC2007
           (2007, X'7D7') Character attributes string not valid.
   RC2009
           (2009, X'7D9') Connection to queue manager lost.
   RC2018
           (2018, X'7E2') Connection handle not valid.
   RC2019
           (2019, X'7E3') Object handle not valid.
   RC2020
           (2020, X'7E4') Value for inhibit-get or inhibit-put queue attribute not
           valid.
   RC2021
           (2021, X'7E5') Count of integer attributes not valid.
   RC2023
           (2023, X'7E7') Integer attributes array not valid.
   RC2040
           (2040, X'7F8') Queue not open for set.
   RC2041
           (2041, X'7F9') Object definition changed since opened.
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
Usage notes
                        1. Using this call, the application can specify an array of integer attributes, or a
                           collection of character attribute strings, or both. The attributes specified are all
                           set simultaneously, if no errors occur. If an error does occur (for example, if a
                           selector is not valid, or an attempt is made to set an attribute to a value that is
                           not valid), the call fails and no attributes are set.
                        2. The values of attributes can be determined using the MQINQ call; see
                           “Chapter 31. MQINQ - Inquire about object attributes” on page 241 for details.
                           Note: Not all attributes whose values can be inquired using the MQINQ call
                                   can have their values changed using the MQSET call. For example, no
                                   process-object or queue-manager attributes can be set with this call.
                        3. Attribute changes are preserved across restarts of the queue manager (other
                           than alterations to temporary dynamic queues, which do not survive restarts of
                           the queue manager).
                        4. It is not possible to change the attributes of a model queue using the MQSET
                           call. However, if you open a model queue using the MQOPEN call with the
                           OOSET option, you can use the MQSET call to set the attributes of the dynamic
                           queue that is created by the MQOPEN call.
    RPG invocation
                      C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                      C                     CALLP     MQSET(HCONN : HOBJ : SELCNT :
                      C                                     SELS(1) : IACNT : INTATR(1) :
                      C                                     CALEN : CHRATR : CMPCOD :
                      C                                     REASON)
                             This part of the book describes the attributes (or properties) of MQSeries objects
                             that are accessible through the API, which are queues, queue managers, namelists,
                             and processes.
                             Namelists are supported in the following environments: AIX, DOS client, HP-UX,
|                            OS/390, OS/2, OS/400, Sun Solaris, Windows client, and Windows NT.
                             The attributes are grouped according to the type of object to which they apply; see:
                             v “Chapter 37. Attributes for all queues” on page 293
                             v “Chapter 38. Attributes for local queues and model queues” on page 299
                             v “Chapter 39. Attributes for local definitions of remote queues” on page 313
                             v “Chapter 40. Attributes for alias queues” on page 315
                             v “Chapter 41. Attributes for namelists” on page 317
                             v “Chapter 42. Attributes for process definitions” on page 319
                             v “Chapter 43. Attributes for the queue manager” on page 323
                             Within each section, the attributes are listed in alphabetic order.
                             Note: The names of the attributes of objects are shown in this book in the form
                                   that you use them with the MQINQ and MQSET calls. When you use
                                   MQSeries commands to define, alter, or display the attributes, you use the
                                   keywords shown in the descriptions of the commands in the MQSeries
                                   Command Reference.
|                                This is the date when the definition was last changed. The format of the date is
|                                YYYY-MM-DD, padded with two trailing blanks to make the length 12 bytes.
|                                To determine the value of this attribute, use the CAALTD selector with the
|                                MQINQ call. The length of this attribute is given by LNDATE.
|                            AlterationTime (8-byte character string)
|                                Time when definition was last changed.
|                                This is the time when the definition was last changed. The format of the time
|                                is HH.MM.SS.
|                                To determine the value of this attribute, use the CAALTT selector with the
|                                MQINQ call. The length of this attribute is given by LNTIME.
|                            ClusterName (48-byte character string)
|                                Name of cluster to which queue belongs.
|                                This is the name of the cluster to which the queue belongs. If the queue
|                                belongs to more than one cluster, ClusterNamelist specifies the name of a
|                               To determine the value of this attribute, use the CACLN selector with the
|                               MQINQ call. The length of this attribute is given by LNCLUN.
|                           ClusterNamelist (48-byte character string)
|                               Name of namelist object containing names of clusters to which queue belongs.
|                               This is the name of a namelist object that contains the names of clusters to
|                               which this queue belongs. If the queue belongs to only one cluster, the
|                               namelist object contains only one name. Alternatively, ClusterName can be used
|                               to specify the name of the cluster, in which case ClusterNamelist is blank. At
|                               least one of ClusterName and ClusterNamelist must be blank. This attribute
|                               does not apply to model queues.
|                               To determine the value of this attribute, use the CACLNL selector with the
|                               MQINQ call. The length of this attribute is given by LNNLN.
|                           DefBind (10-digit signed integer)
|                               Default binding.
|                               This is the default binding that is used when OOBNDQ is specified on the
|                               MQOPEN call and the queue is a cluster queue. This attribute does not apply
|                               to model queues.
|                               To determine the value of this attribute, use the IADBND selector with the
|                               MQINQ call.
                            DefPersistence (10-digit signed integer)
                                Default message persistence.
                                If there is more than one definition in the queue-name resolution path, the
                                default persistence is taken from the value of this attribute in the first
                                definition in the path at the time of the MQPUT or MQPUT1 call. This could
                                be:
                                v An alias queue
                                v A local queue
                                v A local definition of a remote queue
                                v A queue-manager alias
                                v A transmission queue (for example, the DefXmitQName queue)
Both persistent and nonpersistent messages can exist on the same queue.
    To determine the value of this attribute, use the IADPER selector with the
    MQINQ call.
DefPriority (10-digit signed integer)
    Default message priority
    This is the default priority for messages on the queue. This applies if PRQDEF
    is specified in the message descriptor when the message is put on the queue.
    If there is more than one definition in the queue-name resolution path, the
    default priority for the message is taken from the value of this attribute in the
    first definition in the path at the time of the put operation. This could be:
    v An alias queue
    v A local queue
    v A local definition of a remote queue
    v A queue-manager alias
    v A transmission queue (for example, the DefXmitQName queue)
    The way in which a message is placed on a queue depends on the value of the
    queue’s MsgDeliverySequence attribute:
    v If the MsgDeliverySequence attribute is MSPRIO, the logical position at
      which a message is placed on the queue is dependent on the value of the
      MDPRI field in the message descriptor.
    v If the MsgDeliverySequence attribute is MSFIFO, messages are placed on the
      queue as though they had a priority equal to the DefPriority of the
      resolved queue, regardless of the value of the MDPRI field in the message
      descriptor. However, the MDPRI field retains the value specified by the
      application that put the message. See the MsgDeliverySequence attribute
      described in “Chapter 38. Attributes for local queues and model queues” on
      page 299 for more information.
    Priorities are in the range zero (lowest) through MaxPriority (highest); see the
    MaxPriority attribute described in “Chapter 43. Attributes for the queue
    manager” on page 323.
    To determine the value of this attribute, use the IADPRI selector with the
    MQINQ call.
InhibitGet (10-digit signed integer)
    Controls whether get operations for this queue are allowed.
                            To determine the value of this attribute, use the IAIGET selector with the
                            MQINQ call. To change the value of this attribute, use the MQSET call.
                        InhibitPut (10-digit signed integer)
                            Controls whether put operations for this queue are allowed.
                            If there is more than one definition in the queue-name resolution path, put
                            operations must be allowed for every definition in the path (including any
                            queue-manager alias definitions) at the time of the put operation, in order for
                            the MQPUT or MQPUT1 call to succeed.
                            To determine the value of this attribute, use the IAIPUT selector with the
                            MQINQ call. To change the value of this attribute, use the MQSET call.
                        QDesc (64-byte character string)
                            Queue description.
                            This is a field that may be used for descriptive commentary. The content of the
                            field is of no significance to the queue manager, but the queue manager may
                            require that the field 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).
        To determine the value of this attribute, use the CAQD selector with the
        MQINQ call. The length of this attribute is given by LNQD.
    QName (48-byte character string)
        Queue name.
        This is the name of a queue defined on the local queue manager. For more
        information about queue names, see the MQSeries Application Programming
        Guide. All queues defined on a queue manager share the same queue name
        space. Therefore, a QTLOC queue and a QTALS queue cannot have the same
        name.
        To determine the value of this attribute, use the CAQN selector with the
        MQINQ call. The length of this attribute is given by LNQN.
    QType (10-digit signed integer)
        Queue type.
        To determine the value of this attribute, use the IAQTYP selector with the
        MQINQ call.
    Scope (10-digit signed integer)
        Controls whether an entry for this queue also exists in a cell directory.
                            To determine the value of this attribute, use the IASCOP selector with the
                            MQINQ call.
                            Apart from allowing its value to be queried, the queue manager takes no
                            action based on the value of this attribute.
                            To determine the value of this attribute, use the CABRQN selector with the
                            MQINQ call. The length of this attribute is given by LNQN.
                        BackoutThreshold (10-digit signed integer)
                            Backout threshold.
                            Apart from allowing its value to be queried, the queue manager takes no
                            action based on the value of this attribute.
                            To determine the value of this attribute, use the IABTHR selector with the
                            MQINQ call.
                        CreationDate (12-byte character string)
                            Date this queue was created.
                            The format is
                            YYYY-MM-DD
                            with 2 bytes of blank padding to the right to make the length 12 bytes. For
                            example:
                            1992-09-23bb
                            On OS/400, the creation date of a queue may differ from that of the
                            underlying operating system entity (file or userspace) that represents the
                            queue.
                            To determine the value of this attribute, use the CACRTD selector with the
                            MQINQ call. The length of this attribute is given by LNCRTD.
                        CreationTime (8-byte character string)
                            Time this queue was created.
                            The format is
                            HH.MM.SS
                            using the 24-hour clock, with a leading zero if the hour is less than 10. For
                            example:
                            21.10.20
                            To determine the value of this attribute, use the CACRTT selector with the
                            MQINQ call. The length of this attribute is given by LNCRTT.
                        CurrentQDepth (10-digit signed integer)
                            Current queue depth.
   The count also includes messages which have passed their expiry time but
   have not yet been discarded, although these messages are not eligible to be
   retrieved. See the MDEXP field described in “Chapter 10. MQMD - Message
   descriptor” on page 83.
   This attribute does not apply to model queues, but it does apply to the
   dynamically-defined queues created from the model queue definitions using
   the MQOPEN call.
   To determine the value of this attribute, use the IACDEP selector with the
   MQINQ call.
DefinitionType (10-digit signed integer)
    Queue definition type.
   This indicates how the queue was defined. It is one of the following:
   QDPRE
        Predefined permanent queue.
           The queue is a permanent queue created by the system administrator;
           only the system administrator can delete it.
           Predefined queues are created using the DEFINE command, and can
           be deleted only by using the DELETE command. Predefined queues
           cannot be created from model queues.
           Commands can be issued either by an operator, or by an authorized
           application sending a command message to the command input queue
           (see the CommandInputQName attribute described in “Chapter 43.
           Attributes for the queue manager” on page 323).
   QDPERM
        Dynamically defined permanent queue.
           The queue is a permanent queue that was created by an application
           issuing an MQOPEN call with the name of a model queue specified in
           the object descriptor. The model queue definition has the value
           QDPERM for the DefinitionType attribute. This type of queue can be
           deleted using the MQCLOSE call. See “Chapter 25. MQCLOSE - Close
           object” on page 211 for more details.
   QDTEMP
        Dynamically defined temporary queue.
           The queue is a temporary queue that was created by an application
           issuing an MQOPEN call with the name of a model queue specified in
           the object descriptor. The model queue definition has the value
                               Chapter 38. Attributes for local queues and model queues   301
Attributes - local and model queues
                                     QDTEMP for the DefinitionType attribute. This type of queue is
                                     deleted automatically by the MQCLOSE call when it is closed by the
                                     application that created it.
                            This attribute in a model queue definition does not indicate how the model
                            queue was defined, because model queues are always predefined. Instead, the
                            value of this attribute in the model queue is used to determine the
                            DefinitionType of each of the dynamic queues created from the model queue
                            definition using the MQOPEN call.
                            To determine the value of this attribute, use the IADEFT selector with the
                            MQINQ call.
                        DefInputOpenOption (10-digit signed integer)
                            Default input open option.
                            This is the default way in which the queue should be opened for input. It
                            applies if the OOINPQ option is specified on the MQOPEN call when the
                            queue is opened. It is one of the following:
                            OOINPX
                                 Open queue to get messages with exclusive access.
                                     The queue is opened for use with subsequent MQGET calls. The call
                                     fails with reason code RC2042 if the queue is currently open by this or
                                     another application for input of any type (OOINPS or OOINPX).
                            OOINPS
                                 Open queue to get messages with shared access.
                                     The queue is opened for use with subsequent MQGET calls. The call
                                     can succeed if the queue is currently open by this or another
                                     application with OOINPS, but fails with reason code RC2042 if the
                                     queue is currently open with OOINPX.
                            To determine the value of this attribute, use the IADINP selector with the
                            MQINQ call.
                        DistLists (10-digit signed integer)
                            Distribution list support.
                            This attribute is primarily for use with transmission queues, but the processing
                            described is performed regardless of the usage defined for the queue (see the
                            Usage attribute).
   To determine the value of this attribute, use the IADIST selector with the
   MQINQ call. To change the value of this attribute, use the MQSET call.
HardenGetBackout (10-digit signed integer)
    Whether to maintain an accurate backout count.
   For each message, a count is kept of the number of times that the message is
   retrieved by an MQGET call within a unit of work, and that unit of work
   subsequently backed out. This count is available in the MDBOC field in the
   message descriptor after the MQGET call has completed.
   The message backout count survives restarts of the queue manager. However,
   to ensure that the count is accurate, information has to be “hardened”
   (recorded on disk or other permanent storage device) each time a message is
   retrieved by an MQGET call within a unit of work for this queue. If this is not
   done, and a failure of the queue manager occurs together with backout of the
   MQGET call, the count may or may not be incremented.
   Hardening information for each MQGET call within a unit of work, however,
   imposes a performance overhead, and the HardenGetBackout attribute should
   be set to QABH only if it is essential that the count is accurate.
                               Chapter 38. Attributes for local queues and model queues   303
    Attributes - local and model queues
                                To determine the value of this attribute, use the IAHGB selector with the
                                MQINQ call.
                            InitiationQName (48-byte character string)
                                Name of initiation queue.
                                This is the name of a queue defined on the local queue manager; the queue
                                must be of type QTLOC. The queue manager sends a trigger message to the
                                initiation queue when application start-up is required as a result of a message
                                arriving on the queue to which this attribute belongs. The initiation queue
                                must be monitored by a trigger monitor application which will start the
                                appropriate application after receipt of the trigger message.
                                To determine the value of this attribute, use the CAINIQ selector with the
                                MQINQ call. The length of this attribute is given by LNQN.
                            MaxMsgLength (10-digit signed integer)
                                Maximum message length in bytes.
|                               This is an upper limit for the length of the longest physical message that can be
|                               placed on the queue. However, because the MaxMsgLength local-queue attribute
                                can be set independently of the MaxMsgLength queue-manager attribute, the
                                actual upper limit for the length of the longest physical message that can be
                                placed on the queue is the lesser of those two values.
                                An attempt to place on the queue a message that is too long fails with reason
                                code:
                                v RC2030 if the message to too big for the queue
                                v RC2031 if the message to too big for the queue manager, but not too big for
                                  the queue
                                The lower limit for the MaxMsgLength attribute is zero. The upper limit is
                                determined by the environment:
                                v On OS/400, the maximum message length is 100 MB (104 857 600 bytes).
                                For more information, see the BUFLEN parameter described in “Chapter 33.
                                MQPUT - Put message” on page 265.
                                To determine the value of this attribute, use the IAMLEN selector with the
                                MQINQ call.
                            MaxQDepth (10-digit signed integer)
                                Maximum queue depth.
                                This is the defined upper limit for the number of physical messages that can
                                exist on the queue at any one time. An attempt to put a message on a queue
                                that already contains MaxQDepth messages fails with reason code RC2053.
   The value of this attribute is zero or greater. The upper limit is determined by
   the environment:
   v On OS/400, the value cannot exceed 640 000.
   Note: It is possible for the storage space available to the queue to be exhausted
         even if there are fewer than MaxQDepth messages on the queue.
   To determine the value of this attribute, use the IAMDEP selector with the
   MQINQ call.
MsgDeliverySequence (10-digit signed integer)
    Message delivery sequence.
   This determines the order in which messages are returned to the application by
   the MQGET call:
   MSFIFO
         Messages are returned in FIFO order (first in, first out).
           This means that an MQGET call will return the first message that
           satisfies the selection criteria specified on the call, regardless of the
           priority of the message.
   MSPRIO
        Messages are returned in priority order.
           This means that an MQGET call will return the highest-priority message
           that satisfies the selection criteria specified on the call. Within each
           priority level, messages are returned in FIFO order (first in, first out).
   If the relevant attributes are changed while there are messages on the queue,
   the delivery sequence is as follows:
       The order in which messages are returned by the MQGET call is
       determined by the values of the MsgDeliverySequence and DefPriority
       attributes in force for the queue at the time the message arrives on the
       queue:
       – If MsgDeliverySequence is MSFIFO when the message arrives, the
         message is placed on the queue as though its priority were DefPriority.
         This does not affect the value of the MDPRI field in the message
         descriptor of the message; that field retains the value it had when the
         message was first put.
       – If MsgDeliverySequence is MSPRIO when the message arrives, the
         message is placed on the queue at the place appropriate to the priority
         given by the MDPRI field in the message descriptor.
                                Chapter 38. Attributes for local queues and model queues   305
Attributes - local and model queues
                                FIFO order, even though the MsgDeliverySequence attribute is set to
                                MSFIFO; those that were placed on the queue at the higher priority are
                                delivered first.
                            To determine the value of this attribute, use the IAMDS selector with the
                            MQINQ call.
                        OpenInputCount (10-digit signed integer)
                            Number of opens for input.
                            This is the number of handles that are currently valid for removing messages
                            from the queue by means of the MQGET call. It is the total number of such
                            handles known to the local queue manager.
                            The count includes handles where an alias queue which resolves to this queue
                            was opened for input. The count does not include handles where the queue
                            was opened for action(s) which did not include input (for example, a queue
                            opened only for browse).
                            This attribute does not apply to model queues, but it does apply to the
                            dynamically-defined queues created from the model queue definitions using
                            the MQOPEN call.
                            To determine the value of this attribute, use the IAOIC selector with the
                            MQINQ call.
                        OpenOutputCount (10-digit signed integer)
                            Number of opens for output.
                            This is the number of handles that are currently valid for adding messages to
                            the queue by means of the MQPUT call. It is the total number of such handles
                            known to the local queue manager; it does not include opens for output that
                            were performed for this queue at remote queue managers.
                            The count includes handles where an alias queue which resolves to this queue
                            was opened for output. The count does not include handles where the queue
                            was opened for action(s) which did not include output (for example, a queue
                            opened only for inquire).
                            This attribute does not apply to model queues, but it does apply to the
                            dynamically-defined queues created from the model queue definitions using
                            the MQOPEN call.
                            To determine the value of this attribute, use the IAOOC selector with the
                            MQINQ call.
                        ProcessName (48-byte character string)
                            Process name.
                            This is the name of a process object that is defined on the local queue manager.
                            The process object identifies a program that can service the queue.
   A Queue Depth High event indicates that an application has put a message on
   a queue, and this has caused the number of messages on the queue to become
   greater than or equal to the queue depth high threshold (see the
   QDepthHighLimit attribute).
   Note: The value of this attribute can change dynamically. See the description
         of the Queue Depth High event for more details.
   To determine the value of this attribute, use the IAQDHE selector with the
   MQINQ call.
QDepthHighLimit (10-digit signed integer)
    High limit for queue depth.
   The threshold against which the queue depth is compared to generate a Queue
   Depth High event.
   This event indicates that an application has put a message on a queue, and this
   has caused the number of messages on the queue to become greater than or
   equal to the queue depth high threshold. See the QDepthHighEvent attribute.
   To determine the value of this attribute, use the IAQDHL selector with the
   MQINQ call.
QDepthLowEvent (10-digit signed integer)
    Controls whether Queue Depth Low events are generated.
   Note: The value of this attribute can change dynamically. See the description
         of the Queue Depth Low event for more details.
                                 Chapter 38. Attributes for local queues and model queues   307
Attributes - local and model queues
                            EVRENA
                                 Event reporting enabled.
                            To determine the value of this attribute, use the IAQDLE selector with the
                            MQINQ call.
                        QDepthLowLimit (10-digit signed integer)
                            Low limit for queue depth.
                            The threshold against which the queue depth is compared to generate a Queue
                            Depth Low event.
                            This event indicates that an application has retrieved a message from a queue,
                            and this has caused the number of messages on the queue to become less than
                            or equal to the queue depth low threshold. See the QDepthLowEvent attribute.
                            To determine the value of this attribute, use the IAQDLL selector with the
                            MQINQ call.
                        QDepthMaxEvent (10-digit signed integer)
                            Controls whether Queue Full events are generated.
                            A Queue Full event indicates that a put to a queue has been rejected because
                            the queue is full, that is, the queue depth has already reached its maximum
                            value.
                            Note: The value of this attribute can change dynamically. See the description
                                  of the Queue Full event for more details.
                            To determine the value of this attribute, use the IAQDME selector with the
                            MQINQ call.
                        QServiceInterval (10-digit signed integer)
                            Target for queue service interval.
                            The service interval used for comparison to generate Service Interval High and
                            Service Interval OK events. See the QServiceIntervalEvent attribute.
                            The value is in units of milliseconds, and is greater than or equal to zero, and
                            less than or equal to 999 999 999.
                            To determine the value of this attribute, use the IAQSI selector with the
                            MQINQ call.
                        QServiceIntervalEvent (10-digit signed integer)
                            Controls whether Service Interval High or Service Interval OK events are
                            generated.
   Note: The value of this attribute can change dynamically. See the description
         of the Service Interval High and Service Interval OK events for more
         details.
   To determine the value of this attribute, use the IAQSIE selector with the
   MQINQ call.
RetentionInterval (10-digit signed integer)
    Retention interval.
   This is the period of time for which the queue should be retained. After this
   time has elapsed, the queue is eligible for deletion.
   The time is measured in hours, counting from the date and time when the
   queue was created. The creation date and time of the queue are recorded in the
   CreationDate and CreationTime attributes, respectively.
   Note: The queue manager never takes any action to delete queues based on
         this attribute, or to prevent the deletion of queues whose retention
         interval has not expired; it is the user’s responsibility to cause any
         required action to be taken.
   To determine the value of this attribute, use the IARINT selector with the
   MQINQ call.
                                 Chapter 38. Attributes for local queues and model queues   309
Attributes - local and model queues
                        Shareability (10-digit signed integer)
                            Queue shareability.
                            This indicates whether the queue can be opened for input multiple times
                            concurrently. It is one of the following:
                            QASHR
                                 Queue is shareable.
                                     Multiple opens with the OOINPS option are allowed.
                            QANSHR
                                 Queue is not shareable.
                                     An MQOPEN call with the OOINPS option is treated as OOINPX.
                            To determine the value of this attribute, use the IASHAR selector with the
                            MQINQ call.
                        TriggerControl (10-digit signed integer)
                            Trigger control.
                            To determine the value of this attribute, use the IATRGC selector with the
                            MQINQ call. To change the value of this attribute, use the MQSET call.
                        TriggerData (64-byte character string)
                            Trigger data.
                            This is free-format data that the queue manager inserts into the trigger
                            message when a message arriving on this queue causes a trigger message to be
                            written to the initiation queue.
                            The character string cannot contain any nulls. It is padded to the right with
                            blanks if necessary.
                            To determine the value of this attribute, use the CATRGD selector with the
                            MQINQ call. To change the value of this attribute, use the MQSET call. The
                            length of this attribute is given by LNTRGD.
        To determine the value of this attribute, use the IATRGD selector with the
        MQINQ call. To change the value of this attribute, use the MQSET call.
    TriggerMsgPriority (10-digit signed integer)
        Threshold message priority for triggers.
        This is the message priority below which messages do not contribute to the
        generation of trigger messages (that is, the queue manager ignores these
        messages when deciding whether a trigger message should be generated).
        TriggerMsgPriority can be in the range zero (lowest) through MaxPriority
        (highest; see “Chapter 43. Attributes for the queue manager” on page 323); a
        value of zero causes all messages to contribute to the generation of trigger
        messages.
        To determine the value of this attribute, use the IATRGP selector with the
        MQINQ call. To change the value of this attribute, use the MQSET call.
    TriggerType (10-digit signed integer)
        Trigger type.
        This controls the conditions under which trigger messages are written as a
        result of messages arriving on this queue.
                                      Chapter 38. Attributes for local queues and model queues   311
Attributes - local and model queues
                            To determine the value of this attribute, use the IATRGT selector with the
                            MQINQ call. To change the value of this attribute, use the MQSET call.
                        Usage (10-digit signed integer)
                            Queue usage.
                            This indicates what the queue is used for. It is one of the following:
                            USNORM
                                 Normal usage.
                                     This is a queue that normal applications use when putting and getting
                                     messages; the queue is not a transmission queue.
                            USTRAN
                                 Transmission queue.
                                     This is a queue used to hold messages destined for remote queue
                                     managers. When a normal application sends a message to a remote
                                     queue, the local queue manager stores the message temporarily on the
                                     appropriate transmission queue in a special format. A message channel
                                     agent then reads the message from the transmission queue, and
                                     transports the message to the remote queue manager. For more
                                     information about transmission queues, see the MQSeries Application
                                     Programming Guide.
                                     Only privileged applications can open a transmission queue for
                                     OOOUT to put messages on it directly. Only utility applications would
                                     normally be expected to do this. Care must be taken that the message
                                     data format is correct (see “Chapter 21. MQXQH - Transmission queue
                                     header” on page 193), otherwise errors may occur during the
                                     transmission process. Context is not passed or set unless one of the
                                     PM* context options is specified.
                            To determine the value of this attribute, use the IAUSAG selector with the
                            MQINQ call.
                         A local definition of a remote queue is normally used to refer to a queue that exists
                         on a remote queue manager. It specifies the name of the queue manager at which
                         the queue exists, and optionally the name of the transmission queue to be used to
                         convey messages destined for that queue at that queue manager.
                         However, the same type of definition can also be used for the following purposes:
                         v Reply queue aliasing
                           The name of the definition is the name of a reply-to queue. For more
                           information, see the MQSeries Intercommunication book.
                         v Queue-manager aliasing
                           The name of the definition is actually the alias name of a queue manager, not
                           the name of a queue. For more information, see the MQSeries Intercommunication
                           book.
                         RemoteQMgrName (48-byte character string)
                             Name of remote queue manager.
                             The name of the remote queue manager on which the queue RemoteQName is
                             defined.
                             If this definition is used for a reply-to alias, this name is the name of the queue
                             manager which is to be the MDRM.
                            If an application opens the local definition of a remote queue, when the open
                            occurs RemoteQName must not be blank.
                            If this definition is used for a queue-manager alias definition, when the open
                            occurs RemoteQName must be blank.
                            If the definition is used for a reply-to alias, this name is the name of the queue
                            that is to be the MDRQ.
                            To determine the value of this attribute, use the CARQN selector with the
                            MQINQ call.
                            If this attribute is nonblank when an open occurs, either for a remote queue or
                            for a queue-manager alias definition, it specifies the name of the local
                            transmission queue to be used for forwarding the message.
                            To determine the value of this attribute, use the CAXQN selector with the
                            MQINQ call.
                                 This is the name of a queue that is defined to the local queue manager. (For
                                 more information on queue names, see the MQSeries Application Programming
                                 Guide. The queue is one of the following types:
                                 QTLOC
                                          Local queue.
                                 QTREM
                                          Local definition of a remote queue.
|                                QTCLUS
|                                         Cluster queue.
                                 To determine the value of this attribute, use the CABASQ selector with the
                                 MQINQ call.
                             The following table summarizes the attributes that are specific to namelists. The
                             attributes are described in alphabetic order.
                             Table 52. Attributes for namelists
                             Attribute                   Description                                  Page
|                            AlterationDate              Date when definition was last changed        317
|                            AlterationTime              Time when definition was last changed        317
                             NameCount                   Number of names in namelist                  317
                             NamelistDesc                Namelist description                         317
                             NamelistName                Namelist name                                318
                             Names                       A list of NameCount names                    318
|                                This is the date when the definition was last changed. The format of the date is
|                                YYYY-MM-DD, padded with two trailing blanks to make the length 12 bytes.
|                                To determine the value of this attribute, use the CAALTD selector with the
|                                MQINQ call. The length of this attribute is given by LNDATE.
|                            AlterationTime (8-byte character string)
|                                Time when definition was last changed.
|                                This is the time when the definition was last changed. The format of the time
|                                is HH.MM.SS.
|                                To determine the value of this attribute, use the CAALTT selector with the
|                                MQINQ call. The length of this attribute is given by LNTIME.
                             NameCount (10-digit signed integer)
                                 Number of names in namelist.
                                 To determine the value of this attribute, use the IANAMC selector with the
                                 MQINQ call.
                             NamelistDesc (64-byte character string)
                                 Namelist description.
                                 This is a field that may be used for descriptive commentary; its value is
                                 established by the definition process. The content of the field is of no
                                 significance to the queue manager, but the queue manager may require that the
                                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.
                                To determine the value of this attribute, use the CALSTD selector with the
                                MQINQ call.
                                This is the name of a namelist that is defined on the local queue manager. For
                                more information about namelist names, see the MQSeries Application
                                Programming Guide.
                                Each namelist has a name that is different from the names of other namelists
                                belonging to the queue manager, but may duplicate the names of other queue
                                manager objects of different types (for example, queues).
                                To determine the value of this attribute, use the CALSTN selector with the
                                MQINQ call.
|                               Each name is the name of an object that is defined to the local queue manager.
|                               For more information about object names, see the MQSeries Application
                                Programming Guide.
                                To determine the value of this attribute, use the CANAMS selector with the
                                MQINQ call.
|                                This is the date when the definition was last changed. The format of the date is
|                                YYYY-MM-DD, padded with two trailing blanks to make the length 12 bytes.
|                                To determine the value of this attribute, use the CAALTD selector with the
|                                MQINQ call. The length of this attribute is given by LNDATE.
|                            AlterationTime (8-byte character string)
|                                Time when definition was last changed.
|                                This is the time when the definition was last changed. The format of the time
|                                is HH.MM.SS.
|                                To determine the value of this attribute, use the CAALTT selector with the
|                                MQINQ call. The length of this attribute is given by LNTIME.
                             ApplId (256-byte character string)
                                 Application identifier.
                                 The character string cannot contain any nulls. It is padded to the right with
                                 blanks if necessary.
                                 To determine the value of this attribute, use the CAAPPI selector with the
                                 MQINQ call. The length of this attribute is given by LNPROA.
                            ApplType can have any value, but the following values are recommended for
                            standard types; user-defined application types should be restricted to values in
                            the range ATUFST through ATULST:
                            ATCICS
                                    CICS transaction.
                            AT400 OS/400 application.
                            ATUFST
                                    Lowest value for user-defined application type.
                            ATULST
                                    Highest value for user-defined application type.
                            To determine the value of this attribute, use the IAAPPT selector with the
                            MQINQ call.
                        EnvData (128-byte character string)
                            Environment data.
                            The character string cannot contain any nulls. It is padded to the right with
                            blanks if necessary.
                            To determine the value of this attribute, use the CAENVD selector with the
                            MQINQ call. The length of this attribute is given by LNPROE.
                        ProcessDesc (64-byte character string)
                            Process description.
                            This is a field that may be used for descriptive commentary. The content of the
                            field is of no significance to the queue manager, but the queue manager may
                            require that the field 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.
    This is the name of a process definition that is defined on the local queue
    manager.
    Each process definition has a name that is different from the names of other
    process definitions belonging to the queue manager. But the name of the
    process definition may be the same as the names of other queue manager
    objects of different types (for example, queues).
    To determine the value of this attribute, use the CAPRON selector with the
    MQINQ call.
    The character string cannot contain any nulls. It is padded to the right with
    blanks if necessary.
    To determine the value of this attribute, use the CAUSRD selector with the
    MQINQ call. The length of this attribute is given by LNPROU.
                            Some of these attributes are fixed for particular implementations, others can be
                            changed with the ALTER QMGR command. All can be inquired by opening a
                            special OTQM object, and using the MQINQ call with the handle returned. They
|                           can also all be displayed with the DISPLAY QMGR command.
|                           AlterationDate (12-byte character string)
|                               Date when definition was last changed.
|                               This is the date when the definition was last changed. The format of the date is
|                               YYYY-MM-DD, padded with two trailing blanks to make the length 12 bytes.
|                               To determine the value of this attribute, use the CAALTD selector with the
|                               MQINQ call. The length of this attribute is given by LNDATE.
|                           AlterationTime (8-byte character string)
|                               Time when definition was last changed.
|                               This is the time when the definition was last changed. The format of the time
|                               is HH.MM.SS.
|                               To determine the value of this attribute, use the CAALTT selector with the
|                               MQINQ call. The length of this attribute is given by LNTIME.
                            AuthorityEvent (10-digit signed integer)
                                Controls whether authorization (Not Authorized) events are generated.
                                To determine the value of this attribute, use the IAAUTE selector with the
                                MQINQ call.
                            ChannelAutoDef (10-digit signed integer)
                                Controls whether automatic channel definition is permitted.
       To determine the value of this attribute, use the IACAD selector with the
       MQINQ call.
    ChannelAutoDefEvent (10-digit signed integer)
        Controls whether channel automatic-definition events are generated.
|      This applies to channels of type CTRCVR, CTSVCN, and CTCLSD. The value
       is one of the following:
       EVRDIS
            Event reporting disabled.
       EVRENA
            Event reporting enabled.
       To determine the value of this attribute, use the IACADE selector with the
       MQINQ call.
    ChannelAutoDefExit (n-byte character string)
        Name of user exit for automatic channel definition.
       If this name is nonblank, and ChannelAutoDef has the value CHADEN, the exit
       is called each time that the queue manager is about to create a channel
|      definition. This applies to channels of type CTRCVR, CTSVCN, and CTCLSD.
       The exit can then do one of the following:
       v Allow the creation of the channel definition to proceed without change.
       v Modify the attributes of the channel definition that is created.
       v Suppress creation of the channel entirely.
       Note: Both the length and the value of this attribute are environment specific.
             See the introduction to the MQCD structure in the MQSeries
             Intercommunication book for details of the value of this attribute in
             various environments.
       To determine the value of this attribute, use the CACADX selector with the
       MQINQ call. The length of this attribute is given by LNEXN.
|   ClusterWorkloadData (32-byte character string)
|       User data for cluster workload exit.
|      To determine the value of this attribute, use the CACLWD selector with the
|      MQINQ call.
|   ClusterWorkloadExit (n-byte character string)
|       Name of user exit for cluster workload management.
|      If this name is nonblank, the exit is called each time that a message is put to a
|      cluster queue or moved from one cluster-sender queue to another. The exit can
|                               Note: Both the length and the value of this attribute are environment specific.
|                                     See the MQSeries Intercommunication manual for details of the value of
|                                     this attribute in various environments.
|                               To determine the value of this attribute, use the CACLWX selector with the
|                               MQINQ call. The length of this attribute is given by LNEXN.
|                           ClusterWorkloadLength (10-digit signed integer)
|                               Maximum length of message data passed to cluster workload exit.
|                               This is the maximum length of message data that is passed to the cluster
|                               workload exit. The actual length of data passed to the exit is the minimum of
|                               the following:
|                               v The length of the message.
|                               v The queue-manager’s MaxMsgLength attribute.
|                               v The ClusterWorkloadLength attribute.
|                               To determine the value of this attribute, use the IACLWL selector with the
|                               MQINQ call.
                            CodedCharSetId (10-digit signed integer)
                                Coded character set identifier.
                                This defines the character set used by the queue manager for all character
                                string fields defined in the MQI, including the names of objects, and queue
                                creation date and time. It must be the identifier of a single-byte character set
                                (SBCS). It does not apply to application data carried in the message. The value
                                depends on the environment:
                                v On OS/400, the value is that which is set in the environment when the
                                   queue manager is first created.
                                To determine the value of this attribute, use the IACCSI selector with the
                                MQINQ call.
                            CommandInputQName (48-byte character string)
                                Command input queue name.
                                This is the name of the command input queue defined on the local queue
                                manager. This is a queue to which applications can send commands, if
                                authorized to do so. The name of the queue depends on the environment:
                                v On OS/400, the name of the queue is
                                  SYSTEM.ADMIN.COMMAND.QUEUE, and only PCF commands can be
                                  sent to it. However, an MQSC command can be sent to this queue if the
                                  MQSC command is enclosed within a PCF command of type CMESC. Refer
                                  to the MQSeries Programmable System Management. book for details of the
                                  Escape command.
                                To determine the value of this attribute, use the CACMDQ selector with the
                                MQINQ call. The length of this attribute is given by LNQN.
                            CommandLevel (10-digit signed integer)
                                Command Level.
       To determine the value of this attribute, use the IACMDL selector with the
       MQINQ call.
    DeadLetterQName (48-byte character string)
        Name of dead-letter (undelivered-message) queue.
       This is the name of a queue defined on the local queue manager. Messages are
       sent to this queue if they cannot be routed to their correct destination.
                            Note: Messages that have passed their expiry time (see the MDEXP field
                                  described in “Chapter 10. MQMD - Message descriptor” on page 83) are
                                  not transferred to this queue when they are discarded. However, an
                                  expiration report message (ROEXP) is still generated and sent to the
                                  MDRQ queue, if requested by the sending application.
                            Messages are not put on the dead-letter (undelivered-message) queue when the
                            application that issued the put request has been notified synchronously of the
                            problem by means of the reason code returned by the MQPUT or MQPUT1
                            call (for example, a message put on a local queue for which put requests are
                            inhibited).
                            To determine the value of this attribute, use the CADLQ selector with the
                            MQINQ call. The length of this attribute is given by LNQN.
                        DefXmitQName (48-byte character string)
                            Default transmission queue name.
                            This is the name of the transmission queue that is used for the transmission of
                            messages to remote queue managers, if there is no other indication of which
                            transmission queue to use.
                            If there is no default transmission queue, the name is entirely blank. The initial
                            value of this attribute is blank.
                            To determine the value of this attribute, use the CADXQN selector with the
                            MQINQ call. The length of this attribute is given by LNQN.
                        DistLists (10-digit signed integer)
                            Distribution list support.
                            This indicates whether the local queue manager supports distribution lists on
                            the MQPUT and MQPUT1 calls. The value is one of the following:
    To determine the value of this attribute, use the IADIST selector with the
    MQINQ call.
InhibitEvent (10-digit signed integer)
    Controls whether inhibit (Inhibit Get and Inhibit Put) events are generated.
    To determine the value of this attribute, use the IAINHE selector with the
    MQINQ call.
LocalEvent (10-digit signed integer)
    Controls whether local error events are generated.
    To determine the value of this attribute, use the IALCLE selector with the
    MQINQ call.
MaxHandles (10-digit signed integer)
    Maximum number of handles.
    This is the maximum number of open handles that any one task can use
    concurrently. Each successful MQOPEN call for a single queue (or for an object
    that is not a queue) uses one handle. That handle becomes available for reuse
    when the object is closed. However, when a distribution list is opened, each
    queue in the distribution list is allocated a separate handle, and so that
    MQOPEN call uses as many handles as there are queues in the distribution
    list. This must be taken into account when deciding on a suitable value for
    MaxHandles.
    The value is in the range 1 through 999 999 999. The default value is
    determined by the environment:
    v On OS/400, the default value is 256.
    To determine the value of this attribute, use the IAMHND selector with the
    MQINQ call.
                                This is the length of the longest physical message that can be handled by the
                                queue manager. However, because the MaxMsgLength queue-manager attribute
                                can be set independently of the MaxMsgLength local-queue attribute, the longest
                                physical message that can be placed on a queue is the lesser of those two
                                values.
                                The lower limit for the MaxMsgLength attribute is 32 KB (32 768 bytes). The
                                upper limit is determined by the environment:
                                v On OS/400, the maximum message length is 100 MB (104 857 600 bytes).
                                To determine the value of this attribute, use the IAMLEN selector with the
                                MQINQ call.
                            MaxPriority (10-digit signed integer)
                                Maximum priority.
                                To determine the value of this attribute, use the IAMPRI selector with the
                                MQINQ call.
                            MaxUncommittedMsgs (10-digit signed integer)
                                Maximum number of uncommitted messages within a unit of work.
                                This is the maximum number of uncommitted messages that can exist within a
                                unit of work. The number of uncommitted messages is the sum of the
                                following since the start of the current unit of work:
                                v Messages put by the application with the PMSYP option
                                v Messages retrieved by the application with the GMSYP option
                                v Trigger messages and COA report messages generated by the queue
                                   manager for messages put with the PMSYP option
                                v COD report messages generated by the queue manager for messages
                                   retrieved with the GMSYP option
                                The following are not counted as uncommitted messages:
                                v Messages put or retrieved by the application outside a unit of work
                                v Trigger messages or COA/COD report messages generated by the queue
                                  manager as a result of messages put or retrieved outside a unit of work
                                v Expiration report messages generated by the queue manager (even if the call
                                  causing the expiration report message specified GMSYP)
                                v Event messages generated by the queue manager (even if the call causing
                                  the event message specified PMSYP or GMSYP)
The lower limit for this attribute is 1; the upper limit is 999 999 999.
    To determine the value of this attribute, use the IAMUNC selector with the
    MQINQ call.
PerformanceEvent (10-digit signed integer)
    Controls whether performance-related events are generated.
    To determine the value of this attribute, use the IAPFME selector with the
    MQINQ call.
Platform (10-digit signed integer)
    Platform on which the queue manager is running.
    This indicates the architecture of the platform on which the queue manager is
    running. The value is:
    PL400 OS/400.
QMgrDesc (64-byte character string)
    Queue manager description.
    This is a field that may be used for descriptive commentary. The content of the
    field is of no significance to the queue manager, but the queue manager may
    require that the field 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, this 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.
|                               To determine the value of this attribute, use the CAQMID selector with the
|                               MQINQ call. The length of this attribute is given by LNQMID.
                            QMgrName (48-byte character string)
                                Queue manager name.
                                This is the name of the local queue manager, that is, the name of the queue
                                manager to which the application is connected.
                                The first 12 characters of the name are used to construct a unique message
                                identifier (see the MDMID field described in “Chapter 10. MQMD - Message
                                descriptor” on page 83). Queue managers that can intercommunicate must
                                therefore have names that differ in the first 12 characters, in order for message
                                identifiers to be unique in the queue-manager network.
                                To determine the value of this attribute, use the CAQMN selector with the
                                MQINQ call. The length of this attribute is given by LNQMN.
                            RemoteEvent (10-digit signed integer)
                                Controls whether remote error events are generated.
                                To determine the value of this attribute, use the IARMTE selector with the
                                MQINQ call.
|                           RepositoryName (48-byte character string)
|                               Name of cluster for which this queue manager provides repository services.
|                               This is the name of a cluster for which this queue manager provides a
|                               repository-manager service. If the queue manager provides this service for
|                               more than one cluster, RepositoryNamelist specifies the name of a namelist
|                               object that identifies the clusters, and RepositoryName is blank. At least one of
|                               RepositoryName and RepositoryNamelist must be blank.
|                               To determine the value of this attribute, use the CARPN selector with the
|                               MQINQ call. The length of this attribute is given by LNQMN.
|                           RepositoryNamelist (48-byte character string)
|                               Name of namelist object containing names of clusters for which this queue
|                               manager provides repository services.
|                               This is the name of a namelist object that contains the names of clusters for
|                               which this queue manager provides a repository-manager service. If the queue
|                               manager provides this service for only one cluster, the namelist object contains
|       To determine the value of this attribute, use the CARPNL selector with the
|       MQINQ call. The length of this attribute is given by LNNLN.
    StartStopEvent (10-digit signed integer)
        Controls whether start and stop events are generated.
        To determine the value of this attribute, use the IASSE selector with the
        MQINQ call.
    SyncPoint (10-digit signed integer)
        Syncpoint availability.
        This indicates whether the local queue manager supports units of work and
        syncpointing with the MQGET, MQPUT, and MQPUT1 calls.
        SPAVL
                Units of work and syncpointing available.
        SPNAVL
             Units of work and syncpointing not available.
        To determine the value of this attribute, use the IASYNC selector with the
        MQINQ call.
    TriggerInterval (10-digit signed integer)
        Trigger-message interval.
        This is a time interval (in milliseconds) used to restrict the number of trigger
        messages. This is relevant only when the TriggerType is TTFRST. In this case
        trigger messages are normally generated only when a suitable message arrives
        on the queue, and the queue was previously empty. Under certain
        circumstances, however, an additional trigger message can be generated with
        TTFRST triggering even if the queue was not empty. These additional trigger
        messages are not generated more often than every TriggerInterval
        milliseconds.
        The value is not less than 0 and not greater than 999 999 999. The default value
        is 999 999 999.
        To determine the value of this attribute, use the IATRGI selector with the
        MQINQ call.
                         In addition to coding the MQI calls in your source code, you must add the
                         appropriate language statements to include the MQSeries for AS/400 copy files for
                         the RPG language. You should make yourself familiar with the contents of these
                         files—their names, and a brief description of their contents are given in the
                         following text.
                         The copy files that MQSeries for AS/400 provides to assist with the writing of
                         channel exits are described in the MQSeries Intercommunication book.
                         The names of the MQSeries for AS/400 copy files for RPG have the prefix CMQ.
                         They have a suffix of G. There are separate copy files containing the named
                         constants, and one file for each of the structures. The copy files are listed in Table 2
                          on page 8.
                         Note: For ILE RPG/400 they are supplied as members of file QRPGLESRC in
                               library QMQM.
                         To do this for ILE RPG/400, you can use the usual OS/400 commands,
                         CRTRPGMOD and CRTPGM.
                         After creating your *MODULE, you also need to reference the service program
                         QMQM/AMQZSTUB when creating your ILE RPG/400 program using the
                         CRTPGM command.
|                           To start the OS/400 commitment control facilities, use the STRCMTCTL system
|                           command. To end commitment control, use the ENDCMTCTL system command.
|                           Note: The default value of Commitment definition scope is *ACTGRP. This must be
|                                 defined as *JOB for MQSeries for AS/400. For example:
|                                  STRCMTCTL LCKLVL(*ALL) CMTSCOPE(*JOB)
|                           If you disconnect from the queue manager while there are pending MQPUT,
|                           MQPUT1, or MQGET operations in the current unit of work, MQSeries for AS/400
|                           remains registered as an API commitment resource so that it is notified of the next
|                           commit or rollback. When the next syncpoint is reached, MQSeries for AS/400
|                           commits or rolls back the changes as required. It is possible for an application to
|                           disconnect and reconnect to a queue manager during an active unit of work and
|                           perform further MQGET and MQPUT operations inside the same unit of work
|                           (this is a pending disconnect).
|                           To commit or roll back (that is, to back out) your unit of work, use one of the
|                           programming languages that supports the commitment control. For example:
|                           v CL commands: COMMIT and ROLLBACK
|                           v ILE C Programming Functions: _Rcommit and _Rrollback
|                           v RPG/400: COMIT and ROLBK
|                           v COBOL/400: COMMIT and ROLLBACK
                  You can use the EXEC CICS SYNCPOINT command to establish a syncpoint that
                  includes the MQSeries for AS/400 operations. To back out all changes up to the
                  previous syncpoint, you can use the EXEC CICS SYNCPOINT ROLLBACK
                  command.
                         The source code for all the samples is provided with the product; this source
                         includes comments that explain the message queuing techniques demonstrated in
                         the programs.
                         Table 55 gives a complete list of the sample programs delivered with MQSeries for
                         AS/400 V3R1 or later, and shows the names of the programs in each of the
                         supported programming languages. Notice that their names all start with the
                         prefix AMQ, the fourth character in the name indicates the programming language.
                         Note: This chapter tells you how to use the ILE RPG/400 compiler. with
                               prototyped calls to the MQI.
                         Table 55. Names of the sample programs
                                                                                 RPG (ILE)
                         Put samples                                             AMQnPUT4
                         Browse samples                                          AMQnGBR4
                         Get samples                                             AMQnGET4
                         Request samples                                         AMQnREQ4
                         Echo samples                                            AMQnECH4
                         Inquire samples                                         AMQnINQ4
                         Set samples                                             AMQnSET4
                         Trigger Monitor sample                                  AMQ3TRG4
                        In addition to these, the MQSeries for AS/400 sample option includes a sample
                        data file, AMQSDATA, which can be used as input to certain sample programs.
                        and sample CL programs that demonstrate administration tasks. The CL samples
                        are described in the MQSeries for AS/400 V5.1 System Administration. You could use
                        the sample CL program to create queues to use with the sample programs
                        described in this chapter.
                        For information on how to run the sample programs, see “Preparing and running
                        the sample programs” on page 343.
                        Note: All the sample programs produce a spool file that contains the results of the
                              processing.
                 where Queue Name must be 48 characters in length, which you achieve by padding
                 the queue name with the required number of blanks.
                 Note that for the Inquire and Set sample programs, the sample definitions created
                 by AMQSAMP4 cause the C versions of these samples to be triggered. If you want
                 to trigger the RPG versions, you must change the process definitions
                 SYSTEM.SAMPLE.ECHOPROCESS and SYSTEM.SAMPLE.INQPROCESS and
                 SYSTEM.SAMPLE.SETPROCESS. You can use the CHGMQMPRC command
                 (described in the MQSeries for AS/400 V5.1 System Administration book) to do this,
                 or edit and run AMQSAMP4 with the alternative definition.
                 To start the program, call the program and give the name of your target queue as a
                 program parameter. The program puts a set of fixed messages on the queue; these
                 messages are taken from the data block at the end of the program source code. A
                 sample put program is AMQ3PUT4 in library QMQMSAMP.
                 where Queue Name must be 48 characters in length, which you achieve by padding
                 the queue name with the required number of blanks.
                        For each line of data contained in the source code, the program reads the text into
                        a buffer and uses the MQPUT call to create a datagram message containing the
                        text of that line. The program continues until either it reaches the end of the input
                        or the MQPUT call fails. If the program reaches the end of the input, it closes the
                        queue using the MQCLOSE call.
                        The program retrieves copies of all the messages on the queue you specify when
                        you call the program; the messages remain on the queue. You could use the
                        supplied queue SYSTEM.SAMPLE.LOCAL; run the Put sample program first to
                        put some messages on the queue. You could use the queue
                        SYSTEM.SAMPLE.ALIAS, which is an alias name for the same local queue. The
                        program continues until it reaches the end of the queue or an MQI call fails.
                        where Queue Name must be 48 characters in length, which you achieve by padding
                        the queue name with the required number of blanks. Therefore, if you are using
                        SYSTEM.SAMPLE.LOCAL as your target queue, you will need 29 blank characters.
                        For each message on the queue, the program uses the MQGET call to copy the
                        message from the queue, then displays the data contained in the message. The
                        MQGET call uses these options:
                        GMBRWN
                            After the MQOPEN call, the browse cursor is positioned logically before
                            the first message in the queue, so this option causes the first message to be
                            returned when the call is first made.
                        GMNWT
                            The program does not wait if there are no messages on the queue.
                        GMATM
                            The MQGET call specifies a buffer of fixed size. If a message is longer than
                            this buffer, the program displays the truncated message, together with a
                            warning that the message has been truncated.
                        The program demonstrates how you must clear the MDMID and MDCID fields of the
                        MQMD structure after each MQGET call because the call sets these fields to the
             The program continues to the end of the queue; at this point the MQGET call
             returns the RC2033 (no message available) reason code and the program displays a
             warning message. If the MQGET call fails, the program writes an error message
             that contains the reason code in its spool file.
The program then closes the queue using the MQCLOSE call.
             When the program is called, it removes messages from the specified queue. You
             could use the supplied queue SYSTEM.SAMPLE.LOCAL; run the Put sample
             program first to put some messages on the queue. You could use the
             SYSTEM.SAMPLE.ALIAS queue, which is an alias name for the same local queue.
             The program continues until the queue is empty or an MQI call fails.
             where Queue Name must be 48 characters in length, which you achieve by padding
             the queue name with the required number of blanks. Therefore, if you are using
             SYSTEM.SAMPLE.LOCAL as your target queue, you will need 29 blank characters.
             For each message on the queue, the program uses the MQGET call to remove the
             message from the queue; it then displays the data contained in the message. The
             MQGET call uses the GMWT option, specifying a wait interval (GMWI) of 15
             seconds, so that the program waits for this period if there is no message on the
             queue. If no message arrives before this interval expires, the call fails and returns
             the RC2033 (no message available) reason code.
             The program demonstrates how you must clear the MDMID and MDCID fields of the
             MQMD structure after each MQGET call because the call sets these fields to the
             values contained in the message it retrieves. Clearing these fields means that
             successive MQGET calls retrieve messages in the order in which the messages are
             held in the queue.
             The MQGET call specifies a buffer of fixed size. If a message is longer than this
             buffer, the call fails and the program stops.
             The program continues until either the MQGET call returns the RC2033 (no
             message available) reason code or the MQGET call fails. If the call fails, the
             program displays an error message that contains the reason code.
                        The Request sample puts a series of request messages on a queue using the
                        MQPUT call. These messages specify SYSTEM.SAMPLE.REPLY as the reply-to
                        queue. The program waits for reply messages, then displays them. Replies are sent
                        only if the target queue (which we will call the server queue) is being processed by
                        a server application, or if an application is triggered for that purpose (the Inquire
                        and Set sample programs are designed to be triggered). The sample waits 5
                        minutes for the first reply to arrive (to allow time for a server application to be
                        triggered) and 15 seconds for subsequent replies, but it can end without getting
                        any replies.
                        To start the program, call the program and give the name of your target queue as a
                        program parameter. The program puts a set of fixed messages on the queue; these
                        messages are taken from the data block at the end of the program source code.
                        Depending on the trigger process you want to run, AMQ3REQ4 should be called
                        with the parameter specifying request messages to be placed on one of these
                        sample server queues:
                        v SYSTEM.SAMPLE.ECHO (for the Echo sample programs)
                        v SYSTEM.SAMPLE.INQ (for the Inquire sample programs)
                        v SYSTEM.SAMPLE.SET (for the Set sample programs)
      Note: This sample queue has a trigger type of FIRST, so if there are already
            messages on the queue before you run the Request sample, server
            applications are not triggered by the messages you send.
      If you want to attempt further examples, you can try the following variations:
      v Use AMQ3TRG4 instead of AMQ3SRV4 to submit the job instead, but potential
         job submission delays could make it less easy to follow what is happening.
      v Use the SYSTEM.SAMPLE.INQ and SYSTEM.SAMPLE.SET sample queues.
         Using the example data file the commands to issue the RPG program requests to
         these servers are, respectively:
           CALL   PGM(QMQMSAMP/AMQ3INQ4) PARM('SYSTEM.SAMPLE.INQ
           + 31   blank characters')
           CALL   PGM(QMQMSAMP/AMQ3SET4) PARM('SYSTEM.SAMPLE.SET
           + 31   blank characters')
      For each line of input, the program then reads the text into a buffer and uses the
      MQPUT call to create a request message containing the text of that line. On this
      call the program uses the ROEXCD report option to request that any report
      messages sent about the request message will include the first 100 bytes of the
      message data. The program continues until either it reaches the end of the input or
      the MQPUT call fails.
      The program then uses the MQGET call to remove reply messages from the queue,
      and displays the data contained in the replies. The MQGET call uses the GMWT
      option, specifying a wait interval (GMWI) of 5 minutes for the first reply (to allow
      time for a server application to be triggered) and 15 seconds for subsequent replies.
      The program waits for these periods if there is no message on the queue. If no
      message arrives before this interval expires, the call fails and returns the RC2033
      (no message available) reason code. The call also uses the GMATM option, so
      messages longer than the declared buffer size are truncated.
      The program demonstrates how you must clear the MDMID and MDCOD fields of the
      MQMD structure after each MQGET call because the call sets these fields to the
      values contained in the message it retrieves. Clearing these fields means that
      successive MQGET calls retrieve messages in the order in which the messages are
      held in the queue.
                        The program then closes both the server queue and the reply-to queue using the
                        MQCLOSE call. 57 shows the changes to the Echo sample program that are
                        necessary to run the Inquire and Set sample programs.
                        Note: The details for the Echo sample program are included as a reference.
                         Table 57. Client/Server sample program details
                         Program name           SYSTEM/SAMPLE queue                      Program started
                         Echo                   ECHO                                     AMQ3ECH4
                         Inquire                INQ                                      AMQ3INQ4
                         Set                    SET                                      AMQ3SET4
                        The programs are intended to run as triggered programs, so their only input is the
                        data read from the queue named in the trigger message structure.
                        For the triggering process to work, you must ensure that the Echo sample program
                        you want to use is triggered by messages arriving on queue
             When you have set the definition correctly, first start AMQ3SRV4 in one job, then
             start AMQnREQ4 in another. You could use AMQ3TRG4 instead of AMQ3SRV4,
             but potential job submission delays could make it less easy to follow what is
             happening.
             The program then opens the queue named in the trigger message structure it was
             passed when it started. (For clarity, we will call this the request queue.) The program
             uses the MQOPEN call to open this queue for shared input.
             The program uses the MQGET call to remove messages from this queue. This call
             uses the GMATM and GMWT options, with a wait interval of 5 seconds. The
             program tests the descriptor of each message to see if it is a request message; if it
             is not, the program discards the message and displays a warning message.
             For each request message removed from the request queue, the program uses the
             MQPUT call to put a reply message on the reply-to queue. This message contains
             the contents of the request message.
             When there are no messages remaining on the request queue, the program closes
             that queue and disconnects from the queue manager.
             This program can also respond to messages sent to the queue from platforms other
             than MQSeries for AS/400, although no sample is supplied for this situation. To
             make the ECHO program work, you:
             v Write a program, correctly specifying the Format, Encoding, and CCSID fields, to
               send text request messages.
               The ECHO program requests the queue manager to perform message data
               conversion, if this is needed.
             v Specify CONVERT(*YES) on the MQSeries for AS/400 sending channel, if the
               program you have written does not provide similar conversion for the reply.
                        For the triggering process to work, you must ensure that the Inquire sample
                        program is triggered by messages arriving on queue SYSTEM.SAMPLE.INQ. To do
                        this, specify the name of the Inquire sample program in the ApplId field of the
                        SYSTEM.SAMPLE.INQPROCESS process definition. (For this, you can use the
                        CHGMQMPRC command, described in the MQSeries for AS/400 V5.1 System
                        Administration book.) The sample queue has a trigger type of FIRST, so if there are
                        already messages on the queue before you run the Request sample, the Inquire
                        sample is not triggered by the messages you send.
                        When you have set the definition correctly, first start AMQ3SRV4 in one job, then
                        start AMQnREQ4 in another. You could use AMQ3TRG4 instead of AMQ3SRV4,
                        but potential job submission delays could make it less easy to follow what is
                        happening.
                        Use the Request sample program to send request messages, each containing just a
                        queue name, to queue SYSTEM.SAMPLE.INQ. For each request message, the
                        Inquire sample program sends a reply message containing information about the
                        queue specified in the request message. The replies are sent to the reply-to queue
                        specified in the request message.
                        The program then opens the queue named in the trigger message structure it was
                        passed when it started. (For clarity, we will call this the request queue.) The program
                        uses the MQOPEN call to open this queue for shared input.
                        The program uses the MQGET call to remove messages from this queue. This call
                        uses the GMATM and GMWT options, with a wait interval of 5 seconds. The
                        program tests the descriptor of each message to see if it is a request message; if it
                        is not, the program discards the message and displays a warning message.
                        For each request message removed from the request queue, the program reads the
                        name of the queue (which we will call the target queue) contained in the data and
                        opens that queue using the MQOPEN call with the OOINQ option. The program
                        then uses the MQINQ call to inquire about the values of the InhibitGet,
                        CurrentQDepth, and OpenInputCount attributes of the target queue.
                        If the MQINQ call is successful, the program uses the MQPUT call to put a reply
                        message on the reply-to queue. This message contains the values of the 3
                        attributes.
                        If the MQOPEN or MQINQ call is unsuccessful, the program uses the MQPUT call
                        to put a report message on the reply-to queue. In the MDFB field of the message
                        descriptor of this report message is the reason code returned by either the
                        MQOPEN or MQINQ call, depending on which one failed.
             When there are no messages remaining on the request queue, the program closes
             that queue and disconnects from the queue manager.
             For the triggering process to work, you must ensure that the Set sample program is
             triggered by messages arriving on queue SYSTEM.SAMPLE.SET. To do this, specify
             the name of the Set sample program in the ApplId field of the process definition
             SYSTEM.SAMPLE.SETPROCESS. (For this, you can use the CHGMQMPRC
             command, described in the MQSeries for AS/400 V5.1 System Administration.) The
             sample queue has a trigger type of FIRST, so if there are already messages on the
             queue before you run the Request sample, the Set sample is not triggered by the
             messages you send.
             When you have set the definition correctly, first start AMQ3SRV4 in one job, then
             start AMQnREQ4 in another. You could use AMQ3TRG4 instead of AMQ3SRV4,
             but potential job submission delays could make it less easy to follow what is
             happening.
             Use the Request sample program to send request messages, each containing just a
             queue name, to queue SYSTEM.SAMPLE.SET. For each request message, the Set
             sample program sends a reply message containing a confirmation that put
             operations have been inhibited on the specified queue. The replies are sent to the
             reply-to queue specified in the request message.
             The program then opens the queue named in the trigger message structure it was
             passed when it started. (For clarity, we will call this the request queue.) The program
             uses the MQOPEN call to open this queue for shared input.
             The program uses the MQGET call to remove messages from this queue. This call
             uses the GMATM and GMWT options, with a wait interval of 5 seconds. The
             program tests the descriptor of each message to see if it is a request message; if it
             is not, the program discards the message and displays a warning message.
             For each request message removed from the request queue, the program reads the
             name of the queue (which we will call the target queue) contained in the data and
             opens that queue using the MQOPEN call with the OOSET option. The program
             then uses the MQSET call to set the value of the InhibitPut attribute of the target
             queue to QAPUTI.
                        If the MQOPEN or MQSET call is unsuccessful, the program uses the MQPUT call
                        to put a report message on the reply-to queue. In the MDFB field of the message
                        descriptor of this report message is the reason code returned by either the
                        MQOPEN or MQSET call, depending on which one failed.
                        After the MQSET call, the program closes the target queue using the MQCLOSE
                        call.
                        When there are no messages remaining on the request queue, the program closes
                        that queue and disconnects from the queue manager.
                        AMQ3TRG4 submits an OS/400 job for each valid trigger message it gets from the
                        initiation queue.
                        The trigger monitor submits an OS/400 job to start the application specified in the
                        trigger message, and passes an MQTMC (a character version of the trigger
                        message) structure. The environment data in the trigger message is used as job
                        submission parameters.
             where Queue Name must be 48 characters in length, which you achieve by padding
             the queue name with the required number of blanks. Therefore, if you are using
             SYSTEM.SAMPLE.TRIGGER as your target queue, you will need 28 blank
             characters.
             Note: Programs started by AMQ3SRV4 must not use the MQDISC call because this
                   will stop the trigger server. If programs started by AMQ3SRV4 use the
                   MQCONN call, they will get the RC2002 reason code.
             Note: To start triggering again on this queue, you must enter the command:
                        CHGMQMQ QNAME('SYSTEM.SAMPLE.TRIGGER') GETENBL(*YES)
             The Request sample program puts its own local queue manager name in the MDRM
             field of messages it sends. The Inquire and Set samples send reply messages to the
             queue and message queue manager named in the MDRQ and MDRM fields of the
             request messages they process.
                         Applications must not depend upon errors being checked for in a specific order,
                         except where specifically noted. If more than one completion code or reason code
                         could arise from a call, the particular error reported depends on the
                         implementation.
Completion codes
                         The completion code parameter (CMPCOD) allows the caller to see quickly whether
                         the call completed successfully, completed partially, or failed.
                         The following is a list of completion codes, with more detail than is given in the
                         call descriptions:
                         CCOK
                                   Successful completion.
                                   The call completed fully; all output parameters have been set. The REASON
                                   parameter always has the value RCNONE in this case.
                         CCWARN
                              Warning (partial completion).
                                   The call completed partially. Some output parameters may have been set in
                                   addition to the CMPCOD and REASON output parameters. The REASON
                                   parameter gives additional information about the partial completion.
                         CCFAIL
                               Call failed.
                                   The processing of the call did not complete, and the state of the queue
                                   manager is normally unchanged; exceptions are specifically noted. The
                                   CMPCOD and REASON output parameters have been set; other parameters are
                                   unchanged, except where noted.
                                   The reason may be a fault in the application program, or it may be a result
                                   of some situation external to the program, for example the application’s
                                   authority may have been revoked. The REASON parameter gives additional
                                   information about the error.
Reason codes
                         The reason code parameter (REASON) is a qualification to the completion code
                         parameter (CMPCOD).
                         If the completion code is either CCWARN or CCFAIL, the queue manager always
                         reports a qualifying reason; details are given under each call description.
                        Any special reason values defined by user exits should be less than zero, to ensure
                        that they do not conflict with values defined by the queue manager. Exits can set
                        reasons already defined by the queue manager, where these are appropriate.
                        The following is a list of reason codes, in alphabetic order, with more detail than is
                        given in the call descriptions.
                        RCNONE
                             (0, X'000') No reason to report.
                                 The call completed normally. The completion code (CMPCOD) is CCOK.
                                 Corrective action: None.
                        RC0900
                                 (900, X'384') Lowest value for an application-defined reason code returned
                                 by a data-conversion exit.
                                 Data-conversion exits can return reason codes in the range RC0900 through
                                 RC0999 to indicate particular conditions that the exit has detected.
                                 Corrective action: As defined by the writer of the data-conversion exit.
                        RC0999
                                 (999, X'3E7') Highest value for application-defined reason code returned by
                                 a data-conversion exit.
                                 Data-conversion exits can return reason codes in the range RC0900 through
                                 RC0999 to indicate particular conditions that the exit has detected.
                                 Corrective action: As defined by the writer of the data-conversion exit.
                        RC2001
                                 (2001, X'7D1') Alias base queue not a valid type.
                                 An MQOPEN or MQPUT1 call was issued specifying an alias queue as the
                                 destination, but the BaseQName in the alias queue definition resolves to a
                                 queue that is not a local queue, a local definition of a remote queue, or a
                                 cluster queue.
                                 Corrective action: Correct the queue definitions.
                        RC2002
                                 (2002, X'7D2') Application already connected.
                                 An MQCONN call was issued, but the application is already connected to
                                 the queue manager.
                                 Corrective action: None. The HCONN parameter returned has the same value
                                 as was returned for the previous MQCONN call.
                                 Note: An MQCONN call that returns this reason code does not mean that
                                       an additional MQDISC call must be issued in order to disconnect
                                       from the queue manager. If this reason code is returned because the
                                       application (or portion thereof) has been called in a situation where
                                       the connect has already been done, a corresponding MQDISC
         Corrective action: Check the returns from previous calls to the queue
         manager. For example, a previous MQPUT call may have failed.
RC2004
         (2004, X'7D4') Buffer parameter not valid.
         The BUFFER parameter is not valid for one of the following reasons:
         v The parameter pointer is not valid. (It is not always possible to detect
           parameter pointers that are not valid; if not detected, unpredictable
           results occur.)
         v The parameter pointer points to storage that cannot be accessed for the
           entire length specified by BUFLEN.
         v For calls where BUFFER is an output parameter: the parameter pointer
           points to read-only storage.
             This reason code can sometimes occur when a server application opens the
             reply queue specified by the MDRQ and MDRM fields in the MQMD of a
             message that the server has just received. In this case the reason code
             indicates that the application that sent the original message placed
             incorrect values into the MDRQ and MDRM fields in the MQMD of the original
             message.
         Corrective action: Specify the name of the queue to which the reply
         message or report message is to be sent.
RC2029
         (2029, X'7ED') Message type in message descriptor not valid.
         On an MQPUT or MQPUT1 call, the value specified for the MDMT field in
         the message descriptor (MQMD) is not valid.
         Corrective action: Specify a valid value. See the MDMT field described in
         “Chapter 10. MQMD - Message descriptor” on page 83 for details.
RC2030
         (2030, X'7EE') Message length greater than maximum for queue.
         An MQPUT or MQPUT1 call was issued to put a message on a queue, but
         the message was too long for the queue and MFSEGA was not specified in
         the MDMFL field in MQMD. If segmentation is not allowed, the length of the
         message cannot exceed the lesser of the queue and queue-manager
         MaxMsgLength attributes.
         This reason code can also occur when MFSEGA is specified, but the nature
         of the data present in the message prevents the queue manager splitting it
         into segments that are small enough to place on the queue:
         v For a user-defined format, the smallest segment that the queue manager
            can create is 16 bytes.
         v For a built-in format, the smallest segment that the queue manager can
            create depends on the particular format, but is greater than 16 bytes in
            all cases other than FMSTR (for FMSTR the minimum segment size is 16
            bytes).
         RC2030 can also occur in the MDFB field in the message descriptor of a
         report message; in this case it indicates that the error was encountered by a
         message channel agent when it attempted to put the message on a remote
         queue.
                                 RC2031 can also occur in the MDFB field in the message descriptor of a
                                 report message; in this case it indicates that the error was encountered by a
                                 message channel agent when it attempted to put the message on a remote
                                 queue.
                                 This reason also occurs if a channel, through which the message is to pass,
                                 has restricted the maximum message length to a value that is actually less
                                 than that supported by the queue manager, and the message length is
                                 greater than this value.
         This reason code can also occur in the MDFB field in the message descriptor
         of a report message; in this case it indicates that the error was encountered
         by a message channel agent when it attempted to put the message on a
         remote queue.
         Corrective action: Ensure that the correct queue manager or object was
         specified, and that appropriate authority exists.
         Note: 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”.
                                 This reason code can also occur on the MQOPEN call when the object
                                 being opened is of type OTNLST, OTPRO, or OTQM, but the ODMN field in
                                 MQOD is neither blank nor the name of the local queue manager.
                                 Corrective action: Specify the correct option; see Table 48 on page 256 for
                                 open options, and Table 47 on page 212 for close options. For the MQOPEN
                                 call, ensure that the ODMN field is set correctly. For the MQCLOSE call,
                                 either correct the option or change the definition type of the model queue
                                 that is used to create the new queue.
                        RC2046
                                 (2046, X'7FE') Options not valid or not consistent.
                                 The OPTS parameter or field contains options that are not valid, or a
                                 combination of options that is not valid.
                                 v For the MQOPEN, MQCLOSE, MQXCNVC, mqBagToBuffer,
                                   mqBufferToBag, mqCreateBag, and mqExecute calls, GMOPT is a separate
                                   parameter on the call.
                                    This reason also occurs if the parameter pointer is not valid. (It is not
                                    always possible to detect parameter pointers that are not valid; if not
                                    detected, unpredictable results occur.)
                                 v For the MQCONNX, MQGET, MQPUT, and MQPUT1 calls, GMOPT is a
                                   field in the relevant options structure (MQGMO or MQPMO).
                                 Corrective action: Specify valid options. Check the description of the OPTS
                                 parameter or field to determine which options and combinations of options
                                 are valid. If multiple options are being set by adding the individual
                                 options together, ensure that the same option is not added twice.
                        RC2047
                                 (2047, X'7FF') Persistence not valid.
                                 On an MQPUT or MQPUT1 call, the value specified for the MDPER field in
                                 the message descriptor MQMD is not valid.
                                 Corrective action: Specify one of the following values:
                                    PEPER
                                    PENPER
                                    PEQDEF
                        RC2048
                                 (2048, X'800') Message on a temporary dynamic queue cannot be persistent.
                                 Corrective action: Ensure that the queue manager has been started. If the
                                 connection is from a client application, check the channel definitions.
                        RC2061
                                 (2061, X'80D') Report options in message descriptor not valid.
                                 An MQPUT or MQPUT1 call was issued, but the MDREP field in the
                                 message descriptor MQMD contains one or more options which are not
                                 recognized by the local queue manager. The options that cause this reason
                                 code to be returned depend on the destination of the message; see
                                 “Appendix E. Report options” on page 457 for more details.
                                 This reason code can also occur in the MDFB field in the MQMD of a report
                                 message, or in the DLREA field in the MQDLH structure of a message on the
                                 dead-letter queue; in both cases it indicates that the destination queue
                                 manager does not support one or more of the report options specified by
                                 the sender of the message.
                                 Corrective action: Do the following:
                                 1. Ensure that the MDREP field in the message descriptor is initialized with
                                    a value when the message descriptor is declared, or is assigned a value
                                    prior to the MQPUT or MQPUT1 call.
                                    Specify RONONE if no report options are required.
                                 2. Ensure that the report options specified are ones which are documented
                                    in this book; see the MDREP field described in “Chapter 10. MQMD -
                                    Message descriptor” on page 83 for valid report options. Remove any
                                    report options which are not documented in this book.
                                 3. If multiple report options are being set by adding the individual report
                                    options together, ensure that the same report option is not added twice.
                                 4. Check that conflicting report options are not specified. For example, do
                                    not add both ROEXC and ROEXCD to the MDREP field; only one of
                                    these can be specified.
                        RC2063
                                 (2063, X'80F') Security error occurred.
                                 An MQOPEN, MQPUT1, or MQCLOSE call was issued, but it failed
                                 because a security error occurred.
                                 Corrective action: Note the error from the security manager, and contact
                                 your system programmer or security administrator.
                                 v On OS/400, the FFST log will contain the error information.
                        RC2065
                                 (2065, X'811') Count of selectors not valid.
                                 On an MQINQ or MQSET call, the SELCNT parameter specifies a value that
                                 is not valid. This reason also occurs if the parameter pointer is not valid.
                                 (It is not always possible to detect parameter pointers that are not valid; if
                                 not detected, unpredictable results occur.)
         Corrective action: Ensure that the value specified for the selector is valid
         for the object type represented by HOBJ. For the MQSET call, also ensure
         that the selector represents an integer attribute that can be set.
RC2068
         (2068, X'814') Selector not applicable to queue type.
         On the MQINQ call, one or more selectors in the SELS array is not
         applicable to the type of the queue whose attributes are being inquired.
         This reason also occurs when the queue is a cluster queue that resolved to
         a remote instance of the queue. In this case only a subset of the attributes
         that are valid for local queues can be inquired. See the usage notes in
         “Chapter 31. MQINQ - Inquire about object attributes” on page 241 for
         further details.
         The call completes with CCWARN, with the attribute values for the
         inapplicable selectors set as follows:
         v For integer attributes, the corresponding elements of INTATR are set to
           IAVNA.
         v For character attributes, the appropriate parts of the CHRATR string are set
           to a character string consisting entirely of asterisks (*).
         Corrective action: Verify that the selector specified is the one that was
         intended.
         However, the ODON field in the object descriptor is not recognized for the
         specified object type.
         This reason code can also occur when the queue is a cluster queue that is
         hosted on a remote queue manager, but the local queue manager does not
         have a defined route to the remote queue manager.
                                 Corrective action: Specify a valid object name. Ensure that the name is
                                 padded to the right with blanks if necessary. If this is correct, check the
                                 queue definitions.
                        RC2086
                                 (2086, X'826') Unknown object queue manager.
                                 On an MQOPEN or MQPUT1 call, the ODMN field in the object descriptor
                                 MQOD does not satisfy the naming rules for objects. For more information,
                                 see the MQSeries Application Programming Guide for
                                 This reason also occurs if the ODOT field in the object descriptor has the
                                 value OTQM, and the ODMN field is not blank, but the name specified is not
                                 the name of the local queue manager.
                                 Corrective action: Specify a valid queue manager name (or all blanks or an
                                 initial null character to refer to the local queue manager). Ensure that the
                                 name is padded to the right with blanks or terminated with a null
                                 character if necessary.
                        RC2087
                                 (2087, X'827') Unknown remote queue manager.
                                 On an MQOPEN or MQPUT1 call, an error occurred with the queue-name
                                 resolution, for one of the following reasons:
                                 v ODMN is blank or the name of the local queue manager, ODON is the name
                                    of a local definition of a remote queue (or an alias to one), and one of
                                    the following is true:
                                   – RemoteQMgrName is blank or the name of the local queue manager.
                                     Note that this error occurs even if XmitQName is not blank.
                                   – XmitQName is blank, but there is no transmission queue defined with
                                     the name of RemoteQMgrName, and the DefXmitQName queue-manager
                                     attribute is blank.
                                   – RemoteQMgrName and RemoteQName specify a cluster queue that cannot
                                     be resolved successfully, and the DefXmitQName queue-manager
                                     attribute is blank.
                                 v ODMN is the name of a local definition of a remote queue (containing a
                                   queue-manager alias definition), and one of the following is true:
                                   – RemoteQName is not blank.
                                   – XmitQName is blank, but there is no transmission queue defined with
                                     the name of RemoteQMgrName, and the DefXmitQName queue-manager
                                     attribute is blank.
                                 v ODMN is not:
                                   – Blank
                                   – The name of the local queue manager
                                   – The name of a transmission queue
                                   – The name of a queue-manager alias definition (that is, a local
                                     definition of a remote queue with a blank RemoteQName)
                                    but the DefXmitQName queue-manager attribute is blank.
                                 v ODMN is the name of a model queue.
                                 v The queue name is resolved through a cell directory. However, there is
                                   no queue defined with the same name as the remote queue manager
                                   name obtained from the cell directory, and the DefXmitQName
                                   queue-manager attribute is blank.
         This reason also occurs if the queue name is resolved through a cell
         directory, and the remote queue manager name obtained from the cell
         directory is the name of a queue, but this is not a local queue.
         Corrective action: Check the values specified for ODON and ODMN. If these are
         correct, check the queue definitions. For more information on transmission
         queues, see the MQSeries Application Programming Guide.
RC2092
         (2092, X'82C') Transmission queue with wrong usage.
         On an MQOPEN or MQPUT1 call, a message is to be sent to a remote
         queue manager, but one of the following occurred:
         v ODMN specifies the name of a local queue, but it does not have a Usage
           attribute of USTRAN.
         v The ODON or ODMN field in the object descriptor specifies the name of a
           local definition of a remote queue but one of the following applies to the
           XmitQName attribute of the definition:
           – XmitQName is not blank, but specifies a queue that does not have a
              Usage attribute of USTRAN
           – XmitQName is blank, but RemoteQMgrName specifies a queue that does
              not have a Usage attribute of USTRAN
         v The queue name is resolved through a cell directory, and the remote
           queue manager name obtained from the cell directory is the name of a
           local queue, but it does not have a Usage attribute of USTRAN.
         Corrective action: Check the values specified for ODON and ODMN. If these are
         correct, check the queue definitions. For more information on transmission
         queues, see the MQSeries Application Programming Guide.
RC2093
         (2093, X'82D') Queue not open for pass all context.
         An MQPUT call was issued with the PMPASA option specified in the PMO
         parameter, but the queue had not been opened with the OOPASA option.
                                 Corrective action: Check the format name that was specified when the
                                 message was put. If this is not one of the built-in formats, check that a
                                 suitable exit with the same name as the format is available for the queue
                                 manager to load. Verify that the data in the message corresponds to the
                                 format expected by the exit.
                        RC2111
                                 (2111, X'83F') Source coded character set identifier not valid.
                                 The coded character-set identifier from which character data is to be
                                 converted is not valid or not supported.
                                 This can occur on the MQGET call when the GMCONV option is included
                                 in the GMO parameter; the coded character-set identifier in error is the MDCSI
                                 field in the message being retrieved. In this case, the message data is
                                 returned unconverted, the values of the MDCSI and MDENC fields in the
                                 MSGDSC parameter are set to those of the message returned, and the call
                                 completes with CCWARN.
                                 This reason can also occur on the MQGET call when the message contains
                                 one or more of the data-related MQ header structures (MQCIH, MQDLH,
                                 MQIIH, MQRMH), and the MDCSI field in the message specifies a character
                                 set that does not have SBCS characters for the characters that are valid in
                                 queue names. MQ header structures containing such characters are not
                                 valid, and so the message is returned unconverted. The Unicode character
                                 set UCS-2 is an example of such a character set.
                                 If the message consists of several parts, each of which is described by its
                                 own character-set and encoding fields (for example, a message with format
                                 name FMDLH), some parts may be converted and other parts not
                                 converted. However, the values returned in the various character-set and
                                 encoding fields always correctly describe the relevant message data.
                                 This reason can also occur on the MQXCNVC call; the coded character-set
                                 identifier in error is the SRCCSI parameter. Either the SRCCSI parameter
                                 specifies a value which is not valid or not supported, or the SRCCSI
                                 parameter pointer is not valid. (It is not always possible to detect
                                 parameter pointers that are not valid; if not detected, unpredictable results
                                 occur.)
             This reason code occurs in the following environments: AIX, HP-UX, OS/2,
             Sun Solaris, Windows NT.
             Note: This reason code does not prevent the application initiating further
                   units of work.
    RC2124
             (2124, X'84C') Result of commit operation is pending.
             The queue manager is acting as the unit-of-work coordinator for a unit of
             work that involves other resource managers, and an MQCMIT or MQDISC
             call was issued to commit the unit of work, but one or more of the
             participating resource managers has not confirmed that the unit of work
             was committed successfully.
             The completion of the commit operation will happen at some point in the
             future, but there remains the possibility that the outcome will be mixed.
             This reason code occurs in the following environments: AIX, HP-UX, OS/2,
             Sun Solaris, Windows NT.
             Corrective action: Use the normal error-reporting mechanisms to determine
             whether the outcome was mixed. If it was, take appropriate action to
             resynchronize the resources.
             Note: This reason code does not prevent the application initiating further
                   units of work.
    RC2125
             (2125, X'84D') Bridge started.
                                     This reason code occurs in the following environments: AIX, DOS client,
|                                    HP-UX, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
         This reason code occurs in the following environments: AIX, DOS client,
         HP-UX, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
         This reason code occurs in the following environments: AIX, DOS client,
         HP-UX, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
         Corrective action:
         v If the error occurred on the MQCONN or MQCONNX call, ensure that
           the required objects exist by running the following command and then
           retrying the application:
           STRMQM -c qmgr
                                     This reason code occurs in the following environments: AIX, DOS client,
|                                    HP-UX, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
         This reason code can also occur on the MQGET call when the GMCONV
         option is specified. In this case it indicates that the RC2144 reason was
         returned by an MQXCNVC call issued by the data conversion exit.
         If the reason code occurs on the MQGET call, check that the logic in the
         data-conversion exit is correct.
RC2145
         (2145, X'861') Source buffer parameter not valid.
         On the MQXCNVC call, the SRCBUF parameter pointer is not valid, or
         points to storage that cannot be accessed for the entire length specified by
         SRCLEN. (It is not always possible to detect parameter pointers that are not
         valid; if not detected, unpredictable results occur.)
         This reason code can also occur on the MQGET call when the GMCONV
         option is specified. In this case it indicates that the RC2145 reason was
         returned by an MQXCNVC call issued by the data conversion exit.
         Corrective action: Specify a valid buffer.
         If the reason code occurs on the MQGET call, check that the logic in the
         data-conversion exit is correct.
RC2146
         (2146, X'862') Target buffer parameter not valid.
         On the MQXCNVC call, the TGTBUF parameter pointer is not valid, or
         points to read-only storage, or to storage that cannot be accessed for the
         entire length specified by TGTLEN. (It is not always possible to detect
         parameter pointers that are not valid; if not detected, unpredictable results
         occur.)
         This reason code can also occur on the MQGET call when the GMCONV
         option is specified. In this case it indicates that the RC2146 reason was
         returned by an MQXCNVC call issued by the data conversion exit.
         Corrective action: Specify a valid buffer.
         If the reason code occurs on the MQGET call, check that the logic in the
         data-conversion exit is correct.
RC2148
         (2148, X'864') IMS information header structure not valid.
         On an MQPUT or MQPUT1 call, the IMS information header structure
         MQIIH in the message data is not valid.
                                 Corrective action: Ensure that the length of the message specified on the
                                 MQPUT or MQPUT1 call equals the sum of the lengths of the PCF
                                 structures contained within the message data.
                        RC2150
                                 (2150, X'866') DBCS string not valid.
                                 On the MQXCNVC call, the SRCCSI parameter specifies the coded
                                 character-set identifier of a double-byte character set (DBCS), but the
                                 SRCBUF parameter does not contain a valid DBCS string. This may be
                                 because the string contains characters which are not valid DBCS characters,
                                 or because the string is a mixed SBCS/DBCS string and the
                                 shift-out/shift-in characters are not correctly paired.
                                 This reason code can also occur on the MQGET call when the GMCONV
                                 option is specified. In this case it indicates that the RC2150 reason was
                                 returned by an MQXCNVC call issued by the data conversion exit.
                                 Corrective action: Specify a valid string.
                                 If the reason code occurs on the MQGET call, check that the data in the
                                 message is valid, and that the logic in the data-conversion exit is correct.
                        RC2152
                                 (2152, X'868') Object name not valid.
                                 An MQOPEN or MQPUT1 call was issued to open a distribution list (that
                                 is, the ODREC field in MQOD is greater than zero), but the ODON field is
                                 neither blank nor the null string.
                                 Corrective action: If it is intended to open a distribution list, set the ODON
                                 field to blanks or the null string. If it is not intended to open a distribution
                                 list, set the ODREC field to zero.
                        RC2153
                                 (2153, X'869') Object queue-manager name not valid.
                                 An MQOPEN or MQPUT1 call was issued to open a distribution list (that
                                 is, the ODREC field in MQOD is greater than zero), but the ODMN field is
                                 neither blank nor the null string.
                                 Corrective action: If it is intended to open a distribution list, set the ODMN
                                 field to blanks or the null string. If it is not intended to open a distribution
                                 list, set the ODREC field to zero.
                        RC2154
                                 (2154, X'86A') Number of records present not valid.
         Corrective action: Ensure that one of ODORO and ODORP is zero and the other
         nonzero. Ensure that the field used points to accessible storage.
RC2156
         (2156, X'86C') Response records not valid.
         An MQOPEN or MQPUT1 call was issued to open a distribution list (that
         is, the ODREC field in MQOD is greater than zero), but the MQRR response
         records are not specified correctly. One of the following applies:
         v ODRRO is not zero and ODRRP is neither the null pointer nor zero.
         v ODRRP is not a valid pointer.
         v ODRRP or ODRRO points to storage that is not accessible.
         Corrective action: Ensure that at least one of ODRRO and ODRRP is zero.
         Ensure that the field used points to accessible storage.
RC2158
         (2158, X'86E') Put message record flags not valid.
         An MQPUT or MQPUT1 call was issued to put a message, but the PMPRF
         field in the MQPMO structure is not valid, for one of the following
         reasons:
         v The field contains flags which are not valid.
         v The message is being put to a distribution list, and put message records
            have been provided (that is, PMREC is greater than zero, and one of PMPRO
            or PMPRP is nonzero), but PMPRF has the value PFNONE.
         v PFACC is specified without either PMSETI or PMSETA.
         Corrective action: Ensure that PMPRF is set with the appropriate PF* flags to
         indicate which fields are present in the put message records. If PFACC is
         specified, ensure that either PMSETI or PMSETA is also specified.
         Alternatively, set both PMPRO and PMPRP to zero.
RC2159
         (2159, X'86F') Put message records not valid.
                                 Corrective action: Ensure that at least one of PMPRO and PMPRP is zero.
                                 Ensure that the field used points to accessible storage.
                        RC2161
                                 (2161, X'871') Queue manager quiescing.
                                 The application attempted to connect to the queue manager, but the queue
                                 manager is in the quiescing state.
                                 v On OS/400, the application either issued the MQCONN call, or issued
                                   the MQOPEN call when no connection was established.
                                 This reason code also occurs if the queue manager is in the quiescing state
                                 and an application issues one of the following calls:
                                 v MQOPEN, with OOFIQ included in the OPTS parameter
                                 v MQGET, with GMFIQ included in the GMOPT field of the GMO parameter
                                 v MQPUT or MQPUT1, with PMFIQ included in the PMOPT field of the PMO
                                   parameter
                                 Corrective action: The application should tidy up and stop. If the OOFIQ,
                                 PMFIQ, and GMFIQ options are not used, the application may continue
                                 working in order to complete and commit the current unit of work; but it
                                 should not start another unit of work.
                        RC2162
                                 (2162, X'872') Queue manager shutting down.
                                 A call has been issued when the queue manager is shutting down. If the
                                 call is an MQGET call with the GMWT option, the wait has been canceled.
                                 No more message-queuing calls can be issued.
                                 Corrective action: The application should tidy up and stop. Applications
                                 should ensure that any uncommitted updates are backed out; any unit of
                                 work that is coordinated by the queue manager is backed out
                                 automatically.
                        RC2173
                                 (2173, X'87D') Put-message options structure not valid.
                                 On an MQPUT or MQPUT1 call, the MQPMO structure is not valid. Either
                                 the PMSID mnemonic eye-catcher is not valid, or the PMVER is not
                                 recognized.
                                 This reason also occurs if:
                                 v The parameter pointer is not valid. (It is not always possible to detect
                                   parameter pointers that are not valid; if not detected, unpredictable
                                   results occur.)
                                 v The queue manager cannot copy the changed structure to application
                                   storage, even though the call is successful. This can occur, for example, if
                                   the pointer points to read-only storage.
         Corrective action: Alter the local definition of the remote queue and supply
         a valid remote queue name, or supply a nonblank ODON in the object
         descriptor, as appropriate.
RC2185
         (2185, X'889') Inconsistent persistence specification.
         The MQPUT call was issued to put a message that has a value for the
         MDPER field in MQMD that is different from the previous message put
         using that queue handle. This is not permitted when the PMLOGO option
         is specified and there is already a current message group or logical
         message. All messages in a group and all segments in a logical message
         must be persistent, or all must be nonpersistent.
         Corrective action: Modify the application to ensure that all of the messages
         in the group or logical message are put with the same value for the MDPER
         field in MQMD.
RC2186
         (2186, X'88A') Get-message options structure not valid.
         On an MQGET call, the MQGMO structure is not valid. Either the GMSID
         mnemonic eye-catcher is not valid, or the GMVER is not recognized.
         This reason also occurs if:
         v The parameter pointer is not valid. (It is not always possible to detect
           parameter pointers that are not valid; if not detected, unpredictable
           results occur.)
         v The queue manager cannot copy the changed structure to application
           storage, even though the call is successful. This can occur, for example, if
           the pointer points to read-only storage.
                                 Corrective action: Ensure that only valid options are specified for the field.
                        RC2248
                                 (2248, X'8C8') Message descriptor extension not valid.
                                 The MQMDE structure at the start of the application message data is not
                                 valid, for one of the following reasons:
                                 v The MESID mnemonic eye-catcher is not MESIDV.
                                 v The MEVER field is less than MEVER2.
                                 v The MELEN field is less than MELEN2, or (for MEVER equal to MEVER2
                                   only) greater than MELEN2.
         Corrective action: Specify a value which is greater than zero. Zero is valid
         only for the last segment.
RC2253
         (2253, X'8CD') Length of data in message segment is zero.
         An MQPUT or MQPUT1 call was issued to put the first or intermediate
         segment of a logical message, but the length of the application message
         data in the segment (excluding any MQ headers that may be present) is
         zero. The length must be at least one for the first or intermediate segment.
                                 Corrective action: Issue the MQGET, MQPUT, or MQPUT1 call inside the
                                 user-defined unit of work. Alternatively, for the MQPUT or MQPUT1 call,
                                 reduce the size of the message so that it does not require segmentation by
                                 the queue manager.
                        RC2256
                                 (2256, X'8D0') Wrong version of MQGMO supplied.
                                 An MQGET call was issued specifying options that required an MQGMO
                                 with a version number not less than GMVER2, but the MQGMO supplied
                                 did not satisfy this condition.
                                 Corrective action: Modify the application to pass a version-2 MQGMO.
                                 Check the application logic to ensure that the GMVER field in MQGMO has
                                 been set to GMVER2. Alternatively, remove the option that requires the
                                 version-2 MQGMO.
                        RC2257
                                 (2257, X'8D1') Wrong version of MQMD supplied.
                                 An MQGET, MQPUT, or MQPUT1 call was issued specifying options that
                                 required an MQMD with a version number not less than MDVER2, but the
                                 MQMD supplied did not satisfy this condition.
                                 Corrective action: Modify the application to pass a version-2 MQMD.
                                 Check the application logic to ensure that the MDVER field in MQMD has
                                 been set to MDVER2. Alternatively, remove the option that requires the
                                 version-2 MQMD.
                        RC2258
                                 (2258, X'8D2') Group identifier not valid.
                                 An MQPUT or MQPUT1 call was issued to put a distribution-list message
                                 that is also a message in a group, a message segment, or has segmentation
                                 allowed, but an invalid combination of options and values was specified.
                                 All of the following are true:
                                 v PMLOGO is not specified in the PMOPT field in MQPMO.
                                 v Either there are too few MQPMR records provided by MQPMO, or the
                                    PRGID field is not present in the MQPMR records.
                                     The exit returns this reason in the CXFB field of the MQCXP structure. If an
                                     exception report is requested, it is copied to the CXFB field of the MQMD
                                     associated with the report.
                                     The exit returns this reason in the CXFB field of the MQCXP structure. If an
                                     exception report is requested, it is copied to the CXFB field of the MQMD
                                     associated with the report.
                                     The exit returns this reason in the CXFB field of the MQCXP structure. If an
                                     exception report is requested, it is copied to the CXFB field of the MQMD
                                     associated with the report.
             This reason code occurs in the following environments: AIX, DOS client,
|            HP-UX, OS/390, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
             Corrective action: Check the cluster workload exit to ensure that it has
             been written correctly.
    RC2267
             (2267, X'8DB') Unable to load cluster workload exit.
             An MQCONN call was issued to connect to a queue manager, but the call
             failed because the cluster workload exit defined by the queue-manager’s
             ClusterWorkloadExit attribute could not be loaded.
             This reason code occurs in the following environments: AIX, DOS client,
|            HP-UX, OS/2, OS/400, Sun Solaris, Windows client, Windows NT.
             Corrective action: Ensure that the cluster workload exit has been installed
             in the correct location.
    RC2268
             (2268, X'8DC') Put calls inhibited for all queues in cluster.
             An MQOPEN call with the OOOUT and OOBNDO options in effect was
             issued for a cluster queue, but all of the instances of the queue in the
             cluster are currently put-inhibited, that is, all of the queue instances have
             the InhibitPut attribute set to QAPUTI. Because there are no queue
             instances available to receive messages, the MQOPEN call fails.
             Note: This reason code occurs only when both of the following are also
                   true:
                   v There is no local instance of the queue. (If there is a local instance,
                      the MQOPEN call succeeds, even if the local instance is
                      put-inhibited.)
                   v There is no cluster workload exit for the queue, or there is a
                      cluster workload exit but it did not choose a queue instance. (If
                      the cluster workload exit does choose a queue instance, the
                      MQOPEN call succeeds, even if that instance is put-inhibited.)
             If the OOBNDN option is specified on the MQOPEN call, the call can
             succeed even if all of the queues in the cluster are put-inhibited. However,
             a subsequent MQPUT call may fail if all of the queues are still
             put-inhibited at the time of the MQPUT call.
         Corrective action: Ensure that at least one of CNCCO and CNCCP is zero.
         Ensure that the field used points to accessible storage.
RC2279
         (2279, X'8E7') Channel stopped by user.
         This condition is detected when the channel has been stopped by an
         operator. The reason qualifier identifies the reasons for stopping.
         Corrective action: None. This reason code is only used to identify the
         corresponding event message.
RC2282
         (2282, X'8EA') Channel started.
         One of the following has occurred:
         v An operator has issued a Start Channel command.
         v An instance of a channel has been successfully established.
           This condition is detected when Initial Data negotiation is complete and
           resynchronization has been performed where necessary such that
           message transfer can proceed.
         Corrective action: None. This reason code is only used to identify the
         corresponding event message.
RC2283
         (2283, X'8EB') Channel stopped.
         This condition is detected when the channel has been stopped. The reason
         qualifier identifies the reasons for stopping.
         Corrective action: None. This reason code is only used to identify the
         corresponding event message.
RC2284
         (2284, X'8EC') Channel conversion error.
         This condition is detected when a channel is unable to do data conversion
         and the MQGET call to get a message from the transmission queue
         resulted in a data conversion error. The conversion reason code identifies
         the reason for the failure.
         Corrective action: None. This reason code is only used to identify the
         corresponding event message.
                                 Corrective action: Specify the index of a data item that does exist in the
                                 bag or namelist. Use the mqCountItems call to determine the number of
                                 data items with the specified selector that exist in the bag, or the
                                 nameCount method to determine the number of names in the namelist.
                        RC2307
                                 (2307, X'903') String parameter not valid.
                                 The String parameter is not valid. Either the parameter pointer is not
                                 valid, or it points to read-only storage. (It is not always possible to detect
                                 parameter pointers that are not valid; if not detected, unpredictable results
                                 occur.)
                                 Corrective action: Correct the parameter.
                        RC2308
                                 (2308, X'904') Encoding not supported.
                                 The MDENC field in the message descriptor MQMD contains a value that is
                                 not supported:
                                 v For the mqPutBag call, the field in error resides in the MsgDesc
                                   parameter of the call.
                                 v For the mqGetBag call, the field in error resides in:
                                   – The MsgDesc parameter of the call if the GMCONV option was
                                      specified.
                                   – The message descriptor of the message about to be retrieved if
                                      GMCONV was not specified.
                                 If the value of the MDENC field in the message is not valid, the message
                                 cannot be retrieved using the mqGetBag call:
                                 v If one of the GMBRW* options was specified, the message remains on
                                    the queue and can be retrieved using the MQGET call.
                                 v In other cases, the message has already been removed from the queue
                                    and discarded. If the message was retrieved within a unit of work, the
                                    unit of work can be backed out and the message retrieved using the
                                    MQGET call.
                        RC2309
                                 (2309, X'905') Selector not present in bag.
                                 The Selector parameter specifies a selector that does not exist in the bag.
                                 Corrective action: Specify a selector that does exist in the bag.
                        RC2310
                                 (2310, X'906') OutSelector parameter not valid.
                                 The OutSelector parameter is not valid. Either the parameter pointer is not
                                 valid, or it points to read-only storage. (It is not always possible to detect
                                 parameter pointers that are not valid; if not detected, unpredictable results
                                 occur.)
                                 Corrective action: Correct the parameter.
                        RC2311
                                 (2311, X'907') String truncated (too long for output buffer).
                                 If the value of the MDFMT field in the message is none of these values, the
                                 message cannot be retrieved using the mqGetBag call:
                                 v If one of the GMBRW* options was specified, the message remains on
                                   the queue and can be retrieved using the MQGET call.
                                 Note
                                The names of the MQI constants are listed in this chapter in the form in
                                which they appear in the RPG COPY file. The copy file is named CMQR.
                             This chapter specifies the values of all of the named constants that are used in the
                             MQI, with the exception of those used for C++. For the C++ return codes refer to
                             the MQSeries Using C++ book.
                             The constants are grouped according to the parameter or field to which they relate.
                             All of the names of the constants in a group begin with a common prefix of the
                             form “XX” that indicates the parameter or field to which the values relate. The
                             constants are ordered alphabetically by this prefix.
                             Notes:
                             1. For constants with numeric values, the values are shown in both decimal and
                                hexadecimal forms.
                             2. Hexadecimal values are represented using the notation X'hhhh', where each “h”
                                denotes a single hexadecimal digit.
                             3. Character values are shown delimited by single quotation marks; the quotation
                                marks are not part of the value.
                             4. Blanks in character values are represented by one or more occurrences of the
                                symbol “b”.
|                            5. If the value is shown as “(variable)”, it indicates that the value of the constant
|                               depends on the environment in which the application is running.
    List of constants
                             The following sections list all of the named constants mentioned in this book, and
                             show their values.
             BND* (Binding)
                   See the DefBind attribute described in “Chapter 37. Attributes for all queues” on
                   page 293.
|   BNDOPN                                                               0                  X'00000000'
|   BNDNOT                                                               1                  X'00000001'
|
             EN* (Encoding)
                        See the MDENC field described in “Chapter 10. MQMD - Message descriptor” on
                        page 83.
ENNAT                                                                   273               X'00000111'
             FB* (Feedback)
                   See the MDFB field described in “Chapter 10. MQMD - Message descriptor” on
                   page 83, and the DLREA field described in “Chapter 7. MQDLH - Dead-letter
                   header” on page 43; see also the RC* values.
    FBNONE                                                            0                  X'00000000'
    FBSFST                                                            1                  X'00000001'
    FBQUIT                                                          256                  X'00000100'
    FBEXP                                                           258                  X'00000102'
    FBCOA                                                           259                  X'00000103'
    FBCOD                                                           260                  X'00000104'
    FBABEG                                                          265                  X'00000109'
    FBTM                                                            266                  X'0000010A'
    FBATYP                                                          267                  X'0000010B'
    FBSBMX                                                          268                  X'0000010C'
    FBXQME                                                          271                  X'0000010F'
    FBPAN                                                           275                  X'00000113'
    FBNAN                                                           276                  X'00000114'
|   FBSBCX                                                          277                  X'00000115'
|   FBSBPS                                                          279                  X'00000117'
|   FBNARM                                                          280                  X'00000118'
    FBDLZ                                                           291                  X'00000123'
    FBDLN                                                           292                  X'00000124'
    FBDLTB                                                          293                  X'00000125'
    FBBUFO                                                          294                  X'00000126'
    FBLOB1                                                          295                  X'00000127'
    FBIIH                                                           296                  X'00000128'
    FBNAFI                                                          298                  X'0000012A'
    FBIERR                                                          300                  X'0000012C'
    FBIFST                                                          301                  X'0000012D'
    FBILST                                                          399                  X'0000018F'
    FBCINE                                                          401                  X'00000191'
    FBCNTA                                                          402                  X'00000192'
    FBCBRF                                                          403                  X'00000193'
    FBCCIE                                                          404                  X'00000194'
    FBCCSE                                                          405                  X'00000195'
    FBCENE                                                          406                  X'00000196'
    FBCIHE                                                          407                  X'00000197'
    FBCUWE                                                          408                  X'00000198'
                 FM* (Format)
                            See the MDFMT field described in “Chapter 10. MQMD - Message descriptor” on
                            page 83 and in other structures.
    FMNONE                                                    'bbbbbbbb'
    FMADMN                                                    'MQADMINb'
    FMCICS                                                    'MQCICSbb'
    FMCMD1                                                    'MQCMD1bb'
    FMCMD2                                                    'MQCMD2bb'
    FMDLH                                                     'MQDEADbb'
    FMDH                                                      'MQHDISTb'
    FMEVNT                                                    'MQEVENTb'
    FMIMS                                                     'MQIMSbbb'
    FMIMVS                                                    'MQIMSVSb'
    FMMDE                                                     'MQHMDEbb'
    FMPCF                                                     'MQPCFbbb'
    FMRMH                                                     'MQHREFbb'
|   FMRFH                                                     'MQHRFbbb'
    FMSTR                                                     'MQSTRbbb'
    FMTM                                                      'MQTRIGbb'
|   FMWIH                                                     'MQHWIHbb'
    FMXQH                                                     'MQXMITbb'
             PE* (Persistence)
                   See the MDPER field described in “Chapter 10. MQMD - Message descriptor” on
                   page 83, and the DefPersistence attribute described in “Chapter 37. Attributes for
                   all queues” on page 293.
    PENPER                                                              0                  X'00000000'
    PEPER                                                               1                  X'00000001'
             PL* (Platform)
                   See the Platform attribute described in “Chapter 43. Attributes for the queue
                   manager” on page 323.
    PLMVS                                                               1                  X'00000001'
|   PL390                                                               1                  X'00000001'
    PLOS2                                                               2                  X'00000002'
    PLAIX                                                               3                  X'00000003'
         PR* (Priority)
                See the MDPRI field described in “Chapter 10. MQMD - Message descriptor” on
                page 83.
PRQDEF                                                              -1                  X'FFFFFFFF'
             SEG* (Segmentation)
                    See the GMSEG field described in “Chapter 8. MQGMO - Get-message options” on
                    page 51.
    SEGIHB                                               'b'
    SEGALW                                               'A'
|                  SP* (Syncpoint)
                              See the SyncPoint attribute described in “Chapter 43. Attributes for the queue
                              manager” on page 323.
    SPNAVL                                                                         0                X'00000000'
    SPAVL                                                                          1                X'00000001'
             US* (Usage)
                    See the Usage attribute described in “Chapter 38. Attributes for local queues and
                    model queues” on page 299.
    USNORM                                                               0                  X'00000000'
    USTRAN                                                               1                  X'00000001'
    MQOPEN call
                             For the options of the MQOPEN call:
                             v At least one of the following must be specified:
                                   OOBRW
                                   OOINPQ
                                   OOINPX
                                   OOINPS
                                   OOINQ
                                   OOOUT
                                   OOSET
                             v Only one of the following is allowed:
                                   OOINPQ
                                   OOINPX
                                   OOINPS
|                            v Only one of the following is allowed:
|                                OOBNDO
|                                OOBNDN
|                                OOBNDQ
|                              Note: The options listed above are mutually exclusive. However, because the
|                                    value of OOBNDQ is zero, specifying it with either of the other two bind
|                                    options does not result in reason code RC2046. OOBNDQ is provided to
|                                    aid program documentation.
|                            v If OOSAVA is specified, one of the OOINP* options must also be specified.
                             v If one of the OOSET* or OOPAS* options is specified, OOOUT must also be
                               specified.
    MQPUT call
                             For the put-message options:
                             v The combination of PMSYP and PMNSYP is not allowed.
                             v Only one of the following is allowed:
                                  PMDEFC
                                  PMNOC
                                  PMPASA
                                  PMPASI
                                  PMSETA
                                  PMSETI
                             v PMALTU is not allowed (it is valid only on the MQPUT1 call).
    MQPUT1 call
                            For the put-message options, the rules are the same as for the MQPUT call, except
                            for the following:
                            v PMALTU is allowed.
|                           v PMLOGO is not allowed.
    MQGET call
                            For the get-message options:
                            v Only one of the following is allowed:
                                  GMNSYP
                                  GMSYP
                                  GMPSYP
                            v Only one of the following is allowed:
                                  GMBRWF
                                  GMBRWC
                                  GMBRWN
                                  GMMUC
                            v GMSYP is not allowed with any of the following:
                                  GMBRWF
                                  GMBRWC
                                  GMBRWN
                                  GMLK
                                  GMUNLK
                            v GMPSYP is not allowed with any of the following:
                                  GMBRWF
                                  GMBRWC
                                  GMBRWN
                                  GMCMPM
                                  GMUNLK
                            v If GMLK is specified, one of the following must also be specified:
                                  GMBRWF
                                  GMBRWC
                                  GMBRWN
                            v If GMUNLK is specified, only the following are allowed:
                                  GMNSYP
                                  GMNWT
    MQCLOSE call
                            For the options of the MQCLOSE call:
                            v The combination of CODEL and COPURG is not allowed.
                         The MDENC field is a 32-bit integer that is divided into four separate subfields; these
                         subfields identify:
                         v The encoding used for binary integers
                         v The encoding used for packed-decimal integers
                         v The encoding used for floating-point numbers
                         v Reserved bits
                         Each subfield is identified by a bit mask which has 1-bits in the positions
                         corresponding to the subfield, and 0-bits elsewhere. The bits are numbered such
                         that bit 0 is the most significant bit, and bit 31 the least significant bit. The
                         following masks are defined:
                         ENIMSK
                              Mask for binary-integer encoding.
                                   This subfield occupies bit positions 28 through 31 within the MDENC field.
                         ENDMSK
                              Mask for packed-decimal-integer encoding.
                                   This subfield occupies bit positions 24 through 27 within the MDENC field.
                         ENFMSK
                              Mask for floating-point encoding.
                                   This subfield occupies bit positions 20 through 23 within the MDENC field.
                         ENRMSK
                              Mask for reserved bits.
                                   This subfield occupies bit positions 0 through 19 within the MDENC field.
Binary-integer encoding
                         The following values are valid for the binary-integer encoding:
                         ENIUND
                              Undefined integer encoding.
                                   Binary integers are represented using an encoding that is undefined.
                         ENINOR
                              Normal integer encoding.
                                   Binary integers are represented in the conventional way:
                                   v The least significant byte in the number has the highest address of any
                                     of the bytes in the number; the most significant byte has the lowest
                                     address
                                   v The least significant bit in each byte is adjacent to the byte with the next
                                     higher address; the most significant bit in each byte is adjacent to the
                                     byte with the next lower address
                         ENIREV
                               Reversed integer encoding.
Packed-decimal-integer encoding
                             The following values are valid for the packed-decimal-integer encoding:
                             ENDUND
                                  Undefined packed-decimal encoding.
                                       Packed-decimal integers are represented using an encoding that is
                                       undefined.
                             ENDNOR
                                  Normal packed-decimal encoding.
                                       Packed-decimal integers are represented in the conventional way:
                                       v Each decimal digit in the printable form of the number is represented in
                                         packed decimal by a single hexadecimal digit in the range X'0' through
                                         X'9'. Each hexadecimal digit occupies four bits, and so each byte in the
                                         packed decimal number represents two decimal digits in the printable
                                         form of the number.
                                       v The least significant byte in the packed-decimal number is the byte
                                         which contains the least significant decimal digit. Within that byte, the
                                         most significant four bits contain the least significant decimal digit, and
                                         the least significant four bits contain the sign. The sign is either X'C'
                                         (positive), X'D' (negative), or X'F' (unsigned).
                                       v The least significant byte in the number has the highest address of any
                                         of the bytes in the number; the most significant byte has the lowest
                                         address.
                                       v The least significant bit in each byte is adjacent to the byte with the next
                                         higher address; the most significant bit in each byte is adjacent to the
                                         byte with the next lower address.
                             ENDREV
                                  Reversed packed-decimal encoding.
                                       Packed-decimal integers are represented in the same way as ENDNOR, but
                                       with the bytes arranged in reverse order. The bits within each byte are
                                       arranged in the same way as ENDNOR.
Floating-point encoding
                             The following values are valid for the floating-point encoding:
                             ENFUND
                                  Undefined floating-point encoding.
                                       Floating-point numbers are represented using an encoding that is
                                       undefined.
                             ENFNOR
                                  Normal IEEE float encoding.
                                       Floating-point numbers are represented using the standard IEEE2
                                       floating-point format, with the bytes arranged as follows:
                      Details of the IEEE float encoding may be found in IEEE Standard 754.
             ENFREV
                  Reversed IEEE float encoding.
                      Floating-point numbers are represented in the same way as ENFNOR, but
                      with the bytes arranged in reverse order. The bits within each byte are
                      arranged in the same way as ENFNOR.
             ENF390
                      System/390® architecture float encoding.
                      Floating-point numbers are represented using the standard System/390
                      floating-point format; this is also used by System/370®.
Constructing encodings
             To construct a value for the MDENC field in MQMD, the relevant constants that
             describe the required encodings should be added together. Be sure to combine only
             one of the ENI* encodings with one of the END* encodings and one of the ENF*
             encodings.
Analyzing encodings
             The MDENC field contains subfields; because of this, applications that need to
             examine the integer, packed decimal, or float encoding should use the technique
             described below.
       Using arithmetic
             The following steps should be performed using integer arithmetic:
             1. Select a value from the following table, according to the encoding required:
                  Encoding required
                          Value to use
                  Binary integer
                          1
                  Packed-decimal integer
                          16
                  Floating point
                          256
                         Each subfield is identified by a bit mask which has 1-bits in the positions
                         corresponding to the subfield, and 0-bits elsewhere. Note that the bits in a subfield
                         are not necessarily adjacent. The bits are numbered such that bit 0 is the most
                         significant bit, and bit 31 the least significant bit. The following masks are defined
                         to identify the subfields:
                         RORUM
                              Mask for unsupported report options that are rejected.
                                   This mask identifies the bit positions within the MDREP field where report
                                   options which are not supported by the local queue manager will cause the
                                   MQPUT or MQPUT1 call to fail with completion code CCFAIL and reason
                                   code RC2061.
                                   This subfield occupies bit positions 3, and 11 through 13.
                         ROAUM
                             Mask for unsupported report options that are accepted.
                                   This mask identifies the bit positions within the MDREP field where report
                                   options which are not supported by the local queue manager will
                                   nevertheless be accepted on the MQPUT or MQPUT1 calls. Completion
                                   code CCWARN with reason code RC2104 are returned in this case.
                                   This subfield occupies bit positions 0 through 2, 4 through 10, and 24
                                   through 31.
                                   The following report options are included in this subfield:
                                      ROCMTC
                                      RODLQ
                                      RODISC
                                      ROEXC
                                      ROEXCD
                                      ROEXCF
                                      ROEXP
                                      ROEXPD
                        If there are any options specified in the MDREP field which the queue manager does
                        not recognize, the queue manager checks each subfield in turn by using the bitwise
                        AND operation to combine the MDREP field with the mask for that subfield. If the
                        result of that operation is not zero, the completion code and reason codes
                        described above are returned.
                        The ability to specify and have accepted report options which are not recognized
                        by the local queue manager is useful when it is desired to send a message with a
                        report option which will be recognized and processed by a remote queue manager.
             Using arithmetic
                        The following steps should be performed using integer arithmetic:
               The following pseudocode illustrates this technique for exception report messages:
               A    =   MQRO_EXCEPTION
               B    =   Report/A
               C    =   B/8
               D    =   B - C*8
               E    =   D*A
               A similar method can be used to test for the ROPMI or ROPCI options; select as
               the value A whichever of these two constants is appropriate, and then proceed as
               described above, but replacing the value 8 in the steps above by the value 2.
Note: All subfields in MDMFL are reserved for use by the queue manager.
               Each subfield is identified by a bit mask which has 1-bits in the positions
               corresponding to the subfield, and 0-bits elsewhere. The bits are numbered such
                        If there are flags specified in the MDMFL field that the queue manager does not
                        recognize, the queue manager checks each subfield in turn by using the bitwise
                        AND operation to combine the MDMFL field with the mask for that subfield. If the
                        result of that operation is not zero, the completion code and reason codes
                        described above are returned.
                         The data-conversion exit is invoked as part of the processing of the MQGET call, in
                         order to convert the application message data to the representation required by the
                         receiving application. Conversion of the application message data is optional — it
                         requires the GMCONV option to be specified on the MQGET call.
Conversion processing
                         The queue manager performs the following actions if the GMCONV option is
                         specified on the MQGET call, and there is a message to be returned to the
                         application:
                         1. If one or more of the following is true, no conversion is necessary:
                            v The MDCSI and MDENC values in the control information in the message are
                               identical to those in the MSGDSC parameter.
                            v The length of the application message data is zero.
                             v The length of the BUFFER parameter is zero.
                             In these cases the message is returned without conversion to the application
                             issuing the MQGET call; the MDCSI and MDENC values in the MSGDSC parameter
                             are set to the values in the control information in the message, and the call
                             completes with one of the following combinations of completion code and
                             reason code:
                             Completion code
                                   Reason code
                             CCOK
                                   RCNONE
                             CCWARN
                                   RC2079
                             CCWARN
                                   RC2080
                               If no error occurs, the output from the data-conversion service or from the
                               user-written exit is the converted message, plus the completion code and
                               reason code to be returned to the application issuing the MQGET call.
                            6. If the conversion is successful, the queue manager returns the converted
                               message to the application. In this case, the completion code and reason code
                               returned by the MQGET call will usually be one of the following combinations:
                                Completion code
                                      Reason code
                                CCOK
                                      RCNONE
                                CCWARN
                                      RC2079
                                If the conversion fails (for whatever reason), the queue manager returns the
                                unconverted message to the application, with the MDCSI and MDENC fields in the
                                MSGDSC parameter set to the values in the control information in the message,
                                and with completion code CCWARN. See below for possible reason codes.
    Processing conventions
                            When converting a built-in format, the queue manager follows the processing
                            conventions described below. It is recommended that user-written exits should also
                            follow these conventions, although this is not enforced by the queue manager. The
                            built-in formats converted by the queue manager are:
                                FMADMN
|       The Unicode character set UCS-2 is an example of a character set that does not
|       have SBCS characters for the characters that are valid in queue names.
    12. If the message data for a built-in format is truncated, fields within the
        message which contain lengths of strings, or counts of elements or structures,
        are not adjusted to reflect the length of the data actually returned to the
        application; the values returned for such fields within the message data are
        the values applicable to the message prior to truncation.
        When processing messages such as a truncated FMADMN message, care must
        be taken to ensure that the application does not attempt to access data beyond
        the end of the data returned.
    13. If the format name is FMDLH, the message data begins with an MQDLH
        structure, and this may be followed by zero or more bytes of application
        message data. The format, character set, and encoding of the application
        message data are defined by the DLFMT, DLCSI, and DLENC fields in the MQDLH
        structure at the start of the message. Since the MQDLH structure and
        application message data can have different character sets and encodings, it is
        possible for one, other, or both of the MQDLH structure and application
        message data to require conversion.
        The queue manager converts the MQDLH structure first, as necessary. If
        conversion is successful, or the MQDLH structure does not require conversion,
        the queue manager checks the DLCSI and DLENC fields in the MQDLH structure
             Because of these possibilities, the data-conversion exit should not use the format
             name to deduce the length of data passed to it; instead the exit should check the
             length of data provided, and be prepared to convert less data than the length
             implied by the format name. If the data can be converted successfully, completion
             code CCOK and reason code RCNONE should be returned by the exit. The length
             of the message data to be converted is passed to the exit as the INLEN parameter.
                        The MQDXP structure is a parameter that is passed to the data-conversion exit. See
                        the description of the MQCONVX call for details of the data conversion exit.
                        Only the DXLEN, DXCC, DXREA and DXRES fields in MQDXP may be changed by the
                        exit; changes to other fields are ignored. However, the DXLEN field cannot be
                        changed if the message being converted is a segment that contains only part of a
                        logical message.
                        When control returns to the queue manager from the exit, the queue manager
                        checks the values returned in MQDXP. If the values returned are not valid, the
                        queue manager continues processing as though the exit had returned XRFAIL in
                        DXRES; however, the queue manager ignores the values of the DXCC and DXREA fields
                        returned by the exit in this case, and uses instead the values those fields had on
                        input to the exit. The following values in MQDXP cause this processing to occur:
                        v DXRES field not XROK and not XRFAIL
                        v DXCC field not CCOK and not CCWARN
                        v DXLEN field less than zero, or DXLEN field changed when the message being
                           converted is a segment that contains only part of a logical message.
             Fields
                        DXSID (4-byte character string)
                            Structure identifier.
    The following constant specifies the version number of the current version:
    DXVERC
         Current version of data-conversion exit parameter structure.
    Note: When a new version of this structure is introduced, the layout of the
          existing part is not changed. The exit should therefore check that the
          DXVER field is equal to or greater than the lowest version which contains
          the fields that the exit needs to use.
    This is a copy of the GMOPT field of the MQGMO structure specified by the
    application issuing the MQGET call. The exit may need to examine these to
    ascertain whether the GMATM option was specified.
    This is the numeric encoding required by the application issuing the MQGET
    call; see the MDENC field in the MQMD structure for more details.
    If the conversion is successful, the exit should copy this to the MDENC field in
    the message descriptor.
    This is the coded character-set identifier of the character set required by the
    application issuing the MQGET call; see the MDCSI field in the MQMD structure
    for more details. If the application specifies the special value CSQM on the
    MQGET call, the queue manager changes this to the actual character-set
    identifier of the character set used by the queue manager, before invoking the
    exit.
    If the conversion is successful, the exit should copy this to the MDCSI field in
    the message descriptor.
                            Truncation is indicated by the DXREA field having the value RC2079 on input to
                            the exit.
                            Most conversions will not need to change this length, but an exit can do so if
                            necessary; the value set by the exit is returned to the application in the DATLEN
                            parameter of the MQGET call. However, this length cannot be changed if the
                            message being converted is a segment that contains only part of a logical
                            message. This is because changing the length would cause the offsets of later
                            segments in the logical message to be incorrect.
                            Note that, if the exit wants to change the length of the data, be aware that the
                            queue manager has already decided whether the message data will fit into the
                            application’s buffer, based on the length of the unconverted data. This decision
                            determines whether the message is removed from the queue (or the browse
                            cursor moved, for a browse request), and is not affected by any change to the
                            data length caused by the conversion. For this reason it is recommended that
                            conversion exits do not cause a change in the length of the application message
                            data.
                            The exit is not invoked if the message contains no application message data;
                            hence DXLEN is always greater then zero.
                            When the exit is invoked, this contains the completion code that will be
                            returned to the application that issued the MQGET call, if the exit chooses to
                            do nothing. It is always CCWARN, because either the message was truncated,
                            or the message requires conversion and this has not yet been done.
                            On output from the exit, this field contains the completion code to be returned
                            to the application in the CMPCOD parameter of the MQGET call; only CCOK and
                            CCWARN are valid. See the description of the DXREA field for recommendations
                            on how the exit should set this field on output.
                            When the exit is invoked, this contains the reason code that will be returned to
                            the application that issued the MQGET call, if the exit chooses to do nothing.
                            Among possible values are RC2079, indicating that the message was truncated
    On output from the exit, this field contains the reason to be returned to the
    application in the REASON parameter of the MQGET call; the following is
    recommended:
    v If DXREA had the value RC2079 on input to the exit, the DXREA and DXCC fields
       should not be altered, irrespective of whether the conversion succeeds or
       fails.
       (If the DXCC field is not CCOK, the application which retrieves the message
       can identify a conversion failure by comparing the returned MDENC and MDCSI
       values in the message descriptor with the values requested; in contrast, the
       application cannot distinguish a truncated message from a message that just
       fitted the buffer. For this reason, RC2079 should be returned in preference to
       any of the reasons that indicate conversion failure.)
    v If DXREA had any other value on input to the exit:
      – If the conversion succeeds, DXCC should be set to CCOK and DXREA set to
        RCNONE.
      – If the conversion fails, or the message expands and has to be truncated to
        fit in the buffer, DXCC should be set to CCWARN (or left unchanged), and
        DXREA set to one of the values listed below, to indicate the nature of the
        failure.
        Note that, if the message after conversion is too big for the buffer, it
        should be truncated only if the application that issued the MQGET call
        specified the GMATM option:
         - If it did specify that option, reason RC2079 should be returned.
         - If it did not specify that option, the message should be returned
           unconverted, with reason code RC2120.
    The reason codes listed below are recommended for use by the exit to indicate
    the reason that conversion failed, but the exit can return other values from the
|   set of RC* codes if deemed appropriate. In addition, the range of values
|   RC0900 through RC0999 are allocated for use by the exit to indicate conditions
|   that the exit wishes to communicate to the application issuing the MQGET call.
    Note: If the message cannot be converted successfully, the exit must return
          XRFAIL in the DXRES field, in order to cause the queue manager to
          return the unconverted message. This is true regardless of the reason
          code returned in the DXREA field.
|   RC0900
|           (900, X'384') Lowest value for an application-defined reason code
|           returned by a data-conversion exit.
|   RC0999
|           (999, X'3E7') Highest value for application-defined reason code
|           returned by a data-conversion exit.
    RC2120
            (2120, X'848') Converted data too big for buffer.
    RC2119
            (2119, X'847') Message data not converted.
    RC2111
            (2111, X'83F') Source coded character set identifier not valid.
    RC2113
            (2113, X'841') Packed-decimal encoding in message not recognized.
                            This is set by the exit to indicate the success or otherwise of the conversion. It
                            must be one of the following:
                            XROK Conversion was successful.
                                     If the exit specifies this value, the queue manager returns the following
                                     to the application which issued the MQGET call:
                                     v The value of the DXCC field on output from the exit
                                     v The value of the DXREA field on output from the exit
                                     v The value of the DXLEN field on output from the exit
                                     v The contents of the exit’s output buffer OUTBUF; the number of bytes
                                       returned is the lesser of the exit’s OUTLEN parameter, and the value of
                                       the DXLEN field on output from the exit
                                     v The value of the MDENC field in the exit’s message descriptor
                                       parameter on output from the exit
                                     v The value of the MDCSI field in the exit’s message descriptor
                                       parameter on output from the exit
                            XRFAIL
                                  Conversion was unsuccessful.
                                     If the exit specifies this value, the queue manager returns the following
                                     to the application which issued the MQGET call:
                                     v The value of the DXCC field on output from the exit
                                     v The value of the DXREA field on output from the exit
                                     v The value of the DXLEN field on input to the exit
                                     v The contents of the exit’s input buffer INBUF; the number of bytes
                                       returned is given by the INLEN parameter
                 This is a connection handle which can be used on the MQXCNVC call. This
                 handle is not necessarily the same as the handle specified by the application
                 which issued the MQGET call.
             This call is part of the MQSeries Data Conversion Interface (DCI), which is one of
             the MQSeries framework interfaces. Note: this call can be used only from a
             data-conversion exit.
       Syntax
             MQXCNVC (HCONN, OPTS, SRCCSI, SRCLEN, SRCBUF, TGTCSI, TGTLEN,
                  TGTBUF, DATLEN, CMPCOD, REASON)
       Parameters
             HCONN (10-digit signed integer) – input
                 Connection handle.
                                Zero or more of the options described below can be specified. If more than one
                                is required, the values can be added together (do not add the same constant
                                more than once).
                                         If DCCDEF is not specified, the queue manager uses only the specified
                                         character sets to convert the string, and the call fails if one or both of
                                         the character sets is not supported.
|                               Padding option: The following option allows the queue manager to pad the
                                converted string with blanks or discard insignificant trailing characters, in
|                               order to make the converted string fit the target buffer:
|                               DCCFIL
|                                     Fill target buffer.
|                                        This option requests that conversion take place in such a way that the
|                                        target buffer is filled completely:
|                                        v If the string contracts when it is converted, trailing blanks are added
|                                          in order to fill the target buffer.
|                                        v If the string expands when it is converted, trailing characters that are
|                                          not significant are discarded to make the converted string fit the
|                                          target buffer. If this can be done successfully, the call completes with
|                                          CCOK and reason code RCNONE.
|                                          If there are too few insignificant trailing characters, as much of the
|                                          string as will fit is placed in the target buffer, and the call completes
|                                          with CCWARN and reason code RC2120.
|                                          Insignificant characters are:
|                                          – Trailing blanks
|                                          – Characters following the first null character in the string (but
|                                              excluding the first null character itself)
|   Encoding options: The options described below can be used to specify the
    integer encodings of the source and target strings. The relevant encoding is
    used only when the corresponding character set identifier indicates that the
    representation of the character set in main storage is dependent on the
    encoding used for binary integers. This affects only certain multibyte character
    sets (for example, UCS-2 character sets).
    Only one of the DCCS* values should be specified, combined with one of the
    DCCT* values:
    DCCSNA
         Source encoding is the default for the environment and programming
         language.
    DCCSNO
         Source encoding is normal.
    DCCSRE
         Source encoding is reversed.
    DCCSUN
         Source encoding is undefined.
    DCCTNA
         Target encoding is the default for the environment and programming
         language.
    DCCTNO
         Target encoding is normal.
    DCCTRE
         Target encoding is reversed.
                            The encoding values defined above can be added directly to the OPTS field.
                            However, if the source or target encoding is obtained from the MDENC field in
                            the MQMD or other structure, the following processing must be done:
                            1. The integer encoding must be extracted from the MDENC field by eliminating
                                the float and packed-decimal encodings; see “Analyzing encodings” on
                                page 455 for details of how to do this.
                            2. The integer encoding resulting from step 1 must be multiplied by the
                                appropriate factor before being added to the OPTS field. These factors are:
                                DCCSFA
                                     Factor for source encoding
                                DCCTFA
                                     Factor for target encoding
                            If not specified, the encoding options default to undefined (DCC*UN). In most
                            cases, this does not affect the successful completion of the MQXCNVC call.
                            However, if the corresponding character set is a multibyte character set whose
                            representation is dependent on the encoding (for example, a UCS-2 character
                            set), the call fails with reason code RC2112 or RC2116 as appropriate.
                            This is the coded character set identifier of the input string in SRCBUF.
                        SRCLEN (10-digit signed integer) – input
                            Length of string before conversion.
                            This is the length in bytes of the input string in SRCBUF; it must be zero or
                            greater.
                        SRCBUF (1-byte character string×SRCLEN) – input
                            String to be converted.
                            This is the buffer containing the string to be converted from one character set
                            to another.
                        TGTCSI (10-digit signed integer) – input
                            Coded character set identifier of string after conversion.
                            This is the coded character set identifier of the character set to which SRCBUF is
                            to be converted.
                        TGTLEN (10-digit signed integer) – input
                            Length of output buffer.
   This is the string after it has been converted to the character set defined by
   TGTCSI. The converted string can be shorter or longer than the unconverted
   string. The DATLEN parameter indicates the number of valid bytes returned.
DATLEN (10-digit signed integer) – output
    Length of output string.
   This is the length of the string returned in the output buffer TGTBUF. The
   converted string can be shorter or longer than the unconverted string.
CMPCOD (10-digit signed integer) – output
    Completion code.
   If CMPCOD is CCOK:
   RCNONE
           (0, X'000') No reason to report.
   If CMPCOD is CCWARN:
   RC2120
           (2120, X'848') Converted data too big for buffer.
   If CMPCOD is CCFAIL:
   RC2010
           (2010, X'7DA') Data length parameter not valid.
   RC2150
           (2150, X'866') DBCS string not valid.
   RC2018
           (2018, X'7E2') Connection handle not valid.
   RC2046
           (2046, X'7FE') Options not valid or not consistent.
   RC2102
           (2102, X'836') Insufficient system resources available.
   RC2145
           (2145, X'861') Source buffer parameter not valid.
   RC2111
           (2111, X'83F') Source coded character set identifier not valid.
   RC2112
           (2112, X'840') Source integer encoding not recognized.
   RC2143
           (2143, X'85F') Source length parameter not valid.
                            For more information on these reason codes, see “Appendix A. Return codes”
                            on page 357.
RPG invocation
                              C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              C                     CALLP     MQXCNVC(HCONN : OPTS : SRCCSI :
                              C                                       SRCLEN : SRCBUF : TGTCSI :
                              C                                       TGTLEN : TGTBUF : DATLEN :
                              C                                       CMPCOD : REASON)
                        This definition is part of the MQSeries Data Conversion Interface (DCI), which is
                        one of the MQSeries framework interfaces.
Parameters
     MQDXP (MQDXP) – input/output
         Data-conversion exit parameter block.
         This structure contains information relating to the invocation of the exit. The
         exit sets information in this structure to indicate the outcome of the conversion.
         See “MQDXP – Data-conversion exit parameter” on page 468 for details of the
         fields in this structure.
     MQMD (MQMD) – input/output
         Message descriptor.
         On input to the exit, this is the message descriptor that would be returned to
         the application if no conversion were performed. It therefore contains the
         MDFMT, MDENC, and MDCSI of the unconverted message contained in INBUF.
         Note: The MQMD parameter passed to the exit is always the most-recent version
               of MQMD supported by the queue manager which invokes the exit. If
               the exit is intended to be portable between different environments, the
               exit should check the MDVER field in MQMD to verify that the fields that the
               exit needs to access are present in the structure.
         On output, the exit should change the MDENC and MDCSI fields to the values
         requested by the application, if conversion was successful; these changes will
         be reflected back to the application. Any other changes that the exit makes to
         the structure are ignored; they are not reflected back to the application.
     INLEN (10-digit signed integer) – input
         Length in bytes of INBUF.
         This is the length of the input buffer INBUF, and specifies the number of bytes
         to be processed by the exit. INLEN is the lesser of the length of the message
         data prior to conversion, and the length of the buffer provided by the
         application on the MQGET call.
         This contains the message data prior to conversion. If the exit is unable to
         convert the data, the queue manager returns the contents of this buffer to the
         application after the exit has completed.
         Note: The exit should not alter INBUF; if this parameter is altered, the results
               are undefined.
     OUTLEN (10-digit signed integer) – input
         Length in bytes of OUTBUF.
                            On output from the exit, if the conversion was successful (as indicated by the
                            value XROK in the DXRES field of the MQDXP parameter), OUTBUF contains the
                            message data to be delivered to the application, in the requested
                            representation. If the conversion was unsuccessful, any changes that the exit
                            has made to this buffer are ignored.
             Usage notes
                         1. A data-conversion exit is a user-written exit which receives control during the
                            processing of an MQGET call. The function performed by the data-conversion
                            exit is defined by the provider of the exit; however, the exit must conform to
                            the rules described here, and in the associated parameter structure MQDXP.
                            The programming languages that can be used for a data-conversion exit are
                            determined by the environment.
                         2. The exit is invoked only if all of the following are true:
                            v The GMCONV option is specified on the MQGET call
                            v The MDFMT field in the message descriptor is not FMNONE
                            v The message is not already in the required representation; that is, one or
                              both of the message’s MDCSI and MDENC is different from the value specified
                              by the application in the message descriptor supplied on the MQGET call
                            v The queue manager has not already done the conversion successfully
                            v The length of the application’s buffer is greater than zero
                            v The length of the message data is greater than zero
                            v The reason code so far during the MQGET operation is RCNONE or
                              RC2079
                         3. When an exit is being written, consideration should be given to coding the
                            exit in a way that will allow it to convert messages that have been truncated.
                            Truncated messages can arise in the following ways:
                            v The receiving application provides a buffer that is smaller than the message,
                              but specifies the GMATM option on the MQGET call.
                              In this case, the DXREA field in the MQDXP parameter on input to the exit will
                              have the value RC2079.
                            v The sender of the message truncated it before sending it. This can happen
                              with report messages, for example (see “Conversion of report messages” on
                              page 467 for more details).
                              In this case, the DXREA field in the MQDXP parameter on input to the exit will
                              have the value RCNONE (if the receiving application provided a buffer that
                              was big enough for the message).
                             Thus the value of the DXREA field on input to the exit cannot always be used to
                             decide whether the message has been truncated.
     If the exit has not been written to convert truncated messages, and INLEN is
     less than the value expected, the exit should return XRFAIL in the DXRES field
     of the MQDXP parameter, with the DXCC and DXREA fields set to CCWARN and
     RC2110 respectively.
     If the exit has been written to convert truncated messages, the exit should
     convert as much of the data as possible (see next usage note), taking care not
     to attempt to examine or convert data beyond the end of INBUF. If the
     conversion completes successfully, the exit should leave the DXREA field in the
     MQDXP parameter unchanged. This has the effect of returning RC2079 if the
     message was truncated by the receiver’s queue manager, and RCNONE if the
     message was truncated by the sender of the message.
RPG invocation
                              C*..1....:....2....:....3....:....4....:....5....:....6....:....7..
                              C                     CALLP     exitname(MQDXP : MQMD : INLEN :
                              C                                        INBUF : OUTLEN : OUTBUF)
                         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.
                        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:
             Java and all Java-based trademarks and logos are trademarks or registered
             trademarks of Sun Microsystems, Inc. in the United States and/or other countries.
             Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
             Microsoft Corporation in the United States and/or other countries.
call back. In MQSeries, a requester message channel           client connection channel type. The type of MQI
initiates a transfer from a sender channel by first calling   channel definition associated with an MQSeries client.
the sender, then closing down and awaiting a call back.       See also server connection channel type.
CCF. Channel control function.                                cluster. A network of queue managers that are
                                                              logically associated in some way.
CCSID. Coded character set identifier.
                                                              coded character set identifier (CCSID). The name of a
CDF. Channel definition file.                                 coded set of characters and their code point
                                                              assignments.
channel. See message channel.
                                                              command. In MQSeries, an administration instruction
channel control function (CCF). In MQSeries, a                that can be carried out by the queue manager.
program to move messages from a transmission queue
to a communication link, and from a communication             command prefix (CPF). In MQSeries for OS/390, a
link to a local queue, together with an operator panel        character string that identifies the queue manager to
interface to allow the setup and control of channels.         which MQSeries for OS/390 commands are directed,
                                                              and from which MQSeries for OS/390 operator
channel definition file (CDF). In MQSeries, a file            messages are received.
containing communication channel definitions that
associate transmission queues with communication              command processor. The MQSeries component that
links.                                                        processes commands.
connect. To provide a queue manager connection              default object. A definition of an object (for example,
handle, which an application uses on subsequent MQI         a queue) with all attributes defined. If a user defines an
calls. The connection is made either by the MQCONN          object but does not specify all possible attributes for
call, or automatically by the MQOPEN call.                  that object, the queue manager uses default attributes
                                                            in place of any that were not specified.
connection handle. The identifier or token by which a
program accesses the queue manager to which it is           deferred connection. A pending event that is activated
connected.                                                  when a CICS subsystem tries to connect to MQSeries
                                                            for OS/390 before MQSeries for OS/390 has been
context. Information about the origin of a message.         started.
context security. In MQSeries, a method of allowing         distributed application. In message queuing, a set of
security to be handled such that messages are obliged       application programs that can each be connected to a
to carry details of their origins in the message            different queue manager, but that collectively constitute
descriptor.                                                 a single application.
F                                                          H
FFST. First Failure Support Technology.                    handle. See connection handle and object handle.
message channel. In distributed message queuing, a        MQSeries. A family of IBM licensed programs that
mechanism for moving messages from one queue              provides message queuing services.
manager to another. A message channel comprises two
message channel agents (a sender at one end and a         MQSeries Administration Interface (MQAI). A
receiver at the other end) and a communication link.      programming interface to MQSeries.
Contrast with MQI channel.
                                                          MQSeries client. Part of an MQSeries product that
message channel agent (MCA). A program that               can be installed on a system without installing the full
transmits prepared messages from a transmission           queue manager. The MQSeries client accepts MQI calls
queue to a communication link, or from a                  from applications and communicates with a queue
communication link to a destination queue. See also       manager on a server system.
message queue interface.
                                                          MQSeries commands (MQSC). Human readable
message channel interface (MCI). The MQSeries             commands, uniform across all platforms, that are used
interface to which customer- or vendor-written            to manipulate MQSeries objects. Contrast with
programs that transmit messages between an MQSeries       programmable command format (PCF).
queue manager and another messaging system must
conform. A part of the MQSeries Framework.
                                                          N
message descriptor. Control information describing
the message format and presentation that is carried as    namelist. An MQSeries object that contains a list of
part of an MQSeries message. The format of the            names, for example, queue names.
message descriptor is defined by the MQMD structure.
                                                          name service. In MQSeries on UNIX systems,
message priority. In MQSeries, an attribute of a          MQSeries for OS/2 Warp, and MQSeries for Windows
message that can affect the order in which messages on    NT, the facility that determines which queue manager
a queue are retrieved, and whether a trigger event is     owns a specified queue.
generated.
                                                          name service interface (NSI). The MQSeries interface
message queue. Synonym for queue.                         to which customer- or vendor-written programs that
                                                          resolve queue-name ownership must conform. A part of
message queue interface (MQI). The programming            the MQSeries Framework.
interface provided by the MQSeries queue managers.
This programming interface allows application             name transformation. In MQSeries on UNIX systems,
programs to access message queuing services.              MQSeries for OS/2 Warp, and MQSeries for Windows
    nonpersistent message. A message that does not              PCF. Programmable command format.
    survive a restart of the queue manager. Contrast with
                                                                PCF command. See programmable command format.
    persistent message.
                                                                pending event. An unscheduled event that occurs as a
    NSI. Name service interface.
                                                                result of a connect request from a CICS adapter.
    NTFS. New Technology File System.
                                                                percolation. In error recovery, the passing along a
    null character. The character that is represented by        preestablished path of control from a recovery routine
    X'00'.                                                      to a higher-level recovery routine.
    OAM. Object authority manager.                              performance trace. An MQSeries trace option where
                                                                the trace data is to be used for performance analysis
    object. In MQSeries, an object is a queue manager, a        and tuning.
    queue, a process definition, a channel, a namelist, or a
    storage class (OS/390 only).                                permanent dynamic queue. A dynamic queue that is
                                                                deleted when it is closed only if deletion is explicitly
|   object authority manager (OAM). In MQSeries on              requested. Permanent dynamic queues are recovered if
|   UNIX systems, MQSeries for AS/400, and MQSeries for         the queue manager fails, so they can contain persistent
|   Windows NT, the default authorization service for           messages. Contrast with temporary dynamic queue.
|   command and object management. The OAM can be
|   replaced by, or run in combination with, a                  persistent message. A message that survives a restart
|   customer-supplied security service.                         of the queue manager. Contrast with nonpersistent
                                                                message.
    object descriptor. A data structure that identifies a
    particular MQSeries object. Included in the descriptor      ping. In distributed queuing, a diagnostic aid that
    are the name of the object and the object type.             uses the exchange of a test message to confirm that a
                                                                message channel or a TCP/IP connection is
    object handle. The identifier or token by which a           functioning.
    program accesses the MQSeries object with which it is
    working.                                                    platform. In MQSeries, the operating system under
                                                                which a queue manager is running.
    off-loading. In MQSeries for OS/390, an automatic
    process whereby a queue manager’s active log is             point of recovery. In MQSeries for OS/390, the term
    transferred to its archive log.                             used to describe a set of backup copies of MQSeries for
                                                                OS/390 page sets and the corresponding log data sets
    OPM. Original Program Model.                                required to recover these page sets. These backup
                                                                copies provide a potential restart point in the event of
    Original Program Model (OPM). The AS/400                    page set loss (for example, page set I/O error).
    Original Program Model. This is no longer supported
    on MQSeries. It is replaced by the Integrated Language      preemptive shutdown. In MQSeries, a shutdown of a
    Environment (ILE).                                          queue manager that does not wait for connected
                                                                applications to disconnect, nor for current MQI calls to
    OTMA. Open Transaction Manager Access.                      complete. Contrast with immediate shutdown and
                                                                quiesced shutdown.
    output log-buffer. In MQSeries for OS/390, a buffer
    that holds recovery log records before they are written     principal. In MQSeries on UNIX systems, MQSeries
    to the archive log.                                         for OS/2 Warp, and MQSeries for Windows NT, a term
                                                                used for a user identifier. Used by the object authority
    output parameter. A parameter of an MQI call in             manager for checking authorizations to system
    which the queue manager returns information when            resources.
    the call completes or fails.
rules table. A control file containing one or more rules   session ID. In MQSeries for OS/390, the CICS-unique
that the dead-letter queue handler applies to messages     identifier that defines the communication link to be
on the DLQ.
subsystem. In OS/390, a group of modules that             target library high-level qualifier (thlqual).
provides function that is dependent on OS/390. For        High-level qualifier for OS/390 target data set names.
example, MQSeries for OS/390 is an OS/390
subsystem.                                                task control block (TCB). An OS/390 control block
                                                          used to communicate information about tasks within an
supervisor call (SVC). An OS/390 instruction that         address space that are connected to an OS/390
interrupts a running program and passes control to the    subsystem such as MQSeries for OS/390 or CICS.
supervisor so that it can perform the specific service
indicated by the instruction.                             task switching. The overlapping of I/O operations
                                                          and processing between several tasks. In MQSeries for
SVC. Supervisor call.                                     OS/390, the task switcher optimizes performance by
                                                          allowing some MQI calls to be executed under subtasks
switch profile. In MQSeries for OS/390, a RACF            rather than under the main CICS TCB.
profile used when MQSeries starts up or when a
refresh security command is issued. Each switch profile   TCB. Task control block.
that MQSeries detects turns off checking for the
specified resource.                                       temporary dynamic queue. A dynamic queue that is
                                                          deleted when it is closed. Temporary dynamic queues
symptom string. Diagnostic information displayed in       are not recovered if the queue manager fails, so they
a structured format designed for searching the IBM        can contain nonpersistent messages only. Contrast with
software support database.                                permanent dynamic queue.
                                                                                           Bibliography   501
               MQSeries LotusScript Extension,           v   MQSeries   for HP-UX V5.1
               SC34-5404                                 v   MQSeries   for OS/2 Warp V5.1
                                                         v   MQSeries   for Sun Solaris V5.1
                                                         v   MQSeries   for Windows NT V5.1
    Softcopy books                                       v   MQSeries   link for R/3 V1.2
    Most of the MQSeries books are supplied in both
    hardcopy and softcopy formats.                       PDF versions of all current MQSeries books are
                                                         also available from the MQSeries product family
    BookManager format                                   Web site at:
                                                             http://www.ibm.com/software/ts/mqseries/
    The MQSeries library is supplied in IBM
    BookManager format on a variety of online
    library collection kits, including the Transaction   PostScript format
    Processing and Data collection kit, SK2T-0730. You   The MQSeries library is provided in PostScript
    can view the softcopy books in IBM BookManager       (.PS) format with many MQSeries Version 2
    format using the following IBM licensed              products. Books in PostScript format can be
    programs:                                            printed on a PostScript printer or viewed with a
        BookManager READ/2                               suitable viewer.
        BookManager READ/6000
        BookManager READ/DOS                             Windows Help format
        BookManager READ/MVS
                                                         The MQSeries for Windows User’s Guide is
        BookManager READ/VM
                                                         provided in Windows Help format with MQSeries
        BookManager READ for Windows
                                                         for Windows Version 2.0 and MQSeries for
                                                         Windows Version 2.1.
    HTML format
    Relevant MQSeries documentation is provided in
    HTML format with these MQSeries products:
                                                         MQSeries information available
    v MQSeries for AIX V5.1                              on the Internet
|   v MQSeries for AS/400 V5.1
                                                         The MQSeries product family Web site is at:
    v MQSeries for HP-UX V5.1
    v MQSeries for OS/2 Warp V5.1                             http://www.ibm.com/software/ts/mqseries/
    v MQSeries for Sun Solaris V5.1
    v MQSeries for Windows NT V5.1 (compiled             By following links from this Web site you can:
      HTML)                                              v Obtain latest information about the MQSeries
    v MQSeries link for R/3 V1.2                           product family.
    The MQSeries books are also available in HTML        v Access the MQSeries books in HTML and PDF
    format from the MQSeries product family Web            formats.
    site at:                                             v Download MQSeries SupportPacs.
     http://www.ibm.com/software/ts/mqseries/
                                                         Related publications
    Portable Document Format (PDF)                            AS/400 ILE RPG/400 Programmer’s Guide,
    PDF files can be viewed and printed using the             SC09-1525
    Adobe Acrobat Reader.                                     AS/400 ILE RPG/400 Reference, SC09-1526
                                                                                                    Index   505
IISEC field 80                          MEFLG field 134                         MS* values 305
IISID field 78                          MEFMT field 134                         MsgDeliverySequence attribute   305
IITID field 79                          MEGID field 134                         MSGDSC parameter
IITST field 80                          MELEN field 134                           MQGET call 231
IIVER field 78                          MEMFL field 135                           MQPUT call 265
INBUF parameter 479                     MEOFF field 135                           MQPUT1 call 275
InhibitEvent attribute 329              MEOLN field 135                         MT* values 95
InhibitGet attribute 295                MESEQ field 135                         MTK* values 73
InhibitPut attribute 296                MESID field 133
InitiationQName attribute 304           message descriptor extension
INLEN parameter 479                      structure 131                          N
INTATR parameter                        message descriptor structure 83         NameCount attribute 317
    MQINQ call 246                      message order 236, 270, 279             namelist attributes 317
    MQSET call 284                      MEVER field 133                         NamelistDesc attribute 317
ISS* values 80                          MF* values 124                          NamelistName attribute 318
ITI* values 80                          MI* values 111                          Names attribute 318
ITS* values 80                          MO* values 71                           NC* values 317
                                        MQBACK call 203                         notational conventions – RPG
                                        MQBEGIN call 207                         programming language 10
L                                       MQBO structure 15
LN* values 421                          MQBYTE 3
LocalEvent attribute   329              MQBYTEn 4
                                        MQCHAR 4
                                                                                O
LT* values 22                                                                   OBJDSC parameter
                                        MQCHARn 4
                                                                                   MQOPEN call 251
                                        MQCIH structure 17
                                                                                   MQPUT1 call 275
M                                       MQCLOSE call 211
                                        MQCMIT call 217
                                                                                object descriptor structure 137
MaxHandles attribute 329                                                        object record structure 147
                                        MQCNO structure 31
MaxMsgLength attribute                                                          OD* values 138
                                        MQCONN call 221
  local queue 304                                                               ODASI field 143
                                        MQCONNX call 227
  queue manager 330                                                             ODAU field 140
                                        MQCONVX call 478
MaxPriority attribute 330                                                       ODDN field 140
                                        MQDH structure 37
MaxQDepth attribute 304                                                         ODIDC field 141
                                        MQDISC call 229
MaxUncommittedMsgs attribute    330                                             ODKDC field 141
                                        MQDLH structure 43
MD* values 85                                                                   ODMN field 139
                                        MQDXP parameter 479
MDACC field 115                                                                 ODON field 139
                                        MQDXP structure 468
MDAID field 116                                                                 ODORO field 142
                                        MQGET call 231
MDAOD field 121                                                                 ODORP field 143
                                        MQGMO structure 51
MDBOC field 112                                                                 ODOT field 138
                                        MQHCONN 4
MDCID field 111                                                                 ODREC field 141
                                        MQHOBJ 5
MDCSI field 103                                                                 ODRMN field 144
                                        MQIIH structure 77
MDENC field 102                                                                 ODRQN field 144
                                        MQINQ call 241
MDEXP field 96                                                                  ODRRO field 142
                                        MQLONG 5
MDFB field 98                                                                   ODRRP field 143
                                        MQMD
MDFMT field 104                                                                 ODSID field 138
                                           parameter 479
MDGID field 121                                                                 ODUDC field 141
                                           structure 83
MDMFL field 124                                                                 ODVER field 138
                                        MQMDE structure 131
MDMID field 109                                                                 OII* values 172
                                        MQOD structure 137
MDMT field 95                                                                   OL* values 22, 128
                                        MQOPEN call 251
MDOFF field 123                                                                 OO* values 252, 302
                                        MQOR structure 147
MDOLN field 128                                                                 OpenInputCount attribute 306
                                        MQPMO structure 149
MDPAN field 119                                                                 OpenOutputCount attribute 306
                                        MQPMR structure 165
MDPAT field 117                                                                 OPTS parameter
                                        MQPUT call 265
MDPD field 119                                                                     MQCLOSE call 211
                                        MQPUT1 call 275                            MQOPEN call 251
MDPER field 108
                                        MQRMH structure 169                        MQXCNVC call 474
MDPRI field 107
                                        MQRR structure 177                      ordering of messages 236, 270, 279
MDPT field 120
                                        MQSeries for AS/400                     ORMN field 147
MDREP field 85
MDRM field 113                             syncpoint considerations with CICS   ORON field 147
MDRQ field 112                               for AS/400 339                     OT* values 138
MDSEQ field 123                            syncpoints 338                       OUTBUF parameter 480
MDSID field 85                          MQSeries publications 499               OUTLEN parameter 480
MDUID field 114                         MQSET call 283
MDVER field 85                          MQTM structure 179
ME* values 133                          MQTMC2 structure 185                    P
MECSI field 134                         MQWIH structure 189                     PDF (Portable Document Format)    502
MEENC field 134                         MQXCNVC call 473                        PE* values 108, 294
MEF* values 134                         MQXQH structure 193                     PerformanceEvent attribute 331
                                                                                                             Index     507
TM* values 180
TMAI field 182
TMAT field 181
TMED field 182
TMPN field 181
TMQN field 180
TMSID field 180
TMTD field 181
TMUD field 182
TMVER field 180
transmission queue header structure   193
trigger message structure 179
TriggerControl attribute 310
TriggerData attribute 310
TriggerDepth attribute 311
triggering 310
TriggerInterval attribute 333
TriggerMsgPriority attribute 311
TriggerType attribute 311
trusted application 32
TT* values 311
type styles in this book xii
U
Uncommitted messages 330
US* values 312
Usage attribute 312
UserData attribute 321
W
WI* values 22, 69, 189
WICSI field 190
WIENC field 190
WIFLG field 190
WIFMT field 190
WILEN field 190
Windows Help 502
WIRSV field 191
WISID field 189
WISNM field 190
WISST field 190
WITOK field 191
WIVER field 189
X
XmitQName attribute      314
XQ* values   196
XQMD field 196
XQRQ field 196
XQRQM field 196
XQSID field 196
XQVER field 196
XR* values   472
                         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.
                         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:
                           Information Development Department (MP095)
                           IBM United Kingdom Laboratories
                           Hursley Park
                           WINCHESTER,
                           Hampshire
                           United Kingdom
                         v By fax:
                           – From outside the U.K., after your international access code use
                              44–1962–870229
                           – From within the U.K., use 01962–870229
                         v Electronically, use the appropriate network ID:
                           – IBM Mail Exchange: GBIBM2Q9 at IBMMAIL
                                       ™
                           – IBMLink : HURSLEY(IDRCF)
                           – Internet: idrcf@hursley.ibm.com
SC34-5559-00
Spine information:
IBM MQSeries® for AS/400® MQSeries for AS/400, V5.1 APR (ILE RPG) V5.1