View previous topic :: View next topic |
Author |
Message |
abracadabra Beginner
Joined: 02 Sep 2003 Posts: 101 Topics: 55 Location: India
|
Posted: Fri Mar 30, 2007 9:13 am Post subject: COBOL to XML |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Mar 30, 2007 10:00 am Post subject: |
|
|
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 |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
|
Back to top |
|
 |
abracadabra Beginner
Joined: 02 Sep 2003 Posts: 101 Topics: 55 Location: India
|
Posted: Fri Mar 30, 2007 2:53 pm Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Apr 02, 2007 5:54 am Post subject: |
|
|
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 |
|
 |
|
|