A00-212 Exam QuestionsBrowse all questions from this exam

A00-212 Exam - Question 25


SIMULATION -

This item will ask you to provide a segment of missing code.

Given the input data set shown on the left and the output data set shown on the right:

In the text below, enter the code that will complete the program to produce the output set shown above on the right.

Case is ignored and standard SAS syntax rules apply.

Show Answer
Correct Answer:

To produce the output set shown on the right by ensuring each unique vehicle (based on Year, Make, and Model) appears only once in the output, you should use the 'first.' variable with the 'model' as the grouping variable. The correct code segment to insert into the if statement is 'first.model'. This will output only the first occurrence of each (Year, Make, Model) combination. Therefore, the completed code is: data INVENTORY(drop=color); set VEHICLES; by Year Make Model; if first.model = 1 then output INVENTORY; run;

Discussion

1 comment
Sign in to comment
mhminkov
Aug 21, 2021

first.model