art photo

DSDR KB

Q:  

How does one read strings in SAS? For instance, if I am reading in a name like Washtenaw County in a pipe delimted file?

A:  

Define the length of your variable before you read in the data. In the example below “name” is the field that has county names:

data a;

length name $40;

infile 'test.txt’ dlm='|';

input geoid $ name $ type part2000 part2010 ;

Related Question Groups:


W A R N I N G

If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software. The following are good choices:

Firefox
Opera
Safari