SAS numeric to character conversion?
问题 When we convert a numeric to character , we should use a numeric format like the following data test ; prodID = 001 ; result = put(prodID , 1.) ; run ; proc print ; run ; I also tried to use a character format $1. , and it also worked data test ; prodID = 001 ; result = put(prodID , $1.) ; *I am using $1. here ; run ; proc print ; run ; Question is why did the second code work ? It was not supposed to work . Should we use a numeric or character format or it does not matter ? 回答1: You do get a