To build an application under the UNIX(R) System Services shell, you must give the compiler access to the WebSphere(R) MQ include files (located in thlqual.SCSQC370 and thlqual.SCSQHPPS), and link against two of the DLL side-decks (located in thlqual.SCSQDEFS). At runtime, the application needs access to the WebSphere MQ data sets thlqual.SCSQLOAD, thlqual.SCSQAUTH, and one of the language specific data sets, such as thlqual.SCSQANLE.
/u/fred/sample:> export _CXX_EXTRA_ARGS=1 /u/fred/sample:> export _CXX_CXXSUFFIX="cpp"
/u/fred/sample:> c++ -o imqwrld -I "//'thlqual.SCSQC370'" \ -I "//'thlqual.SCSQHPPS'" imqwrld.cpp \ "//'thlqual.SCSQDEFS(IMQS23DM)'" "//'thlqual.SCSQDEFS(IMQB23DM)'"
For more information on the TSO oput command, refer to the z/OS UNIX System Services Command Reference.
You can also use the make utility to simplify building C++ programs. Here is a sample makefile to build the HELLO WORLD C++ sample program. It separates the compile and link stages. Set up the environment as in step 3 above before running make.
flags = -I "//'thlqual.SCSQC370'" -I "//'thlqual.SCSQHPPS'" decks = "//'thlqual.SCSQDEFS(IMQS23DM)'" "//'thlqual.SCSQDEFS(IMQB23DM)'" imqwrld: imqwrld.o c++ -o imqwrld imqwrld.o $(decks) imqwrld.o: imqwrld.cpp c++ -c -o imqwrld $(flags) imqwrld.cpp
Refer to z/OS UNIX System Services Programming Tools for more information on using make.
/u/fred/sample:> export STEPLIB=$STEPLIB:thlqual.SCSQLOAD /u/fred/sample:> export STEPLIB=$STEPLIB:thlqual.SCSQAUTH /u/fred/sample:> export STEPLIB=$STEPLIB:thlqual.SCSQANLE
/u/fred/sample:> ./imqwrld
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
amq5480 |