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?
Which statement describes a characteristic of the SAS automatic variable _ERROR_?
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?
Given the SAS data set WORKAWARDS:
WORK.AWARDS
FNAMEPOINTSMONTH
----------------------------------
Amy24
Amy17
Gerard33
Wang33
Wang112
Wang18
The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;
How are the observations sorted?
Given the SAS data set PRICES:
PRICES
Prodid priceproducttypesalesreturns
K1255.10NETWORK152
B132S 2.34HARDWARE30010
R18KY2 1.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
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;
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?
Given the SAS data set WORK.TEMPS:
The following program is submitted:
Which output is correct?
Which is a valid LIBNAME statement?
Read the table
The following SAS program is submitted:
proc freq data = sales;
run;
The following output is created by the FREQUENCY procedure:
Which TABLES statement(s) completed the program and produced the output?
Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?
The following SAS program is submitted:
data work.empsalary;
set work.people (in = inemp)
work.money (in = insal);
if insal and inemp;
run;
The SAS data set WORKPEOPLE has 5 observations, and the data set WORKMONEY has 7 observations. How many observations will the data set WORK.EMPSALARY contain?
The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?
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?
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?
Given the SAS data set WORK.EMP_NAME:
Given the SAS data set WORK.EMP_DEPT:
The following program is submitted:
How many observations are in data set WORK.ALL after submitting the program?
The following SAS program is submitted, creating the SAS data set ONE:
data one;
infile ‘file specification’;
input num chars$;
run;
ONE
NUMCHAR
----------------
123
323
177
The following SAS program is submitted:
proc print data = one;
where char = 23;
run;
What is output?
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?
The following SAS program is submitted:
How many observations are written to the WORK.SALES data set?
A user-defined format has been created using the FORMAT procedure. Where is it stored?
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;
run;
Which SAS statement completes the program and results in a value of ‘Printing750’ for the DEPARTMENT variable?
The following SAS program is submitted:
<_insert_ods_code_>
proc means data=SASUSER.SHOES;
where Product in ('Sandal' , 'Slipper' , 'Boot');
run;
<_insert_ods_code_>
Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?
Given the contents of the raw data file 'EMPLOYEE.TXT'
Which SAS informat correctly completes the program?
Given the SAS data set WORK.ONE:
The following SAS program is submitted:
The data set WORK.TWO is created, where Day would be 1 for Sunday, 2 for Monday, 3 for Tuesday, ... :
Which expression successfully completed the program and creates the variable DAY?
The following SAS program is submitted:
data work.pieces;
do while (n lt 6);
n + 1;
end;
run;
Which one of the following is the value of the variable N in the output data set?
The SAS data set Fed.Banks contains a variable Open_Date which has been assigned a permanent label of "Open Date". Which SAS program temporarily replaces the label "Open Date" with the label "Starting Date" in the output?
Given the raw data file ‘DEPENDENTS.TXT’:
The following SAS program is submitted:
What will be the value of _ERROR_ in the Program Data Vector for each iteration of the DATA step?
The following SAS program is submitted:
The SAS data set WORK.SALARY is currently ordered by Gender within Department. Which inserted code will accumulate subtotals for each Gender within Department?
Given the following raw data records:
The following output is desired:
Which SAS program correctly reads in the raw data?
The following SAS program is submitted:
data work.totalsales;
set work.monthlysales(keep = year product sales);
retain monthsales {12} ;
array monthsales {12} ;
do i = 1 to 12;
monthsales{i} = sales;
end;
cnt + 1;
monthsales{cnt} = sales;
run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?
This question will ask you to provide a segment of missing code.
Given the SAS data set WORK.ONE:
The following SAS program is submitted:
The data set WORK.TWO is created, where Day would be the day of the month:
Which expression successfully completed the program and creates the variable Day?
The following SAS program is submitted:
data WORK.OUTDS;
do until(Prod GT 6);
Prod + 1;
end;
run;
What is the value of the variable Prod in the output data set?
After a SAS program is submitted, the following is written to the SAS log:
What issue generated the error in the log?
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:
What is the value of the variable Total before the first iteration of the data step?
The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
length EmpId $6;
CharEmpid=EmpId;
run;
If data set WORK.DEPARTMENT has a numeric variable EmpId. Which statement is true about the output dataset?
The following SAS program is submitted:
data work.totalsales (keep = monthsales{12} );
set work.monthlysales (keep = year product sales);
array monthsales {12} ;
do i=1 to 12;
monthsales{i} = sales;
end;
run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?
A raw data file is listed below:
RANCH,1250,2,1,Sheppard Avenue,"$64,000"
SPLIT,1190,1,1,Rand Street,"$65,850"
CONDO,1400,2,1.5,Market Street,"80,050"
TWOSTORY,1810,4,3,Garris Street,"$107,250"
RANCH,1500,3,3,Kemble Avenue,"$86,650"
SPLIT,1615,4,3,West Drive,"94,450"
SPLIT,1305,3,1.5,Graham Avenue,"$73,650"
The following SAS program is submitted using the raw data file as input:
data work.condo_ranch;
infile 'file-specification' dsd;
input style $ @;
if style = 'CONDO' or style = 'RANCH';
input sqfeet bedrooms baths street $ price : dollar10.;
run;
How many observations will the output data set contain?
Which of the following programs correctly invokes the DATA Step Debugger?
The following SAS program is submitted:
data work.test;
array agents{4} $ 12 sales1 - sales4;
run;
Which one of the following represents the variables that are contained in the output data set?
Given the following raw data records:
The following output data set is desired:
Which SAS program correctly reads in the raw data?
The following SAS program is submitted:
libname temp 'SAS-data-library';
data work.new;
set temp.jobs;
format newdate mmddyy10.;
qdate = qtr(newdate);
ddate = weekday(newdate);
run;
proc print data = work.new;
run;
The variable NEWDATE contains the SAS date value for April 15, 2000.
What output is produced if April 15, 2000 falls on a Saturday?
The following SAS program is submitted:
What will the data set WORK.TEST contain?