Building z/OS UNIX System Services applications

 

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

cc -o mqsamp -I "//'thlqual.SCSQC370'" mqsamp.c
"//'thlqual.SCSQLOAD(CSQBSTUB)'"
where thlqual is the high-level qualifier used by your installation.

To run the C program, we need to add the following to your .profile file; this should be in your root directory:

STEPLIB=thlqual.SCSQANLE:thlqual.SCSQAUTH: STEPLIB
Note that we need to exit from OpenEdition, and enter OpenEdition 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 we can link the CSQBSTUB and issue WebSphere MQ calls.

Dynamically calling the WebSphere MQ stub describes an alternative method of making MQI calls in your programs so that you do not need to link-edit a WebSphere 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 WebSphere MQ for z/OS on which your program is running. For example, a program running on MQSeries for OS/390, V5.2 must not be link-edited with a stub program supplied with WebSphere MQ for z/OS, V5.3.

 

Parent topic:

Preparing your program to run


fg16810_