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 » WebSphere Message Broker (ACE) Support » ESQL - field level ascii to ebcdic conversion

Post new topic  Reply to topic
 ESQL - field level ascii to ebcdic conversion « View previous topic :: View next topic » 
Author Message
najmaaaa
PostPosted: Tue Jun 05, 2012 8:48 am    Post subject: ESQL - field level ascii to ebcdic conversion Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Tue Jun 05, 2012 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Wed Jun 06, 2012 1:09 am    Post subject: Reply with quote

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
View user's profile Send private message
najmaaaa
PostPosted: Wed Jun 06, 2012 7:27 am    Post subject: Reply with quote

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

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL - field level ascii to ebcdic conversion
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.