ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » how to recompile amqsget0.c sample program?

Post new topic  Reply to topic
 how to recompile amqsget0.c sample program? « View previous topic :: View next topic » 
Author Message
mrlazy
PostPosted: Mon May 08, 2006 6:16 am    Post subject: how to recompile amqsget0.c sample program? Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Mon May 08, 2006 6:21 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mrlazy
PostPosted: Mon May 08, 2006 6:51 am    Post subject: Reply with quote

Centurion

Joined: 19 Apr 2006
Posts: 144

Thanks a lot vennela
Back to top
View user's profile Send private message
Tibor
PostPosted: Mon May 08, 2006 8:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Nigelg
PostPosted: Mon May 08, 2006 11:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Tibor
PostPosted: Tue May 09, 2006 2:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » how to recompile amqsget0.c sample program?
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.