XML-Related System Variables

#### Search Results

Search

# XML-Related System Variables

This document covers the following topics:

- *PARSE-COL (r) for XML

- *PARSE-LEVEL (r) for XML

- *PARSE-NAMESPACE-URI (r) for XML

- *PARSE-ROW (r) for XML

- *PARSE-TYPE (r) for XML

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

## *PARSE-COL (r) for XML

Format/length: | I4
Content modifiable: | No

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

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

## *PARSE-LEVEL (r) for XML

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 XML` statement. If `(r)` is not specified, `*PARSE-LEVEL` represents the level where the parser in the currently active processing loop is working at.

## *PARSE-NAMESPACE-URI (r) for XML

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 XML` 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 XML` statement. If `(r)` is not specified, `*PARSE-NAMESPACE-URI` represents the namespace URI of the current element/attribute in the currently active processing loop.

## *PARSE-ROW (r) for XML

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 XML` statement. If `(r)` is not specified, `*PARSE-ROW` represents the row where the parser in the currently active processing loop is working at.

## *PARSE-TYPE (r) for XML

Format/length: | A1
Content modifiable: | No

This Natural system variable is automatically created for each `PARSE XML` 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 XML` 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 z/OS: § or @, depending on session code page and terminal emulation).
/ | Closing tag.
$ | Parsed data.

### On this page

- *PARSE-COL (r) for XML
- *PARSE-LEVEL (r) for XML
- *PARSE-NAMESPACE-URI (r) for XML
- *PARSE-ROW (r) for XML
- *PARSE-TYPE (r) for XML