SAS Base Programming for SAS 9 v1.0 (A00-211)

Page:    1 / 18   
Total 270 questions

Given the SAS data set WORK QTR 1_REVENUE:
destination revenue

YYZ 53634 -

FRA 62129 -

FRA 75962 -

RDU 76254 -

YYZ 82174 -
The following SAS program is submitted:


What is the first observation in the output data set?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : B

The following SAS program is submitted:
data numrecords;
infile "˜file specification"™;
[email protected] patient $15.
relative$ [email protected];
if relative = "˜children"™ then
input @54 diagnosis $15. @;
else if relative = "˜parents"™ then
input @28 doctor $15.
clinic $ 44-53
@54 diagnosis $15. @;
input age;
run;
How many raw data records are read during each iteration of the DATA step execution?

  • A. 1
  • B. 2
  • C. 3
  • D. 4


Answer : B

Given the SAS data set ONE:
Given the SAS data set WORK.ONE:


The following SAS program is submitted:

Which report is produced?

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D


Answer : B

After a SAS program is submitted, the following is written to the SAS log:
105 data january;
106 set allmonths(keep = product month num_sold cost);
107 if month = "˜Jan"™ then output january;
108 sales = cost * num_sold;
109 keep = product sales;
------
ERROR 22-322: Syntax error, expecting one of the following:!,
!!, &, *,**, +, -,/, <,< =, <>, =, >, ><, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR,^=,|,II,
110 run;
What changes should be made to the KEEP statement to correct the errors in the LOG?

  • A. keep product sales;
  • B. keep product, sales;
  • C. keep = product, sales;
  • D. keep = (product sales);


Answer : A

The following SAS program is submitted:
data combine;
prefix="™505"™;
middle="™6465 "˜;
end="™09090"™;
<insert statement here>;
run;
Which statement successfully completes the program so that TOTAL has a value of 505-6465-
09090?

  • A. total = cat("™-"™, prefix, middle, end);
  • B. total = catx("™-"™, prefix, middle, end);
  • C. total = prefix !!"™-"™!! middle "˜"˜!!"™-"™!! end;
  • D. total = prefix!!"™-"™!! left(middle)!!"™-"™!! end;


Answer : B

The following SAS program is submitted:
<insert ODS statement here>
proc means data = sasuser.shoes;
where product in ("˜Sandal"™ , "˜Slipper"™ , "˜Boot"™); run;
<insert ODS statement here>
Which ODS statements complete the program and send the report to an HTML file?

  • A. ods html = "˜sales.html"™; ods html close;
  • B. ods file = "˜sales.html"™; ods file close;
  • C. ods file html = "˜sales.html"™; ods file close;
  • D. ods html file = "˜sales.html"™; ods html close;


Answer : D

Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile "˜amount"™;
[email protected] salary 6.;
if_error_then description = "˜Problems"™;
else description = "˜No Problems"™;
run;
What is the result?

  • A. The value of the DESCRIPTION variable is No Probl.
  • B. The value of the DESCRIPTION variable is Problems.
  • C. The value of the DESCRIPTION variable is No Problems.
  • D. The value of the DESCRIPTION variable can not be determined.


Answer : B

Given the SAS data set PEPM.STUDENTS:

PERM.STUDENTS NAME AGE -
--------- ------ Alfred 14

Alice13 -

Barbara13 -

Carol14 -
The following SAS program is submitted:
libname perm "˜SAS data library"™;
data students;
set perm.students;
file "˜file specification"™;
put name $15. @5 age 2.;
run;
What is written to the output raw data file?

  • A. ----I----10---I----20---I----30 Alfred 14 Alice 13 Barbara 13 Carol 14
  • B. ----I----10---I----20---I----30 Alfr14 Alic13 Barb13a Carol 4
  • C. ----I----10---I----20---I----30 Alfr14ed Alic130 Barb13ara Caro141
  • D. ----I----10---I----20---I----30 Alfred14 Alice13 Barbara13 Carol14


Answer : B

The following SAS program is submitted:
data work.total;
set work.salary(keep = department wagerate);
by department;
if first.department
then payroll = 0;
payroll + wagerate;
if last.department
run;
The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.
What is the result?

  • A. The WORK.TOTAL data set contains 5 observations.
  • B. The WORKTDTAL data set contains 100 observations.
  • C. The WORKTOTAL data set contains 500 observations.
  • D. The program fails to execute due to errors.


Answer : A

The following SAS program is submitted;
data combine;
country = "˜Italy, Russia, ireland"™;
found = find(country, "˜i"™);
run;
What is the value of the variable FOUND in the output data set?

  • A. 1
  • B. 12
  • C. Italy
  • D. Russia


Answer : B

Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?

  • A. 11
  • B. 15
  • C. 10 or fewer
  • D. 11 or fewer


Answer : D

The SAS data set named WORK.SALARY contains 10 observations for each department, and is currently ordered by Department. The following SAS program is submitted:


Which statement is true?

  • A. The by statement in the DATA step causes a syntax error.
  • B. The statement Payroll+(MonthlyWageRate*12); in the data step causes a syntax error.
  • C. The values of the variable Payroll represent the monthly total for each department in the WORK.SALARY data set.
  • D. The values of the variable Payroll represent a monthly total for all values of WAGERATE in the WORK.SALARY data set.


Answer : C

Given the contents of the raw data file TYPECOLOR.DAT:



The following SAS program is submitted:

What are the values of the variables Type and Color?

  • A. Type=daisy, Color=yellow
  • B. Type=daisy, Color=w
  • C. Type=daisy, Color=daisyyellow
  • D. Type=daisy, Color=


Answer : D

The following SAS program is submitted:


What new variables are created?

  • A. Difcount1, Difcount2 and Difcount3
  • B. Diff1, Diff2 and Diff3
  • C. Janpt, Febpt, and Marpt
  • D. Patients1, Patients2 and Patients3


Answer : A

Given the raw data record in the file phone.txt:


Which SAS statement completes the program and results in a value of "James Stevens" for the variableFullName?

  • A. FullName=CATX(' ',EmpFName,EmpLName);
  • B. FullName=CAT(' ',EmpFName,EmpLName);
  • C. FullName=EmpFName!!EmpLName;
  • D. FullName=EmpFName + EmpLName;


Answer : A

Page:    1 / 18   
Total 270 questions