title: Merging EBCDIC converted files and pdf files into a single file and pushing to mainframes
body: <p>I have two pdf files and two text files which are converted into ebcdif format. The two text files acts like cover files for the pdf files containing details like pdf name, number of pages, etc. in a fixed format. </p>
  
  <pre><code>Cover1.det, Firstpdf.pdf, Cover2.det, Secondpdf.pdf
  </code></pre>
  
  <p>Format of the cover file could be:</p>
  
  <pre><code>Firstpdf.pdf|22|03/31/2012
  </code></pre>
  
  <p>that is </p>
  
  <pre><code>pdfname|page num|date generated
  </code></pre>
  
  <p>which is then converted into ebcdic format.</p>
  
  <p>I want to merge all these files in a single file in the order first text file, first pdf file, second text file, second pdf file. </p>
  
  <p>The idea is to then push this single merged file into mainframes using scp. </p>
  
  <p>1) How to merge above mentioned four files into a single file?</p>
  
  <p>2) Do I need to convert pdf files also in ebcdic format ? If yes, how ?</p>
  
  <p>3) As far as I know, mainframe files also need record length details during transit. How to find out record length of the file if at all I succeed in merging them in a single file ?</p>
  
  <p>I remember reading somewhere that it could be done using put and append in ftp. However since I have to use scp, I am not sure how to achieve this merging. </p>
  
  <p>Thanks for reading. </p>