Author |
Message
|
narki |
Posted: Mon Feb 28, 2011 6:22 pm Post subject: Dermining EBCIDIC or ASCII |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
I have quick question, I have flow in which I need to determine wether the message sent is EBCIDIC or ASCII. Depending on that there is a flag in the database which I need to update. I just want to what is the best way to determine wether the mesage is EBCDIC or ASCII. Any help in this regaris is higly appriciateble. |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Feb 28, 2011 8:39 pm Post subject: Re: Dermining EBCIDIC or ASCII |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
narki wrote: |
I have quick question, I have flow in which I need to determine wether the message sent is EBCIDIC or ASCII. Depending on that there is a flag in the database which I need to update. I just want to what is the best way to determine wether the mesage is EBCDIC or ASCII. Any help in this regaris is higly appriciateble. |
Don't use a flag. If you save the message "as is", you also need to save its CCSID and Encoding, and possibly format.
If you do not save the message as a BLOB the question is meaningless.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
narki |
Posted: Tue Mar 01, 2011 12:33 am Post subject: |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
fjp_saper,
I do not have any choice, as this is existing application. This is rquest and response flow, request messages flow can receive messages EBCDIC or ASCII , which goes through various message flow before it finally goes to reponse message flow which uses this flag to to send back message in the same format in which request has sent the messages. |
|
Back to top |
|
 |
zpat |
Posted: Tue Mar 01, 2011 12:36 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Look at the MQMD.CCSID in the message tree.
Well written MQ applications issue MQGET with MQGMO_CONVERT so that they do not care which codepage the message was sent in. |
|
Back to top |
|
 |
narki |
Posted: Tue Mar 01, 2011 12:51 am Post subject: |
|
|
Acolyte
Joined: 19 Dec 2005 Posts: 67
|
Yes I know that MQMD.CCSID can be used for determining the the EBCDIC or ASCII but there can many code page which can be EBCDIC. Also I realyy do not care in request flow , its in response which which need to use the same code page to sent message to requester. |
|
Back to top |
|
 |
kimbert |
Posted: Tue Mar 01, 2011 4:50 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
its in response which which need to use the same code page to sent message to requester. |
So save the code page ( the one in the final MQ header ). If you only save a flag then you risk putting the wrong code page onto the output message. |
|
Back to top |
|
 |
|