By admin | September 17, 2009

SAS Certified Base Programmer 123 Questions (56)

The following SAS program is submitted:

data work.flights;
    destination = 'cph';
    select(destination);
        when('LHR') city = 'London';
        when('CPH') city = 'Copenhgen';
        otherwise city = 'Other';
    end;
run;

Which one of the following is the value of the CITY variable?

A. Other
B. Copenh
C. Copenhagen
D. ‘ ‘ (missing character value)

By admin | September 17, 2009

SAS Certified Base Programmer 123 Questions (55)

The following SAS program is submitted:

data work.flights;
    destination = 'CPH';
    select(destination);
        when('LHR') city = 'London';
        when('CPH') city = 'Copenhgen';
        otherwise;
    end;
run;

Which one of the following is the value of the CITY variable?

A. London
B. Copenh
C. Copenhagen
D. ‘ ‘ (missing character value)

By admin | September 17, 2009

SAS Certified Base Programmer 123 Questions (54)

The following SAS program is submitted:

data work.new;
    length word $7;
    amount = 4;
    if amount = 4 then word = 'FOUR';
    else if amount = 7 then word = 'SEVEN';
    else word = 'NONE!!!';
    amount = 7;
run;

Which one of the following represents the values of the AMOUNT and WORD variables?

A.
amount word
7 FOUR

B.
amount word
7 SEVEN

C.
amount word
4 FOUR

D.
amount word
4 ‘ ‘ (missing character value)

By admin | September 16, 2009

SAS Certified Base Programmer 123 Questions (53)

The SAS data set EMPLOYEE_INFO is listed below:

IDNumber Expenses
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 sequentially by descending expense values within each descending IDNUMBER value?

A. by descending IDNumber Expenses;
B. by (IDNumber Expenses) descending;
C. by IDNumber descending Expenses descending;
D. by descending IDNumber descending Expenses;

By admin | September 16, 2009

SAS Certified Base Programmer 123 Questions (52)

The SAS data set QTR1_REVENUE is listed below:

destination revenue
YYZ         53634
FRA         62129
FRA         75962
RDU         76254
YYZ         82174

The following SAS program is submitted:

proc sort data = qtr1_revenue;
    by destination descending revenue;
run;

Which one of the following represents the first observation in the output data set?

A.
destination revenue
YYZ 82174

B.
destination revenue
YYZ 53634

C.
destination revenue
FRA 62129

D.
destination revenue
FRA 75962