title: DB2 save CLOB (>16Mb) into IFS
body: <p>I'm trying to save the content of a field(CLOB) into a file on the IFS (iSeries). </p>
  
  <p>The file doen't exist before save the content and the file is created perfect, but I don't know why at the begining (always position 1 and 2) the file contains two odd characteres. This characteres aren't always the same. </p>
  
  <p>I think it's a problem with the conversion between clob field an the file (ifs - smtf)
  Does anyone how to solve this problem? </p>
  
  <p>Thanks in advance!!</p>
  
  <p>PD.:Sorry, I coudn't attach an image because I need at least 10 reputation to post images.</p>
  
  <hr>
  
  <p>Variable Definiton in RPGLE</p>
  
  <pre><code>D xmlEntrada      s                   sqltype(CLOB:10000000)
  
  fd = open('/folder/file/file.xml': 
  O_WRONLY+O_CREAT+O_TRUNC: 
  O_RDWR : 819);                                                
  
  callp write(fd: %addr(xmlEntrada)+2: %len(xmlEntrada));
  </code></pre>