Author |
Message
|
prasannal |
Posted: Wed Mar 02, 2005 10:47 pm Post subject: Running Java client on Unix |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
Hi,
I just want to make sure if I any problem may arise about data conversion.
I have a Unix based MQ client, which is reading from MQSeries queue
located on Windows platform.
Then my client is creating flat files on unix from message data read.
Will there be any data conversion(CCSID/encoding related) required?
Also, if in reverse way, if my unix client is putting file data from unix file on mqseries queue on windows.
Thanks,
Prsanna |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Mar 03, 2005 5:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It depends on the data.
Is it Unicode? Is it ASCII? Is it binary?
Does it have Unix line feeds on the input side? Does it require Windows line feeds on the output side?
It always helps to understand your requirements before you start to write code. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
malammik |
Posted: Thu Mar 03, 2005 6:15 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Mar 03, 2005 5:55 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
When the MQClient app issues an MQGET with convert, and the message has a format of "MQSTR ", and you go with the default value for the CCSID and Encoding on the MQGET call, the underlying MQ client code will call out to the QM asking for an MQ message to be returned in the CCSID and encoding of what the MQClient is actually running on, lets assume Solaris for the sake of argement. If the message is on the queue already in this format, then there is no conversion. If the message is on the queue in some other CCSID, then the QM will convert.
Its not really important what OS that QM and Queue are on, or what OS the MQClient is on. Whats important is what CCSID is the message in as it sits on the queue, that it is character data, that it has an MQMD_FORMAT of "MQSTR ", and that the QM has the conversion tables to convert it to what CCSID the MQClient needs (which 99.9% of the time it will). _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
malammik |
Posted: Thu Mar 03, 2005 6:06 pm Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Mar 03, 2005 6:09 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Are you saying the MQGET with convert can complete succesfully, yet he has a message buffer conatining data that is not 100% good to go into a file on that client server? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
malammik |
Posted: Thu Mar 03, 2005 6:19 pm Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
That would be a travesty. What I am saying is that when that data is written to a flat file and then interpreted by another application that assumes the data is encoded using OS default CCSID, he might get a problem.
I will give you recent example. Slightly different but demonstrates the point. I had an application which was receiving UTF-8 data using 1208 codeset and then updating it into Oracle was configued unicode unaware so the characters that expanded beyond ascii code set were not inserted with the proper binary values. I assume same thing can happen in this scenario. Am I wrong? _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
malammik |
Posted: Thu Mar 03, 2005 6:25 pm Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
I guess what I am trying to say is that I agree with you that the data will be WRITTEN to a file "correctly" from an MQ perspective. But will it be READ and VIEWED correctly if the os is not set up to handle the character set to which message were converted OR if the character set is not flexible to handle the types of characters that will be sent. _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Mar 04, 2005 5:34 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
malammik wrote: |
will it be READ and VIEWED correctly if the os is not set up to handle the character set to which message were converted OR if the character set is not flexible to handle the types of characters that will be sent. |
Yeah.
It's always good to understand the requirements before writing code...
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
prasannal |
Posted: Sun Mar 06, 2005 9:08 pm Post subject: Unix file read/write with MQ |
|
|
Apprentice
Joined: 04 Aug 2003 Posts: 44
|
|
Back to top |
|
 |
|