Posted: Thu Mar 13, 2003 3:45 pm Post subject: Message sequence error
Centurion
Joined: 20 Sep 2002 Posts: 116 Location: USA
using Windows/MQ 5.3..
Suppose a channel has a problem, I can check the channels status in the explorer, go to event viewer, and then reset the message sequence number on a channel. (the only way I know how to)
However if I wanted to write a java program that gets the channel status... where could I pull the sequence number from so I can make my program reset the channel itself, so no one has to do this manually, they can simply click the a Jbutton on the GUI <get Channel status> then after seeing the problem click <reset chl> keep in mind I'm talking about having the logic pull and place the correct sequence number not just resetting the channel to 0.
Posted: Thu Mar 20, 2003 1:54 pm Post subject: Two ways.
Centurion
Joined: 28 Jan 2003 Posts: 109 Location: Colorado
One way would be to use the inquire API function to get the attribut of the channel status.... Then issue the commands.
Second... You can call runmqsc from as a call to the system and pass in what you are looking for... The output should be redirected into a file which can be parsed and read. From the command line you can issue the reset or resolve commands.
Better yet. Create a long running job that constantly(or periodically) checks channel status.. Then provide a notification and resolution logic for when things fail.
On both UNIX and windows platforms the echo command can be used to pipe commands into runmqsc... In UNIX you can do multiple commands by seperating them with a \n but in windows I haven't gotten this to work.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum