This is the 2nd e-mail of the “Ace the SAS Base Programmer Exam” training series
Informats tell SAS how to read variables. Remember the table we created last week? The dollar sign after the “var1” variable is an example of an informat, it tells SAS to read in that variable as a character variable and not a numeric, which is the default way SAS reads variables where the informat is not specified.
INPUT var1 $ var2;
What do you think the output of the code below would be, given that we’ve forgotten to use the $ sign for the variable “Names”?
INPUT Names Age;
a) Jess 23
b) . 23
Since no informat was specified, SAS tried to read in “Jess” as a numeric variable which obviously doesn’t work. Because it could not read it, it saved it as null, or missing, which is denoted by a dot in SAS.