SAS Base Programming for SAS 9

Here you have the best SAS Institue A00-211 practice exam questions

  • You have 66 total questions to study from
  • Each page has 5 questions, making a total of 14 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 17, 2024
Question 1 of 66

The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label of "Asking Price". Which SAS program temporarily replaces the label "Asking Price" with the label "Sale Price" in the output?

    Correct Answer: C

    The correct SAS program to temporarily replace the label 'Asking Price' with 'Sale Price' in the output is: proc print data = sasuser.houses label; label price = 'Sale Price'; run;. This code uses the LABEL statement correctly within the PROC PRINT procedure to assign a temporary label.

Question 2 of 66

The following SAS program is submitted:

data work.empsalary;

set work.people (in = inemp)

work.money (in = insal);

if insal and inemp;

run;

The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7 observations. How many observations will the data set

WORK.EMPSALARY contain?

    Correct Answer: A

    When the SAS program is executed, the IF statement 'if insal and inemp;' ensures that only those observations which are present in both data sets, work.people and work.money, will be included in the resulting data set, work.empsalary. This is essentially performing an inner join operation. Since there are no identification variables mentioned to match observations between the work.people and work.money data sets, we can assume that no observations meet the condition of being present in both data sets. Therefore, the resulting data set, WORK.EMPSALARY, will contain 0 observations.

Question 3 of 66

The following SAS program is submitted:

data work.accounting;

set work.dept1 work.dept2;

jobcode = FA1;

length jobcode $ 8;

run;

A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the

WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set. What is the length of the variable JOBCODE in the output data set?

    Correct Answer: D

    In the given SAS program, the LENGTH statement sets the length of the variable JOBCODE to 8 bytes. The LENGTH statement in SAS overrides the lengths specified in the input data sets (WORK.DEPT1 and WORK.DEPT2). Because the LENGTH statement is executed before any data step processing, the length of JOBCODE in the output data set will be 8.

Question 4 of 66

Given the SAS data set SASDATA TWO:

SASDATA TWO -

X Y -

-- --

5 2

3 1

5 6

The following SAS program is submitted:

data sasuser.one two sasdata.three;

set sasdata two;

if x = 5 then output sasuser.one;

else output sasdata two;

run;

What is the result?

    Correct Answer: D

    The given SAS code attempts to write observations to datasets sasuser.one and sasdata.two. However, there are syntax issues in the code. The dataset sasuser.one is mentioned, but the dataset sasdata.two is also referenced as both a source and destination, which is not handled properly in the syntax. Additionally, sasdata.two is being used for output without it being clearly defined in the start of the code structure. Therefore, no data sets are output.

Question 5 of 66

The following SAS program is submitted:

footnote1 Sales Report for Last Month;

footnote2 Selected Products Only;

footnote3 All Regions;

footnote4 All Figures in Thousands of Dollars;

proc print data = sasuser.shoes;

footnote2 All Products;

run;

Which footnote(s) is/are displayed in the report?

    Correct Answer: D

    When a new footnote2 is specified, it replaces the previous footnote2 but does not affect footnote1, footnote3, and footnote4. Therefore, the footnotes displayed on the report will be: 'Sales Report for Last Month', 'All Products', 'All Regions', and 'All Figures in Thousands of Dollars'.