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 » Cast blob to char: ebcdic to ascii

Post new topic  Reply to topic
 Cast blob to char: ebcdic to ascii « View previous topic :: View next topic » 
Author Message
wbintegrator
PostPosted: Wed Mar 29, 2006 6:21 am    Post subject: Cast blob to char: ebcdic to ascii Reply with quote

Voyager

Joined: 08 Feb 2006
Posts: 83

I have a problem trying to cast an ebcidic message from IMS to ascii.
I've tried a row of CCSID-s 819,916,1208 etc but nothing worked.

Code:
DECLARE imsMsg CHAR CAST(InputBody.BLOB AS CHAR CCSID 916);


In case u wonder why I need the IMS message: whenever a mainframe procedure terminates abnormally or if theIMS is shutting down, it keeps sending messages notifying of that and the users have no way to know it as the exception handling I have doesn't "know" to identify this cases. So I'm trying to identify these cases by parsing the IMS messages.

Thanks in advance.
Back to top
View user's profile Send private message
fschofer
PostPosted: Wed Mar 29, 2006 6:34 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,

try 37 (US english) or 500 (multilingual)

for more CCSIDs look here
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzak.doc/csqzak10399.htm

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
wbintegrator
PostPosted: Wed Mar 29, 2006 6:43 am    Post subject: Reply with quote

Voyager

Joined: 08 Feb 2006
Posts: 83

37 did the job,
Thanks a lot frank.
Back to top
View user's profile Send private message
wbintegrator
PostPosted: Tue Apr 04, 2006 9:40 pm    Post subject: Reply with quote

Voyager

Joined: 08 Feb 2006
Posts: 83

By the way, The reason I couldn't cast it using other CCSIDs turned out to be the '00' in the beginning of the BLOB. Apparently there is some C/C++ processing of the string during the cast, and the null terminateion-oriented processing failed at the very beginning of the string.

I replaced all the X'00' with X'40' and the cast worked.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 05, 2006 2:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I would have tried to use InputRoot.BLOB.BLOB in the cast command...
That might take care of your hex 00 problem?

Another way to try it (if it is not a reply node) is to set the convert flag on the input node.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Apr 05, 2006 4:09 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
I would have tried to use InputRoot.BLOB.BLOB in the cast command...
That might take care of your hex 00 problem?


InputBody is a synonym for InputRoot.BLOB... so InputRoot.BLOB.BLOB is the same as InputBody.BLOB.
_________________
I am *not* the model of the modern major general.
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 » Cast blob to char: ebcdic to ascii
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.