SAS Base Certification – Question 8

Question 8: This question will ask you to provide a line of missing code.
Given the following data set WORK.SALES:

SalesID  SalesJan  FebSales  MarchAmt
-------  --------  --------  --------
W6790          50       400       350
W7693          25       100       125
W1387           .       300       250

The following SAS program is submitted:

data WORK.QTR1;
   set WORK.SALES;
   array month{3} SalesJan FebSales MarchAmt;
   <insert code here>

Which statement should be inserted to produce the following output?

SalesID  SalesJan  FebSales  MarchAmt  Qtr1
-------  --------  --------  --------  ----
W6790          50       400       350   800
W7693          25       100       125   250
W1387           .       300       250   550


A.	Qtr1 = sum(of month{_ALL_}); 
B.	Qtr1 = month{1} + month{2} + month{3}; 
C.	Qtr1 = sum(of month{*}); 
D.	Qtr1 = sum(of month{3}); 

*The SAS certification sample problem and answer above are sourced from the official SAS sample questions page. All answer logs, data sets, output, and commentary are provided by this blog.

Correct Answer

Incorrect Answer

Click to see Answer Explanation below

thanks for your support


    Rupesh Chandra Das C Das Aug 07, 2016

    I did not understand the 4 th and 5th arguments how does it work? Can you give me an example? Thank you

      Rupesh Chandra Das C Das Aug 07, 2016

      I mean the explanation is given for this question and He mentioned 5 valid arguments about sum function.

    Linda Aug 23, 2016

    Refer to the Paul Dickman Sum website mentioned in Commentary prior to the 5 arguments! Good Luck


Leave a Comment

Please keep in mind that comments are moderated and rel="nofollow" is in use. So, please do not use a spammy keyword or a domain as your name, or it will be deleted. Let us have a personal and meaningful conversation instead.