The following SAS program is submitted:
What new value would be assigned to X if its original value was a missing value?
The following SAS program is submitted:
data WORK.AUTHORS;
array Favorites{3} $ 8 ('Shakespeare','Hemingway','McCaffrey');
run;
What is the value of the second variable in the dataset WORK.AUTHORS?
Given the contents of the raw data file 'EMPLOYEE.TXT'
Which SAS informat correctly completes the program?
Given the following SAS data set WORK.SALES:
The following SAS program is submitted:
Which output is produced?
A SAS program is submitted and the following SAS log is produced:
2 data gt100;
3 set ia.airplanes
4 if mpg gt 100 then output;
22 202
ERROR: File WORK.IF.DATA does not exist.
ERROR: File WORK.MPG.DATA does not exist.
ERROR: File WORK.GT.DATA does not exist.
ERROR: File WORK.THEN.DATA does not exist.
ERROR: File WORK.OUTPUT.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name,
a quoted string, (, ;, END, KEY, KEYS, NOBS, OPEN, POINT, _DATA_, _LAST_, _NULL_.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
5 run;
The IA libref was previously assigned in this SAS session.
Which one of the following corrects the errors in the LOG?
You're attempting to read a raw data file and you see the following messages displayed in the SAS Log:
What does it mean?
Given the raw data file EMPLOYEE.TXT:
The following SAS program is submitted:
What value does the variable idnum contain when the name of the employee is “Ruth”?
The following SAS DATA step executes on Monday, April 25, 2000:
data newstaff;
set staff;
start_date = today();
run;
Which one of the following is the value of the variable START_DATE in the output data set?
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?
This question will ask you to provide lines of missing code.
The following SAS program is submitted:
Which statement inserted, respectively, in the two locations indicated above create a report stored in a PDF file?
A SAS programmer assigns a library reference to an existing Excel workbook named exceldata.xlsx. Using a DATA step, the programmer attempts to create a worksheet named outdata in this Excel workbook. However, the Excel workbook already contains a worksheet named outdata.
What will happen?
The following program is submitted:
Why does the program fail?
The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE
idnum character variable
sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?
The following SAS program is submitted:
libname rawdata1 'location of SAS data library';
filename rawdata2 'location of raw data file';
data work.testdata;
infile
input sales1 sales2;
run;
Which one of the following is needed to complete the program correctly?
Consider the following data step:
The computed variables City and State have their values assigned using two different methods, a
RETAIN statement and an Assignment statement. Which statement regarding this program is true?
The following SAS program is submitted:
data revenue;
set year_1;
var1 = mdy(1,15,1960);
run;
Which one of the following values does the variable named VAR1 contain?
The following SAS program is submitted:
What is the initial value of the variable Total in the following program?
The following SAS program is submitted:
data _null_;
set old (keep = prod sales1 sales2);
file 'file-specification';
put sales1 sales2;
run;
Which one of the following default delimiters separates the fields in the raw data file created?
The following SAS program is submitted:
data work.new;
length word $7;
amount = 7;
if amount = 5 then word = 'CAT';
else if amount = 7 then word = 'DOG';
else word = 'NONE!!!';
amount = 5;
run;
Which one of the following represents the values of the AMOUNT and WORD variables?
This question will ask you to provide a missing option. Given the following SAS program:
Which option needs to be added to wrap the labels to the next line whenever it encounters an asterisk?
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?
The Excel workbook REGIONS.XLS contains the following four worksheets:
EAST
WEST
NORTH
SOUTH
The following program is submitted:
libname MYXLS 'regions.xls';
Which PROC PRINT step correctly displays the NORTH worksheet?
Given the SAS data set PERM.STUDENTS:
PERM.STUDENTS NAMEAGE
---------------- Alfred14
Alice13
Barbara13
Carol14
The following SAS program is submitted:
libname perm ‘SAS data library’;
data students;
set perm.students;
file ‘file specification’;
put name $ age;
run;
The following double-spaced file is desired as output
Alfred 14
Alice 13
Barbara 13
Carol 14
Which statement completes the program and creates the desired file?
Which ODS statement option terminates output being written to an HTML rile?
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:
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?
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?
The following output is created by the FREQUENCY procedure:
Which TABLES statement was used to completed the following program that produced the output?
proc freq data=sales;
<_insert_code_>
run;
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
@25 department$;
run;
Which INFORMAT correctly completes the program?
The following SAS program is submitted:
Data_null_;
set old;
put sales 1 sales2;
run;
Where is the output written?
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?
The following SAS program is submitted:
proc contents data = sashelp.class varnum; quit;
What does the VARNUM option print?
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?
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?
A user-defined format has been created using the FORMAT procedure. Where is it stored?
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?
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;
run;
Which BY statement completes the program and sorts the data sequentially by ascending expense values within each ascending IDNUMBER value?
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:
What types of variables are DayOfMonth, MonthOfYear, and Year?
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?