Author |
Message
|
gobhandago |
Posted: Mon Jul 13, 2009 6:28 am Post subject: IMS Transaction -- J2EE System interaction -- CCSID issue |
|
|
Newbie
Joined: 13 Jul 2009 Posts: 4
|
I am working on a Z/OS based system which is attempting to establish connectivity to a J2EE based system through Websphere MQ.
We are able to send requests to the J2EE based system via MQ and successfully receive response message from them.
The response is arriving on a Trigger Monitor based queue which is triggering our IMS transaction successfully.
However, the J2EE system is setting CCSID to 1208. Due to this we are not able to convert the message to a readable format. After looking at similar interfaces to other J2EE based systems, I understand that the CCSID of the received response message must be 500 to be able to successfully convert the message.
However, the new J2EE based system which we are interacting with has restrictions due to which they will not be able to alter the CCSID to suit our needs.
Assuming that the J2EE bases system cannot change, can someone please suggest a workaround for this issue.
We want our IMS based COBOL program to be able to read the received message and interpret it correctly. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 13, 2009 7:40 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gobhandago wrote: |
However, the J2EE system is setting CCSID to 1208. Due to this we are not able to convert the message to a readable format. After looking at similar interfaces to other J2EE based systems, I understand that the CCSID of the received response message must be 500 to be able to successfully convert the message. |
No, if the message payload is coded in 1208 it's correct for the CCSID to reflect that. The question is why can't your receiving system convert this to 500 (which IIRC is the code page for many z/OS systems). Make such you have the right conversion tables and the message is formatted as string. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gobhandago |
Posted: Mon Jul 13, 2009 7:50 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
Newbie
Joined: 13 Jul 2009 Posts: 4
|
Vitor wrote: |
gobhandago wrote: |
However, the J2EE system is setting CCSID to 1208. Due to this we are not able to convert the message to a readable format. After looking at similar interfaces to other J2EE based systems, I understand that the CCSID of the received response message must be 500 to be able to successfully convert the message. |
No, if the message payload is coded in 1208 it's correct for the CCSID to reflect that. The question is why can't your receiving system convert this to 500 (which IIRC is the code page for many z/OS systems). Make such you have the right conversion tables and the message is formatted as string. |
Hi Vitor,
Thanks for your prompt response.
Here is the MQMD header,
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 2
Expiry : 598755 Feedback : 0
Encoding : 273 CodedCharSetId : 1208
Format : 'xml '
Priority : 0 Persistence : 0
MsgId : X'414D51204C50445741373334202020206B18044A0CC81820'
CorrelId : X'C3E2D840D4D8D4F14040404040404040C47A1AE80EFFEA02'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'SERVER007 '
** Identity Context
UserIdentifier : ' '
AccountingToken :
X'0000000000000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'java '
PutDate : '20090713' PutTime : '07374595'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
As you can seem the Format is set to 'xml'.
Is this the same as setting format to string?
When we try to convert the received message,we are ending up with junk characters.
Thanks again for your help. Looking forward to your response. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 13, 2009 8:09 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gobhandago wrote: |
As you can seem the Format is set to 'xml'.
Is this the same as setting format to string?
|
It's not one of the supplied values (there are a set of constant values delivered with the product) so this is why the conversion's not working and you get junk when you read it.
Ask whoever's putting the message why they're not using one of the accepted values. If they're as unwilling to change that as they are CCSID (unreasonably - the CCSID they're setting correctly) then you could write a custom conversion called "xml" and use that. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gobhandago |
Posted: Mon Jul 13, 2009 8:17 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
Newbie
Joined: 13 Jul 2009 Posts: 4
|
Vitor wrote: |
gobhandago wrote: |
As you can seem the Format is set to 'xml'.
Is this the same as setting format to string?
|
It's not one of the supplied values (there are a set of constant values delivered with the product) so this is why the conversion's not working and you get junk when you read it.
Ask whoever's putting the message why they're not using one of the accepted values. If they're as unwilling to change that as they are CCSID (unreasonably - the CCSID they're setting correctly) then you could write a custom conversion called "xml" and use that. |
Thanks Vitor.
Can you throw some more light on writing a custom conversion?
Is it possible to set the Format of message to "MQSTR" manually at the receiving end before attempting to read the message?
i.e. is this pseudo code valid;
Get Message;
If Message.Format = "xml"
set Message.Format="MQSTR";
Read message;
I apologize if this sounds weird. I am new to COBOL MQ programming. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 13, 2009 8:51 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gobhandago wrote: |
Is it possible to set the Format of message to "MQSTR" manually at the receiving end before attempting to read the message? |
No.
gobhandago wrote: |
i.e. is this pseudo code valid;
Get Message;
If Message.Format = "xml"
set Message.Format="MQSTR";
Read message; |
No. There's no difference between "get message" and "read message". If you're doing this, you'd be better advised to read the message off, accept you've got a message in a CCSID of 1208 & use program logic to convert the message into CCSID 500 before continuing the processing. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jul 13, 2009 8:57 am Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
gobhandago wrote: |
Can you throw some more light on writing a custom conversion? |
It's documented in the manual much better than I can explain, but put simply if the format is unrecognised the queue manager will try and load an assembler exit of that name to do the conversion.
As exits go in WMQ it's less dangerous than most, though a serious error in the exit code will still cause unpleasant things to happen; at best throughput will drop and/or the message will come out as cream cheese, at worse the queue manager will crash.
If it was me, and it isn't, I'd hit the sending application people upside the head with a trout until they set the header values properly. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
gobhandago |
Posted: Mon Jul 13, 2009 11:17 am Post subject: |
|
|
Newbie
Joined: 13 Jul 2009 Posts: 4
|
Thanks Vitor. I will follow up with the J2EE system people. I will post a resolution or update when it becomes available.\
Cheers! |
|
Back to top |
|
 |
bruce2359 |
Posted: Mon Jul 13, 2009 3:15 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
If the creator of the message inserted 'xml' in the format field, he/she must have created a conversion utility named 'xml' to be installed on the receiving qmgr. Ask the folks that created the message "where is the converion utility named xml?" _________________ 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: Mon Jul 13, 2009 5:07 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
bruce2359 wrote: |
If the creator of the message inserted 'xml' in the format field, he/she must have created a conversion utility named 'xml' to be installed on the receiving qmgr. Ask the folks that created the message "where is the converion utility named xml?" |
Or ask them to be nice MQ programmers and set Format to "MQSTR " (=MQFMT_STRING) when the message is put. _________________ Glenn |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 13, 2009 7:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As they are in a J2EE environment you really should ask them to stick to the conventions and send a javax.jms.TextMessage.
My guess is they are sending a BytesMessage and possibly manipulating the format field.
Once that is done and as you are probably having a MapMessage (IMS) you may try to set the CCSID on the destination in JNDI to 500.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|