By admin | October 7, 2009

SAS Certified Base Programmer 123 Questions (109)

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;
    in file' employee';
    input employee_ name $ 1-4;
    if employee_ name = 'Sue' then input age 7-8;
    else input idnum 10-11;
run;

Which one of the following values does the variable AGE contain when the name of the employee is “Sue”?

A. 30
B. 33
C. 40
D. . (missing numeric value)

3 comments | Add One

  1. admin - 10/7/2009 at 3:30 pm

    C

  2. R - 04/6/2011 at 8:20 am

    Hi, Can you Please explain this one?

  3. Deepak - 08/16/2011 at 9:04 am

    @2. R: Since there is no line holder used in first input statement therefore after reading ‘Sue’ as employee_name the pointer will move to next record to read and prcess input age 7-8 statement.

Leave a Comment

Leave a Reply

Your email address will not be published.