title: Convert string to number for large and small numbers sas
body: <p>I have a problem in sas. I have a dataset where the numbers are stored as string. The problem is that the size and format of the numbers vary a lot. I will give an example:</p>
  
  <pre><code> data s;
     x='123456789012345';
     y=input(x,best32.);
     z = '0.0001246564';
     a = input(z,best32.);
     put 'a='y;
     put a;
     keep y a;
  run;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>y=
  1.2345679E14
  a=
  0.00012465644
  </code></pre>
  
  <p>As you can see I lose information in the large integer. How can I make my program in order to not lose information. As far as I understand this number has less than 15 digits <a href="https://stackoverflow.com/questions/25139043/how-to-convert-text-to-numeric-format-in-sas">sas large number</a>. I really miss python where I just can set y = float(x). </p>