If you use var_nm = input(c_num,??8.); it will put a number when it is numeric and . when it is not. Here is an example. DATA test; input c_num $; datalines; 123 12.34 12.34.5 12a4 12)1 23 1 -43 -.5 ; run; data test1 ; set test ; ck_num = input(c_num,??8.) ; run ; This gives the following log and proc print; output. NOTE: There were 8 observations read from the data set WORK.TEST. NOTE: The data set WORK.TEST1 has 8 observations and 2 variables. NOTE: DATA statement used (Total process time): real time 0.01 seconds cpu time 0.01 seconds The SAS System 13:59 Monday, April 16, 2012 1 Obs c_num ck_num 1 123 123.00 2 12.34 12.34 3 12.34.5 . 4 12a4 . 5 12)1 . 6 23 23.00 7 -43 -43.00 8 -.5 -0.50
... View more