473,498 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MQ Functions on DB2 for LUW V8.2

Folks,

I'm wondering if anyone out there actually has a working implementation of
the MQ SQL functions, and if so if they can offer some advice to a poor
struggling MQ novice.

I've got MQ set up and working (I've used it to test DB2 II Q Rep).

I've installed the MQ AMI, as supplied in sqllib/cfg/mq. I've set the
recommended AMT path variable (AMT_DATA_PATH=/home/db2inst1/sqllib/cfg/mq),
and passed it through to DB2 using DB2ENVLIST (and remembered to start the
instance).

I already have a queue manager (lets call it MYQUEUE).

I've run -

enable_MQFunctions -n DBTST001 -u db2inst1 -p password -v 0pc -q MYQUEUE

This seemed to work.

When I call -

VALUES DB2MQ.MQSEND('Testing 123')

I get -

SQL0443N Routine "DB2MQ.MQSEND" (specific name "MQSND1") has returned an
error SQLSTATE with diagnostic text "rc=110:amSesOpen". SQLSTATE=38H01

Anyone tell me what I'm doing wrong ?

I suspect I need to set up some MQ queues manually, and then define them to
DB2 in the xml files in cfg/mq, but I don't know how.

Thanks

Phil
Nov 12 '05 #1
2 3442
SQL0443N means that the UDF itself has returned an SQLSTATE, in this
case 38H01. Most SQLSTATEs in the 38xxx range are user-defined; that
is, depending on the routine you're calling, the state can mean
something different, an d. Unfortunately, you'd need someone who is
more familiar with the MQ functions then I am (or, if you have them, the
MQ function definitions and try looking up that SQLSTATE) to figure out
what it means.

Off hand, the MQSEND function has set that SQLSTATE, and given it an
associated diagnostic test of "rc=110:amSesOpen". This is actually
coming from the function itself and is not part of the standard
DB2-Engine produced SQLSTATES or test. I'd hazard a guess that
"asSesOpen" has something to do with a failure opening an MQ session,
but I don't know what a return code of 110 means.

Someone in charge of the MQ functions (or, hopefully, the documentation)
would have to tell you what those mean. I honestly don't know -- I'm
just trying to provide a bit of an overview of what's happening from a
processing point of view. Although I understand that those functions
are shipped with DB2, they are not part of the core engine or processing
of DB2 itself, which I believe most IBMers who follow and respond to
posts on this forum are part of, and as such they are not as likely to
have a direct idea themselves about why this error is being returned.

I think I've tracked down someone who might know, though, and forwarded
them the text of your message. If they reply to me, I'll post it here.

Philip Nelson wrote:
Folks,

I'm wondering if anyone out there actually has a working implementation of
the MQ SQL functions, and if so if they can offer some advice to a poor
struggling MQ novice.

I've got MQ set up and working (I've used it to test DB2 II Q Rep).

I've installed the MQ AMI, as supplied in sqllib/cfg/mq. I've set the
recommended AMT path variable (AMT_DATA_PATH=/home/db2inst1/sqllib/cfg/mq),
and passed it through to DB2 using DB2ENVLIST (and remembered to start the
instance).

I already have a queue manager (lets call it MYQUEUE).

I've run -

enable_MQFunctions -n DBTST001 -u db2inst1 -p password -v 0pc -q MYQUEUE

This seemed to work.

When I call -

VALUES DB2MQ.MQSEND('Testing 123')

I get -

SQL0443N Routine "DB2MQ.MQSEND" (specific name "MQSND1") has returned an
error SQLSTATE with diagnostic text "rc=110:amSesOpen". SQLSTATE=38H01

Anyone tell me what I'm doing wrong ?

I suspect I need to set up some MQ queues manually, and then define them to
DB2 in the xml files in cfg/mq, but I don't know how.

Thanks

Phil

Nov 12 '05 #2
I managed to get a reply rather quickly. His reply:
========================================
The most likely cause of 110 is that the queue manager was not started.
This could be due to the queue manager the customer thought was using
is not actually the one that's being used, by default parameters, in
this case.
Unless they intended to use 1pc MQ functions, they shouldn't not use '-q
MYQUEUE' option in enable_MQFunctions. It's for 1PC mq functions only.
That could cause the confusion or misleading queue manager.

Hope this helps.
========================================

As do I... I'm going to be honest and say I don't understand about 99%
of the MQ stuff, so hopefully that makes some sense.
Philip Nelson wrote:
Folks,

I'm wondering if anyone out there actually has a working implementation of
the MQ SQL functions, and if so if they can offer some advice to a poor
struggling MQ novice.

I've got MQ set up and working (I've used it to test DB2 II Q Rep).

I've installed the MQ AMI, as supplied in sqllib/cfg/mq. I've set the
recommended AMT path variable (AMT_DATA_PATH=/home/db2inst1/sqllib/cfg/mq),
and passed it through to DB2 using DB2ENVLIST (and remembered to start the
instance).

I already have a queue manager (lets call it MYQUEUE).

I've run -

enable_MQFunctions -n DBTST001 -u db2inst1 -p password -v 0pc -q MYQUEUE

This seemed to work.

When I call -

VALUES DB2MQ.MQSEND('Testing 123')

I get -

SQL0443N Routine "DB2MQ.MQSEND" (specific name "MQSND1") has returned an
error SQLSTATE with diagnostic text "rc=110:amSesOpen". SQLSTATE=38H01

Anyone tell me what I'm doing wrong ?

I suspect I need to set up some MQ queues manually, and then define them to
DB2 in the xml files in cfg/mq, but I don't know how.

Thanks

Phil

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3323
by: hokiegal99 | last post by:
A few questions about the following code. How would I "wrap" this in a function, and do I need to? Also, how can I make the code smart enough to realize that when a file has 2 or more bad...
99
5814
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
21
746
by: Rubén Campos | last post by:
I haven't found any previous message related to what I'm going to ask here, but accept my anticipated excuses if I'm wrong. I want to ask about the real usefulness of the 'inline' keyword. I've...
17
3585
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels...
2
3755
by: Bryan Olson | last post by:
The current Python standard library provides two cryptographic hash functions: MD5 and SHA-1 . The authors of MD5 originally stated: It is conjectured that it is computationally infeasible to...
7
5877
by: Tim ffitch | last post by:
Hi I have created a VB dll file that contains common functions I use across various projects in VB, Access and Excel. Rather than have to code the functions in each I decided to use the dll...
23
3958
by: Timothy Madden | last post by:
Hello all. I program C++ since a lot of time now and I still don't know this simple thing: what's the problem with local functions so they are not part of C++ ? There surely are many people...
14
4165
by: v4vijayakumar | last post by:
Why we need "virtual private member functions"? Why it is not an (compile time) error?
7
3944
by: Immortal Nephi | last post by:
My project grows large when I put too many member functions into one class. The header file and source code file will have approximately 50,000 lines when one class contains thousand member...
6
9589
KevinADC
by: KevinADC | last post by:
This snippet of code provides several examples of programming techniques that can be applied to most programs. using hashes to create unique results static variable recursive function...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.