Preparing and running the sample programs

Before we can run the WebSphere MQ for iSeries sample programs, compile them as you would any other WebSphere MQ for iSeries applications. To do this, we can use the OS/400 commands CRTRPGMOD and CRTPGM.

When you create the

AMQ3xxx4 programs, we need to specify BNDSRVPGM(QMQM/LIBMQM) in the CRTPGM command. This includes the various MQ procedures in your program.

The sample programs are provided in library QMQMSAMP as members of QRPGLESRC. They use the copy files provided in library QMQM, so make sure this library is in the library list when you compile them. The RPG compiler gives information messages because the samples do not use many of the variables that are declared in the copy files.