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 » XML to MRM-CWF (BLOB to Character)

Post new topic  Reply to topic
 XML to MRM-CWF (BLOB to Character) « View previous topic :: View next topic » 
Author Message
pduvvuri
PostPosted: Wed Jun 04, 2003 7:17 am    Post subject: XML to MRM-CWF (BLOB to Character) Reply with quote

Newbie

Joined: 30 May 2003
Posts: 2

I have a cobol PIC X(10) field which contains packed data. When I convert that to XML I used the following cast

SET CHAR_ID = cast(InputBody.MRM.CHAR_ID as BLOB ccsid 500).
This produced the following result.
<CHR_ID>11200210241607600078</CHR_ID>

To convert it back to PIC X(10) from XML I am trying something like this.
SET OutputRoot.MRM.CHR_ID =
cast(InputRoot.XML.CHR_ID as CHARACTER ccsid 500 encoding 785);

Can anyone help me how can do this conversion back to PIC X(10) field?

Thanks
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Wed Jun 04, 2003 4:36 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

The cast command does not work when converting BLOB to CHAR.
I had faced the same problem while working on S390 - NT platforms.
So then I had used the CREATE command.
But I was using BLOB to XML conversion and the parameters on the Create allowed me to do that.
If someone else has other solutions I'll be more than happy for their input.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kirani
PostPosted: Sun Jun 08, 2003 10:45 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Try this ...
Code:

DECLARE CHAR_ID BLOB;
SET CHAR_ID = X'' || InputRoot.XML.CHR_ID || '';
SET OutputRoot.MRM.CHR_ID = cast(CHAR_ID as CHARACTER ccsid 500 encoding 785);

_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » XML to MRM-CWF (BLOB to Character)
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.