Previous PageNext Page

What if the variable names don't match?
Say the variable names are different in the two files being concatenated:

DATA SURVEY2;
   INPUT SUBJ GENDER :$1. HEIGHTs WEIGHTs YEAR;
DATALINES;
5 F 63 102 92
8 M 70 250 91
DATA Library.SURVEY12;
   Set Library.Survey1 Survey2;
Proc Print;
   ID SUBJ;
   Title 'Like Example 2.2 in C&P';

The Proc Print output shows that variables are uniquely identified by their name.

Like Example 2.2 in C&P
SUBJ    GENDER    HEIGHT    WEIGHT    YEAR    HEIGHTS    WEIGHTS

  1       M         68        155      91         .          .
  7       F         72        205      90         .          .
  9       M         66        120      93         .          .
  5       F          .          .      92        63        102
  8       M          .          .      91        70        250

There is no "close enough". Variable with different names are different.

Previous PageTable Of ContentsNext Page