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 » Source for AMQSPUTC binary

Post new topic  Reply to topic
 Source for AMQSPUTC binary « View previous topic :: View next topic » 
Author Message
belchman
PostPosted: Thu Mar 01, 2007 9:47 am    Post subject: Source for AMQSPUTC binary Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 386
Location: Ohio, USA

I am trying to write a C process that does a put to a remote qmgr from a MQ Client for AIX host over a srvconn.

It appears that amqsput0.c is not the source for the amqsputc binary.

Does anyone know where the souce for amqsputc is?
If amqsput0.c is the source for amqsputc, can someone explain what I am doing wrong?

Here is the test I used to verfiy that amqsput0.c is not source for amqsputc.

I localized a copy of amqsput0.c
I compiled above as follows >>gcc -o hdbputc amqsput0.c -lmqm
I exported MQSERVER env var
When I run delivered amqsputc as >> amqsputc TEST, it puts to proper qmgr
When I run newly created hdbputc as >> hdbputc TEST, it writes to local queue manager

The problem I am trying to address...

I have to right a light-weight agent to sit on a MQ Client for AIX node that puts messages over a Svrconn that a misbehaving vendor app is putting over. That way, when the app gets a MQRC 2009 over SvrconnA but my agent does not get a MQRC 2009 over SvrconnA, I have a defense against the vendor saying the problem is with the qmgr.

Any thoughts are welcome!!!!!
Back to top
View user's profile Send private message
Toronto_MQ
PostPosted: Thu Mar 01, 2007 9:56 am    Post subject: Reply with quote

Master

Joined: 10 Jul 2002
Posts: 263
Location: read my name

Since amqsputc is the client version of amqsput0.c, you need to link it with the client library - and not the server library, which you have done.

Cheers
Steve
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 01, 2007 9:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

did you build amqsput0.c as client app?

No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
belchman
PostPosted: Thu Mar 01, 2007 10:03 am    Post subject: Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 386
Location: Ohio, USA

I used the amqcput0.c that is installed with MQ Server on a server host and compiled on the MQ server host.

Will it...

work if I get the amqsput0.c from the MQ client host and compile it on the MQ server host?

work if I compile the customized amqsput0.c source from the MQ client host on the MQ client host
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 01, 2007 10:06 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It will
work if you compile it against the client libraries

wherever those are.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
belchman
PostPosted: Fri Mar 02, 2007 8:15 am    Post subject: Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 386
Location: Ohio, USA

OK,

This is related to this original post but another set of questions.

I am still working on defending the honor of MQ here. While I work on getting the agent created (normal delays), me and the application developer worked to implement a test in which we NOHUP started an instance of AMQSPUTC on the MQ client node. Here are some specific data:

1) We started a long running AMQSPUTC connected over application's specific SvrConn (SvrConnA) to an exact copy of application's queue (QueueA) on QmgrA. We left it running connected at the "input msg prompt"

2) I verified that conn and handle to QMgrA.QueueA existed on QMgrA as "Process(495890.17138) User(mqm) Program(amqrmppa)".

3) Application Host has MQ Client for AIX v 5.3.7 (maybe higher but can't get there to verify right now) installed

4) QmgrA is MQ for AIX v6.0.1.1

5) QMgrA has TCP KeepAlive=yes

6) SvrConnA has hbint=300, keepalive=auto

This morning when I came in, the queue handle was gone. I did verify that the amqrmppa with PID=495890 was still running, but had no thread of 17138.

Question(s):

1) If nothing was going wrong, would that AMQSPUTC process have kept that connection and input handle indefinitely?

2) Would the QMgr have killed the thread for any reason? (ignore network/OS/Firewall for the moment)

I am going to be working with AIX guys and network guys later. I just want to have support when I say, "This is not an MQ problem".

Thanks
Back to top
View user's profile Send private message
tleichen
PostPosted: Fri Mar 02, 2007 9:45 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

Not having your code, I can't be sure. But, I assume you're not doing anything like an MQCLOSE and/or MQDISC in your code? And if not, how do you cleanly end the task? (Please don't say you just kill the PID.... yuk!)

Barring that, I would make sure that there was not a network glitch. What happens when you send data into it at this point? What error(s) are reported?
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
mvic
PostPosted: Fri Mar 02, 2007 2:33 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jefflowrey wrote:
No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample.

amqsput and amqsputc are indeed built from amqsput0.c ... where did your information come from, Jeff?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 05, 2007 7:10 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mvic wrote:
jefflowrey wrote:
No, the actual source for the actual amqsputc is not available. amqsput0.c is the sample source - amqsputc is smarter than the sample.

amqsput and amqsputc are indeed built from amqsput0.c ... where did your information come from, Jeff?


Apparently nowhere.



Is it amqsbcg that isn't built from the sample code?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mvic
PostPosted: Tue Mar 06, 2007 12:44 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

jefflowrey wrote:
Is it amqsbcg that isn't built from the sample code?

No, I think that's from the supplied source too. Could you be thinking of runmqtrm?
Back to top
View user's profile Send private message
HubertKleinmanns
PostPosted: Tue Mar 06, 2007 1:50 am    Post subject: Reply with quote

Shaman

Joined: 24 Feb 2004
Posts: 732
Location: Germany

mvic wrote:
jefflowrey wrote:
Is it amqsbcg that isn't built from the sample code?

No, I think that's from the supplied source too. Could you be thinking of runmqtrm?


The samples include a trigger monitor called amqstrg0.c which acts as a trigger monitor, but includes only a subset of the functionality of runmqtrm.
_________________
Regards
Hubert


Last edited by HubertKleinmanns on Tue Mar 06, 2007 4:03 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Nigelg
PostPosted: Tue Mar 06, 2007 3:23 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

I think amqstrg0.c has the same functionality as runqmtrm but does not have any of the WMQ tracing.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
belchman
PostPosted: Wed Apr 04, 2007 6:06 am    Post subject: Reply with quote

Partisan

Joined: 31 Mar 2006
Posts: 386
Location: Ohio, USA

I got this to work by:

1) Deploy .c source to MQ Client host
2) compiling with following command line args

So now the c object works as amqsputc but message input command line is not presented. It puts the message passed as argument.

gcc -o executableName executableName.c -I/usr/mqm/inc -L/usr/mqm/lib -limqb23ia -lmqic

I was using this set of compiler options before this original post...
gcc -o executableName executableName.c -lmqm
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 » Source for AMQSPUTC binary
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.