Don't forget to create account on our site to get access to more material made only for free registered user.  
SAS A00-211 Certification SAS A00-212 Certification Questions and Answers SAS A00 240 Certification Material SAS A00-250 Exam Material Certification SAS Packaged Solutions

The contents of the raw data file EMPLOYEE are listed below:

--------10-------20-------30

Ruth 39 11

Jose 32 22

Sue 30 33

John 40 44

The following SAS program is submitted:

data test;

infile 'employee';

input employee_name $ 1-4;

if employee_name = 'Ruth' then input idnum 10-11;

else input age 7-8;

run;

Which one of the following values does the variable IDNUM contain when the name of the employee is "Ruth"?

1. 11

2. 22

3. 32

4. . (missing numeric value)

Correct Answer : 2

Exp: This is a free listing format and the cursor moves to the second record and picks up 22. if you run the program as it is the answer should be and is '2' but if you change the position of idnum to 9-10, then the answer is 22.

As the pointer moves to next column when its checks the condition....

The output would be

employee_name idnum age

Ruth 22 .

Sue . 0(the zero value is of John age 40)

 

You have no rights to post comments