World No 1 Cert Exams: SAS Base Programming For SAS (R) 9
World No 1 Cert Exams: SAS Base Programming For SAS (R) 9
com
No Pass No Pay!
A00-211
DISCLAIMER
This study guide and/or material is not sponsored by, endorsed by or affiliated with Microsoft, Cisco, Oracle, Citrix, CIW,
Checkpoint, Novell, Sun/Solaris, CWNA, LPI, ISC, etc. All trademarks are properties of their respective owners.
Guarantee
If you use this study guide correctly and still fail the exam, send a scanned copy of your official score notice at:
Sales@Testkingonline.com
We will gladly refund the cost of this study guide or give you an exchange of study guide of your choice of the Free.
This material is protected by copyright law and international treaties. Unauthorized reproduction or distribution of this material, or
any portion thereof, may result in severe civil and criminal penalties, and will be prosecuted to the maximum extent possible under
law.
Answer: C
Question: 2
The following GAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAG data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7
observations. How many observations will the data set WORK.EMPSALARY contain?
A-0
B-5
C-7
D - 12
Answer: A
Question: 3
The following SAS program is submitted:
data work.accounting;
set work.dept1 work.dept2;
jobcode = ‘FA1’;
length jobcode $ 8;
run;
A character variable named JOBCODE is contained in both the WORK.DEPT1 and
WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1
data set and a length of 7 in the WORK.DEPT2 data set. What is the length of the variable
JOBCODE in the output data set?
A-3
B-5
C-7
D-8
Answer: B
Question: 4
Given the SAS data set SASDATA.TWO:
SASDATA.TWO
XY
-- __
52
A - The data set SASUSER.ONE has 0 observations, the data set ONE has 0 observations, and
the data set SASDATA.THREE has 0 observations.
B - The data set SASUSER.ONE has 2 observations, the data set ONE has 0 observations, and
the data set SASDATA.THREE has 1 observation.
C - The data set SASUSER.ONE has 2 observations, the data set ONE has 3 observations, and
the data set SASDATA.THREE has 1 observation.
D - No data sets are output. The DATA step fails execution due to errors.
Answer: B
Question: 5
The following SAS program is submitted:
footnote 1 ‘Sales Report for Last Month’;
footnote2 ‘Selected Products Only’;
footnote3 ‘All Regions’;
footnote4 ‘All Figures in Thousands of Dollars’;
proc print data = sasuser.shoes;
footnote2 ‘All Products’;
run;
Which footnote(s) is/are displayed in the report?
A - All Products
B - Sales Report for Last Month All Products
C - All Products All Regions All Figures in Thousands of Dollars
D - Sales Report for Last Month All Products All Regions All Figures in Thousands of Dollars
Answer: B
Question: 6
Given the raw data record DEPT:
----|----10---|----20---|----30
Printing 750
The following SAS program is submitted:
data bonus;
infile ‘dept’;
inputdept$ 1-11 number 13- 15;
<insert statement here>
run;
Which SAS statement completes the program and results in a value of ‘Printing750’ for the
DEPARTMENT variable?
Question: 7
The following SAS program is submitted:
data one;
addressl = ‘214 London Way’;
run;
data one;
set one;
address = tranwrd(address1, ‘Way’, ‘Drive’); run;
What are the length and value of the variable ADDRESS?
Answer: D
Question: 8
The following SAS program is submitted:
data work.sets;
do until (prod gt 6);
prod + 1;
end;
run;
What is the value of the variable PROD in the output data set?
A-6
B-7
C-8
D - (missing numeric)
Answer: B
Question: 9
Given the SAS data sets EMPLOYEE and SALARY:
EMPLOYEE SALARY
Fname age name salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
<insert MERGE statement here>
by fname;
totsal + salary;
run;
Which MERGE statement correctly completes the program?
A - merge employee
salary rename = fname = name;
B - merge employee
salary rename(name = fname);
C - merge employee
salary (rename = (fname = name));
Answer: D
Question: 10
Which program displays a listing of all data sets in the SASUSER library?
Answer: D
Question: 11
The following SAS program is submitted:
proc sort data = work.employee;
by descending fname;
proc sort data = work.salary;
by descending fname;
data work.empdata;
merge work.employee
work.salary;
by fname;
run;
Why does the program rail to execute?
Answer: D
Question: 12
The following SAS program Is submittad:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?
A-0
B-1
C-5
D - 60
Answer: D
Question: 13
A - data family ( dIm = ‘,’); infile ‘tile specification’; input relation $ firstname $; run;
B - options dIm = ‘,’; data family; infile ‘file specification’; input relation $ firstname $; run;
C - data family; infile ‘file specification’ dIm = ‘,’; input relation $ firstname $; run;
D - data family; infile ‘file specification’; input relation $ firstname $ / dim = ‘,’; run;
Answer: C
Question: 14
Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:
data subset;
set ages;
where age> 12;
run;
How many observations are written out to the data set SUBSET?
A-0
B-1
C-2
D-3
Answer: A
Question: 15
Given the SAS data set PRICES:
PRICES
prodid price producttype sales returns
K12S 5.10 NETWORK 15 2
B132S 2.34 HARDWARE 300 10
R18KY21.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = ‘HARDWARE’ then output HWARE;
else if producttype = ‘NETWORK’ then output INTER;
else if producttype = ‘SOFTWARE’ then output SOFT;
run;
How many observations does the HWARE data set contain?
A-0
B-2
Answer: B
Question: 16
The following SAS program is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
jobcode=’FAl’;
run;
The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a
length of 5.
What is the result?
Answer: B
Question: 17
Which ODS statement option terminates output being written to an HTML rile?
A - END
B - QUIT
C - STOP
D - CLOSE
Answer: D
Question: 18
The SAS data set PETS is sorted by the variables TYPE and BREED.
The following SAS program is submitted:
proc print data = pets;
var type breed;
sum number;
run;
What is the result?
Answer: A
Question: 19
The following SAS program is submitted:
data work.passengers;
if OrigPassengers = then
OrigPassengers = 100;
A-0
B - 100
C - 200
D - (missing numeric value)
Answer: B
Question: 20
Given the SAS data set PRICES:
PRICES
Prodid price producttype sales returns
K125 5.10 NETWORK 15 2
B132S 2.34 HARDWARE 300 10
R18KY2 1.29 SOFTWARE 25 5
3KL8BY 6.37 HARDWARE 125 15
DY65DW 5.60 HARDWARE 45 5
DGTY23 4.55 HARDWARE 67 2
The following SAS program is submitted:
data hware inter cheap;
set prices(keep = productype price);
if producttype = ‘HARDWARE’ then output hware; else if producttype = ‘NETWORK’ then output
inter; if price le 5.00;
run;
How many observations does the HWARE data set contain?
A-0
B-2
C-3
D-4
Answer: D
Question: 21
The following SAS program is submitted:
data work.sales;
do year = 1 to 5;
do month = 1 to 12;
x+ 1;
end;
end;
run;
How many observations are written to the WORK.SALES data set?
A-0
B-1
C-5
D - 60
Answer: B
Answer: B
Question: 23
Given the SAS data set EMPLOYEES:
EMPLOYEES
NAME SALARY
-------- ------------
Innis 60000
Jolli 50000
Ellis 55000
Liu 45000
The following SAS program is submitted:
proc print data = employees; where name like ‘_i%’;
run;
What is contained in the output?
A - Liu only
B - Innis and Ellis only
C - Innis, Ellis, and Liu only
D - Innis, Jolli, Ellis, and Liu
Answer: A
Question: 24
Given the SAS data set ONE:
ONE
Obs Dte
----- --------
1 09JAN2005
2 12JAN2005
The following SAS program is submitted:
data two;
set one;
day = <insert expression here>;
format dte date9.;
run;
The data set TWO is created:
TWO
Obs Dte Day
1 09JAN2005 1
12 JAN2005 4
A - day(dte)
B - weekday(dte)
C - dayofweek(dte)
D - datdif(dte,’01jan2005’d,’act/act’)
Answer: B
Question: 25
Read the table:
Given the SAS data set SASUSER.HOUSES:
Obs style bedrooms baths price sqteet street
1 CONDO 2 1.5 80050 1200 MAIN
2 CONDO 3 2.5 79350 1300 ELM
3 CONDO 4 2.5 127150 1400 OAK
4 CONDO 2 2.0 110700 1100 FIFTH
5 TWOSTORY 4 3.0 107250 2100 SECOND
6 TWOSTORY 2 1.0 55650 1600 WEST
7 TWOSTORY 2 1.0 69250 1450 NORTH
6 TWOSTORY 4 2.5 102950 2000 SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
<insert DEFINE statement here>
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
style price
------- ------
CONDO $79,700
TWOSTORY $62550
Which DEFINE statement completes the program and produces the desired output?
Answer: C
Question: 26
Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAME POINTS MONTH
----------- ------------ -----------
Amy 2 4
Amy 1 7
Gerard 3 3
Wang 3 3
Wang 1 12
Wang 1 8
The following SAS program is submitted:
proc sort data = work.awards;
Answer: D
Question: 27
The following SAS program is submitted:
libname temp ‘SAS data library’;
data work.new;
set temp.jobs;
format newdate mmddw10.;
mdate = month(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new; run;
The variable NEWDATE contains the SAS date value for April 15. 2005. What output is produced
if April 15, 2005 falls on a Friday?
Question: 28
Given the contents of the raw data file PRODUCT:
----I----10---I----20---I----30
24613 $25.31
The following SAS program is submitted:
data inventory;
infile ‘product’;
input idnum 5. @10 price;
run;
What is the value of the PRICE variable?
A - 25.31
B - $25.31
C - . (missing numeric value)
D - No value is stored.
Answer: C
Question: 29
The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?
Answer: D
Question: 30
The following SAS program is submitted:
data test;
set chemists;
itjobcode = ‘Chem2’
then description = ‘Senior Chemist’;
else description = ‘Unknown’;
run;
The value for the variable JOBCODE is:
JOBCODE
-------------
chem2
What is the value of the variable DESCRIPTION?
A - chem2
B - Unknown
C - Senior Chemist
D - ‘ ‘ (missing character value)
Answer: B
Question: 31
Given the AIRPLANES data set
Answer: C
Question: 32
Given the raw data file EMPLOYEE:
----I----1 0---I----20---I----30
Ruth 39 11
Jose 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
infile ‘employee’;
input employee_name $ 1-4;
if employee_name = ‘Ruth’ then input idnum 10-11;
else input age 7-8;
run;
What value does the variable IDNUM contain when the name of the employee is “Ruth”?
A - 11
B - 22
C - 33
D - (missing numeric value)
Answer: B
Question: 33
The following SAS program is submitted:
data temp.x;
set sasuser.y;
run;
What must be submitted prior to this SAS program for the program to execute successfully?
Question: 34
The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variable
COUNTRYFEE with a format or 7.;
The following SAS program is submitted:
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?
Answer: C
Question: 35
The following SAS program is submitted:
proc freq data = class;
tables gender * age / <insert option here>;
run;
The following report is created:
The FREQ Procedure
Table of gender by age
Row Column
Gender age Frequency Percent Percent Percent
F 11 1 10.00 20.00 50.00
12 2 20.00 40.00 40.00
13 2 20.00 40.00 66.67
Total 5 50.00 100.00
M 11 1 10.00 20.00 50.00
12 3 30.00 60.00 60,00
13 1 10.00 20.00 33.33
Total 5 50.00 100.00
----------------------------------------------------------------------------------
Total 11 2 20.00 100.00
12 5 50.00 100.00
13 3 30.00 100.00
Total 10 100.00
Which option correctly completes the program and creates the report?
A - LIST
B - NOCOLS
C - CROSSLIST
D - NOCROSSTAB
Answer: C
Question: 36
The value 110700 is stored in a numeric variable named SALARY.
Which FORMAT statement displays the value as $110,700.00 in a report?
Answer: C
Question: 37
Given the raw data file YEARAMT:
----|---10---|---20---|----30
1901 2
1905 1
1910 6
1925 .
1941 1
The following SAS program is submitted:
data coins;
infile ‘yearamt’;
input year quantity;
<insert statement(s) here>
run;
Which statement(s) completed the program and produced a non-missing value for the variable
TOTQUANTITY in the final observation of the output data set?
A - totquantity + quantity;
B - totquantity = sum(totquantity + quantity);
C - retain totquantity; totquantity = totquantity + quantity;
D - retain totquantity0; totquantity = totquantity + quantity;
Answer: A
Question: 38
Given the SAS data set EMPLOYEE INFO:
EMPLOYEE_INFO
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 BY statement 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 Expenses IDNumber;
D - by ascending IDNumber ascending Expenses;
Answer: B
Question: 39
The following SAS program is submitted:
proc format
A - Fail
B - Pass
C - 50.5
D - . (missing numeric value)
Answer: C
Question: 40
What is the purpose or the MISSOVER option on the INFILE statement?
A - It prevents SAS from loading a new record when the end of the current record is reached.
B - It enables SAS to scan the input data records until the character string that is specified in the
@‘character-string’ expression is round.
C - It enables SAS to continue to read the next input data record if it does not find values in the
current input tine for all the variables in the statement.
D - It causes the DATA step to stop processing if an INPUT statement reaches the end of the
current record without finding values for all variables in the statement.
Answer: A
Question: 41
The following SAS program is submitted:
data work.test;
set work.staff (keep = jansales febsales marsales);
array diff_sales{3} difsales1 - difsales3;
array monthly{3} jansales febsales marsales;
run;
What new variables are created?
Answer: C
Question: 42
What describes the SAS automatic _ERRDR_ variable?
Answer: C
A - dmy9.
B - date9.
C - ddMMMyy9.
D - ddmmmyyyy9.
Answer: B
Question: 44
Which statement correctly computes the average of four numerical values?
Answer: C
Question: 45
The following SAS program is submitted:
libname temp ‘SAS data library’;
data temp.sales;
merge temp sales
work.receipt;
by names;
run;
The input data files are sorted by the NAMES variable:
What is the result?
A - The program executes successfully and a temporary SAS data set is created.
B - The program executes successfully and a permanent SAS data set is created.
C - The program fails execution because the same SAS data set is referenced for both read and
write operations.
D - The program fails execution because the SAS data sets on the MERGE statement are in two
different libraries.
Answer: B
Question: 46
Given the contents of the raw data file TYPECOLOR:
----I----10---I----20---I----30
Daisyyellow
The following SAG program is submitted:
data flowers;
infile ‘typecolor’;
input type$ 1-5+1 color$;
run;
What are the values of the variables TYPE and COLOR?
A - type color
daisyyellow
Answer: B
Question: 47
A user-defined format has been created using the FORMAT procedure. Where is it stored?
A - in a SAS catalog
B - in an external binary file
C - in a SAS dataset in the WORK library
D - in a SAS dataset in a permanent SAS data library
Answer: A
Question: 48
The following SAS program is submitted:
data work.flights;
destination = ‘cph’;
select(destination);
when(’LHR’) city = ‘London’;
when(’CPH’) city = ‘Copenhagen’;
otherwise city = ‘Other’;
end;
run;
What is the value of the CITY variable?
A - Other
B - Copenh
C - Copenhagen
D - ‘‘(missing character value)
Answer: A
Question: 49
The following SAS program is submitted:
data work.new;
length word $7;
amount = 4;
it amount = 4 then word = ‘FOUR’;
else if amount = 7
then word = ‘SEVEN’;
else word = ‘NONE!!!’;
amount = 7;
run;
What are the values of the AMOUNT and WORD variables in SAS dataset work.new?
A - amount word
4 FOUR
B - amount word
4 NONE!!!
C - amount word
Answer: C
Question: 50
The following SAS program is submitted, creating the SAS data set ONE:
data one;
infile ‘file specification’;
input num chars$;
run;
ONE
NUM CHAR
------- ---------
1 23
3 23
1 77
The following SAS program is submitted:
proc print data = one;
where char = 23;
run;
What is output?
A - NUM CHAR
1 77
2
B - NUM CHAR
1 23
3 23
C - NUM CHAR
1 23
3 23
1 77
D - No output is generated.
Answer: D
Question: 51
The following SAS program is submitted:
data work.retail;
cost = ‘20000’;
total= .10* cost
run;
What is the result?
A - The value of the variable TOTAL in the output data set is 2000. No messages are written to
the SAS log.
B - The value of the variable TOTAL in the output data set is 2000. A note that conversion has
taken place is written to the SAS log.
C - The value of the variable TOTAL in the output data set is missing. An error message is written
to the SAS log.
D - The variable TOTAL in the output data set has no value. The program fails to execute due to
a syntax error.
Answer: B
Answer: A
Question: 53
The following SAS program is submitted:
data work.test;
array items{3} _temporary_;
run;
What are the names of the variable(s) in the WORKTEST data set?
A - ITEMS
B - ITEMS1, ITEMS2, ITEMS3
C - No variables are created because it is a temporary array.
D - The program fails to execute because there are no variables listed on the ARRAY statement.
Answer: C
Question: 54
Read the table
The following SAS program is submitted:
proc freq data = sales;
<insert TABLES statement here>
run;
The following output is created by the FREQUENCY procedure:
The FREQ Procedure
Table of region by product
region product
Frequency
Percent
Row Pct
Col Pct corn cotton oranges Total
EAST 2 1 1 4
22.22 11.11 11.11 44.44
50.00 25.00 25.00
50.00 33.33 50.00
SOUTH 2 2 1 5
22.22 22.22 11.11 55.56
40.00 40.00 20.00
50.00 66.67 50.00
Total 4 3 2 9
4444 33.33 22.22 100.00
Which TABLES statement(s) completed the program and produced the output?
Answer: B
Question: 55
The following SAS program is submitted:
data one;
date = ‘04juI2005’d;
format date weekdate.; run;
proc print data = one; run;
What output is generated?
A - Obs date
1 Monday, July 4, 2005
B - Obs date
1 July4, 2005
C - Obs date
1 04Jul2005
D - Obs date
1 Monday, 07/04/2005
Answer: A
Question: 56
The following SAS program is submitted:
data test;
set sasuser.employees;
if 2 le years_service le 10 then
amount = 1000;
else amount = 0;
amount_per_year = years_service / amount
run;
What is the value of the variable AMOUNT_PER_YEAR if an employee has been with the
company for one year?
A-0
B - 0.001
C-1
D - . (missing numeric value)
Answer: D
Question: 57
Given the SAS data set PERM.STUDENTS:
PERM.STUDENTS
NAME AGE
--------- -------
Alfred 14
Alice 13
Barbara 13
Carol 14
The following SAS program is submitted:
libname perm ‘SAS data library’;
data students;
A - put
B - put/;
C - double;
D - put _null_;
Answer: A
Question: 58
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 named WORKSALARY contains 10 observations for each department, and is
currently ordered by DEPARTMENT.
Which statement is true?
Answer: C
Question: 59
Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan 19/2/2004 ACCT
Rob 22/5/2004 MKTG
MaryJane 14/3/2004 EDUC
The following SAS program is submitted:
data emps;
infile ‘employee’;
input@1 name$
@15 date <insert INFORMAT here>
@25 department$;
run;
Which INFORMAT correctly completes the program?
Answer: C
Question: 60
The following SAS program is submitted:
data test;
infile ‘file specification’;
input name $ amount@@;
run;
Which of the following is true?
Answer: C
Question: 61
Given the SAS data set QTR 1_REVENUE:
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;
What is the first observation in the output data set?
A - destination revenue
FRA 62129
B - destination revenue
FRA 75962
C - destination revenue
YYZ 53634
D - destination revenue
YYZ 82174
Answer: B
Question: 62
The following SAS program is submitted:
data numrecords;
infile ‘file specification’;
input@1 patient $15.
relative$ 16-26@;
if relative = ‘children’ then
input @54 diagnosis $15. @;
else if relative = ‘parents’ then
input @28 doctor $15.
A-1
B-2
C-3
D-4
Answer: A
Question: 63
Given the SAS data set ONE:
ONE
XYZ
--- --- ---
1 A 27
1 A 33
1 B 45
2 A 52
2 B 69
3 B 70
4 A 62
4 C 91
The following SAS program is submitted:
data two;
set one;
by x y;
if first.y;
run;
proc print data = two noobs;
run;
4Which report is produced?
A-XYZ
1 A 27
1 B 45
2 A 52
2 B 69
3 B 70
4 A 82
4 C 91
B-XYZ
1 A 33
1 B 45
2 A 52
2 B 69
3 B 70
4 A 82
4 C 91
C-XYZ
1 B 45
2 A 52
2 B 69
Answer: A
Question: 64
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;
------
22
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?
Answer: A
Question: 65
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?
Answer: B
Question: 66
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?
Answer: D
Question: 67
Given the raw data file AMOUNT:
----I---- 10---I----20---I----30
$1,234
The following SAS program is submitted:
data test;
infile ‘amount’;
input@1 salary 6.;
if_error_then description = ‘Problems’;
else description = ‘No Problems’;
run;
What is the result?
Answer: B
Question: 68
Given the SAS data set PEPM.STUDENTS:
PERM.STUDENTS
NAME AGE
--------- ------
Alfred 14
Alice 13
Barbara 13
Carol 14
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
Answer: B
Question: 69
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?
Answer: A
Question: 70
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