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

Post new topic  Reply to topic
 CDATA! « View previous topic :: View next topic » 
Author Message
mqbrk_newbie
PostPosted: Thu Nov 18, 2004 1:09 pm    Post subject: CDATA! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

HI,

I am doing a message flow conversion of MRM to XML. After I convert the input copybook definitions to XML , there is one more adapter which will call two applications (COBOL and WEB Application). So I need to send some part of ouput XML in CDATA so that the adapter can directly take that part of xml output and invoke the COBOL application. For example if I have got an input copybook definitions as

01 MESSAGE.
05 HEADER.
10 VERSION PIC 9(04).
10 NAME PIC X(20).
10 ID PIC X(10).
10 INTER-ID PIC X(10).
05 REQ.
10 REQ VAL PIC X(10).
10 USER ID PIC X(06).
10 KEY PIC X(30).
05 BODY.
10 NAME PIC X(30).
10 AGE PIC X(20).
10 PLACE PIC X(20).
10 DOB PIC X(10).
10 STATUS PIC X(06).

I need an output in xml format as...

HEADER>
<VERSION>XXX</VERSION>
<NAME>YYY</NAME>
<ID> ZZ<ID>
</HEADER>
<BODY>
<REQCOPYBOOK>
<![CDATA[(HEADER OF COPYBOOK AND NAME, AGE PLACE,
FROM BODY OF COPYBOOK)]]>
</REQCOPYBOOK>
<DOB>XXX</DOB>
<STATUS>YYY</STATUS>


Can anybody help me out in coding , so that I get only the header part and some body part ( name , age , place) from copybook definitions given above and give XML output as shown above.

Can anyplease please tell me the piece of code for the same.

thanks in advance
Back to top
View user's profile Send private message Yahoo Messenger
JT
PostPosted: Thu Nov 18, 2004 1:24 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Have you searched this site for "CDATA"?

There are numerous examples available, here's one of them: http://www.mqseries.net/phpBB2/viewtopic.php?t=18364
Back to top
View user's profile Send private message
mqbrk_newbie
PostPosted: Thu Nov 18, 2004 1:30 pm    Post subject: CDATA! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

JT,

I have already looked at the example which you refered here. I am not sure how to refer only the header and 2 fields from the body of copybook deifinition. can you please write the piece of code here.

thanks
Back to top
View user's profile Send private message Yahoo Messenger
JT
PostPosted: Thu Nov 18, 2004 2:35 pm    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

I'm not sure if there is a more elegant way to produce the results you want, however something like this should do the trick:

Code:
SET OutputRoot.XML.ParentTag.BODY.REQCOPYBOOK.(XML.CDataSection) =
    CAST(InputRoot.MRM.HEADER.VERSION AS CHARACTER CCSID InputRoot.MQMD.CodedCharSetId) || ',' ||
    InputRoot.MRM.HEADER.NAME      || ',' ||
    InputRoot.MRM.HEADER.ID        || ',' ||
    InputRoot.MRM.HEADER.INTER_ID  || ',' ||
    InputRoot.MRM.BODY.NAME        || ',' ||
    InputRoot.MRM.BODY.AGE         || ',' ||
    InputRoot.MRM.BODY.PLACE;
Back to top
View user's profile Send private message
mqbrk_newbie
PostPosted: Thu Nov 18, 2004 6:02 pm    Post subject: cdata! Reply with quote

Acolyte

Joined: 13 Sep 2004
Posts: 70

jt,

thanks a lot . i willl try and respond you back

thanks again
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » CDATA!
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.