Building z/OS UNIX System Services applications

Use this information when building z/OS® UNIX System Services applications.

To build a C application for IBM® MQ for z/OS that runs under UNIX System Services, compile and link your application as follows:

cc -o mqsamp -W c,DLL -I "//' thlqual.SCSQC370'" mqsamp.c "//' thlqual.SCSQDEFS(CSQBMQ1)'"
where thlqual is the high-level qualifier used by your installation.
To run the C program, you need to add the following to your .profile file; this should be in your root directory:

STEPLIB= thlqual.SCSQANLE:thlqual.SCSQAUTH: STEPLIB
Note that you need to exit from UNIX System Services, and enter UNIX System Services again, for the change to be recognized.
If you want to run multiple shells, add the word export at the beginning of the line, that is:

export STEPLIB= thlqual.SCSQANLE:thlqual.SCSQAUTH: STEPLIB
Once this completes successfully you can link the CSQBSTUB and issue IBM MQ calls.

Dynamically calling the IBM MQ stub describes an alternative method of making MQI calls in your programs so that you do not need to link-edit an IBM MQ stub. This method is not available for all languages and environments.

Do not link-edit a higher level of stub program than that of the version of IBM MQ for z/OS on which your program is running. For example, a program running on , IBM WebSphere® MQ for z/OS Version 7.1 must not be link-edited with a stub program supplied with IBM MQ for z/OS, Version 8.0.