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 » IBM MQ API Support » MQRFH MQRFH2

Post new topic  Reply to topic
 MQRFH MQRFH2 « View previous topic :: View next topic » 
Author Message
AITKENM
PostPosted: Fri Apr 01, 2005 2:32 am    Post subject: MQRFH MQRFH2 Reply with quote

Newbie

Joined: 19 Mar 2005
Posts: 3

Hi,
I am developing an app to simply read messages from a queue. I am a little confused as to the best practise for handling different header values. At the moment I check to see if the message descriptor Format is MQRFH. If it is I cast the message recived to a MQRFH and then use the format field of that to determine if I have a MQRFH2 header. Is this correct or is there a preferred way of doing this.
Thanks
Mark.
Back to top
View user's profile Send private message
malammik
PostPosted: Fri Apr 01, 2005 6:53 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

That sounds good but what do you mean by casting it into rfh2 message?
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
AITKENM
PostPosted: Fri Apr 01, 2005 7:40 am    Post subject: Reply with quote

Newbie

Joined: 19 Mar 2005
Posts: 3

Hi Thanks for the feedback, Basically I am writing in CPP. If the MD Format is MQRFH then I cast the Data received to one of those structures, I then can access the header information through my pointer. Will the MD Format ever be MQRFH2?

Cheers
Mark.
Back to top
View user's profile Send private message
malammik
PostPosted: Fri Apr 01, 2005 7:44 am    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

Sure. If you receive any messages from a jms client they will be rfh version 2 messages. I would definitely suggest that you code up ur prog to handle both versions of rfh.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
EddieA
PostPosted: Fri Apr 01, 2005 9:46 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

But RFH and RFH2 headers have different Format names:
Quote:
MQFMT_RF_HEADER 'MQHRFbbb'
MQFMT_RF_HEADER_2 'MQHRF2bb'

So, you can't use the Format for one, but the "payload" for the other.
Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Apr 01, 2005 1:52 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

And I would be very carefull with all that "casting".
Think about pointer/memory overflows and all that stuff.

Enjoy
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » MQRFH MQRFH2
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.