|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
ESQL - field level ascii to ebcdic conversion |
« View previous topic :: View next topic » |
Author |
Message
|
najmaaaa |
Posted: Tue Jun 05, 2012 8:48 am Post subject: ESQL - field level ascii to ebcdic conversion |
|
|
Newbie
Joined: 19 Feb 2012 Posts: 4
|
Hi,
I have to convert the data from ascii to ebcdic field by field. I tried using the cast function, along with the ccsid 500 and encoding 785. I tried with few other ccsid and encoding(related to ebcdic) as well. But, the data was not getting converted to ebcdic unless and until the ccsid and encoding are set in the MQMD header. I cannot use this option, since my expected output data is a mixture of hexadecimal and ebcdic.
Can anyone please let me know if there Is a way to do the field level conversion from ascii to ebcdic? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 05, 2012 8:53 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I suspect you'll find that even the hexadecimal needs to be in ebcdic.
I.e. it does no good to send an ascii "4F" when the mainframe is expecting an ebcdic "4f".
Secondly, the results you're getting may not be the results you think you're getting. Double-check the bytes you see on the output message against the ccsid when you don't set it in the mqmd.
Thirdly, of course, any fields you specify that are modelled rather than adhoc are in fact in Unicode and not anything else, until you actually serialize the message. |
|
Back to top |
|
 |
kimbert |
Posted: Wed Jun 06, 2012 1:09 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Can anyone please let me know if there Is a way to do the field level conversion from ascii to ebcdic? |
Well...the CAST function is the hard way to do it. The easy way is
1. model your input message ( create a message set with a physical format, probably CWF ). If you have a copybook for your input message then you can use the COBOL importer to do this step automatically.
2. In a Compute node, set OutputRoot.Properties.CCSID to the desired output code page. That's one line of ESQL.
3. Sit back and let the product do the work for you. Any CHARACTER fields will be written with the code page specified in OutputRoot.Properties.CCSID. Any non-CHARACTER fields will be left alone. |
|
Back to top |
|
 |
najmaaaa |
Posted: Wed Jun 06, 2012 7:27 am Post subject: |
|
|
Newbie
Joined: 19 Feb 2012 Posts: 4
|
Thank You for the response.
I do not have the cobol copy book.
Since my expected output structure was very small, did the field level conversion to ebcdic in BLOB domain. My Output data is in expected format with ebcdic and hex value of few characters. I have used the CCSID 37 and ENCODING 546. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|