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 » IBM MQ API Support » IMS Transaction -- J2EE System interaction -- CCSID issue

Post new topic  Reply to topic
 IMS Transaction -- J2EE System interaction -- CCSID issue « View previous topic :: View next topic » 
Author Message
gobhandago
PostPosted: Mon Jul 13, 2009 6:28 am    Post subject: IMS Transaction -- J2EE System interaction -- CCSID issue Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 13, 2009 7:40 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
gobhandago
PostPosted: Mon Jul 13, 2009 7:50 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 13, 2009 8:09 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
gobhandago
PostPosted: Mon Jul 13, 2009 8:17 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 13, 2009 8:51 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Mon Jul 13, 2009 8:57 am    Post subject: Re: IMS Transaction -- J2EE System interaction -- CCSID issu Reply with quote

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
View user's profile Send private message
gobhandago
PostPosted: Mon Jul 13, 2009 11:17 am    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Mon Jul 13, 2009 3:15 pm    Post subject: Reply with quote

Poobah

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

Quote:
Format : 'xml '

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
View user's profile Send private message
gbaddeley
PostPosted: Mon Jul 13, 2009 5:07 pm    Post subject: Reply with quote

Jedi Knight

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

bruce2359 wrote:
Quote:
Format : 'xml '

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 13, 2009 7:56 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » IMS Transaction -- J2EE System interaction -- CCSID issue
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.