By admin | July 27, 2009

SAS Certified Base Programmer 50 Questions (1)

A raw data file is listed below.

1---+----10---+----20---+
son Frank 01/31/89
daughter June    12-25-87
brother Samuel 01/17/51

The following program is submitted using this file as input:

data work.family;
    infile 'file-specification';
    <insert INPUT statement here>
run;

Which INPUT statement correctly reads the values for the variable Birthdate as SAS date values?

a. input relation $ first_name $ birthdate date9.;
b. input relation $ first_name $ birthdate mmddyy8.;
c. input relation $ first_name $ birthdate : date9.;
d. input relation $ first_name $ birthdate : mmddyy8.;

8 comments | Add One

  1. SAS Tutor - 07/27/2009 at 2:48 pm

    D

  2. cnu - 06/2/2011 at 6:22 am

    answer
    A

  3. SAS user - 01/18/2012 at 7:04 am

    Answer is D

    because ‘:’ must be there after the variable need to change

  4. sagar - 05/18/2012 at 3:50 am

    The correct answer is B.

    there is no : before formatting a data so D cannot be the right answer.

  5. Vaibhav Mainkar - 05/18/2012 at 7:08 am

    “:” helps to read immediate value after spaces. Ans is D

  6. artur - 11/7/2012 at 5:34 pm

    The true answer is D not A.
    The reason:

    When you are reading an external file you must wirte (colon 🙂 and the correct format.

  7. Arthur - 12/9/2012 at 2:01 am

    The answer D, is right.
    Try it on sas 😉

  8. Aloke - 02/1/2014 at 8:44 am

    Both B & D are correct for given input data.

    But D will not be correct if there is birthday value as “10 20 84”, Hence B is the best answer.

Leave a Comment

Leave a Reply

Your email address will not be published.