18. A raw data file is listed below.
1---+----10---+----20---+---
10
23
20
15
The following program is submitted:
data all_sales;
infile 'file-specification';
input receipts;
<insert statement(s) here>
run;
Which statement(s) complete(s) the program and produce(s) a running total of the
Receipts variable?
a. total+receipts;
b. total 0;
sum total;
c. total=total+receipts;
d. total=sum(total,receipts);
不可以用C吗
19.A raw data file is listed below.
1---+----10---+----20---+---
1901 2
1905 1
1910 6
1925 1
1941 1
The following SAS program is submitted and references the raw data file above:
data money;
infile 'file-specification';
input year quantity;
total=total+quantity;
run;
What is the value of total when the data step finishes executing?
a. 0
b. 1
c. 11
d. . (missing numeric value)total是missing value?
33.The following SAS program is submitted:
data test;
input animal1 $ animal2 $
mlgrams1 mlgrams2;
cards;
hummingbird ostrich 54000.39 90800000.87
;
run;
Which one of the following represents the values of each variable in the output data set?
a. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000
b. animal1 animal2 mlgrams1 mlgrams2
hummingb ostrich 54000.39 90800000.87
c. animal1 animal2 mlgrams1 mlgrams2
hummingbird ostrich 54000.39 90800000
d. animal1 animal2 mlgrams1 mlgrams2
animal1后面有$,为什么选b
34.The SAS data sets Work.Employee and Work.Salary are shown below.
Work.Employee
fname age
Bruce 30
Dan 40
Work.Salary
fname salary
Bruce 25000
Bruce 35000
Dan 25000
The following merged SAS data set is generated:
Work.Empdata
fname age totsal
Bruce 30 60000
Dan 40 25000
Which one of the following SAS programs created the merged data set?
a. data work.empdata;
merge work.employee
work.salary;
by fname;
if first.fname then totsal=0;
totsal+salary;
if last.fname then output;
run;
b. data work.empdata(drop=salary);
merge work.employee
work.salary;
by fname;
if first.fname then totsal=0;
totsal+salary;
if last.fname then output;
run;
c. data work.empdata;
merge work.employee
work.salary(drop=salary);
by fname;
if first.fname then total=0;
totsal+salary;
if last.fname then output;
run;
d. data work.empdata;
merge work.employee
work.salary;
by fname;
if first.fname then total+salary;
run;