Author |
Message
|
Teckh |
Posted: Thu Oct 12, 2006 12:11 pm Post subject: Using amqsbcg0 to connect to remote Q manager (c version) |
|
|
Newbie
Joined: 12 Oct 2006 Posts: 6
|
I want to use the amqsbcg0 sample code to browse the contents of a large message that is on a queue. Large being greater then 6 MB.
I have updated the amqsbcg0 code to use an adequate buffer size and compiled the code. My local QM tests have been successful but I have had no success using it to read from a remote QM.
(I am able to use amqsbcgc.exe to read small messages from the remote QM without issue. I use set MQSERVER=SYSTEM.DEF.SVRCONN/tcp/130.130.111.xxx(1414) prior to running the exe)
The application programming guide indicates that the sample code for local and client versions of the code are the same.
"1. The executable version of the MQSeries client samples share the same source as the samples that run in a server environment."
Is there any change to the source code that needs to be made to allow it to connect to a remote QM?
--------------------
When I try to connect it to the remote QM I get the following error;
AMQSBCG0 - starts here
**********************
MQCONN failed with CompCode:2, Reason:2058 |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 12, 2006 12:17 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
There aren't any source changes that need to be made.
You need to change your linking options to link against the client library.  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Teckh |
Posted: Thu Oct 12, 2006 12:23 pm Post subject: |
|
|
Newbie
Joined: 12 Oct 2006 Posts: 6
|
Thanks.
I see the reference comment in the APG now. I'll re-compile. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Oct 12, 2006 12:49 pm Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
Large being greater then 6 MB. |
Using the MQSERVER variable, you can only get 4meg's of data (MAXMSGL(4194304)) .. you're going to need to use a client channel table for 6Meg. _________________ -wayne |
|
Back to top |
|
 |
Teckh |
Posted: Thu Oct 12, 2006 1:22 pm Post subject: |
|
|
Newbie
Joined: 12 Oct 2006 Posts: 6
|
I am running into that issue now... Thanks for the heads up, made diagnosing the new issue a whole lot easier
As I only really need the first 1-3 MB of the larger message I am going use the MQGMO_ACCEPT_TRUNCATED_MSG option.
Hopefully now it will work and allow me to get up to the max of 4194304 bytes. |
|
Back to top |
|
 |
|