Author |
Message
|
chandru3183 |
Posted: Sat Apr 01, 2017 11:20 pm Post subject: Question on MQHRF2 data format |
|
|
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 |
|
 |
bruce2359 |
Posted: Sun Apr 02, 2017 7:53 am Post subject: Re: Question on MQHRF2 data format |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
gbaddeley |
Posted: Sun Apr 02, 2017 4:35 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 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 |
|
 |
hughson |
Posted: Mon Apr 03, 2017 12:53 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 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 |
|
 |
fjb_saper |
Posted: Mon Apr 03, 2017 4:37 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 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 |
|
 |
elkinsc |
Posted: Thu Apr 06, 2017 6:37 am Post subject: and here is a sample |
|
|
 Centurion
Joined: 29 Dec 2004 Posts: 138 Location: Indy
|
|
Back to top |
|
 |
chandru3183 |
Posted: Sat Apr 08, 2017 8:33 am Post subject: |
|
|
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 |
|
 |
chandru3183 |
Posted: Fri Apr 14, 2017 9:06 am Post subject: |
|
|
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 |
|
 |
elkinsc |
Posted: Fri Apr 14, 2017 9:26 am Post subject: What are you asking? |
|
|
 Centurion
Joined: 29 Dec 2004 Posts: 138 Location: Indy
|
Your question is unclear. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Apr 14, 2017 11:13 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
chandru3183 |
Posted: Fri Apr 14, 2017 8:58 pm Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Sat Apr 15, 2017 4:48 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
chandru3183 |
Posted: Sat Apr 15, 2017 6:35 am Post subject: |
|
|
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 |
|
 |
bruce2359 |
Posted: Sat Apr 15, 2017 4:57 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 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 |
|
 |
chandru3183 |
Posted: Mon Apr 17, 2017 11:08 pm Post subject: |
|
|
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.
Please note that I am using the below statement to put the message from mainframe.
call MQPUT using parm1 Parm2.. |
|
Back to top |
|
 |
|