Previous PageNext Page

What if the variable types don't match?
What if two variables that really are different (conceptually) have the same name?

DATA SURVEY2;
   INPUT SUBJ HEIGHT:$1.;
DATALINES;
5 F 63 102 92
8 M 70 250 91
DATA Library.SURVEY12;
   Set Library.Survey1 Survey2;

The notes in the log after the data step tell you that this is not allowed.

ERROR: Variable HEIGHT has been defined as both character and numeric.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set LIBRARY.SURVEY12 may be incomplete.  When this step was stopped there were 0 observations and 5 variables.
WARNING: Data set LIBRARY.SURVEY12 was not replaced because this step was stopped.

Previous PageTable Of ContentsNext Page