Natural for Mainframes Version 8.2.6 for Mainframes
 —  System Variables  —

XML Related System Variables

This document covers the following topics:

These system variables, which are available when using the PARSE statement, are only valid in the current loop context.


*PARSE-COL (r)

Format/length: I4
Content modifiable: No

This system variable contains the column where the parser is currently working at.

In mainframe environments, it always points to the start of the current markup element.

(r) notation after *PARSE-COL is used to indicate the statement label or source-code line number of the PARSE statement. If (r) is not specified, *PARSE-COL represents the column where the parser in the currently active processing loop is working at.

Top of page

*PARSE-LEVEL (r)

Format/length: I4
Content modifiable: No

This system variable contains the level of currently nested elements.

(r) notation after *PARSE-LEVEL is used to indicate the statement label or source-code line number of the PARSE statement. If (r) is not specified, *PARSE-LEVEL represents the level where the parser in the currently active processing loop is working at.

Top of page

*PARSE-NAMESPACE-URI (r)

Format/length: A (dynamic)
Content modifiable: No

This system variable contains the namespace URI of the current element/attribute, if the element/attributes belong to a namespace. If the NAME (operand3) value of the PARSE statement is empty, then there is also no namespace and *LENGTH(*PARSE-NAMESPACE-URI) is set to 0.

(r) notation after *PARSE-NAMESPACE-URI is used to indicate the statement label or source-code line number of the PARSE statement. If (r) is not specified, *PARSE-NAMESPACE-URI represents the namespace URI of the current element/attribute in the currently active processing loop.

Top of page

*PARSE-ROW (r)

Format/length: I4
Content modifiable: No

This system variable contains the row where the parser is currently working at.

(r) notation after *PARSE-ROW is used to indicate the statement label or source-code line number of the PARSE statement. If (r) is not specified, *PARSE-ROW represents the row where the parser in the currently active processing loop is working at.

Top of page

*PARSE-TYPE (r)

Format/length: A1
Content modifiable: No

This Natural system variable is automatically created for each PARSE statement issued.

This system variable contains the type of the delivered data.

(r) notation after *PARSE-TYPE is used to indicate the statement label or source-code line number of the PARSE statement. If (r) is not specified, *PARSE-TYPE represents the type of the delivered data in the currently active processing loop.

Possible values for ASCII-based systems are:

? Processing instruction (but not first <?XML ... ?>).
! Comment.
C CDATA section.
T Starting tag.
@ Attribute (on mainframes: § or @, depending on session code page and terminal emulation).
/ Closing tag.
$ Parsed data.

Top of page