Hello,
I am a newbie to SAS and I am trying to import a CSV file into SAS Dataset . The import was successful. However the format of 16 digit long numeric values are represented as exponential values in SAS observations(TranID, CreditCardNo) in a particular datset. So can you please let me know how to view TranId, CreditCardNo as a normal 16 digit number in SAS Tables.
Thanks,
Sankar.
Are you going to use those for computation such as total TranId or average TranID? If not import them as character. If you imported them using proc import it makes a guess as to the data type something should be and if all digits then assumes they are numeric. Which will have issues with many ID values. Besides the appearance which is just the display format associated but numeric precision means that 16 digit numeric are not likely to be accurately stored.
Proc import, guessing that is what you used, will generate SAS datastep code that can (and often should) be modified to control import and display format. It is likely that you would see lines like:
informat TranID best16. ; Change them to informat TranId $16. ;
Import those two fields as character variables with a length of 16. If you used proc import, modify the code that it produced (which should be shown in your log).
Are you going to use those for computation such as total TranId or average TranID? If not import them as character. If you imported them using proc import it makes a guess as to the data type something should be and if all digits then assumes they are numeric. Which will have issues with many ID values. Besides the appearance which is just the display format associated but numeric precision means that 16 digit numeric are not likely to be accurately stored.
Proc import, guessing that is what you used, will generate SAS datastep code that can (and often should) be modified to control import and display format. It is likely that you would see lines like:
informat TranID best16. ; Change them to informat TranId $16. ;
Thanks for providing the solution ballardw. Its Working now :smileygrin:
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.