95.1k views
1 vote
The following program will execute without errors:

data bonuses;
merge managers(in=M)
staff(in=S);
by EmpID;
if M=0 and S=1;
run;;
a. True
b. False

User Chrisoula
by
7.9k points

1 Answer

5 votes

Final answer:

The SAS program will not execute without errors because the syntax for the conditional 'if M=0 and S=1;' is incorrect for filtering records after merging datasets based on the 'EmpID'.

Step-by-step explanation:

The question asks whether the SAS program provided will execute without errors. The answer to this question is false. The program attempts to merge two datasets, managers and staff, based on a variable called EmpID. The conditional statement if M=0 and S=1 is meant to include observations that are present only in the staff dataset, not in managers.

However, the syntax for indicating which dataset an observation comes from during a merge in SAS is incorrect. The correct indicators after the merge statement should be if M and not S to get observations from the managers dataset that do not match those in the staff dataset, or vice versa.

User Hoffmania
by
7.7k points