# Parse XML issues.

**URL:** <https://techcommunity.softwareag.com/t/parse-xml-issues/78578>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [July 17, 2008, 4:08am UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578 "2008-07-17T04:08:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven3](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Steven3](https://techcommunity.softwareag.com/u/Steven3)\
**Post date:** [July 17, 2008, 4:08am UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/1 "2008-07-17T04:08:12Z")

</div>

I am having two issues using the Parse XML command.

1. The command is just “PARSE” on the mainframe (4.3), but is “PARSE XML” using Natural Studio (6.3). This causes an issue when attempting to catalog a program that uses the Parse XML command on either the mainframe or in Studio (depending on which syntax the program is using). Is there fix for this issue?

2. The mainframe version of the Parse XML command is not properly handling output escaping. I tested by creating a PDA and it’s parse and serialize modules - then executed a program that loads data into the PDA, serializes the data to an XML string, resets the PDA, and then parses the XML string to the PDA. I did verify that the serialize is properly writing out the data. Here are results of parsing tests using the mainframe (4.3) and Studio (6.3):

PDA field loaded with: 1234567890

Mainframe after parse: 1234567890

Studio after parse: 1234567890

PDA field loaded with: 1234\<56\>7890

Mainframe after parse: 7890

Studio after parse: 1234\<56\>7890

PDA field loaded with: 12345&67890

Mainframe after parse: 67890

Studio after parse: 12345&67890

Any ideas on what the fix for this might be? I was thinking that it could be a code page issue, but it would seem odd that the default code page on the mainframe wouldn’t be able to handle the translation since I’m using IBM037 encoding (EBCDIC) and data that is generated and processed on the mainframe.

Any help or information about these two issues would be greatly appreciated and I thank, in advance, anyone who takes time to respond!

Steven Ystebo  
California State Teachers’ Retirement System

---

<div class="post-metadata">

**Author:** ![Harald\_Sauer](https://avatars.discourse-cdn.com/v4/letter/h/e95f7d/32.png) [@Harald\_Sauer](https://techcommunity.softwareag.com/u/Harald_Sauer)\
**Post date:** [July 17, 2008, 1:01pm UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/2 "2008-07-17T13:01:08Z")

</div>

ad 1) It’s PARSE XML on the mainframe as well. PARSE alone will not check, but getting a NAT0001 syntax error.

ad 2) The issue with the predefined entities (\< \> etc) causing multiple callbacks will be resolved with Natural 425!

Harald Sauer

---

<div class="post-metadata">

**Author:** ![Steven3](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Steven3](https://techcommunity.softwareag.com/u/Steven3)\
**Post date:** [July 18, 2008, 11:26pm UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/3 "2008-07-18T23:26:28Z")

</div>

Regarding question 2:  
Is there any way to get around this without waiting for version 425, such as a patch that’s available now? Output escape processing is a base necessity of any XML reader, so it would be difficult to move forward with that flaw not resolved.

Regarding question 1:

DEFINE DATA  
LOCAL  
1 #XML-INPUT (A) DYNAMIC  
1 #XML-PATH (A) DYNAMIC  
1 #XML-CONTENT (A) DYNAMIC  
END-DEFINE  
\*  
PARSE XML #XML-INPUT INTO PATH #XML-PATH  
VALUE #XML-CONTENT  
END-PARSE  
\*  
END

The above program will not stow. I get the following error (with the cursor positioned at the XML statement):  
NAT0285 Field reference error; reference invalid or missing.

Once I change the PARSE XML to just PARSE, it stows and executes correctly. Would you give me information about your version levels? I’m interested in knowing how your installation is properly resolving PARSE XML.

Thank you for your reply!

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 19, 2008, 1:23am UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/4 "2008-07-19T01:23:17Z")

</div>

I tested your program on Natural 4.2.2 and 4.2.4 - PARSE XML stows correctly. Omitting the “XML” causes a “NAT0728 Keyword XML expected” error.

---

<div class="post-metadata">

**Author:** ![Steven3](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Steven3](https://techcommunity.softwareag.com/u/Steven3)\
**Post date:** [July 19, 2008, 5:39am UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/5 "2008-07-19T05:39:56Z")

</div>

Thanks, Douglas.

Before I contact our data center to open a ticket, do you have any thoughts on what might be causing the behavior I experience? A Natural parm, keyword table, etc…?

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 19, 2008, 9:47pm UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/6 "2008-07-19T21:47:45Z")

</div>

You could check the NATTXT members to make sure they weren’t incorrectly modified.

You indicated that you were using Natural 4.3, but the highest level released is 4.2.4. Use the SYSPROD command to verify your version numbers.

---

<div class="post-metadata">

**Author:** ![Steven3](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@Steven3](https://techcommunity.softwareag.com/u/Steven3)\
**Post date:** [July 23, 2008, 12:00am UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/7 "2008-07-23T00:00:44Z")

</div>

I’ll check on that. Thanks again for your response.

That should read version 4.23, not version 4.3 - left the 2 out twice, it appears.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:50pm UTC](https://techcommunity.softwareag.com/t/parse-xml-issues/78578/8 "2021-04-02T14:50:39Z")

</div>


