SAS中文论坛

标题: Some base SAS problems I met [打印本页]

作者: shiyiming    时间: 2006-9-3 14:02
标题: Some base SAS problems I met
The base exam is not hard.I just remember the following problems, whish it would be  some kind of helpful for the DXJM who are preparing for the base exam.


!)
footnote1 'A';
footnote2 'B';
footnote3 'C';
footnote4 'D';
data ABC ;
footnote2 'CHANGE';
proc print data=ABC;
run;
/*What's the footnote in data ABC*/

2) data A;
  x=3;
y=2;
z=x**y;

run;

question:

what's the value for z in data A?


3) data ABC ;

do until (b gt 6);
  b+1;
end;
run;
question: What's the value for b stroed in data A?


4)data ABC  has five observations;

data B;
set ABC;
do  i=2000 to 2020 by 5;
  y=x+50;
  output;
end;


/* questions:
How many  observations are in data B ?*/

5)
data ABC ;
input x: mmddyy10.;
format x weekdate17.;
y=weekday(x); /* Told you that it's saturday*/

cards;
4222000
;
run;


/* questions:
What's the result of x, y*/

6)
data ABC ;
input x;
if x=. then y='missing';
else y=x;
cards;
.
1
;
run;
proc print data=ABC;
run;

/* questions:
What's the possible result of  y*/

7) Scan , trim , substr function should know in detail.

<!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) --> diffrence between 'set A B;' and 'set A; set B;'
作者: shiyiming    时间: 2006-9-25 14:05
标题: 谢谢
非常感谢,鼓励多发表考试经验。我也打算考,准备中:)谢谢各位的无私奉献 <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->




欢迎光临 SAS中文论坛 (http://mysas.net/forum/) Powered by Discuz! X3.2