PDA

View Full Version : XML files generation



jonebanes
05-20-2024, 06:48 AM
I have the need to produce an XML formatted file from what is now a sequential file produced by a COBOL program. I did some cursory search and with that it seems like either we can use a third party tool or can write a COBOL program with all the XML tags already in working storage reformat the file in to XML. Or can there be a way to use a Java app to read the generated file and produce the XML using Java tools and a Java parser?
But with these we are not sure what one should be choose. Asking client for a new tool is a tough preposition. The option with COBOL seems doable, but does not seem to be the most elegant of solutions. Solution with Java parser sounds interesting and appealing, but the question is, we need to make sure that anything that is run is standard, vanilla IBM stuff. What level of VSE (if any) supports Java natively?

DocAElstein
05-20-2024, 01:46 PM
Hello jonebanes
Welcome to ExcelFox
Your question probably won’t get much response here, as there are not so many people passing at the best of times, and those that do are thinking about Microsoft Windows, Microsoft Office and in particulate the Microsoft Office application Excel and its Automation using VBA, (Visual Basic for Applications), all from about the last 25 years.
I don’t even know where to pass you on to.
The best you can hope for here I think is that someone passing might know where to pass you on to, but don’t hold your breath.

At first glance, I don’t think there is any relevance between Excel Help and your question. Excel is mostly about sheets with boxes in it that we put text and formulas in and can go some way to making the sheet look organised and pretty.
We do have VBA coding, the coding we can use to automate Excel a bit, and that does have a lot of possibilities to link to other stuff, and manipulate all sorts of things outside Excel, almost anything inside Windows actually.
But at first glance I don’t think I see a simple way to do anything like you want. But that is likely as I have no idea about most of the stuff you are taking about.

One thing we can do with VBA nicely is take in text files , manipulate those text files , and re output or make new text files. So I suppose if you had your “sequential file produced by a COBOL program” in some form of a text file, then that could be taken in manipulated / converted into the XML form, which I know is like a text file with a lot of structured < > tag things.
We can in VBA do a lot of text manipulation / conversion.

That is as much as I can say.

Alan

kirin999
08-16-2024, 10:04 PM
I work with Java and might be able to help you out with generating XML files from your sequential file. Using a Java app to read the file and produce XML sounds like a viable solution to me. Java has excellent XML parsing and generation libraries, such as JAXB or XStream, that can make the process relatively straightforward. Since you're concerned about using standard, vanilla IBM stuff, I can suggest exploring the IBM Java SDK, which is compatible with VSE.