ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » How to edit message saved by rfhutil without loosing headers

Post new topic  Reply to topic
 How to edit message saved by rfhutil without loosing headers « View previous topic :: View next topic » 
Author Message
Bartez75
PostPosted: Thu Dec 15, 2011 1:23 am    Post subject: How to edit message saved by rfhutil without loosing headers Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Hi,
How to edit message (body) saved by rfhutil without loosing headers information?

I want to add some data to the body of the mq message. The original message I have was got from queue in rfhutil and then saved to file together with headers.

I tried to change this but then message seams to be corrupted, I mean headers.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Thu Dec 15, 2011 1:48 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

In the file(s) that you stored from RFH-Util change single characters only! Especially do not change the lenght of the message. There is a field in the mqmd or rfh2 header which stores the lenght and this will make the message corrupt. I never figured out how the length is stored, but it seems to be not plain/direct... probably it is a hash-code or Hex or something? Does anybody know how to fix/trick this with RFH-Util?

I used WMQTool for editing RFH2-Messages. But... WMQTool is not great with "special" characters (and codepages and so on) and it also costs license fees.

So I am using rfhutil (for most of the time, especiall for codepage-issues) and WMQ-Tool (for editing rfh2-messages) and a queue for exchanging the messages between the 2 tools (not possible through file!).
_________________
Just use REFERENCEs


Last edited by mqsiuser on Tue Jan 17, 2012 1:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Luke
PostPosted: Thu Dec 15, 2011 5:28 am    Post subject: Reply with quote

Centurion

Joined: 10 Nov 2008
Posts: 128
Location: UK

You should be able to work around this, try ...

Load the file to a queue, and save just the message body.
Edit the file with just the message body in it.
Change Read options on RfhUtil to 'Save Headers'.
Read original message from queue.
Open File and read the amended message body.

You should now have the original headers with the amended message body.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 15, 2011 5:35 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Or you could just review the APR for the format of the various structures, and determine how to map, for example, an integer into a stream of bytes and vice versa.

Or you could send a note to the maintainer/author of RFHUtil asking for assistance.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 15, 2011 5:45 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqsiuser wrote:
I never figured out how the length is stored,


It's the NameValueLength field mentioned in the documentation.

mqsiuser wrote:
but it seems to be not plain/direct...


Yes it is (it'a a long integer)

mqsiuser wrote:
probably it is a hash-code or Hex or something?


No it isn't.

mqsiuser wrote:
Does anybody know how to fix/trick this with RFH-Util?


Yes. Edit the details with RFHUtil and let it work out the length itself. There are documented rules regarding the RFH2 which RFHUtil applies and their absence is the cause of most malformed RFH2 headers.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Thu Dec 15, 2011 6:50 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Vitor wrote:
Edit the details with RFHUtil


What do you mean with details? - Probably all the tabs (at the top of RFH-Util) and the fields contained there (all header-stuff).

What about the message body? You can't with RFH-Util, at least the version that I use.

Vitor wrote:
There are documented rules regarding the RFH2 which RFHUtil applies

Thats what I mean with that it is not plain/obvious... probably there is a plain and obvious lenght field, but it is not enough to adjust that !?

So RFH-Util adjust "according to rules", when editing the header, but it can't edit the body.


I guess Luke's workaround does it.


Last edited by mqsiuser on Thu Dec 15, 2011 6:54 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 15, 2011 6:54 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqsiuser wrote:
Vitor wrote:
There are documented rules regarding the RFH2 which RFHUtil applies

Thats what I mean with that it is not plain/obvious... probably there is a plain and obvious lenght field, but it is not enough to adjust that !?


It's plain and obvious in the sense that they're in the documentation like the rules for the ordering of parameters in an MQPut call and what types the parameters must be.

If that's not the sense of plain and obvious you mean then no they're not.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 15, 2011 6:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

And of course with the rise of message properties in v7 it's all a bit philosophical anyway.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Thu Dec 15, 2011 7:07 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

Vitor wrote:
If that's not the sense of plain and obvious you mean then no they're not.


Why isn't it possible to edit the body within RFH-Util? Is it the programmers responsibility to figure out something ? - When I see that RFH-Util is just an unoffical support pack and the de facto standard and still you can't even edit the message (body) easily... I think what's wrong with IT?

What are message properties
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 15, 2011 7:12 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqsiuser wrote:
When I see that RFH-Util is just an unoffical support pack and the de facto standard and still you can't even edit the message (body) easily... I think what's wrong with IT?


I think you're entitled to think anything you like, as and to what's wrong with IT one of our regulars will be along in a moment to compare notes.

IHMO there are a number of people who would disagree with "de facto standard". Widely used certainly (I'm one of the user base) but standard? Certainly not the ideal tool in all circumstances.

mqsiuser wrote:
What are message properties


They're described in WMQv7 InfoCenter in a plain & obvious style
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Dec 15, 2011 7:15 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

mqsiuser wrote:

Why isn't it possible to edit the body within RFH-Util?

The supportpac does what it's advertised to do.

mqsiuser wrote:
Is it the programmers responsibility to figure out something ?

Yes, always. Developers need to develop apps that put messages, apps that get messages, and apps that validate or modify the contents of messages, to meet whatever specifications are set.

mqsiuser wrote:
- When I see that RFH-Util is just an unoffical support pack and the de facto standard and still you can't even edit the message (body) easily... I think what's wrong with IT?

There are similar applications from 3rd-party providers that will do what you want.
mqsiuser wrote:
What are message properties

Try searching here (search button above) or google.
_________________
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
View user's profile Send private message
mqsiuser
PostPosted: Thu Dec 15, 2011 7:31 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

bruce2359 wrote:
The supportpac does what it's advertised to do.

I guess ... it was for editing RFH2-Headers in the first place (that's what the name suggests )... probably it emerged from that into editing a lot of other headers too (that' what it seems to be today). Its still named RFH-Util, I'd like to see that it has in one of the future version a button "edit" on the message(-body) like wmq-tool does.

bruce2359 wrote:
mqsiuser wrote:
Is it the programmers responsibility to figure out something ?

Yes, always.

Infrastructure stuff should be provided, I think.

bruce2359 wrote:
There are similar applications from 3rd-party providers that will do what you want.

o.k. ... you need a couple of tools, each with their own strengths.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Dec 15, 2011 8:18 am    Post subject: Re: How to edit message saved by rfhutil without loosing hea Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

mqsiuser wrote:

Infrastructure stuff should be provided, I think.

Somewhere here there is a requirements topic where you can post your suggestions for improvements.
_________________
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
View user's profile Send private message
Bartez75
PostPosted: Fri Dec 16, 2011 1:17 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Workaround from Luke worked fine.
Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to edit message saved by rfhutil without loosing headers
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.