Contents

Tables
About this book
Who this book is for
What you need to know to understand this book
How to use this book
Appearance of text in this book
Terms used in this book
Changes for this edition (SC34-6599-00)
Data type descriptions
Elementary data types
Conventions used in the descriptions of data types
Elementary data types
MQBYTE - Byte
MQBYTEn - String of n bytes
MQCHAR - character
MQCHARn - String of n characters
MQHCONN - Connection handle
MQHOBJ - Object handle
MQINT32 - 32 bit integer
MQUINT32 - 32 bit unsigned integer
MQINT64 - 64 bit integer
MQUINT64 - 64 bit unsigned integer
MQLONG - Long integer
PMQINT32 - Pointer to data of type MQINT32
PMQUINT32 - Pointer to data of type MQUINT32
PMQINT64 - Pointer to data of type MQINT64
PMQUINT64 - Pointer to data of type MQUINT64
Elementary data types
Language considerations
COPY files
Calls
Call parameters
Structures
Named constants
MQI procedures
Threading considerations
Commitment control
Coding the bound calls
Notational conventions
MQBO - Begin options
Overview
Fields
BOOPT (10-digit signed integer)
BOSID (4-byte character string)
BOVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQBOH)
MQCIH - CICS bridge header
Overview
Fields
CIAC (4-byte character string)
CIADS (10-digit signed integer)
CIAI (4-byte character string)
CIAUT (8-byte character string)
CICC (10-digit signed integer)
CICNC (4-byte character string)
CICP (10-digit signed integer)
CICSI (10-digit signed integer)
CICT (10-digit signed integer)
CIENC (10-digit signed integer)
CIEO (10-digit signed integer)
CIFAC (8-byte bit string)
CIFKT (10-digit signed integer)
CIFL (4-byte character string)
CIFLG (10-digit signed integer)
CIFMT (8-byte character string)
CIFNC (4-byte character string)
CIGWI (10-digit signed integer)
CIII (10-digit signed integer)
CILEN (10-digit signed integer)
CILT (10-digit signed integer)
CINTI (4-byte character string)
CIODL (10-digit signed integer)
CIREA (10-digit signed integer)
CIRET (10-digit signed integer)
CIRFM (8-byte character string)
CIRSI (4-byte character string)
CIRS1 (8-byte character string)
CIRS2 (8-byte character string)
CIRS3 (8-byte character string)
CIRS4 (10-digit signed integer)
CIRTI (4-byte character string)
CISC (4-byte character string)
CISID (4-byte character string)
CITES (10-digit signed integer)
CITI (4-byte character string)
CIUOW (10-digit signed integer)
CIVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQCIHH)
MQCNO - Connect options
Overview
Fields
CNCT (128-byte bit string)
CNOPT (10-digit signed integer)
CNSID (4-byte character string)
CNVER (10-digit signed integer)
CNCID (24-byte character string)
CNSPP (24-byte character string)
CNSPO (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQCNOH)
MQDH - Distribution header
Overview
Fields
DHCNT (10-digit signed integer)
DHCSI (10-digit signed integer)
DHENC (10-digit signed integer)
DHFLG (10-digit signed integer)
DHFMT (8-byte character string)
DHLEN (10-digit signed integer)
DHORO (10-digit signed integer)
DHPRF (10-digit signed integer)
DHPRO (10-digit signed integer)
DHSID (4-byte character string)
DHVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQDHH)
MQDLH - Dead-letter header
Overview
Fields
DLCSI (10-digit signed integer)
DLDM (48-byte character string)
DLDQ (48-byte character string)
DLENC (10-digit signed integer)
DLFMT (8-byte character string)
DLPAN (28-byte character string)
DLPAT (10-digit signed integer)
DLPD (8-byte character string)
DLPT (8-byte character string)
DLREA (10-digit signed integer)
DLSID (4-byte character string)
DLVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQDLHH)
MQGMO - Get-message options
Overview
Fields
GMGST (1-byte character string)
GMMO (10-digit signed integer)
GMOPT (10-digit signed integer)
GMRE1 (1-byte character string)
GMRL (10-digit signed integer)
GMRQN (48-byte character string)
GMSEG (1-byte character string)
GMSG1 (10-digit signed integer)
GMSG2 (10-digit signed integer)
GMSID (4-byte character string)
GMSST (1-byte character string)
GMTOK (16-byte bit string)
GMVER (10-digit signed integer)
GMWI (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQGMOH)
MQIIH - IMS information header
Overview
Fields
IIAUT (8-byte character string)
IICMT (1-byte character string)
IICSI (10-digit signed integer)
IIENC (10-digit signed integer)
IIFLG (10-digit signed integer)
IIFMT (8-byte character string)
IILEN (10-digit signed integer)
IILTO (8-byte character string)
IIMMN (8-byte character string)
IIRFM (8-byte character string)
IIRSV (1-byte character string)
IISEC (1-byte character string)
IISID (4-byte character string)
IITID (16-byte bit string)
IITST (1-byte character string)
IIVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQIIHH)
MQMD - Message descriptor
Overview
Fields
MDACC (32-byte bit string)
MDAID (32-byte character string)
MDAOD (4-byte character string)
MDBOC (10-digit signed integer)
MDCID (24-byte bit string)
MDCSI (10-digit signed integer)
MDENC (10-digit signed integer)
MDEXP (10-digit signed integer)
MDFB (10-digit signed integer)
MDFMT (8-byte character string)
MDGID (24-byte bit string)
MDMFL (10-digit signed integer)
MDMID (24-byte bit string)
MDMT (10-digit signed integer)
MDOFF (10-digit signed integer)
MDOLN (10-digit signed integer)
MDPAN (28-byte character string)
MDPAT (10-digit signed integer)
MDPD (8-byte character string)
MDPER (10-digit signed integer)
MDPRI (10-digit signed integer)
MDPT (8-byte character string)
MDREP (10-digit signed integer)
MDRM (48-byte character string)
MDRQ (48-byte character string)
MDSEQ (10-digit signed integer)
MDSID (4-byte character string)
MDUID (12-byte character string)
MDVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQMDH)
MQMDE - Message descriptor extension
Overview
Fields
MECSI (10-digit signed integer)
MEENC (10-digit signed integer)
MEFLG (10-digit signed integer)
MEFMT (8-byte character string)
MEGID (24-byte bit string)
MELEN (10-digit signed integer)
MEMFL (10-digit signed integer)
MEOFF (10-digit signed integer)
MEOLN (10-digit signed integer)
MESEQ (10-digit signed integer)
MESID (4-byte character string)
MEVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQMDEH)
MQOD - Object descriptor
Overview
Fields
ODASI (40-byte bit string)
ODAU (12-byte character string)
ODDN (48-byte character string)
ODIDC (10-digit signed integer)
ODKDC (10-digit signed integer)
ODMN (48-byte character string)
ODON (48-byte character string)
ODORO (10-digit signed integer)
ODORP (pointer)
ODOT (10-digit signed integer)
ODREC (10-digit signed integer)
ODRMN (48-byte character string)
ODRQN (48-byte character string)
ODRRO (10-digit signed integer)
ODRRP (pointer)
ODSID (4-byte character string)
ODUDC (10-digit signed integer)
ODVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQODH)
MQOR - Object record
Overview
Fields
ORMN (48-byte character string)
ORON (48-byte character string)
Initial values and RPG declaration
RPG declaration (copy file CMQORH)
MQPMO - Put-message options
Overview
Fields
PMCT (10-digit signed integer)
PMIDC (10-digit signed integer)
PMKDC (10-digit signed integer)
PMOPT (10-digit signed integer)
PMPRF (10-digit signed integer)
PMPRO (10-digit signed integer)
PMPRP (pointer)
PMREC (10-digit signed integer)
PMRMN (48-byte character string)
PMRQN (48-byte character string)
PMRRO (10-digit signed integer)
PMRRP (pointer)
PMSID (4-byte character string)
PMTO (10-digit signed integer)
PMUDC (10-digit signed integer)
PMVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQPMOH)
MQPMR - Put-message record
Overview
Fields
PRACC (32-byte bit string)
PRCID (24-byte bit string)
PRFB (10-digit signed integer)
PRGID (24-byte bit string)
PRMID (24-byte bit string)
Initial values and RPG declaration
RPG declaration
MQRFH - Rules and formatting header
Overview
Fields
RFCSI (10-digit signed integer)
RFENC (10-digit signed integer)
RFFLG (10-digit signed integer)
RFFMT (8-byte character string)
RFLEN (10-digit signed integer)
RFNVS (n-byte character string)
RFSID (4-byte character string)
RFVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQRFHH)
MQRFH2 - Rules and formatting header 2
Overview
Fields
RF2CSI (10-digit signed integer)
RF2ENC (10-digit signed integer)
RF2FLG (10-digit signed integer)
RF2FMT (8-byte character string)
RF2LEN (10-digit signed integer)
RF2NVC (10-digit signed integer)
RF2NVD (n-byte character string)
RF2NVL (10-digit signed integer)
RF2SID (4-byte character string)
RF2VER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQRFH2H)
MQRMH - Reference message header
Overview
Fields
RMCSI (10-digit signed integer)
RMDEL (10-digit signed integer)
RMDEO (10-digit signed integer)
RMDL (10-digit signed integer)
RMDNL (10-digit signed integer)
RMDNO (10-digit signed integer)
RMDO (10-digit signed integer)
RMDO2 (10-digit signed integer)
RMENC (10-digit signed integer)
RMFLG (10-digit signed integer)
RMFMT (8-byte character string)
RMLEN (10-digit signed integer)
RMOII (24-byte bit string)
RMOT (8-byte character string)
RMSEL (10-digit signed integer)
RMSEO (10-digit signed integer)
RMSID (4-byte character string)
RMSNL (10-digit signed integer)
RMSNO (10-digit signed integer)
RMVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQRMHH)
MQRR - Response record
Overview
Fields
RRCC (10-digit signed integer)
RRREA (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQRRH)
MQTM - Trigger message
Overview
Fields
TMAI (256-byte character string)
TMAT (10-digit signed integer)
TMED (128-byte character string)
TMPN (48-byte character string)
TMQN (48-byte character string)
TMSID (4-byte character string)
TMTD (64-byte character string)
TMUD (128-byte character string)
TMVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQTMH)
MQTMC2 - Trigger message 2 (character format)
Overview
Fields
TC2AI (256-byte character string)
TC2AT (4-byte character string)
TC2ED (128-byte character string)
TC2PN (48-byte character string)
TC2QMN (48-byte character string)
TC2QN (48-byte character string)
TC2SID (4-byte character string)
TC2TD (64-byte character string)
TC2UD (128-byte character string)
TC2VER (4-byte character string)
Initial values and RPG declaration
RPG declaration (copy file CMQTMC2H)
MQWIH - Work information header
Overview
Fields
WICSI (10-digit signed integer)
WIENC (10-digit signed integer)
WIFLG (10-digit signed integer)
WIFMT (8-byte character string)
WILEN (10-digit signed integer)
WIRSV (32-byte character string)
WISID (4-byte character string)
WISNM (32-byte character string)
WISST (8-byte character string)
WITOK (16-byte bit string)
WIVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQWIHH)
MQXQH - Transmission-queue header
Overview
Fields
XQMD (MQMD1)
XQRQ (48-byte character string)
XQRQM (48-byte character string)
XQSID (4-byte character string)
XQVER (10-digit signed integer)
Initial values and RPG declaration
RPG declaration (copy file CMQXQHH)
Function calls
Call descriptions
Conventions used in the call descriptions
MQBACK - Back out changes
Syntax
Parameters
HCONN (10-digit signed integer) - input
COMCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQBEGIN - Begin unit of work
Syntax
Parameters
HCONN (10-digit signed integer) - input
BEGOP (MQBO) - input/output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation (ILE)
MQCLOSE - Close object
Syntax
Parameters
HCONN (10-digit signed integer) - input
HOBJ (10-digit signed integer) - input/output
OPTS (10-digit signed integer) - input
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQCMIT - Commit changes
Syntax
Parameters
HCONN (10-digit signed integer) - input
COMCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQCONN - Connect queue manager
Syntax
Parameters
QMNAME (48-byte character string) - input
HCONN (10-digit signed integer) - output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQCONNX - Connect queue manager (extended)
Syntax
Parameters
QMNAME (48-byte character string) - input
CNOPT (MQCNO) - input/output
HCONN (10-digit signed integer) - output
CMPCOD (10-digit signed integer) - output
CONNID (10-digit signed integer) - output
REASON (10-digit signed integer) - output
RPG invocation
MQDISC - Disconnect queue manager
Syntax
Parameters
HCONN (10-digit signed integer) - input/output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQGET - Get message
Syntax
Parameters
HCONN (10-digit signed integer) - input
HOBJ (10-digit signed integer) - input
MSGDSC (MQMD) - input/output
GMO (MQGMO) - input/output
BUFLEN (10-digit signed integer) - input
BUFFER (1-byte bit string×BUFLEN) - output
DATLEN (10-digit signed integer) - output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQINQ - Inquire about object attributes
Syntax
Parameters
HCONN (10-digit signed integer) - input
HOBJ (10-digit signed integer) - input
SELCNT (10-digit signed integer) - input
SELS (10-digit signed integer×SELCNT) - input
IACNT (10-digit signed integer) - input
INTATR (10-digit signed integer×IACNT) - output
CALEN (10-digit signed integer) - input
CHRATR (1-byte character string×CALEN) - output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQOPEN - Open object
Syntax
Parameters
HCONN (10-digit signed integer) - input
OBJDSC (MQOD) - input/output
OPTS (10-digit signed integer) - input
HOBJ (10-digit signed integer) - output
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQPUT - Put message
Syntax
Parameters
HCONN (10-digit signed integer) - input
HOBJ (10-digit signed integer) - input
MSGDSC (MQMD) - input/output
PMO (MQPMO) - input/output
BUFLEN (10-digit signed integer) - input
BUFFER (1-byte bit string×BUFLEN) - input
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQPUT1 - Put one message
Syntax
Parameters
HCONN (10-digit signed integer) - input
OBJDSC (MQOD) - input/output
MSGDSC (MQMD) - input/output
PMO (MQPMO) - input/output
BUFLEN (10-digit signed integer) - input
BUFFER (1-byte bit string×BUFLEN) - input
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
MQSET - Set object attributes
Syntax
Parameters
HCONN (10-digit signed integer) - input
HOBJ (10-digit signed integer) - input
SELCNT (10-digit signed integer) - input
SELS (10-digit signed integer×SELCNT) - input
IACNT (10-digit signed integer) - input
INTATR (10-digit signed integer×IACNT) - input
CALEN (10-digit signed integer) - input
CHRATR (1-byte character string×CALEN) - input
CMPCOD (10-digit signed integer) - output
REASON (10-digit signed integer) - output
Usage notes
RPG invocation
Attributes of objects
Attributes for queues
Overview
AlterationDate (12-byte character string)
AlterationTime (8-byte character string)
BackoutRequeueQName (48-byte character string)
BackoutThreshold (10-digit signed integer)
BaseQName (48-byte character string)
CFStrucName (12-byte character string)
ClusterName (48-byte character string)
ClusterNamelist (48-byte character string)
CreationDate (12-byte character string)
CreationTime (8-byte character string)
CurrentQDepth (10-digit signed integer)
DefBind (10-digit signed integer)
DefinitionType (10-digit signed integer)
DefInputOpenOption (10-digit signed integer)
DefPersistence (10-digit signed integer)
DefPriority (10-digit signed integer)
DistLists (10-digit signed integer)
HardenGetBackout (10-digit signed integer)
InhibitGet (10-digit signed integer)
InhibitPut (10-digit signed integer)
InitiationQName (48-byte character string)
MaxMsgLength (10-digit signed integer)
MaxQDepth (10-digit signed integer)
MediaLog (10-digit signed integer)
MsgDeliverySequence (10-digit signed integer)
OpenInputCount (10-digit signed integer)
OpenOutputCount (10-digit signed integer)
ProcessName (48-byte character string)
QDepthHighEvent (10-digit signed integer)
QDepthHighLimit (10-digit signed integer)
QDepthLowEvent (10-digit signed integer)
QDepthLowLimit (10-digit signed integer)
QDepthMaxEvent (10-digit signed integer)
QDesc (64-byte character string)
QName (48-byte character string)
QServiceInterval (10-digit signed integer)
QServiceIntervalEvent (10-digit signed integer)
QSGDisp (10-digit signed integer)
QType (10-digit signed integer)
RemoteQMgrName (48-byte character string)
RemoteQName (48-byte character string)
RetentionInterval (10-digit signed integer)
Scope (10-digit signed integer)
Shareability (10-digit signed integer)
TriggerControl (10-digit signed integer)
TriggerData (64-byte character string)
TriggerDepth (10-digit signed integer)
TriggerMsgPriority (10-digit signed integer)
TriggerType (10-digit signed integer)
Usage (10-digit signed integer)
XmitQName (48-byte character string)
Attributes for namelists
Attribute descriptions
AlterationDate (12-byte character string)
AlterationTime (8-byte character string)
NameCount (10-digit signed integer)
NamelistDesc (64-byte character string)
NamelistName (48-byte character string)
Names (48-byte character string×NameCount)
Attributes for process definitions
Attribute descriptions
AlterationDate (12-byte character string)
AlterationTime (8-byte character string)
ApplId (256-byte character string)
ApplType (10-digit signed integer)
EnvData (128-byte character string)
ProcessDesc (64-byte character string)
ProcessName (48-byte character string)
UserData (128-byte character string)
Attributes for the queue manager
Attribute descriptions
AlterationDate (12-byte character string)
AlterationTime (8-byte character string)
AuthorityEvent (10-digit signed integer)
BridgeEvent (character string)
ChannelAutoDef (10-digit signed integer)
ChannelAutoDefEvent (10-digit signed integer)
ChannelAutoDefExit (20-byte character string)
ChannelEvent (character string)
ClusterCacheType (32-byte character string)
ClusterWorkloadData (32-byte character string)
ClusterWorkloadExit (20-byte character string)
ClusterWorkloadLength (10-digit signed integer)
CodedCharSetId (10-digit signed integer)
CommandEvent (integer)
CommandInputQName (48-byte character string)
CommandLevel (10-digit signed integer)
ConfigurationEvent
DeadLetterQName (48-byte character string)
DefXmitQName (48-byte character string)
DistLists (10-digit signed integer)
InhibitEvent (10-digit signed integer)
LocalEvent (10-digit signed integer)
LoggerEvent (10-digit signed integer)
MaxHandles (10-digit signed integer)
MaxMsgLength (10-digit signed integer)
MaxPriority (10-digit signed integer)
MaxUncommittedMsgs (10-digit signed integer)
PerformanceEvent (10-digit signed integer)
Platform (10-digit signed integer)
QMgrDesc (64-byte character string)
QMgrIdentifier (48-byte character string)
QMgrName (48-byte character string)
RemoteEvent (10-digit signed integer)
RepositoryName (48-byte character string)
RepositoryNamelist (48-byte character string)
SQQMName (character string)
SSLEvent (character string)
SSLKeyResetCount (integer)
StartStopEvent (10-digit signed integer)
SyncPoint (10-digit signed integer)
TraceRouteRecording (10-digit signed integer)
TriggerInterval (10-digit signed integer)
Attributes for authentication information
Attribute descriptions
AlterationDate (MQCHAR12)
AlterationTime (MQCHAR8)
AuthInfoConnName (MQCHAR264)
AuthInfoDesc (MQCHAR64)
AuthInfoName (MQCHAR48)
AuthInfoType (MQLONG)
LDAPPassword (MQCHAR32)
LDAPUserName (MQ_DISTINGUISHED_NAME_LENGTH)
Applications
Building your application
WebSphere MQ copy files
Preparing your programs to run
Interfaces to the i5/OS external syncpoint manager
Syncpoints in CICS for AS/400 applications
Sample programs
Features demonstrated in the sample programs
Preparing and running the sample programs
Running the sample programs
The Put sample program
Design of the Put sample program
The Browse sample program
Design of the Browse sample program
The Get sample program
Design of the Get sample program
The Request sample program
Using triggering with the Request sample
Design of the Request sample program
The Echo sample program
Design of the Echo sample program
The Inquire sample program
Design of the Inquire sample program
The Set sample program
Design of the Set sample program
The Triggering sample programs
The AMQ3TRG4 sample trigger monitor
The AMQ3SRV4 sample trigger server
Ending the Triggering sample programs
Running the samples using remote queues
Appendixes
Appendix A. Return codes
Completion codes
Reason codes
Appendix B. Rules for validating MQI options
MQOPEN call
MQPUT call
MQPUT1 call
MQGET call
MQCLOSE call
Appendix C. Machine encodings
Binary-integer encoding
Packed-decimal-integer encoding
Floating-point encoding
Constructing encodings
Analyzing encodings
Using arithmetic
Summary of machine architecture encodings
Appendix D. Report options and message flags
Structure of the report field
Analyzing the report field
Using arithmetic
Structure of the message-flags field
Appendix E. Data conversion
Conversion processing
Processing conventions
Conversion of report messages
MQDXP - Data-conversion exit parameter
Overview
Fields
RPG declaration (copy file CMQDXPH)
MQXCNVC - Convert characters
Syntax
Parameters
RPG invocation (ILE)
MQCONVX - Data conversion exit
Syntax
Parameters
Usage notes
RPG invocation (ILE)
Appendix F. Notices
Programming interface information
Trademarks
Index