title: SAS: How do i split by comma and transpose?
body: <p>I am using SAS Enterprise Guide.
  I have a new file and i was asked to generate output.
  Source:</p>
  
  <pre><code>Name    feeder_in    feeder_out   NickName
  ABBA    1,2          A,B           ABBA
  POLA    1,2          C,D,E         CONS POLA
  </code></pre>
  
  <p>and the desire output:</p>
  
  <pre><code>Name             feeder_final    
  ABBA              1                
  ABBA              2                 
  ABBA              A
  ABBA              B
  POLA              1                 
  POLA              2
  CONS POLA         C
  CONS POLA         D
  CONS POLA         E
  </code></pre>
  
  <p>I have been trying myself on handling this but no luck at all.
  I tried </p>
  
  <pre><code>data test;
  catequipment=catx(',',strip(feeder_in),strip(feeder_out));
      do i=1 to countw(catequipment,',');
  
  catequipment=catx(',',strip(feeder_in),strip(feeder_out));
      do i=1 to countw(catequipment,',');
  output;
  end;
  
  xequipment=newequipment;
  
  run;
  </code></pre>
  
  <p>Does anyone have clue for this?</p>