By admin | July 27, 2009

SAS Certified Base Programmer 50 Questions (2)

A raw data file is listed below.

1---+----10---+----20---+
Jose,47,210
Sue,,108

The following program is submitted using the raw data file above as input:

data employeestats;
    <insert INFILE statement here>
    input name $ age weight;
run;

The following output is desired:

name age weight
Jose  47  210
Sue   .   108

Which of the following INFILE statement completes the program and accesses the data correctly?

a. infile ‘file-specification’ pad;
b. infile ‘file-specification’ dsd;
c. infile ‘file-specification’ dlm=’,’;
d. infile ‘file-specification’ missover;

3 comments | Add One

  1. SAS Tutor - 07/27/2009 at 3:03 pm

    B

  2. Aloke - 12/6/2013 at 7:22 am

    None of the option is correct.
    However option C will display the result if and only if there is a space between two comma in the second row. This needs to be “Sue, ,108”.

  3. Prabhakar - 03/14/2014 at 10:14 am

    Answer is C since the Data is Comma seperated file.

Leave a Comment

Leave a Reply

Your email address will not be published.