I am trying to import numbers from csv file to sas dataset with proc import ( SAS ) , but all my leading zero are disappear after the import.
For example,
‘0123456’ after import I would get only ‘123456’
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are reading them in as numerical fields, you just need to apply a format to the variable to display the leading zeroes. Remember, the number 012345 is equivalent to the number 12345 so there’s no reason to store the leading zero. Try the format
. To display the zero in your example above.
If you really need the zeroes for some reason, and the number of digits is arbitrary, then you need to read them in as character variables instead.