To showcase how Interleave handles variations in length, data type, and additional variables, we have modified the data we used earlier for introducing interleave. The program that we used to interleave is still the same:
Data A;
Input Index City $1. Sample Past;
Datalines;
45 A 500 43
56 B 500 50
65 C 600 58
75 D 600 68
85 E 600 82
90 F 500 94
;
Data B;
Input Index City $2. Sample $;
Datalines;
35 AA 600
41 BB 500
48 CC 500
65 DD 600
83 EE 600
83 FF 600
;
Let's review the datasets that were produced:
The preceding dataset's Index variable only has the same attributes. City is a character variable type in both datasets but the length is different. For Sample, the variable type is different in the datasets. The Past variable only exists in dataset A.
When we run the interleaving code, we get the following error:
101 Data Interleave_AB;
102 Set A B;
ERROR: Variable Sample has...