Meta Search
search across all the following databases:
Data Catalog
Data and documentation
KnowledgeBase
Common questions and answers.
Resources
Entire collection of data resources.
Lessons from North of the Border
Nerd Alert: Dictionary of Numbers
Reading in data that contains numeric and alphabetic characters is a bit different than reading plain numeric variables. The alpha-numeric symbol ($) is required when reading in variables whose values can be letters or numbers (i.e., ownchld=02 or ownc hld=na).
In the following example msapmsa and ownchld are being defined as alpha-numeric.
data blkmen; infile '/usr/shared/race.dat'; *input state $msapmsa age born grad rearning $ownchld; if age=...
NOTE: Another reason to define a variable as alpha-numeric is to maintain a variable's format. For example, when the census tract number 024671 is read into SAS as a numeric variable the leading zero is dropped. The tract value becomes 24671 and a merge based on the tract variable would not be possible with another dataset that contained the complete alpha-numeric tract number (024671). The result would be 0 matches.