考试地点:GA某test center (线下考试)
考试时长:150分钟
考试费用:$180,学生折扣价$75
考试题目:总共39道题,20道lab,19道单选题
考题回忆:
transpose考了3道题(这个知识点我没复习),1道lab 2小问;
. check 1point3acres for more.
选择题:transpose搭配class, var, IDlabel, label中的哪一个得到某个结果(建议搞清楚这几个的区别).1point3acres
lab:把一个dataset 变成题目给出的样子,其实就是transpose,by City
填空题:如何调用macro variable “amount”: &, %, etc.
lab:改错where Team="%TeamCity" (TeamCity是先前设置好的,dataset里没有这两个变量)
merge,by
lab:两个dataset A和B,新建3个datasets,members包含A和B match的部分,Numbers包含A,和B中没有的,Phones包含B不包含A
data members;
merge A (in=a)
B (in=b);. 1point 3 acres
by MemberID;
if a and b;
run;
data Names;
merge A (in=a).google и
B (in=b);
by MemberID;
if a and not b;
run;
data members;
merge A (in=a).
B (in=b);
by MemberID;
if not a and b;
run;
proc import中replace的作用(选择题):
proc import datafile = '(file location)'. 1point3acres.com
out = work.import. 1point3acres
dbms = tab
getnames = yes;
run;
如果work.import已经存在了,最后的output会是:(答案是B)
A. overwrite原来的文件
B. 无法创建新文件,会有note写在log里. 1point3acres.com
C. 自动创建了一个新的文件work.import_2
D. (忘记了)
The following SAS program is submitted: B
data WORK.DATE_INFO; X='04jul2005'd; DayOfMonth=day(x); MonthOfYear=month(x); Year=year(x);
run;
What types of variables are DayOfMonth, MonthOfYear, and Year?
A. DayOfMonth, Year, and MonthOfYear are character.
B. DayOfMonth, Year, and MonthOfYear are numeric.. check 1point3acres for more.
C. DayOfMonth and Year are numeric. MonthOfYear is character. D. DayOfMonth, Year, and MonthOfYear are date values.
用哪种format可以实现转换:04/11/2011变为APR11 (答案:mondd7.)
by Postcode City descending ID State,问“descending”对哪些变量起效(答案:only ID)
The following SAS program is submitted: B
.
data WORK.TEST;. check 1point3acres for more.
set WORK.PILOTS;
if Jobcode='Pilot2' then Description='Senior Pilot'; else Description='Unknown';. ----
run;
The value for the variable Jobcode is: PILOT2.What is the value of the variable Description?
A. PILOT2.--
B. Unknown
C. Senior Pilot
D. ' ' (missing character value)
A user-defined format has been created using the FORMAT procedure.How is it stored? A
A. in a SAS catalog
B. in a memory resident lookup table
C. in a SAS dataset in the WORK library. 1point3acres
D. in a SAS dataset in a permanent SAS data library
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? B
A.. From 1point 3acres bbs
proc print data=SASUSER.HOUSES label;-baidu 1point3acres
label Open_Date "Starting Date"; run;
B.
proc print data=SASUSER.HOUSES label;. 1point3acres
label Open_Date="Starting Date"; run;
C.
proc print data=SASUSER.HOUSES;. Χ
label Open_Date="Starting Date"; run;
D.
Xing Bob Jorge
proc print data=SASUSER.HOUSES; Open_Date="Starting Date";
run;
如何避免造成字符变量被截断 (答案:用length语句规定长度)
The following SAS program is submitted:
.1point3acres
data WORK.PRODUCTS; Prod=1;
do while(Prod LE 6);
Prod + 1; end;. 1point 3acres
run;
What is the value of the variable Prod in the output data set?
A. 6
B. 7
C. 8. Waral dи,
D. . (missing numeric)
WORK.EMP_DEPT(in=Emp_D); by Empid;
if (Emp_N and not Emp_D) or (Emp_D and not Emp_N); run;. 1point 3acres
How many observations are in data set WORK.ALL after submitting the program?
A. 1 B. 2 C. 3 D. 5
lab原题或原题改编:
为Excel文件创建library:libname te xlsx 'c:\cert\input\test1.xlsx';
易错点在于name ‘te’要写在引擎‘xlsx’前面,记得加引擎‘xlsx’!
数据集sashelp.class的属性里,encoding和lebel的值分别是什么。
proc contents data = cert.input04;
run;
答案为wlatin1 Western (Windows)和Student Data。
lastname=scan(fullname, 1, ' , ')
firstname=scan(fullname, 2, ' , ')
找出lastname出现次数最多的,出现了几次
proc freq;. check 1point3acres for more.
var lastname;
run;
worksheet name的引用,含有特殊字符的名字需要加' 'n
proc print data = te.'sheet BB'n;
run;
Consider the following data step:
.--
data WORK.NEW;
set WORK.OLD(keep=X);. 1point 3acres
if X < 10 then X=1;
else if X >= 10 AND X LT 20 then X=2; else X=3;
run;. 1point 3 acres
In filtering the values of the variable X in data set WORK.OLD, what new value would be assigned to X if its original value was a missing value? A. check 1point3acres for more.
A. X would get a value of 1.
B. X would get a value of 3.
C. X would retain its original value of missing.. Waral dи,
D. This step does not run because of syntax errors.
missing <0
. ----
. 1point3acres
(只能想起这些了)