45.The following SAS program is submitted:
ods csvall file='c:\test.cvs';
proc print data=WORK.ONE;
var Name Score Grade;
by IdNumber;
run;
ods csvall close;
What is produced as output?
A. A file named test.cvs that can only be opened in Excel.
B. A text file named test.cvs that can be opened in Excel or in any text editor.
C. A text file named test.cvs that can only be opened in a text editor.
D. A file named test.cvs that can only be opened by SAS.
Answer: C cvs是什么格式?
另外,
norow nocol是什么意思呢?
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 Alpha Ave. NY
Jennifer Jason 666 Mt. Diablo
B.
Name Address City State
-------------- ---------------- ----------- ------
Joe Conley 123 Main St. Janesville
Jane Ngyuen 555 Alpha Ave. New York NY
Jennifer Jason 666 Mt. Diablo Eureka
C.
Name Address State
-------------- ---------------- ------
Jane Ngyuen 555 Alpha Ave. NY
D. O observations,there is a syntax error in the data step.
Answer: A
这道题不是很懂,drop 语句在最前面,后面的city变量有意义吗?else input的含义又是什么呢?