SAS Base Certification – Practice Exam 1

Question 1:A raw data file is listed below.
 

1---+----10---+----20---+---
01/05/2012    Rick      11 
12/25/2012    Sue       13 
01/05/2012    Sally     9 

The following SAS program is submitted for above raw data file :

1
2
3
4
5
6
7
8
9
data work.employee;
   infile 'file-specification';
   input @1  start_date ddmmyy10.
         @15 first_name $5.
         @25 hours_worked 3.;
run;
 
proc print data=employee noobs;
run;

The following output is generated for the Work.Employee data set:

birth_date	first_name	age
10713	        Rick	        11
.	        Sue	        13
11443	        Sally	        9

Which of the following statements is true regarding the Work.Employee output ?

Options:

a.	The output has the expected data values.
b.	The output does not have the expected data values due to an invalid format for start_date. 
c.	The listed values for start_date are incorrect because a format is required with date values. 
d.	The output does not have the expected data values due to an invalid informat for start_date.

*This blog is not affiliated with SAS or the SAS Institute. 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

4 Comments

    maksimk Sep 15, 2015

    How can you read variables start_date,first_name,hours_worked and get in result file birth_date,first_name,age ?
    I hope real exam will not have such typos.

    Reply
    GeorgeK Nov 18, 2015

    That start_date & birth_date had me confused.

    Reply
    Henry Mar 25, 2017

    its just typo error, problem is with informat

    Reply
    Jackie Apr 19, 2017

    Shouldn’t the dates, whatever they’re labeled as, for Rick and Sally be the same?

    Reply

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.