Author |
Message
|
costis |
Posted: Fri May 28, 2004 7:55 am Post subject: MQCONN Queue Manager |
|
|
Newbie
Joined: 28 May 2004 Posts: 4
|
I want to connect to a queue manager from an RPG program on AS/400 using MQCONN but I don't know how to specify what port the queue manager listens on. When I try to connect without specifying the port the program returns (as expected) reason code 2058.
For example I have the queue manager TEST and the listener listens on port 1425. It is NOT the default queue manager.
Thanks for your help,
Costi |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri May 28, 2004 12:18 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I assume you want to connect in client mode, since you are talking about ports (if your app is on the same machine as the QM you could just connect to the QM in bindings mode, and the port / channel does not come into play).
There are three ways to specify what connection info your app will use for a client connection (this includes the port).
Use the MQCONNX call, and code it there.
Use the MQSERVER environment variable, and specify it there.
Use Channel tables, and the connection info will be included in them.
Since you didn't mention at all that you are using any of these methods, are you maybe connecting in BINDINGs mode? And since you didn't mention a QM name in the MQCONN call, I assume you coded blank, so the app is looking for the default QM, and there is no default QM defined?
We need some more details to help you. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
costis |
Posted: Fri May 28, 2004 1:31 pm Post subject: |
|
|
Newbie
Joined: 28 May 2004 Posts: 4
|
As this is the first time I code a MQ program in RPG I modified a sample from those provided by IBM. AMQPUT4EX (or something like that, i can't remember (i'm at home now)).
The application is on the same machine as the MQ server
I specified a qmname in the MQCONN call.
I didn't told you about what method I use because I think I don't use any of those methods.
I looked over MQCONNX in the docs but I didn't figured out how I can specify the port (if you can help me with this it would be great)
The environment variable is out of question.
Can you tell me or give me a link where I can learn more about connecting in bindings mode because is the first time I hear of this. Probably I used it without knowing. You may find it strange but I learned MQ on my own without any training so all I did till now was making things work. One of my favourite quotes is "If it works it doesn't mean it's right, but if it's right it means it works".
Haven't heard of channel tables either. I have the same request as above.
Thanks for your help,
Costi |
|
Back to top |
|
 |
MQRuss |
Posted: Fri May 28, 2004 2:05 pm Post subject: MQCONN MQCONNX and vb.net |
|
|
 Novice
Joined: 16 Sep 2003 Posts: 13 Location: Macon. GA
|
this thread interests me, I inherited a solution using the MQSERVER environment variable and am now trying to see whats involved with one client talking to two or more QueueManagers. This MQCONNX sounds like the ticket. I can't find much in the help though or here about the specifics. Anyone have example code? or soecific experience with MQCONNX and .Net?
These forums are very handy,
thanks MQSeries.net
-Russ _________________ ____________
Russ
MQ Newbie |
|
Back to top |
|
 |
MQRuss |
Posted: Fri May 28, 2004 2:26 pm Post subject: hmmm.. |
|
|
 Novice
Joined: 16 Sep 2003 Posts: 13 Location: Macon. GA
|
perhaps i just need to grab 5.3 fixpack 5.
sounds like it has examples.
-Russ _________________ ____________
Russ
MQ Newbie |
|
Back to top |
|
 |
costis |
Posted: Mon May 31, 2004 12:18 am Post subject: MQCONNX |
|
|
Newbie
Joined: 28 May 2004 Posts: 4
|
I looked over MQCONNX features in RPG (in the application program reference) and the MQCNO doesn't seem to provide a MQCD data structure so it seems that the solution with MQCONNX is out of question too.
Costi |
|
Back to top |
|
 |
markt |
Posted: Mon May 31, 2004 10:36 am Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
Clients are not supported on AS/400, so you cannot use the MQCD fields from RPG. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 01, 2004 4:42 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Mark, thanks, I forgot that iSeries is like z/OS in not being able to act as a client.
Costi, this simplifies your problem. Since you can connect only in bindings mode, there is no need to specify things like ports, channels and hostnames. Just issue the MQCONN call with a properly spelled QM name of a QM that actually exists and is running on the server running your code, and you will get by the 2058 error. Remember, the name is case sensitive. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
costis |
Posted: Sun Jun 13, 2004 11:39 am Post subject: |
|
|
Newbie
Joined: 28 May 2004 Posts: 4
|
is case sensiztive ... and must be aligned to the left.  |
|
Back to top |
|
 |
JLRowe |
Posted: Thu Jun 17, 2004 2:51 pm Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
The java client works on the As/400, |
|
Back to top |
|
 |
|