title: Code snippet to split XML files based on record length
body: <p>I want to do FTP an Huge XML file to mainframe server using AIX server</p>
  
  <p>Since my file size is huge, i want to split the XML file based on a delimiter , the record delimiter should be set after every 27000 bytes of data
  and then do the ftp
  This is done becos the data send to the mainframe must have records no longer than 27000 bytes; we CANNOT convert it on the mainframe</p>
  
  <p>i need to read the XML file and i need to put the record delimiter after 27000 bytes and need to start a new record which has 27000 bytes</p>
  
  <p>see below example</p>
  
  <p>record 1:123....................27000|</p>
  
  <p>record 2:123....................27000|</p>
  
  <p>record 3 and so on </p>
  
  <p>Please share the code snippet for the above example</p>