By admin | August 9, 2009

SAS Certified Base Programmer 50 Questions (36)

The SAS data set Employee_info is listed below.

employee bonus
2542      100.00
3612      133.15
2198      234.34
2198      111.12

The following SAS program is submitted:

proc sort data=employee_info;
    <insert BY statement here>
run;

Which one of the following BY statements completes the program and sorts the data in sequential order by descending bonus values within ascending employee values?

a. by descending bonus employee;
b. by employee bonus descending;
c. by employee descending bonus;
d. by descending employee bonus;

By admin | August 9, 2009

SAS Certified Base Programmer 50 Questions (35)

The contents of the SAS data set Sasdata.Group are listed below.

name   age
Janice  10
Henri   11
Michele 11
Susan   12

The following SAS program is submitted using the Sasdata.Group data set as input:

libname sasdata 'SAS-data-library';
data group;
    set sasdata.group;
    file 'file-specification';
    put name $15. @5 age 2.;
run;

Which one of the following describes the output created?

a. a raw data file only
b. a SAS data set named Group only
c. both a SAS data set named Group and a raw data file
d. The program fails execution due to errors.

By admin | August 9, 2009

SAS Certified Base Programmer 50 Questions (34)

The SAS data sets Work.Employee and Work.Salary are shown below.

Work.Employee
fname age
Bruce  30
Dan    40

Work.Salary
fname salary
Bruce  25000
Bruce  35000
Dan    25000

The following merged SAS data set is generated:

Work.Empdata
fname age totsal
Bruce  30   60000
Dan    40   25000

Which one of the following SAS programs created the merged data set?

a.

data work.empdata;
    merge work.employee
        work.salary;
    by fname;
    if first.fname then totsal=0;
    totsal+salary;
    if last.fname then output;
run;


b.

data work.empdata(drop=salary);
    merge work.employee
        work.salary;
    by fname;
    if first.fname then totsal=0;
    totsal+salary;
    if last.fname then output;
run;


c.

data work.empdata;
    merge work.employee
        work.salary(drop=salary);
    by fname;
    if first.fname then total=0;
    totsal+salary;
    if last.fname then output;
run;


d.

data work.empdata;
    merge work.employee
        work.salary;
    by fname;
    if first.fname then total+salary;
run;

By admin | August 9, 2009

SAS Certified Base Programmer 50 Questions (33)

The following SAS program is submitted:

data test;
    input animal1 $ animal2 $
        mlgrams1 mlgrams2;
cards;
hummingbird ostrich 54000.39 90800000.87
;
run;

Which one of the following represents the values of each variable in the output data set?
a.

animal1 animal2 mlgrams1 mlgrams2
hummingb  ostrich  54000.39  90800000

b.

animal1 animal2 mlgrams1 mlgrams2
hummingb  ostrich  54000.39  90800000.87

c.

animal1 animal2 mlgrams1 mlgrams2
hummingbird  ostrich  54000.39  90800000

d.

animal1 animal2 mlgrams1 mlgrams2
hummingbird  ostrich  54000.39  90800000.87

By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (32)

Which TITLE statement would display JANE’S DOG as the text of the title?

a. title “JANE”S DOG”;
b. title ‘JANE”S DOG’;
c. title “JANE’S DOG”;
d. title ‘JANE’ ‘ ‘S DOG’;