Multiple choice technology programming languages

Dataset: Score Name Score John 10 Greg 20 Dataset: Salary Salary 45000 Data map; If n = 1 then set salary; Set score; Run; How many observations will be in the Data Map and what would be value of salary

  1. Observations =2 and Salary = 45000 at both observations

  2. Observations = 2 and Salary = 45000 at first and Salary =. at second observation

  3. Observation = 1 and Salary = 45000

  4. Error

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The conditional IF n=1 executes only for the first iteration, setting salary. SET score reads both observations (2 rows). The salary variable is retained in the PDV, so both output observations have salary=45000. Result: 2 observations, salary=45000 for both.