刚考完半小时, 90%PASS, 考了两个, A.DICTIONARY.TABLES, B. DICTIONARY.COLUMNS
C. DICTIONARY.MEMBERS 的具体应用, 给出输出结果, 要求DELETE 至少5%的OBSERVATIONS并且成为一个VARIABLE,写了很长的CODE, 让选, JJ中没有, 感觉应该选有 DICTIONARY.MEMBERS 的. 另外一个是JJQ44中的DICTIONARY.COLUMNS ,
JJ给的信息是不够的, 自己运行程序看一下SAS HELP
procsql;
title'Tables That Contain the Country Column';
selectlibname, memname
fromdictionary.members;
quit;
jj. 6. Array multi{1:2,2} (1,2);
Do i=1 to 2;
Do j=1 to 2;
Output =multi{i.j};
问 i,j 和对应output 的值,答案:
i j output
1 1 1
1 2 2
2 1 .
2 2 .
选
1 1 1
1 2 2
2 1 .
2 2 .
就行.
COMPRESS=NO | YES | CHAR | BINARY, 其他=HEX 等都是干扰。
另外SAS公司出的题目有错误, 大家将下边的程序拷到SAS中运行, 完全可以得到正确结果, 但是改为题目中的Selectp.*, S.totalsales, 则有错误:
ERROR:Column totalsales could not be found in the table/view identified with thecorrelation
name S。
totalsales不在SALE中, 在输出的文件中.
考试过关,63题加JJ基本够了. 但是为了掌握SAS还得看书和写CODES。
dataproduct;
infiledatalines;
inputPID product;
datalines;
1 1001
2 1002
3 1003
;
datasale;
infiledatalines;
inputPID sales;
datalines;
3 100
1 200
5 100
1 200
3 100
1 100
;
Procsql;
Selectp.*,totalsales
Fromproduct as p
leftjoin
(selectsum(sales) as totalsales
fromsale as s)
on p.pid=s.pid;
quit;
下面写写今天碰到的63题中的原题和变题:
Q2 ANSWER: A. create indexId_Code on WORK.CHECK;
Q3 ANSWER: C. Replace theequal sign with the IN operator.
Q58ANSWER: D where salary is not missing
Q4,9,10,11 13, 14,19, 21FILEVAL, 23,25, 27 , 38,40 ,41,49 ,58, 60 原题.
Q15, 16, 30,37, 43 选项也有小改动,46,55, 63 变题.
2 3 4 5
9 output变为JONES105,选答案中没有groupby Rep的那一项10 %let value=1;所以答案为2 11 data set名称有变化,答案没变 12 13 19 21 22 23
25 代码中No和no换了下,答案为227 30 31 32 37
38 %check=(Num=10)变成了%check=(Num=4),答案为0 39bicycles和shoes位置换了,为Mvis bicycles 40 41
43 output变成JONES100,
所以答案选havingavg(Cost)<(select avg(Cost)from WORK.ONE) 45 题干换成了code形式,不过交代了unsorted,所以答案还是一样的47 48 49
51 给全了代码,题目里byID;填进去了,问运行结果,答案选能够运行withouterrors 54
55 output变成了
Year Qtr Sales Budget 2001 4 300 500 2001 4 300 400 . . . 350 所以答案为leftjoin 58
60 mean和print位置换过了,所以答案为PROCPRINT only 61 62
63 语句已经给出了,问输出的四个变量时什么,答案为weight,height,name,age