C++ sample programs
Four sample programs are supplied, to demonstrate getting and putting messages.
The sample programs are:
- HELLO WORLD (imqwrld.cpp)
- SPUT (imqsput.cpp)
- SGET (imqsget.cpp)
- DPUT (imqdput.cpp)
The sample programs are located in the directories shown in Table 1.
MQ_INSTALLATION_PATH represents the high-level directory in which IBM® MQ is installed.
|
Environment
|
Directory containing source
|
Directory containing built
programs |
|---|---|---|
AIX® |
MQ_INSTALLATION_PATH/samp
|
|
AIX |
MQ_INSTALLATION_PATH/samp
|
|
IBM i |
/QIBM/ProdData/mqm/samp/
|
(see note 3 ) |
Linux® |
MQ_INSTALLATION_PATH/samp
|
None
|
Windows |
MQ_INSTALLATION_PATH\tools\cplus\samples
|
|
z/OS® |
thlqual.SCSQCPPS
|
Notes:
Programs that were built with the IBM XL C/C++ for AIX 16 compiler are located in the "ia" folder.
Support for this compiler was deprecated in
IBM MQ 9.4.0 (for Long Term Support releases, and IBM MQ 9.3.5 for
Continuous Delivery releases).
The XL
C/C++ for AIX 16 compiler was removed in IBM MQ 9.4.2.
Programs that were built with the IBM Open XL C/C++ for AIX 17 compiler are located in the "ca" folder.
Programs built using the ILE C++ compiler for IBM i are in the library QMQM. The source files are in
/QIBM/ProdData/mqm/samp.
Programs built using the Microsoft Visual Studio are found in MQ_INSTALLATION_PATH\tools\cplus\samples\bin\vn.
For further information about these compilers, see Building C++ programs on Windows.
![[Linux]](nglinux.gif)
![[z/OS]](ngzos.gif)