title: How to merge two columns in SAS keeping format
body: <p>I have two columns. The first column contains values (count) and the second column the percentage (from the total population). So I have:</p>
  
  <p>count percentage</p>
  
  <p>12    (48%)</p>
  
  <p>14    (29%)</p>
  
  <p>89    (50%)</p>
  
  <p>I would like one column with both parts:</p>
  
  <p>count</p>
  
  <p>12(48%)</p>
  
  <p>14(29%)</p>
  
  <p>89(50%)</p>
  
  <p>I have tried:</p>
  
  <pre><code>data mydata1;
    set mydata;
    countper=catx(' ',count, percent);
  run;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>data mydata1;
    set mydata;
    counter=count || percent;
  run;
  </code></pre>
  
  <p>Both of these sort of combine, the 'catx' being more successful, but I lose the brackets and percentage and the number of decimal places in the percentage originally used.</p>
  
  <p>How can I combine these columns as I wish?</p>