Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
xml generate CDATA in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
elvin buno

New User


Joined: 08 May 2008
Posts: 2
Location: nyv

PostPosted: Thu May 08, 2008 11:07 pm    Post subject: xml generate CDATA in cobol
Reply with quote

I just started learning XML GENERATE using cobol and I need to know how to generate CDATA.

I tried to move ![CDATA[......]] to the field and when I execute the generate its not creating a correct xml CDATA format..

thanks..
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 09, 2008 4:53 am    Post subject:
Reply with quote

Hello,

If you have not done so already, i'd suggest looking in the ENTERPRISE COBOL Programming Guide which is available via the "IBM Manuals" link at the top of the page.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sat May 10, 2008 3:54 am    Post subject: Reply to: xml generate CDATA in cobol
Reply with quote

elvin,

welcome to the forums. Could you please post more details on the problem you are facing?

XML generate would work fine provided the other things are set/populated correctly.

1) First check whether the XML copybook (structure of the final XML) is populated with data.

2) Then check whether you have used the correct syntax for the generate command. It is usually XML generate followed by the 01/03 level of the XML copybook.


Post more details.
Back to top
View user's profile Send private message
elvin buno

New User


Joined: 08 May 2008
Posts: 2
Location: nyv

PostPosted: Mon May 12, 2008 6:05 pm    Post subject: Reply to: xml generate CDATA in cobol
Reply with quote

Hi thanks for the reply...
This is what I did..

05 OPEN-CDATA.
10 FILLER PIC X(02) VALUE '<!'.
10 OPEN-SQUARE-BRACKET1 PIC X(01) VALUE x'BA'.
10 FILLER PIC X(05) VALUE 'CDATA'.
10 OPEN-SQUARE-BRACKET2 PIC X(01) VALUE x'BA'.
05 CLOSE-CDATA.
10 CLOSE-SQUARE-BRACKET2 PIC X(01) VALUE x'BB'.
10 CLOSE-SQUARE-BRACKET1 PIC X(01) VALUE x'BB'.
10 FILLER PIC X(01) VALUE '>'.

01 daterec.
.
05 x-cdata pic x(80).
.
.

STRING open-cdata DELIMITED BY size
'This,< test> is for CDATA' DELIMITED BY sizE
close-cdata DELIMITED BY size
INTO x-cdata.

Xml generate xml-data from datarec count in numChars

I'm expecting part of my xml to have.

<![CDATA[This,<test> is for CDATA]]>
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am
No new posts batch cobol/db2 paragraph fall thru a... alois eisshofer COBOL Programming 5 Wed Mar 14, 2018 12:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us