1.这题我一直不太明白什么时候用INDEX?为什么后面2个WHERE的不可以
The SAS data set SASDATA.SALES has a simple index on the variable DATE and a variable
named REVENUE with no index.
In which one of the following SAS programs is the DATE index considered for use?
proc print data = sasdata.sales;
by date;
run;
proc print data = sasdata.sales;
where month(date) = 3;
run;
data march;
set sasdata.sales;
if '01mar2002'd < date < '31mar2002'd;
run;
data march;
set sasdata.sales;
where date < '31mar2002'd or revenue > 50000;
run;
correct_answer = "A"
2.这题的大小写有什么区别呢
The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses; if style = "&sub";
run;
%mend;
%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?
A. work.ranch
B. work.houses
C. WORK.RANCH
D. WORK.HOUSES
Answer: D
3为什么是C不是D
Given the following SAS statement:
%let idcode = Prod567;
Which one of the following statements stores the value 567 in the macro variable CODENUM?
A. %let codenum = substr(&idcode,length(&idcode)-2);
B. %let codenum = substr(&idcode,length(&idcode)-3);
C. %let codenum = %substr(&idcode,%length(&idcode)-2);
D. %let codenum = %substr(&idcode,%length(&idcode)-3);



雷达卡


京公网安备 11010802022788号







