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 Discussion » HQHRF2 to MQSTR

Post new topic  Reply to topic
 HQHRF2 to MQSTR « View previous topic :: View next topic » 
Author Message
Amit15
PostPosted: Tue Oct 04, 2005 1:56 am    Post subject: HQHRF2 to MQSTR Reply with quote

Novice

Joined: 20 Sep 2005
Posts: 24

Please tell em how can i change message format from HQHRF2 to MQSTR

thanks
Back to top
View user's profile Send private message
Nigelg
PostPosted: Tue Oct 04, 2005 3:13 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

MQGET the msg in your app.
Set MQMD.Format to MQSTR
MQPUT the msg back to the queue
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
Amit15
PostPosted: Tue Oct 04, 2005 3:29 am    Post subject: Reply with quote

Novice

Joined: 20 Sep 2005
Posts: 24

Hoq can i set please let me know

Regards
Back to top
View user's profile Send private message
dgolding
PostPosted: Tue Oct 04, 2005 3:37 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

Quote:
Hoq can i set please let me know


strcpy(MQMD.Format, MQFMT_STRING)


1) learn a programming language (C, C++, COBOL, Java)

2) Read Programmers Application Guide

3) Edit application program

4) Compile and link

Back to top
View user's profile Send private message Visit poster's website
EddieA
PostPosted: Tue Oct 04, 2005 9:43 am    Post subject: Reply with quote

Jedi

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

Quote:
MQGET the msg in your app.
Set MQMD.Format to MQSTR
MQPUT the msg back to the queue

Shouldn't there be a step in the middle that removes the RFH2 from the payload.

Also, that assumes that the data is String. A safer way would be:
Set MQMD.Format from RFH2.Format

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: Tue Oct 04, 2005 2:02 pm    Post subject: Reply with quote

Grand High Poobah

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

One possibility would be to use a JMSBytesMessage to get the payload, put it to a JMSTextMessage and send it to a destination like:
Code:
queue://qmgr/qname?targetClient=1
MQ client and not JMS client as that will automatically set it to an MQSTR format and strip the RFH header...

Enjoy
Back to top
View user's profile Send private message Send e-mail
Nigelg
PostPosted: Wed Oct 05, 2005 12:59 am    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

EddieA, maybe there should be a step in the middle, but that is not what Amit15 asked. The question contains no information about the type of the msg at all.
_________________
MQSeries.net helps those who help themselves..
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 Discussion » HQHRF2 to MQSTR
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.