title: Interpreting edi mscons files
body: <p>I have en EDI file in mscons format. I am trying to parse the file in R and save it as a csv file. However, I do not have any good explanation how to proceed. Anyone out there worked with these sort of files?</p>
  
  <p>Example:</p>
  
  <pre><code>UNA:+.? '
  UNB+UNOC:3+7080005046091:14:TIMER+102953452626:82:TIMER+140312:2152+XGATE019452198++++1'
  UNH+1+MSCONS:D:96A:ZZ:E2NO6A'BGM+7+1488136+9+NA'
  DTM+137:201403121751:203'DTM+163:201403030000:203'
  DTM+164:201403092400:203'DTM+ZZZ:1:805'
  NAD+FR+7080005046053::9+++++++NO'
  NAD+DO+953452626:NO3:82+++++++NO'UNS+D'
  NAD+XX'LOC+90+707057500071137750::9'
  RFF+MG:97645'RFF+LI:22446237_17506927'
  LIN+1++1491:::SM'MEA+AAZ++KWH'QTY+136:1'
  DTM+324:201403030000201403030100:Z13'QTY+136:1'
  DTM+324:201403030100201403030200:Z13'QTY+136:2'
  DTM+324:201403030200201403030300:Z13'QTY+136:1'
  DTM+324:201403030300201403030400:Z13'QTY+136:1'
  DTM+324:201403030400201403030500:Z13'QTY+136:2'
  DTM+324:201403030500201403030600:Z13'QTY+136:1'
  DTM+324:201403030600201403030700:Z13'QTY+136:1'
  DTM+324:201403092300201403092400:Z13'CNT+1:167181'
  UNT+6832+1'UNZ+1+XGATE019452198'
  </code></pre>