全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
10870 21
2015-03-04
这次考的基本为70题(+变型)+网友机经+全新题,没有出到95中的后25题,没有出到50题的内容,123仅出了经典的109题。
但是70题的变型全部考到,全新题在7-8题。如果目的为证书,看完70题和变型,我总结的网友机经(我会贴在下方)即可。
复习资料我用的95+50+123+prep guide 210。0基础,在平时作业需要sas/r的,都用的r。

再说一下考试情况,今天到hartford考试,路边的街park都停满了,只能停在$5/hr的停车场,总的50分钟也结束了,没有达到$10。
check-in后就一个人考试,很安静,结束后黑哥哥说:you are so quick!

70题变型(来自版上网友2015llc):
9(答案50.1改成了50,5)
21(题里面的GT 30 改成了GT 50)
35(output 改成了else output)
36(raw data里日期的表示方式变成date在前面了,所以答案也变了)
42(Text内容变成 US-Austrilia Denmark,Find的命令不变,问输出prod的结果)
44(有semicolon了)
45(变成了要选正确的ods的命令,程序不变)
52(这题变填空了,问的还是最后有几个observation,但是程序有变化,所以答案也变了,要理解)
57(Day变成日期而不是一个星期的周几)
66(变成了填空,中间加了output,最好看看crackman的解释)
67(改成了IF X<10 then X=3)

网友机经题及我的一些资料补充:
1.proc contents data=sasuser._all_ 后面要加个什么语句,才能suppresses the printing of detailed information about each file in the output;
NODETAILS

2. put(date, worddate20.)如之前总结的,选 put(date, worddate20.)
April 15, 1999

3.split=“*”

一个data步中有一个label里面是这样的“xxxxx*xxxx*xxxx”,想在真正的label中*变空格,叫你选语句填空.类似“cat*dog”这样的格式,怎样实现将*指定为分隔符,实际输出“cat dog”的形式呢?答案选split=“*”

4.几个有效的dataset name
DATA
WORK.one
-test (
test_
2Test
SAS data set names can be 1 to 32 characters long, must begin with a letter (A–Z, either uppercase or lowercase) or an underscore (_), and can continue with any combination of
numbers, letters, or underscores.
5.how many data sets can be combined when using APPEND statement?

2

Adds the observations from one SAS data set to the end of another SAS data set. only two data sets can be combined at one time, a BASE data set and a DATA data set.

6.sort by
填空题还有一道是填语句的,我只记得是考的by语句和acsending descending什么的,不难,题目看清哪个变量在前面就行。

7.Error, datalines缺分号

8.option yearcutoff=1920
给你两个date9.的日期,一个是20结尾,一个是19结尾,为你像个日期相减是多少,我选的-99

9.一道题考的是_N_配合if语句选输出

10.do i=1 to 7;
do i=1 to 10;
x+1;
end;
output;
end;
run;
问结果输出多少条observations(注意output的位置,我填的7)

11.还有一道考了ods pdf,水的一逼,其它选项都没有ods,什么open啦之类的,细心点就行
ods html file='HTML-file-pathname'; ods pdf file='PDF-file-pathname'; proc print data=sasuser.admit;
run;

ods _all_ close;
ods listing;
One of the features of ODS is that you can produce output in multiple formats concurrently by
opening each ODS destination at the beginning of the program.

When you have more than one open ODS destination, you can use the keyword _ALL_ in the
ODS CLOSE statement to close all open destinations concurrently.

12.infile xxxxxx missover;
var1 var2
var3 var4
var5           /*注意这里故意漏掉了$符号*/
dataline是(全是人名地点什么的字符):
xxx,xxx,xxx,xxx,xxx
xxxx,xxxx,
xxxx,xxxx,xxxx,xxx
xxxx,xxxx,xxxx,xxxx,xxxx
问你如果后面加一个变量等于_error_,数据输出是怎样的?
我选的那一列是1,0,0,1,因为execute的时候要出错只有第一行和最后一行会出错,当中两行因为missover就不会涉及到那个错误定义的变量吧。不知道这个答案对不对,心里也没底。

13.end也考了,不过比较简单,答案选1

14.input数据的题
大概题意是这样的:
原始数据
heu,afvf,sale
fsrbtbtf,gg,human resource
ahviu,fvfet,sale

data test;
infile '原始数据‘ dlm=',' missover;
input var1 10.      vat2:10.
        var3 : $20.;
run;
You can use the MISSOVER option in an INFILE statement to prevent SAS from reading the next record when missing values are encountered at the end of a record.
15.cat() 函数题的大意为:

data test;do I = 'SUN', 'MON', 'TUES';

  weekday=cat(i, 'DAY');
run;
问在output中weekday的值。
我这道题是填空题~
Does not remove leading or trailing blanks, and returns a concatenated character string.
data _null_;
   x='  The 2002 Olym';
   y='pic Arts Festi';
   z='  val included works by D  ';
   a='ale Chihuly.';
   result=cat(x,y,z,a);
   put result $char.;
run;
SAS writes the following line to the log:

   ----+----1----+----2----+----3----+----4----+----5----+----6----+----7
     The 2002 Olympic Arts Festi  val included works by D  ale Chihuly.

16. dim具体不记得题了~
array big{5} weight sex height state city;
   do i=1 to dim(big);
     more SAS statements;
   end;
17.[size=13.63636302948px]campress()函数
大概意思如下,数据自己编的:
data test;
x=1234 45-78 898;
y=compress(x, '-');
run;
我就记得两个选项一个是:12344578898
另一个是:1234 4578 898
我也不会这道题就随便选了后面那个选项~
a='AB C D ';
b=compress(a);
put b;


ABCD

----+----1----+----2----+----3
x='123-4567-8901 B 234-5678-9012 c';
y=compress(x,'ABCD','l');
put y;
  

123-4567-8901 234-5678-9012

----+----1
x='1    2    3    4    5';
y=compress(x,,'s');
put y;


12345

----+----1
x='Math A English B Physics A';
y=compress(x,'ABCD','k');
put y;


ABA

18.参考123里的第109题
RUTH 39 11
JOSE 32 22
SUE 30 33
JOHN 40 44
if employee_name=‘SUE’ then input age 7-8;
else input idnum 10-11;

RUTH idnum 22
SUE AGE 40
都读下一行

19.
数据集a中,加入array a(3)_temporary_,问a中包含几个变量?
       A. _temporary_1 _temporary_2 _temporary_3
                           B. a_1 a_2 a_3
                           C. a1 a2 a3
                           D. no variable
这一题我记的问得类似是这样:
       data test;
                            array a{3}_temporary_;
                          run;
问数据集test中有几个变量,我选了d, 因为如下:
Creating Temporary Array Elements
You can create temporary array elements for DATA step processing without creating additional variables. Just specify _TEMPORARY_ after the array name and dimension. This is useful when the array is needed only to perform a calculation.
Temporary是对了 但是没有后面1-3的数字

20.我觉得retain考得挺多的,关键记住如果没有specify initial value(就像这样 retain test_var), 那么默认为missing.还有就是retain只在complie阶段运行,到了execution阶段就没他什么事了

General form, simple RETAIN statement for initializing accumulator variables:
RETAIN variable initial-value;

where

!  variable is a variable whose values you want to retain

!  initial-value specifies an initial value (numeric or character) for the preceding variable.

Note The RETAIN statement
! is a compile-time only statement that creates variables if they do not

already exist
! initializes the retained variable to missing before the first execution of the

DATA step if you do not supply an initial value
! has no effect on variables that are read with SET, MERGE, or UPDATE

statements. (The SET and MERGE statements are discussed in later chapters.)

See retain questions.

21.有一个数据集n,其中变量a $20.
data m;
length a 15
set n;
format a $25.;
run;
问 a的length.
我选的是15,因为length a 15,不确定。。

22.考察了libname用法以及libref的规则,我就记得最后在libname test_1 '_SAS_lib_location_',
和libname testdatablabla '_SAS_lib_location_' 里犹豫,后来选test_1是valid name,因为
libref is a shortcut name or a "nickname" for the aggregate storage location where your SAS files are stored. It is any SAS name when you are assigning a new libref. When you are disassociating a libref from a SAS library or when you are listing attributes, specify a libref that was previously assigned.

libref is 1 to 8 characters long, begins with a letter or underscore, and contains only letters, numbers, or underscores
23.原来70题里面的Num='1'替换成contain(1),答案不变,contain没这个函数。

24.另外填空题遇到了 给你一个 libname****  程序最后让你填指令关闭这个libname

25.给一组data 里面有三个variable 是numeric 两个是character
然后问 array arrayname{*}= _number_;
这个create了几个new variables
a)0
b)1
c)2
d)3
e)error
0

26.有work.b,其中变量Char为字符15长。 data a;
length Char $ 20; set b;format Char $15.;
run; 问Char最终在work.a里面的length为多少
其实要区分format概念和length概念,length还是最初声明的20,format不改变其length。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-3-4 06:02:46
请问这是什么考试的机经呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-7 03:48:32
非常感谢大神!我是北美0305下午考的,考试前一天晚上本来打算睡了,想再搜搜机经,看见您刚发的这篇,激动的我复习了一整晚,早上7点才睡的。当时都没来得及回。您帖子里的内容把考点全部都包括了,尤其是70的变形,对我的帮助真是太大了。
力挺楼主ADV也通过!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-11 04:16:18
太感谢LZ了...这周北美考...希望通过~
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-11 10:19:58
谢谢分享
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-3-11 22:31:57
请问42题变形以后结果是什么呢
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群