45.The following SAS program is submitted:
ods csvallfile='c:\test.cvs';
proc printdata=WORK.ONE;
var Name ScoreGrade;
by IdNumber;
run;
ods csvall close;
What is produced as output?
A. A file named test.cvs thatcan only be opened in Excel.
B. A text file named test.cvsthat can be opened in Excel or in any text editor.
C. A text filenamed test.cvs that can only be opened in a text editor.
D. A file named test.cvs thatcan only be opened by SAS.
Answer: C
问题: 1.)哪里有详细的ODS destination 的介绍? 我看的是base prep guide 寥寥数语就带过了。
2.)另外 我敢打包票excel绝对能够打开CVS, 用import wizard 100%能打开!
3.换用excel 能打开的ods, 切text editor 能打开的ODS是什么?
48.The following SAS program is submitted:
data WORK.TEST;
drop City;
infile datalines;
input
Name $ 1-14 /
Address $ 1-14 /
City $ 1-12 ;
if City='New York ' then input @1 State $2.;
else input;
datalines;
Joe Conley
123 Main St.
Janesville
WI
Jane Ngyuen
555 Alpha Ave.
New York
NY
Jennifer Jason
666 Mt. Diablo
Eureka
CA ;
What will the data set WORK.TEST contain?
A. Name Address State
-------------- ---------------- ------
Joe Conley 123 Main St.
Jane Ngyuen 555 AlphaAve.
NYJennifer Jason 666 Mt. Diablo
B. Name Address City State
-------------- ---------------- ----------- ------
Joe Conley 123 Main St. Janesville
Jane Ngyuen 555 AlphaAve. New York NY
Jennifer Jason 666 Mt.Diablo Eureka
C.
Name Address State
-------------- ---------------- ------
Jane Ngyuen 555 AlphaAve. NY
D. O observations,there is asyntax error in the data step. correct Answer:
A这道题为什么不选B?city为什么不输出???
还有最末的else input; 到底是什么意思?
53.The following SAS program is submitted:
data WORK.TOTAL_SALARY;
retain Total;
set WORK.SALARY;
by Department;
if First.Department then Total=0;
Total=sum(Total, Wagerate);
if Last.Total;
run; 正确答案说是total 的initial value=missing.但是retain 在没有argument 的情况下, 不应该是 retain either input or assignment 的value, from one data step to next 吗?至少也应该能够从读取的数据库里面保留下来吧
另外retain 没有argument, retain 的variable 没有被created, 那么retain 也应该赋值0给这个variable啊?
所以我选了D, cannot be determined from the information given.
感谢各位老大!
谢谢!