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 » cadata!

Post new topic  Reply to topic
 cadata! « View previous topic :: View next topic » 
Author Message
mqbrk_newbie
PostPosted: Thu Dec 23, 2004 8:05 am    Post subject: cadata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

hi,

I am using WBIMB5.0 CSD02. I have a simple message flow which has input xml content. I have a CDATA part inside the xml which has a copybook content. I have to take that portion of copybook information from CDATA and map it to corresponding output which is in copybook format.

If my input is like this

<?xml version="1.0" encoding="UTF-8"?>
<message>
<version> </version>
<group> </group>
<information><![CDATA[name place city dob country ]]> </information>
</message>

output copybook definition

01 message
05 Name PIC X(50)
05 PLACE PIC X(30)
05 CITY PIC X(20)
05 DOB PIC X(10)
05 COUNTRY PIC X(20)
05 FILLER PIC X(1000)

Can anyone help me out with a piece of code how get the content from CDATA map tp copy book definition mentioned above.


thanks for your help in advance...
Back to top
View user's profile Send private message Yahoo Messenger
sieijish
PostPosted: Thu Dec 23, 2004 8:27 am    Post subject: Reply with quote

Acolyte

Joined: 29 Nov 2004
Posts: 67
Location: London

The following expression will give you the content of the CDATA section

InputRoot.XML.message.information.(XML.CDataSection)*
Back to top
View user's profile Send private message
mqbrk_newbie
PostPosted: Thu Dec 23, 2004 8:54 am    Post subject: cdata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

hi,

I know how to refer it , but i dont how to take that information and map it to corresponding copybook output. Can you help me with this please..

thanks
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Thu Dec 23, 2004 9:18 am    Post subject: Re: cdata! Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mqbrk_newbie wrote:
I know how to refer it , but i dont how to take that information and map it to corresponding copybook output. Can you help me with this please..


You use the SET statement to assign data from one field to another.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mqbrk_newbie
PostPosted: Thu Dec 23, 2004 9:48 am    Post subject: cdata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

jeff i understood what you are saying,

i wrote a peice of code like this

CREATE COMPUTE MODULE sample1_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
SET OutputRoot.Properties = InputRoot.Properties;
SET OutputRoot.MQMD = InputRoot.MQMD;
DECLARE message BLOB;
SET message = CAST(BITSTREAM(InputRoot.XML.message.information.(XML.CDataSection)) AS BLOB);


RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;

I dont know how to convert this blob message parse it using MRM to map with copybook output..

Can you help me with this please
Back to top
View user's profile Send private message Yahoo Messenger
sieijish
PostPosted: Thu Dec 23, 2004 9:53 am    Post subject: Reply with quote

Acolyte

Joined: 29 Nov 2004
Posts: 67
Location: London

Did you create the message set & definitions for your message?
Back to top
View user's profile Send private message
mqbrk_newbie
PostPosted: Thu Dec 23, 2004 10:50 am    Post subject: cadata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

yes I did , I created message set and message definition for the copybook. All I need is to take the blob message and map with the definition and message set. I though of using Bitstream function , But I did not get the exact syntax,

can you help me with this please..

thanks
Back to top
View user's profile Send private message Yahoo Messenger
mqbrk_newbie
PostPosted: Thu Dec 23, 2004 1:20 pm    Post subject: cdata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

Any help regarding this issue is highy appreciated. I need to solve this bye the end of day..


thanks
Back to top
View user's profile Send private message Yahoo Messenger
mgk
PostPosted: Thu Dec 23, 2004 2:44 pm    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Look at the CREATE statement and use the PARSE and DOMAIN clauses...

Cheers,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Dec 23, 2004 4:56 pm    Post subject: Re: cdata! Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

mqbrk_newbie wrote:
Any help regarding this issue is highy appreciated. I need to solve this bye the end of day..


Whose end of day?

Yours?

Mine?

Someone in India's?
_________________
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 » cadata!
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.