Extract a record from XML file using COBOL?

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Raju Singh
New Member
Posts: 5
Joined: Sun Jun 08, 2014 4:18 pm

Extract a record from XML file using COBOL?

Post by Raju Singh »

Hello,

How to extract particular record from XML file using COBOL? Can we do that? The records are numeric.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Extract a record from XML file using COBOL?

Post by Robert Sample »

You can use XML PARSE in COBOL.
MartinPacker
Registered Member
Posts: 14
Joined: Tue May 27, 2014 8:45 pm
Contact:

Re: Extract a record from XML file using COBOL?

Post by MartinPacker »

Take a look at http://www.redbooks.ibm.com/redpieces/a ... .html?open and I'd start with a simple example before heading towards a "production ready" one.
Martin Packer
Principal Systems Investigator, IBM
MartinPacker
Registered Member
Posts: 14
Joined: Tue May 27, 2014 8:45 pm
Contact:

Re: Extract a record from XML file using COBOL?

Post by MartinPacker »

At the risk of publicising my blog you might also want to try some of the techniques I write about using DFSORT. Use your favourite web engine with the terms "XML DFSORT".
Martin Packer
Principal Systems Investigator, IBM
Raju Singh
New Member
Posts: 5
Joined: Sun Jun 08, 2014 4:18 pm

Re: Extract a record from XML file using COBOL?

Post by Raju Singh »

Thanks Martin. I looked at your blog too. So, do you suggest to use the 'parse' using DFSORT or using XML PARSE COBOL as Robert has suggested to use? Please suggest.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”