Author |
Message
|
catacomb |
Posted: Sun Dec 03, 2006 9:10 pm Post subject: Reading DLQ error and putting xml file into MQ |
|
|
Novice
Joined: 16 Nov 2006 Posts: 10
|
Hi there. Am not sure did I post in the correct place. Currently am running MQ version 6 in a Windows 2003 server. Would appreciate someone to guide me as I am pretty new to MQ.
(1) If there is a message being reflected in the DLQ, how can I go around understanding why it ended there? I did try to search the forum and happens to read that I need to identify the DLH and understand the HEX code then run mqrc but where can I find the log file or information where the DLH is reflected?
(2) The other thing is that can anyone advise me on how to create a simple script or program on how to put message and retrieve it from MQ. Example is I have MQ server A and server B. I would like to know how to create a scipt so I can put a xml in a folder (maybe name it as Enquiry) in server A and then send to server B. After server B processed the xml, it will be send back server A folder (maybe name it as Processed). Would like to have both servers able to do sending and receiving. I know java scripts can do that as I have seen it running in version 5 but somehow after I copy and amended the codes, it's still no go.
Thanks for advise.. sorry newbie here |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 04, 2006 12:24 am Post subject: Re: Reading DLQ error and putting xml file into MQ |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
catacomb wrote: |
Hi there. Am not sure did I post in the correct place. Currently am running MQ version 6 in a Windows 2003 server. Would appreciate someone to guide me as I am pretty new to MQ.
(1) If there is a message being reflected in the DLQ, how can I go around understanding why it ended there? I did try to search the forum and happens to read that I need to identify the DLH and understand the HEX code then run mqrc but where can I find the log file or information where the DLH is reflected?
(2) The other thing is that can anyone advise me on how to create a simple script or program on how to put message and retrieve it from MQ. Example is I have MQ server A and server B. I would like to know how to create a scipt so I can put a xml in a folder (maybe name it as Enquiry) in server A and then send to server B. After server B processed the xml, it will be send back server A folder (maybe name it as Processed). Would like to have both servers able to do sending and receiving. I know java scripts can do that as I have seen it running in version 5 but somehow after I copy and amended the codes, it's still no go.
Thanks for advise.. sorry newbie here |
1) The DLH is on the front of the message; the information is not refelected in any log file. The DLH can be interpreted with 1-n methods at your whim.
2) Using an application (or script) is the way to achieve what your talking about. When it's "no go", are there any reason codes, error messages, etc or does it just not work?
I assuming you'r trying something like:
File added to folder on A
Script detects new file, puts to queue as request
B gets message, processes; puts reply
A gets message, writes message to folder
Which is maybe non-optimal but ought to work. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 04, 2006 2:55 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Instead of having Program 1 write data into a file in Folder A, and then have another program read that file and put it in a message and send that to queue manager B, and then a third program read that message and put it into file B and then Program 4 will read the file..
Just have Program 1 write the message in the first place. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 04, 2006 3:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
Just have Program 1 write the message in the first place. |
This of course is the optimal solution...
...but usually poses political problem. If you can re-engineer your system, you should. Though often you can't! _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Dec 04, 2006 3:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If you've paid money to implement WMQ, then surely at least ONE program is being changed. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 04, 2006 3:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
You'd be amazed how often MQ is "implemented" by reading a file into a queue one record at a time, getting all the messages processed by an MQ-aware program, then having the replies read back out into a file for the next program in the sequence to read.
Or perhaps you wouldn't.
And there is seldom if ever a good technical reason for not changing the file using programs to messaging. Apart from a belief within management that programs which have been running for years without errors don't need improvement.
And sometimes the source code has gone AWOL, or it's very involved code that doesn't fit in the implementation timescales. Sometimes they just worry that if the program is changed "the magic will go away" and it will stop working.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
catacomb |
Posted: Mon Dec 04, 2006 3:18 am Post subject: Re: Reading DLQ error and putting xml file into MQ |
|
|
Novice
Joined: 16 Nov 2006 Posts: 10
|
Vitor wrote: |
catacomb wrote: |
Hi there. Am not sure did I post in the correct place. Currently am running MQ version 6 in a Windows 2003 server. Would appreciate someone to guide me as I am pretty new to MQ.
(1) If there is a message being reflected in the DLQ, how can I go around understanding why it ended there? I did try to search the forum and happens to read that I need to identify the DLH and understand the HEX code then run mqrc but where can I find the log file or information where the DLH is reflected?
(2) The other thing is that can anyone advise me on how to create a simple script or program on how to put message and retrieve it from MQ. Example is I have MQ server A and server B. I would like to know how to create a scipt so I can put a xml in a folder (maybe name it as Enquiry) in server A and then send to server B. After server B processed the xml, it will be send back server A folder (maybe name it as Processed). Would like to have both servers able to do sending and receiving. I know java scripts can do that as I have seen it running in version 5 but somehow after I copy and amended the codes, it's still no go.
Thanks for advise.. sorry newbie here |
1) The DLH is on the front of the message; the information is not refelected in any log file. The DLH can be interpreted with 1-n methods at your whim.
2) Using an application (or script) is the way to achieve what your talking about. When it's "no go", are there any reason codes, error messages, etc or does it just not work?
I assuming you'r trying something like:
File added to folder on A
Script detects new file, puts to queue as request
B gets message, processes; puts reply
A gets message, writes message to folder
Which is maybe non-optimal but ought to work. |
thanks Vitor but the thing is that when I browse the message in the DLQ, there is not DLH header hence I posted the question. The scenario is such that MQ server A post an XML and send it to MQ server B. MQ server B will acknowledge and sends a response back to MQ server A if everything is successful. But now the thing is that MQ server A process the XML and send it straight to DLQ. In DLQ when I browse the message, it's actually the XML contents that are reflected and nowhere can I find any tag or anything that states DLH.
The other thing is that how I denote the 1-n hex code and then run it with mqrc?
You are right about the scripts but just that I prefer to activate the script manually. Meaning I will put the XML file into a folder and it will be there unless I trigger the script to send it for processing. Is there such a script and where can I find it as I don't really know how to code one from scratch.
Thanks alot for the advice and patience as I am really so technical incline in MQ. |
|
Back to top |
|
 |
catacomb |
Posted: Mon Dec 04, 2006 3:19 am Post subject: |
|
|
Novice
Joined: 16 Nov 2006 Posts: 10
|
jefflowrey wrote: |
Instead of having Program 1 write data into a file in Folder A, and then have another program read that file and put it in a message and send that to queue manager B, and then a third program read that message and put it into file B and then Program 4 will read the file..
Just have Program 1 write the message in the first place. |
thanks for the advice. Actually I don't need a program to write data into a file. The file will be generated by another application server into an XML format. What I need to do is just put the file in a folder and send it to another MQ server. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Dec 04, 2006 3:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
catacomb wrote: |
thanks for the advice. Actually I don't need a program to write data into a file. The file will be generated by another application server into an XML format. What I need to do is just put the file in a folder and send it to another MQ server. |
No, what you should do is bypass the "write the file to a folder" step as jefflowrey suggests. It adds no value to the process, even though it's perfectly feasable. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
catacomb |
Posted: Mon Dec 04, 2006 3:31 am Post subject: |
|
|
Novice
Joined: 16 Nov 2006 Posts: 10
|
Vitor wrote: |
catacomb wrote: |
thanks for the advice. Actually I don't need a program to write data into a file. The file will be generated by another application server into an XML format. What I need to do is just put the file in a folder and send it to another MQ server. |
No, what you should do is bypass the "write the file to a folder" step as jefflowrey suggests. It adds no value to the process, even though it's perfectly feasable. |
Thanks again Vitor but I got my own constain as the response that comes out will need to be stored differently as there are various type of enquiries hence I would prefer to store it in different folder and also the main thing is that the XML is generated by an IBM AS400 machine and the party who is receiving the response XML could be a client of mine who doesn't permit a file to be written directly to their server. Hence the MQ is acting as a communication tool |
|
Back to top |
|
 |
|