Author |
Message
|
amitmalve |
Posted: Mon Oct 31, 2011 8:48 am Post subject: How to specify a MQMD as "MQIMS " when posting a |
|
|
Newbie
Joined: 31 Oct 2011 Posts: 5
|
i need to specify the MQ message descriptor as "MOIMS " for being able to send the message to the Proper Queue .
But when i do
queuemessage.format = "MQIMS "
it gives me a 2148 Reason code when i push my message . And when i remove this the put option puts my message in the Dead Letter Queue.
Can anyone please help on this topic |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 31, 2011 8:59 am Post subject: Re: How to specify a MQMD as "MQIMS " when posti |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
amitmalve wrote: |
i need to specify the MQ message descriptor as "MOIMS " for being able to send the message to the Proper Queue . |
You'd be better off specifying the MQFMT constant rather than the literal, though I don't think that's your problem.
amitmalve wrote: |
it gives me a 2148 Reason code when i push my message . |
It will do if you've set the format to indicate it's an IMS message, but not set up a correctly formatted IMS header. How certain are you your message contains a properly formatted header?
amitmalve wrote: |
And when i remove this the put option puts my message in the Dead Letter Queue |
With what reason code in the DLH? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
amitmalve |
Posted: Mon Oct 31, 2011 10:06 am Post subject: I am sending the IIH Header in the following format |
|
|
Newbie
Joined: 31 Oct 2011 Posts: 5
|
Code: |
'StrucID
x = System.Text.Encoding.GetEncoding(500).GetBytes("IIH ")
queueMessage.Write(x)
'Version
x = WindowsApplication2.Form1.String_To_Bytes("00000001")
queueMessage.Write(x)
'StrucLength
x = WindowsApplication2.Form1.String_To_Bytes("00000054")
queueMessage.Write(x)
'Encoding & 'Coded Characterset
x = WindowsApplication2.Form1.String_To_Bytes("0000000000000000")
queueMessage.Write(x)
'Format
x = System.Text.Encoding.GetEncoding(500).GetBytes("MQIMSVS ")
queueMessage.Write(x)
'Flags
x = WindowsApplication2.Form1.String_To_Bytes("00000000")
queueMessage.Write(x)
'LTermOverride
x = System.Text.Encoding.GetEncoding(500).GetBytes("MASTER ")
queueMessage.Write(x)
'MFSMapName
x = System.Text.Encoding.GetEncoding(500).GetBytes("MODU03 ")
queueMessage.Write(x)
'ReplyToFormat
x = System.Text.Encoding.GetEncoding(500).GetBytes("MQIMSVS ")
queueMessage.Write(x)
'Authenticator
x = System.Text.Encoding.GetEncoding(500).GetBytes("BET64ZAW")
'x = System.Text.Encoding.GetEncoding(500).GetBytes("testen01")
queueMessage.Write(x)
x = WindowsApplication2.Form1.String_To_Bytes("00000000000000000000000000000000")
queueMessage.Write(x)
x = System.Text.Encoding.GetEncoding(500).GetBytes(" ")
queueMessage.Write(x)
x = System.Text.Encoding.GetEncoding(500).GetBytes("0")
queueMessage.Write(x)
x = System.Text.Encoding.GetEncoding(500).GetBytes("C")
queueMessage.Write(x)
x = WindowsApplication2.Form1.String_To_Bytes("00")
queueMessage.Write(x) |
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 31, 2011 10:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
<sarcasm>Thank you for using code tags to aid readability</sarcasm>
That's really the best way to generate an IIH? Really?
If I'm reading it correctly (which given my unwillingness to pick through it is questionable) I'm with WMQ on this - it is badly formed. I see 2 potential problems. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 31, 2011 10:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ok, so I'll ask this as well.
Have you posted this in the broker section because you're as good at reading the forum section headings as you are at reading the WMQ documentation?
Or are you really using WMB and have this perverse desire to write code to add a header WMB will be glad to add for you? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
amitmalve |
Posted: Mon Oct 31, 2011 10:29 am Post subject: |
|
|
Newbie
Joined: 31 Oct 2011 Posts: 5
|
Can you please explain me what is broker and what is WMB i am not able to understand your comments ..Please |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 31, 2011 10:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
amitmalve wrote: |
Can you please explain me what is broker and what is WMB |
I'll take that as "I've posted this in the wrong section" and move the thread.
amitmalve wrote: |
i am not able to understand your comments |
The forum is sub-divided into specific topic areas. You've posted in an area dedicated to problems with the broker product (known as WMB to it's friends), indicating that you're asking a question connected to that product. If so, your method is flawed and you should be using WMB to build the header.
As you're clearly not, my earlier comments stand. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 31, 2011 11:21 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
OK, put code tags around the example. _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Mon Oct 31, 2011 11:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fjb_saper wrote: |
OK, put code tags around the example. |
You're a better man than me.
But I think everyone already knew that.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
amitmalve |
Posted: Mon Oct 31, 2011 3:51 pm Post subject: |
|
|
Newbie
Joined: 31 Oct 2011 Posts: 5
|
Can you please provide me help for 2 specific things ..
do we have to specifically form the IIH header as the code earlier put forth . or i have to use qmsg.wirteInt4(MQC.MQIIH) to specify the header .
Also i have a format for IIH,Root and leaf so r u saying my message shld only contain root and leaf.
Also lastly can you please help with a sample code . for how to specify the MQMD to be "MQIMS " and how to pass the User ID .
I am using Visual Studio 2005 vb.net in this case .
Your help is much appreciated |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Oct 31, 2011 9:34 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
amitmalve wrote: |
Can you please provide me help for 2 specific things ..
do we have to specifically form the IIH header as the code earlier put forth . or i have to use qmsg.wirteInt4(MQC.MQIIH) to specify the header .
Also i have a format for IIH,Root and leaf so r u saying my message shld only contain root and leaf.
Also lastly can you please help with a sample code . for how to specify the MQMD to be "MQIMS " and how to pass the User ID .
I am using Visual Studio 2005 vb.net in this case .
Your help is much appreciated |
First you need to get back to the manuals and read about MQ Headers and header chaining.
Then you need to take time to think about it and make sure you understood what you read.
After that all will be clear and luminous.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
amitmalve |
Posted: Mon Oct 31, 2011 11:14 pm Post subject: |
|
|
Newbie
Joined: 31 Oct 2011 Posts: 5
|
Can you suggest the manual ? pls which talks about MQ Headers and Chaining |
|
Back to top |
|
 |
bruce2359 |
Posted: Tue Nov 01, 2011 3:42 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Wmq Application Programming Reference, Wmq Application Programming Guide.
IIH is an mq structure, just like the mqmd, xqh, dlh, ... _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|