By admin | September 16, 2009

SAS Certified Base Programmer 123 Questions (51)

The following SAS program is submitted:

libnamecompany 'SAS-data-library';
proc sort data = company.payroll;
    by EmployeeIDNumber;
run;

Write access has been granted to the COMPANY library.
Which one of the following represents how the observations are sorted?

A. COMPANY.PAYROLL is recreated in sorted order by EmployeeIDNumber.
B. COMPANY.PAYROLL is stored in original order, and a new data set PAYROLL is created in sorted order by EmployeeIDNumber.
C. COMPANY.PAYROLL is stored in original order, and a new data set COMPANY.PAYROLLSORTED is created in sorted order by EmployeeIDNumber.
D. COMPANY.PAYROLL is recreated in sorted order by EmployeeIDNumber, and a new data set PAYROLL is created in sorted order by EmployeeIDNumber.

By admin | September 16, 2009

SAS Certified Base Programmer 123 Questions (50)

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 ascending expense values within each ascending IDNUMBER value?

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

By admin | September 16, 2009

SAS Certified Base Programmer 123 Questions (49)

The SAS data set WORK.AWARDS is listed below:

fname  points
Amy    2
Amy    1
Gerard 3
Wang   3
Wang   1
Wang   2

The following SAS program is submitted:

proc sort data = work.awards;
    by descending fname points;
run;

Which one of the following represents how the observations are sorted?

A.
Wang 3
Gerard 3
Wang 2
Amy 2
Wang 1
Amy 1

B.
Wang 3
Wang 2
Wang 1
Gerard 3
Amy 2
Amy 1

C.
Wang 3
Wang 1
Wang 2
Gerard 3
Amy 2
Amy 1

D.
Wang 1
Wang 2
Wang 3
Gerard 3
Amy 1
Amy 2

By admin | September 14, 2009

SAS Certified Base Programmer 123 Questions (48)

The observations in the SAS data set WORK.TEST are ordered by the values of the variable SALARY.

The following SAS program is submitted:

proc sort data = work.test out = work.testsorted;
    by name;
run;

Which one of the following is the result of the SAS program?

A. The data set WORK.TEST is stored in ascending order by values of the NAME variable.
B. The data set WORK.TEST is stored in descending order by values of the NAME variable.
C. The data set WORK.TESTSORTED is stored in ascending order by values of the NAME variable.
D. The data set WORK.TESTSORTED is stored in descending order by values of the NAME variable.

By admin | September 14, 2009

SAS Certified Base Programmer 123 Questions (47)

Which one of the following statements is true regarding the name of a SAS array?

A. It is saved with the data set.
B. It can be used in procedures.
C. It exists only for the duration of the DATA step.
D. It can be the same as the name of a variable in the data set.