Given the program below:

Why does the program fail?
The program fails because option C is correct: you must include the dataset height2 in the DATA statement. The DATA step is trying to write to a dataset named height2, which has not been defined in the DATA statement. The correct syntax to create two datasets in one DATA step is to list them both in the DATA statement like so:
data height1 height2;
The use of numbers in dataset names is not a problem in SAS, nor is outputting to different data sets within a single DATA step. Additionally, using two different DATA statements for HEIGHT1 and HEIGHT2 is not required and is not the cause of the failure.
SAS documentation on the DATA statement and creating multiple data sets.


