Author |
Message
|
mrlazy |
Posted: Mon May 08, 2006 6:16 am Post subject: how to recompile amqsget0.c sample program? |
|
|
Centurion
Joined: 19 Apr 2006 Posts: 144
|
I tried to retirve the data from a queue using 'amqsget' command. But it returned with an error code 2080.
Since the maximum size of data in the queue is around 22000 bytes, I changed the buffer size from the default 101 to 30000 bytes in 'amqsget0.c' program.But can any one help me how to recompile and link this file back so that i can retrieve the data?
(I have MQ 5.3 CSD 11 on AIX) |
|
Back to top |
|
 |
vennela |
Posted: Mon May 08, 2006 6:21 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
There is a support pack called Q Program that can get the data with larger sizes. RFHUTIL also might do that.
If you really want to recompile the program, then look at application programming guide and they have clear instructions on compiling for various platforms. |
|
Back to top |
|
 |
mrlazy |
Posted: Mon May 08, 2006 6:51 am Post subject: |
|
|
Centurion
Joined: 19 Apr 2006 Posts: 144
|
Thanks a lot vennela  |
|
Back to top |
|
 |
Tibor |
Posted: Mon May 08, 2006 8:13 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
firstly, you need a c compiler (xlc or gcc).
next step: creating a simple 'Makefile' (in this case the source file is mqget.c and the compiler is xlC):
Code: |
all: mqget
# set TARGET to the name of the executable to create
TARGET = mqget
# CC defines the compiler. Set to "xlc" for ANSI compliant C compiler.
CC = /usr/vac/bin/xlc
# Set CCOPTS - the compiler options.
CCOPTS = -c -DUNIX
# MQM library directory
MQMLIB = /usr/lpp/mqm/lib
# set LIBS to list all the libraries ld should link with.
LIBS = -lm -lmqm
OBJS = mqget.o
# object dependency
.c.o:
$(CC) $(CCOPTS) -I. -I/usr/include -I/usr/include/sys -I/usr/lpp/mqm/inc $<
mqget: mqget.c $(OBJS)
$(CC) -o mqget $(OBJS) -L$(MQMLIB) -L. $(LIBS)
clean:
rm $(OBJS)
|
then run the 'make' command.
HTH,
Tibor |
|
Back to top |
|
 |
Nigelg |
Posted: Mon May 08, 2006 11:42 pm Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Tibor, do you work for IBM? That is just like an IBM response - complicated and over-elaborate.
This single line command should work.
xlc -o amqsget amqsget0.c -L/usr/mqm/lib -lmqm
Anyway, the compile command is in the APG, so mrlazy is well named. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
Tibor |
Posted: Tue May 09, 2006 2:15 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Nigelg wrote: |
Tibor, do you work for IBM? That is just like an IBM response - complicated and over-elaborate." |
just a little apology: I derived it from a complex and platform-independent makefile ... |
|
Back to top |
|
 |
|