/* Converting Numeric values to Character and Vice-Versa */ *First we read in a test data set for you; *Note the first variable is read in as Character; data mydata; input Y $ VAR1 VAR2 VAR3; cards; 1 10 33 4 0 20 21 3 1 30 59 2 1 20 76 1 0 . 24 3 0 20 . 2 1 10 28 2 1 10 49 2 0 30 76 . 1 20 59 2 ; data test; set mydata; New_Numeric=input(compress(Y),1.); New_Character=trim(put(VAR3,1.)); *A quick way to convert to numeric is to multiply by 1.0; Back_to_Numeric=(New_Character*1.0); run; Title Converting Numeric to Char and Vice-Versa; proc print data=test;run;