Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Convert from char to Num a list of variables

I use the following code to add empty columns to my data set. How can I specify that they must be numeric instead of character?

Thank you in advance

       data mydb;
         set all;
           array c{54} $100;
       run;

I would like columns from c1 to c54 to be numeric. By default they are char.
Thank you in advance

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

No. By default they are numeric. You set them to character with a length of 100 with the $100 part of your Array Statement.

Simply do this to make them numeric.

data mydb;
   set all;
   array c{54};
run;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading