By admin | October 7, 2009

SAS Certified Base Programmer 123 Questions (111)

A SAS PRINT procedure output of the WORK.LEVELS data set is listed below:

Obs name  level
1   Frank 1
2   Joan  2
3   Sui   2
4   Jose  3
5   Burt  4
6   Kelly .
7   Juan  1

The following SAS program is submitted:

data work . expertise;
    set work. levels;
    if level = . then
        expertise = 'Unknown';
    else if level = 1 then
        expertise = 'Low';
    else if level = 2 or 3 then
        expertise =' Medium';
    else
        expertise = 'High';
run;

Which of the following values does the variable EXPERTISE contain?

A. Low, Medium, and High only
B. Low, Medium, and Unknown only
C. Low, Medium, High, and Unknown only
D. Low, Medium, High, Unknown, and ‘ ‘ (missing character value)

By admin | October 7, 2009

SAS Certified Base Programmer 123 Questions (110)

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 = 'Ruth' then input idnum 10-11;
    else input age 7-8;
run;

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

A. 11
B. 22
C. 32
D. . (missing numeric value)

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)

By admin | October 6, 2009

SAS Certified Base Programmer 123 Questions (108)

The following SAS program is submitted:

libnamesasdata 'SAS-data-library';

data set;
    set sasdata .chemists;
    if jobcode = 'Chem2'
        then description = 'Senior Chemist';
    else description = 'Unknown';
run;

A value for the variable JOBCODE is listed below:

JOBCODE
chem2

Which one of the following values does the variable DESCRIPTION contain?

A. Chem2
B. Unknown
C. Senior Chemist
D. ‘ ‘ (missing character value)

By admin | October 6, 2009

SAS Certified Base Programmer 123 Questions (107)

The following SAS program is submitted:

libnamesasdata 'SAS-data-library';

data set;
    set sasdata .chemists;
    if jobcode = 'chem3'
        then description = 'Senior Chemist';
    else description = 'Unknown';
run;

A value for the variable JOBCODE is listed below:

JOBCODE
CHEM3

Which one of the following values does the variable DESCRIPTION contain?

A. chem3
B. Unknown
C. Senior Chemist
D. ‘ ‘ (missing character value)