In your %XML.Reader set IgnoreSAXWarnings to 1.

In your XML enabled classes set params:

Parameter XMLIGNOREINVALIDTAG As BOOLEAN = 1;
Parameter XMLIGNOREINVALIDATTRIBUTE As BOOLEAN = 1;

This would allow for errors to be skipped, but they wouldn't be reported either.

I'm not sure if the behavior you want is possible without some modifications.

Write statement does what it's name implies - outputs characters into a current device. It's a way to go if you're working from a terminal, but ZEN does it's own device management, so writing into a current device interferes with ZEN also writing into current device, which causes an error.

 

To make it work check if there's no data (SQLCODE=100) and set OutVal to empty (or error message) and work with that on a client.