Author |
Message
|
fswarbrick |
Posted: Wed Aug 21, 2019 2:38 pm Post subject: Can you force MQSTR on MQGET |
|
|
Apprentice
Joined: 07 Jul 2014 Posts: 42
|
I have a vendor application that appears to write messages with the format of MQFMT_NONE (spaces) instead of MQFMT_STRING (MQSTR). The vendor application runs on Windows (Java) using CCSID 1208 (UTF-8) by default. We are a mainframe shop using EBCDIC (CCSID 1140).
As it stands now the vendor has an option to convert to EBCDIC prior to putting the message on the queue. This works fine, but seems to me to not take full advantage of MQ features. They should, I imagine, be using MQSTR format and simply writing using UTF-8 (which they do by default). We could then set the MQGMO_CONVERT option and specify CCSID 1140.
So my question is, is there a way I could have MQ do the conversion even though the vendor application is using MQFTM_NONE?
Thank you,
Frank |
|
Back to top |
|
 |
hughson |
Posted: Wed Aug 21, 2019 6:55 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I imagine there is probably some really convoluted combination of API exits and data conversion exits that might get you there, but it would be much easier to talk the putting application vendor into setting one small character field - the MQMD.Format - to the appropriate value.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
markt |
Posted: Wed Aug 21, 2019 10:23 pm Post subject: |
|
|
 Knight
Joined: 14 May 2002 Posts: 508
|
If it's a Java program, the ease of changing the app will be different between using the base Java classes or JMS where it would have to be a TextMessage object. Not a big change in itself but might have ripples depending on how the app's classes are structured.
Since this is a mainframe GETter, then even exits might be effectivtly impossible if the PUTter is client-connected. If it's coming across a channel from a Windows qmgr, then a Message exit might do the trick. |
|
Back to top |
|
 |
HubertKleinmanns |
Posted: Thu Aug 22, 2019 1:14 am Post subject: |
|
|
 Shaman
Joined: 24 Feb 2004 Posts: 732 Location: Germany
|
You could also use a channel exit which changes the format value.
But the "correct" solution would be - as Morag suggested - to change the application.
Maybe you could open a ticket, change request or whatever against the vendor, that the put the correct Information into the MQMD _________________ Regards
Hubert |
|
Back to top |
|
 |
fswarbrick |
Posted: Thu Aug 22, 2019 7:55 am Post subject: |
|
|
Apprentice
Joined: 07 Jul 2014 Posts: 42
|
I have requested the vendor change from using a BytesMessage to a TextMessage. Who knows if they will do it, or how long it will take. Thus the question.
Looks like I'll live with it until such time as the vendor makes the change.
Thanks to all! |
|
Back to top |
|
 |
tczielke |
Posted: Thu Aug 22, 2019 11:18 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
What language is the getting application using on the mainframe? _________________ Working with MQ since 2010. |
|
Back to top |
|
 |
fswarbrick |
Posted: Thu Aug 22, 2019 11:21 am Post subject: |
|
|
Apprentice
Joined: 07 Jul 2014 Posts: 42
|
tczielke wrote: |
What language is the getting application using on the mainframe? |
COBOL. |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Aug 22, 2019 2:46 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
fswarbrick wrote: |
I have requested the vendor change from using a BytesMessage to a TextMessage. Who knows if they will do it, or how long it will take. Thus the question.
Looks like I'll live with it until such time as the vendor makes the change.
Thanks to all! |
It's possible/likely that the application message data component is mixed - some text, some binaries, some of this, some of that. If so, neither BytesMessage nor TextMessage will improve your lot.
What can you tell us about the application message data component? What is it... exactly? _________________ 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 |
|
 |
fswarbrick |
Posted: Thu Aug 22, 2019 2:51 pm Post subject: |
|
|
Apprentice
Joined: 07 Jul 2014 Posts: 42
|
The message is pure text. It won't be an problem for them to change. I think whoever developed the application just had a misunderstanding of some sort. |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu Aug 22, 2019 3:53 pm Post subject: Re: Can you force MQSTR on MQGET |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
fswarbrick wrote: |
I have a vendor application that appears to write messages with the format of MQFMT_NONE (spaces) instead of MQFMT_STRING (MQSTR). The vendor application runs on Windows (Java) using CCSID 1208 (UTF- by default. We are a mainframe shop using EBCDIC (CCSID 1140).
As it stands now the vendor has an option to convert to EBCDIC prior to putting the message on the queue. This works fine, but seems to me to not take full advantage of MQ features. They should, I imagine, be using MQSTR format and simply writing using UTF-8 (which they do by default). We could then set the MQGMO_CONVERT option and specify CCSID 1140. |
The vendor has coded their MQ application incorrectly, so they will need to correct the defect. You must go down this path. Anything else is a compromise that will involve signficant time and effort to implement, and creates a technical debt for future generations.
Quote: |
So my question is, is there a way I could have MQ do the conversion even though the vendor application is using MQFTM_NONE? |
A solution is to add an intermediate app program that gets the MQFMT_NONE messages and puts them to another queue as MQFMT_STRING with a valid CCSID. The z/OS COBOL app then does MQGET with MQGMO_CONVERT from the other queue.
Thank you,
Frank[/quote] _________________ Glenn |
|
Back to top |
|
 |
fswarbrick |
Posted: Thu Aug 22, 2019 3:57 pm Post subject: Re: Can you force MQSTR on MQGET |
|
|
Apprentice
Joined: 07 Jul 2014 Posts: 42
|
gbaddeley wrote: |
A solution is to add an intermediate app program that gets the MQFMT_NONE messages and puts them to another queue as MQFMT_STRING with a valid CCSID. The z/OS COBOL app then does MQGET with MQGMO_CONVERT from the other queue.
|
Yeah, I thought of that. (Not a different programs, just having the program do MQGET/MQPUT as MQSTR/MQGET.) Probably not worth the effort. Hopefully I can convince the vendor to fix their interface.  |
|
Back to top |
|
 |
|