SAS proc import missing leading zero
I am trying to import numbers from csv file to sas dataset with proc import ( SAS ) , but all my leading ze开发者_运维百科ro are disappear after the import.
For example,
'0123456' after import I would get only '123456'
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
z7.. 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.
精彩评论