![[AIX]](ngaix.gif)
Preparing and running sample programs on AIX and Linux
Before you run the sample programs on AIX® and Linux®, you must first create a queue manager and also create the queues that you need. If you want to run COBOL samples, you might need to do some additional preparation.
About this task
The IBM® MQ on AIX and Linux systems sample files are in the directories
listed in Table 1 if the defaults were used at installation time.
| Content | Directory |
|---|---|
| source files | MQ_INSTALLATION_PATH/samp |
| dead-letter queue handler source files | MQ_INSTALLATION_PATH/samp/dlq |
| executable files | MQ_INSTALLATION_PATH/samp/bin |
MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
The samples need a set of queues to work with. You can either use your own queues or run the sample MQSC file amqscos0.tst to create a set. To run the samples, either use the executable versions supplied or compile the source versions as you would any other applications, using an ANSI compiler.
![[MQ 9.4.0 Jun 2024]](ng940.gif)
The
following sample programs have authentication capabilities: - amqsbcg0.c
- amqsfhac.c
- amqsget0.c
- amqsghac.c
- amqsmhac.c
- amqsphac.c
- amqspuba.c
- amqsput0.c
- amqssslc.c
- amqssuba.c
- Compiling amqsput0.c without authentication
enabled:
gcc -m64 -I /opt/mqm/inc -L /opt/mqm/lib64 -lmqic -fsanitize=address -o /bin/amqsput amqsput0.c - Compiling amqsput0.c with authentication
enabled:
gcc -m64 -I /opt/mqm/inc -L /opt/mqm/lib64 -lmqic -fsanitize=address -D SAMPLE_AUTH_ENABLED -o /bin/amqsputc_auth amqsauth.c amqsput0.c