Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Mgarner Absent Member.
Absent Member.
554 views

Parsing XML not looking at the tags

I am trying to parse an XML file. I tried to follow the documentation on AcuXML, the XML2FD sets the file to binary sequential I made the changes to cobol config but when i read the file its not looking at the tags its looking like just a sequential stream of data. I am going to look at RMnet and XML Parse next. Any opinions on which is best for XML parsing and any help with AcuXML would be appreciated. Thanks in advance
0 Likes
5 Replies
Micro Focus Expert
Micro Focus Expert

RE: Parsing XML not looking at the tags

The stream of data should be the data within the tags <my-data>Hello</my-data> when using AcuXML you would see Hello. There is also the C$XML library routine to get XML data.

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Parsing XML not looking at the tags

0 Likes
Mgarner Absent Member.
Absent Member.

RE: Parsing XML not looking at the tags

I see the tags and everything in the data stream with acuxml.  I may have missed something in the setup... Thanks for the link i'll be sure to check that one out

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Parsing XML not looking at the tags

When using AcuXML, did you create Data dictionaries .. To create the XFDs, you specify "-Fa" on the command line when you compile your COBOL source. This option signals the compiler to create an XFD file for every indexed, relative, or sequential file contained in the program. To prevent naming errors, you should also include the "-Fc" option, which tells the compiler that the field names in the resulting XFDs must match the element names in the COBOL source exactly.  

0 Likes
Micro Focus Expert
Micro Focus Expert

RE: Parsing XML not looking at the tags

Then start the COBOL program in the debugger (wrun32 -dle error-file-name myprog.acu ) in the debugger enter tf 9 and then enter t flush - when your program exits, the error-file-name will now show what config variables you used and the file i-o.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.