Skip to main content

This article addresses the compiler error message reported for READ XML file with AT END condition specified.

Problem:

A compiler error is generated when a READ statement is coded for an XML file with organization is XML and the AT END/NOT AT END clause is present.

Resolution:

You cannot use the AT END/NOT AT END clauses when reading an XML file. Instead you should check the xml-file-status as follows:

READ XML-FILE

IF XML-FILE-STATUS = -7 *> end of file

...

ELSE

...

END-IF

Incident Number: 2183877

Old KB# 14505