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 DATA step is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
run;
The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of 5. Which one of the following is the length of the variable JOBCODE in the output data set?
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?
The contents of the raw data file CALENDAR are listed below:
--------10-------20-------30
01012000
The following SAS program is submitted:
data test;
infile 'calendar';
input @1 date mmddyy10.;
if date = '01012000'd then event = 'January 1st';
run;
Which one of the following is the value of the EVENT variable?
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?
The following SAS program is submitted:
data test;
set chemists;
jobcode = ‘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?
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?
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:
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?
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:
data WORK.DATE_INFO;
X="01Jan1960" D;
run;
What variable X contains what value?
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?
The following SAS program is submitted:
data work.passengers;
if OrigPassengers = . then'
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
TotalPassengers = sum (OrigPassengers, TransPassengers) +0;
run;
What is the value of the TOTALPASSENGERS variable in the output data set?
Given the data set WORK.EMPDATA:
Which one of the following where statements would display observations with job titles containing the word 'Manager'?
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;
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?
Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?
Given the SAS data set PRICES:
PRICES
prodid price
K12S5.10producttype
NETWORKsales
15returns
2
B132S 2.34HARDWARE30010
R18KY21.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
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?
The following SAS program is submitted:
data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
label Jobcode='Job Description';
run;
Which statement is true about the output dataset?
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?
Read the table:
Given the SAS data set SASUSER.HOUSES:
Obsstylebedroomsbathspricesqteetstreet
1CONDO21.5800501200MAIN
2CONDO32.5793501300ELM
3CONDO42.51271501400OAK
4CONDO22.01107001100FIFTH
5TWOSTORY43.01072502100SECOND
6TWOSTORY21.0556501600WEST
7TWOSTORY21.0692501450NORTH
6TWOSTORY42.5102950 2000SOUTH
The following SAS program is submitted:
proc report data = sasuser.houses nowd headline;
column style price;
where price It 100000;
define price / mean width = 9 format = dollar12.;
title;
run;
The following output is desired:
styleprice
-------------
CONDO$79,700
TWOSTORY$62550
Which DEFINE statement completes the program and produces the desired output?
The following SAS program is submitted:
data work.test;
Author = 'Agatha Christie';
First = substr(scan(author,1,' ,'),1,1);
run;
Which one of the following is the length of the variable FIRST in the output data set?
The following SAS program is submitted:
What is the value of the price variable?
The SAS data sets WORK.EMPLOYEE and WORK.SALARY are listed below:
WORK.EMPLOYEE WORK.SALARY
fname age fname salary
Bruce 30 Bruce 25000
Dan 40 Bruce 35000
Dan 25000
The following SAS program is submitted:
data work.empdata;
merge work.employee
work.salary;
by fname;
totsal + salary;
run;
How many variables are output to the WORK.EMPDATA data set?
Given the data sets below:
WORK.EMP with variables:
WORK.NEWHIRE with variables:
The following SAS program is submitted:
The SAS data set WORK.EMP has 50 observations, and the data set WORK.NEWHIRE has 4 observations.
How many variables will the data set WORK.ALLEMP contain?
The following program is submitted:
proc sort data=SASUSER.PROJECTS out=PSORT;
by Code descending Date Cost;
run;
Which of the following is true concerning the submitted program?
Given the following code:
proc print data=SASHELP.CLASS(firstobs=5 obs=15);
where Sex='M';
run;
How many observations will be displayed?
The following output is created by the FREQUENCY procedure:
Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents?
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?
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?
The following SAS program is submitted:
Which statement is true about the output data set?
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?
Population is currently at 34,278,400 for country A and is expected to rise at a rate of 2%.
Which DO LOOP will correctly calculate growth rate over the next 10 years beginning in 2012 as shown in the graphic below?