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 » Mainframe, CICS, TXSeries » Question on MQHRF2 data format

Post new topic  Reply to topic Goto page 1, 2  Next
 Question on MQHRF2 data format « View previous topic :: View next topic » 
Author Message
chandru3183
PostPosted: Sat Apr 01, 2017 11:20 pm    Post subject: Question on MQHRF2 data format Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

Hi ,

We have developed COBOL-CICS to call 'MQPUT' for MQHRF2 format.
When we see the MQ output, we are getting the payload message with junk character.

Sample format
Code:
Encoding : '273'
CodedCHarSetid : '1208'
Format : 'MQHRF2'
PutApplType: '1'
PutApplName :'APPL1'
PutDate  : '20051005-11114412880'
Header 0: '<mcd><Msd>jms_text</Msd></mcd> '
Header 1: '<jms><Dst>queue:///MYQUEUE.SAMPLE.INPUT1 </Dst><Tms>14323
Message : ')$@""..

1) Could you please help me to convert junk to ASCII readable format.
2) Is there a way to put with additional header dynamically?
example:
Header 2: '<usr><TimeStamp>Fri Jan,,,,,>

Thanks in advance,
Chan
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sun Apr 02, 2017 7:53 am    Post subject: Re: Question on MQHRF2 data format Reply with quote

Poobah

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

chandru3183 wrote:
Hi ,

We have developed COBOL-CICS to call 'MQPUT' for MQHRF2 format.
When we see the MQ output, we are getting the payload message with junk character.

Sample format
Code:
Encoding : '273'
CodedCHarSetid : '1208'
Format : 'MQHRF2'
PutApplType: '1'
PutApplName :'APPL1'
PutDate  : '20051005-11114412880'
Header 0: '<mcd><Msd>jms_text</Msd></mcd> '
Header 1: '<jms><Dst>queue:///MYQUEUE.SAMPLE.INPUT1 </Dst><Tms>14323
Message : ')$@""..

1) Could you please help me to convert junk to ASCII readable format.

Where are you viewing the message? On z/OS? Why do you want to convert it to ASCII? To be able to view it with a utility? IBM MQ for z/OS comes with utilities for this purpose. Contact your z/OS technical support person.
_________________
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
gbaddeley
PostPosted: Sun Apr 02, 2017 4:35 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2492
Location: Melbourne, Australia

You may not be conforming exactly to the MQRFH2 header structure format. It is a binary format, so you need to be aware of integer byte ordering and word alignment and padding. Is there a COBOL copybook for this?

NB: Its MQRFH2, not MQHRF2.
_________________
Glenn
Back to top
View user's profile Send private message
hughson
PostPosted: Mon Apr 03, 2017 12:53 am    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

gbaddeley wrote:
NB: Its MQRFH2, not MQHRF2.
Actually, the string value of MQFMT_RF_HEADER_2_ is "MQHRF2 ", so he's correct. The structure is named MQRFH2, so you're correct. It's all very convoluted!
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Mon Apr 03, 2017 4:37 am    Post subject: Reply with quote

Grand High Poobah

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

And don't use COBOL for constructing an RFH2 header. Use properties in Handle and create the property... you can then write the message to queue and let MQ perform its magic and display the properties on an RFH2 header...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
elkinsc
PostPosted: Thu Apr 06, 2017 6:37 am    Post subject: and here is a sample Reply with quote

Centurion

Joined: 29 Dec 2004
Posts: 138
Location: Indy

of a COBOL CICS program that applies message properties:
https://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/PRS5189
Back to top
View user's profile Send private message
chandru3183
PostPosted: Sat Apr 08, 2017 8:33 am    Post subject: Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

Thank you all for the response. MQ admin was on vacation. As suggested in the post, he configured using message properties. All the headers are coming as expected now.
Back to top
View user's profile Send private message
chandru3183
PostPosted: Fri Apr 14, 2017 9:06 am    Post subject: Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

Could you please let me know whether it is possible to replace header with User defined header using
COBOL application program?
For example
Before changes:
Header 0:
After changes:
My header:
Back to top
View user's profile Send private message
elkinsc
PostPosted: Fri Apr 14, 2017 9:26 am    Post subject: What are you asking? Reply with quote

Centurion

Joined: 29 Dec 2004
Posts: 138
Location: Indy

Your question is unclear.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri Apr 14, 2017 11:13 am    Post subject: Reply with quote

Poobah

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

chandru3183 wrote:
Could you please let me know whether it is possible to replace header with User defined header using
COBOL application program?
For example
Before changes:
Header 0:
After changes:
My header:

MessageProperties makes this possible.
_________________
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
chandru3183
PostPosted: Fri Apr 14, 2017 8:58 pm    Post subject: Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

Could you please let me know which property name I should use in COBOL program to implement user defined header caption.
I searched in Google but no luck
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Apr 15, 2017 4:48 am    Post subject: Reply with quote

Poobah

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

chandru3183 wrote:
Could you please let me know which property name I should use in COBOL program to implement user defined header caption.
I searched in Google but no luck

Header caption?
_________________
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
chandru3183
PostPosted: Sat Apr 15, 2017 6:35 am    Post subject: Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

Thanks for the response.
I searched in Google with multiple combination of above keywords but didn't get the expected variable in COBOL.
I have also tried the options in MQMD parameters and related variables. But nothing helped me
Back to top
View user's profile Send private message
bruce2359
PostPosted: Sat Apr 15, 2017 4:57 pm    Post subject: Reply with quote

Poobah

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

chandru3183 wrote:
Thanks for the response.
I searched in Google with multiple combination of above keywords but didn't get the expected variable in COBOL.
I have also tried the options in MQMD parameters and related variables. But nothing helped me

Which above keywords did you search for exactly?

Go to google. Use this search string +cobol +mq+message properties
_________________
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
chandru3183
PostPosted: Mon Apr 17, 2017 11:08 pm    Post subject: Reply with quote

Novice

Joined: 01 Apr 2017
Posts: 11

I have searched with the above combination but unable to get the exact COBOL statement to populate the header or Meta data like the below. I really don't know where I am lacking.
Code:

Message Type: Type1

Here, Message Type is a caption.
Type1 is the Named data value from the program.
When I include Namedata length and Name data value, I am
getting the header data like the below. But expecting user defined value Message Type. Can anyone please let me know how to handle this issue.
Code:

Header 0 : Type1


Please note that I am using the below statement to put the message from mainframe.
call MQPUT using parm1 Parm2..
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Mainframe, CICS, TXSeries » Question on MQHRF2 data format
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.