As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Importing CSV Data to All Character Variables

From sasCommunity
Revision as of 00:51, 28 October 2017 by ArtCarpenter (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


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.