Difference between revisions of "Importing CSV Data to All Character Variables"

From sasCommunity
Jump to: navigation, search
m (added category)
(added category)
Line 18: Line 18:
[[Category:MWSUG 2016]]
[[Category:MWSUG 2016]]
[[Category:Importing Data]]
[[Category:Importing Data]]
[[Category:DATA Step]]
[[Category:WUSS 2017]]
[[Category:PharmaSUG 2017]]

Latest revision as of 00:51, 28 October 2017


Have you ever needed to import data from a CSV file and found that some of the variables have been incorrectly assigned to be numeric? When this happens to us we may lose information and our data may be incomplete. When using PROC IMPORT on an EXCEL file we can avoid this problem by specifying the MIXED=YES option to force all the variables to be character. This option is not available when using IMPORT to read a CSV file. Increasing GUESSINGROWS can help, but what if it is not sufficient?

It is possible to force IMPORT to only create character variables. Although there is no option to do this, you can create a process that only creates character variables, and the process is easily automated so that no intervention is required on the user’s part.

Online Materials

View the pdf for this paper here.

Contact Info

Please check out my user page. You can also email me.