 <p>To get the data in ASCII add CCSID 1208 (819 is not possible) in the XmlSerialize function and make sure that the ifs-file doesn't exist. Otherwise it would keep the file CCSID</p> <pre><code> XMLSERIALIZE( XMLDOCUMENT( XMLELEMENT(NAME "document", XMLELEMENT(NAME "elements", XMLAGG(elements.element) ) ) ) AS CLOB CCSID 1208 INCLUDING XMLDECLARATION ) AS Response </code></pre> <p>And make sure that your machine QCCSID is set to something other than 65535 (that's always causing lots of Problems with conversion aka not converting automatically).</p>