MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

COBOL to XML

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
abracadabra
Beginner


Joined: 02 Sep 2003
Posts: 101
Topics: 55
Location: India

PostPosted: Fri Mar 30, 2007 9:13 am    Post subject: COBOL to XML Reply with quote

Hi,

I was going through some of the notes that had been sent earlier on this topic but I think I have a slightly different question (I think).

Lets take the example below.

I have a layout in COBOL as follows:

01 AID
02 A PIC....
02 B PIC....

Using GENERATE XML statement, I create the XML given below.

<AID>
<A>1111111</A>
<B>ALFA</B>
<AID>

However, my requirement is to get the type of XML given below. Is this possible through COBOL? Can anyone provide a link or manual? I went through the IBM manual but could not find this type of example.

<AID="A_1">
<A>1111111</A>
<B tc="1">ALFA</B>
<AID>
_________________
Cheers!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 30, 2007 10:00 am    Post subject: Reply with quote

abracadabra,

what type of XML is the output? ie. what are the rules to imbed the content in quotes?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Mar 30, 2007 10:19 am    Post subject: Reply with quote

maybe this Enterprise COBOL programmers guide, which in section 5.2.2 talks about enhancing your output.

http://publibz.boulder.ibm.com/bookmgr_OS390/libraryserver/zosv1r6/
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
abracadabra
Beginner


Joined: 02 Sep 2003
Posts: 101
Topics: 55
Location: India

PostPosted: Fri Mar 30, 2007 2:53 pm    Post subject: Reply with quote

Kolusu,

What I want is something like this

<Holding id="Hold1">
<Pol>12345</Pol>
</Holding>
<Holding id="Hold2">
<Pol>68999</Pol>
</Holding>

Is there a XML COBOL command to add the id="Hold1" inside the tag?

So the rule is that for multiple Holding, the Hold* will increase by 1.
_________________
Cheers!
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Apr 02, 2007 5:54 am    Post subject: Reply with quote

Quote:

Is there a XML COBOL command to add the id="Hold1" inside the tag?

So the rule is that for multiple Holding, the Hold* will increase by 1.



abracadabra,

That is just a programming exercise. Look Up the verb STRING and add quotes and increment the counter when the holding id changes. It has got nothing to do with the XML generation

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group