Frage 1
Frage
1. When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to use:
Frage 2
Frage
2. The SAS data set WORK.CHECK has a variable named Id_Code in it. Which SQL statement would create an index on this variable?
Antworten
-
A. create index Id_Code on WORK.CHECK;
-
B. create index(Id_Code) on WORK.CHECK;
-
C. make index=Id_Code from WORK.CHECK;
-
D. define index(Id_Code) in WORK.CHECK;
Frage 3
Frage
3. Given the SAS data sets:
What would allow the program to successfully execute without errors?
Antworten
-
A. Replace the where clause with:
where EMPLOYEE.Name=(select Names delimited with ','
from WORK.NEWEMPLOYEE
where Salary > 40000);
-
B. Replace line 104 with:
where EMPLOYEE.Name =ANY (select Names separated with ','
from WORK.NEWEMPLOYEE
where Salary > 40000);
-
C. Replace the equal sign with the IN operator.
-
D. Qualify the column names with the table names.
Frage 4
Frage
4. Given the SAS data set SASUSER.HIGHWAY:
Which SQL clause stores the text 0-29, 30-49, 50+ in the macro variable GROUPS?
Antworten
-
A. into &GROUPS
-
B. into :GROUPS
-
C. into :GROUPS separated by ','
-
D. into &GROUPS separated by ','
Frage 5
Frage
5. The SAS data set WORK.CHECK has an index on the variable Code and the following SAS program is submitted.
proc sort data=WORK.CHECK;
by Code;
run;
Which describes the result of submitting the SAS program?
Antworten
-
A. The index on Code is deleted.
-
B. The index on Code is updated.
-
C. The index on Code is uneffected.
-
D. The sort does not execute.
Frage 6
Frage
6. The table WORK.PILOTS contains the following data:
Which SQL statement could NOT generate this result?
Antworten
-
A. select
Jobcode,
Salary,
avg(Salary) label='Avg'
from WORK.PILOTS group by Jobcode
order by Id
;
-
B. select
Jobcode,
Salary,
(select avg(Salary)
from WORK.PILOTS as P1
where P1.Jobcode=P2.Jobcode) as Avg
from WORK.PILOTS as P2
order by Id
;
-
C. select
Jobcode,
Salary,
(select avg(Salary)
from WORK.PILOTS
group by Jobcode) as Avg
from WORK.PILOTS
order by Id
;
-
D. select
Jobcode,
Salary,
Avg
from
WORK.PILOTS,
(select
Jobcode as Jc,
avg(Salary) as Avg
from WORK.PILOTS
group by 1)
where Jobcode=Jc
order by Id
;
(define variable Avg in subquery in from clause.)
Frage 7
Frage
7. A quick rule of thumb for the space required to run PROC SORT is:
Antworten
-
A. two times the size of the SAS data set being sorted.
-
B. three times the size of the SAS data set being sorted.
-
C. four times the size of the SAS data set being sorted.
-
D. five times the size of the SAS data set being sorted.
Frage 8
Frage
8. Multi-threaded processing for PROC SORT will affect which of these system resources?
Antworten
-
A. CPU time will decrease, wall clock time will decrease
-
B. CPU time will increase, wall clock time will decrease
-
C. CPU time will decrease, wall clock time will increase
-
D. CPU time will increase, wall clock time will increase
Frage 9
Frage
9. Given the SAS data set WORK.TRANSACT:
Which SQL statement was used?
Antworten
-
A. select
rep,
min(Cost+Ship)
from WORK.TRANSACT
order by Rep
;
-
select
Rep,
min(Cost,Ship) as Min
from WORK.TRANSACT
summary by Rep
order by Rep
;
-
C.
select
Rep,
min(Cost,Ship)
from WORK.TRANSACT
group by Rep
order by Rep
;
-
D.
select
Rep,
min(Cost+Ship)
from WORK.TRANSACT
group by Rep
order by Rep
;
Frage 10
Frage
10. (%EVAL) The following SAS program is submitted:
%let Value=9;
%let Add=5;
%let Newval=%eval(&Value/&Add); %put &Newval;
What is the value of the macro variable Newval when the %PUT statement executes?
Antworten
-
A. 0.555
-
B. 2
-
C. 1.8
-
D. 1
Frage 11
Frage
11. The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of the WORK.ERRORS data set?
Antworten
-
A. The data set is created when the DATA step is submitted.
-
B. The data set is created when the view TEMP is used in another SAS step.
-
C. The data set is not created because the DATA statement contains a syntax error.
-
D. The descriptor portion of WORK.ERRORS is created when the DATA step is submitted.
Frage 12
Frage
12. Which title statement would always display the current date?
Antworten
-
A. title "Today is: &sysdate.";
-
B. title "Today is: &sysdate9.";
-
C. title "Today is: &today.";
-
D. title "Today is: %sysfunc(today(),worddate.)";
Frage 13
Frage
13. Given the SAS data sets:
Which SQL procedure statement produces the same results?
Antworten
-
A.
create table WORK.COMBINE as
select Id,
Name,
Salary from
WORK.ONE
full join
WORK.TWO
on ONE.Id=TWO.Id
;
-
B.
create table WORK.COMBINE as
select
coalesce(ONE.Id, TWO.Id) as Id,
Name,
Salary
from
WORK.ONE,
WORK.TWO
where ONE.Id=TWO.Id
;
-
C.
create table WORK.COMBINE as
select
coalesce(ONE.Id, TWO.Id) as Id,
Name,
Salary
from
WORK.ONE
full join
WORK.TWO
on ONE.Id=TWO.Id
order by Id
;
-
D.
create table WORK.COMBINE as
select
coalesce(ONE.Id, TWO.Id) as Id,
Name,
Salary
from
WORK.ONE,
WORK.TWO
where ONE.Id=TWO.Id
order by ONE.Id
;
Frage 14
Frage
14. The following SAS program is submitted:
proc contents data=TESTDATA.ONE;
run;
Which SQL procedure step produces similar information about the column attributes of TESTDATA.ONE?
Antworten
-
A. proc sql;
contents from TESTDATA.ONE;
quit;
-
B. proc sql;
describe from TESTDATA.ONE;
quit;
-
C. proc sql;
contents table TESTDATA.ONE;
quit;
-
D. proc sql;
describe table TESTDATA.ONE;
Frage 15
Frage
15. Given the SAS data set WORK.ONE:
Which result set would be generated?
Frage 16
Frage
16. Given the SAS data sets:
The following output is desired:
Name Fi
------- --
Lauren L
Patel A
Chang Z
Hillier R
Smith M
Lauren L
Patel A
Which SQL set operator completes the program and generates the desired output?
Antworten
-
A. append corr
-
B. union corr
-
C. outer union corr
-
D. intersect corr
Frage 17
Frage
17. Which of the following is an advantage of SAS views?
Antworten
-
A.
SAS views can access the most current
data in files that are frequently updated.
-
B.
SAS views can avoid storing a SAS copy of
a large data file.
-
C.
SAS views can decrease programming time.
-
D.
both A and B are true
Frage 18
Frage
18. In what order does SAS search for format definitions by default?
Antworten
-
A. 1. WORK.FORMATS 2. LIBRARY.FORMATS
-
B. 1. LIBRARY.FORMATS 2. WORK.FORMATS
-
C. There is no default order, it must be defined by the user.
-
D. All user defined libraries that have a catalog named FORMATS, in alphabetic order.
Frage 19
Frage
19. Function %UPCASE:
Which WHERE statement successfully completes the program and produces a report?
Antworten
-
A. where upcase(Name)=upcase(&Value);
-
B. where upcase(Name)=%upcase(&Value);
-
C. where upcase(Name)="upcase(&Value)";
-
D. where upcase(Name)="%upcase(&Value)";
Frage 20
Frage
20. The following SAS program is submitted:
data WORK.TEMP;
length A B 3 X;
infile RAWDATA;
input A B X;
run;
What is the length of variable A?
Frage 21
Frage
21. The following SAS program is submitted:
The purpose of the FILEVAR=option on the INFILE statement is to name the variable Next, whose value:
Antworten
-
A. points to a new input file.
-
B. is output to the SAS data set WORK.NEW.
-
C. is an input SAS data set reference.
-
D. points to an aggregate storage location.
Frage 22
Frage
22. DESCRIBE TABLE Statement
Given the following partial SAS log:
NOTE: SQL table SASHELP.CLASS was created like:
create table SASHELP.CLASS( bufsize=4096 )
(
Name char(8),
Sex char(1),
Age num,
Height num,
Weight num
);
Which SQL procedure statement generated this output?
Antworten
-
A. CONTENTS FROM SASHELP.CLASS;
-
B. CREATE FROM SASHELP.CLASS INTO LOG;
-
C. DESCRIBE TABLE SASHELP.CLASS;
-
D. VALIDATE SELECT * FROM SASHELP.CLASS;
Frage 23
Frage
23. Given the SAS data set SASUSER.HIGHWAY:
What macro variable reference completes the program to create the WORK.NOT and
WORK.SERIOUS data sets?
Antworten
-
A. &Status&i
-
B. &&Status&i
-
C. &Status&Count
-
D. &&Status&Count
Frage 24
Frage
24. The following SAS program is submitted:
%let Num1=7;
%let Num2=3;
%let Result=%eval(&Num1/&Num2);
%put &Result;
What is the value of the macro variable Result when the %PUT statement executes?
Antworten
-
A. 2.3
-
B. 2
-
C. . (missing value)
-
D. 2.33333333333333
Frage 25
Frage
25. Macros That Include Keyword Parameters:
Given the SAS data set SASUSER.HIGHWAY:
How many observations appear in the generated report?
Frage 26
Frage
26. Given the following SAS data sets:
Which of the following SQL statements was most likely used to generate this result?
Antworten
-
A.
select
Id,
sum(Expense) label='COST'
from WORK.VISIT1
group by 1
union all
select
Id,
sum(Cost)
from WORK.VISIT2
group by 1
order by 1,2
;
-
B. select
id,
sum(expense) as COST
from
WORK.VISIT1(rename=(Expense=Cost)),
WORK.VISIT2
where VISIT1.Id=VISIT2.Id
group by Id
order by
Id,
Cost ;
-
C. select
VISIT1.Id,
sum(Cost) as Cost
from
WORK.VISIT1(rename=(Expense=Cost)),
WORK.VISIT2
where VISIT1.Id=VISIT2.Id
group by Id
order by
Id,
Cost ;
-
D. select
Id,
sum(Expense) as Cost
from WORK.VISIT1
group by Id
outer union corr
select
Id,
sum(Cost)
from WORK.VISIT2
group by Id
order by 1,2
;
Frage 27
Frage
27. Given the SAS data sets:
What data values are stored in data set WORK.COMBINE?
Frage 28
Frage
28. Which of the following ARRAY statements is similar to the statement array Yr{1974:2007} Yr1974-Yr2007; and will compile without errors?
Antworten
-
A. array Yr{34} Yr1974-Yr2007;
-
B. array Yr{74:07} Yr1974-Yr2007;
-
C. array Yr{74-07} Yr1974-Yr2007;
-
D. array Yr{1974-2007} Yr1974-Yr2007;
Frage 29
Frage
29. The following program is submitted to check the variables Xa, Xb, and Xc in the SASUSER.LOOK data set:
data _null_ WORK.BAD_DATA / view=WORK.BAD_DATA ;
set SASUSER.LOOK(keep=Xa Xb Xc);
length _Check_ $ 10 ;
if Xa=. then _check_=trim(_Check_)!!" Xa" ;
if Xb=. then _check_=trim(_Check_)!!" Xb" ;
if Xc=. then _check_=trim(_Check_)!!" Xc" ;
put Xa= Xb= Xc= _check_= ;
run ;
When is the PUT statement executed?
Antworten
-
A. when the code is submitted
-
B. only when the WORK.BAD_DATA view is used
-
C. both when the code is submitted and the view is used
-
D. never, the use of _null_ in a view is a syntax error
Frage 30
Frage
30. The following SAS program is submitted:
%let product=merchandise;
[_insert_%put_statement_]
and the following message is written to the SAS log: the value is "merchandise"
Antworten
-
A. %put the value is '"'&product.'"';
-
B. %put the value is %quote(&product.);
-
C. %put the value is "&product.";
-
D. %put the value is ""&product."";
Frage 31
Frage
31. Given the SAS data sets:
What data values are stored in data set WORK.COMBINE?
Antworten
-
A. An ERROR message is written to the SAS log and the data set WORK.COMBINE is not created.
-
B.
SumY X Y
---- -- --
36 A 10
-
C.
SumY X Y
---- -- --
36 A 10
. A 3
. A 14
. B 9
-
D.
SumY X Y
---- -- --
36 A 10
36 A 3
36 A 14
36 B 9
Frage 32
Frage
32. The following SAS program is submitted:
data WORK.NEW(bufno=4);
set WORK.OLD(bufno=3);
run;
Why are the BUFNO options used?
Antworten
-
A. to reduce memory usage
-
B. to reduce CPU time usage
-
C. to reduce the amount of data read
-
D. to reduce the number of I/O operations
Frage 33
Frage
33. Given the following program and desired results:
%let Thing1=gift;
%let Thing2=surprise;
%let Gift1=book;
%let Gift2=jewelry;
%let Surprise1=dinner;
%let Surprise2=movie;
%let Pick=2;
%let Choice=surprise;
Desired %PUT Results in LOG:
My favorite surprise is a movie
What is the correct %PUT statement that generates the desired results?
Antworten
-
A. %put My favorite &Thing&Pick is a &&Choice&Pick;
-
B. %put My favorite &&Thing&pick is a &&&Choice&Pick;
-
C. %put My favorite &Choice&pick is a &&Thing&Pick;
-
D. %put My favorite &&Choice&pick is a &&&Thing&Pick;
Frage 34
Frage
34. Given the SAS dataset WORK.ONE
Which SQL procedure clause completes the program and generates the desired output?
Antworten
-
A. select Salary Bonus as Salary*.10
-
B. select Salary Bonus=Salary*.10 'Bonus'
-
C. select Salary, Salary*.10 label='Bonus'
-
D. select Salary, Salary*.10 column="Bonus"
Frage 35
Frage
35. The following SAS program is submitted:
options reuse=YES;
data SASUSER.REALESTATE(compress=CHAR);
set SASUSER.HOUSES;
run;
What is the effect of the reuse=YES SAS system option?
Antworten
-
A. It allows updates in place.
-
B. It tracks and recycles free space.
-
C. It allows a permanently stored SAS data set to be replaced.
-
D. It allows users to access the same SAS data set concurrently.
Frage 36
Frage
36. Which statement is true for Data step HASH objects?
Antworten
-
A. The key component must be numeric.
-
B. The data component may consist of numeric and character values.
-
C. The HASH object is created in one step and referenced in another.
-
D. The HASH object must be smaller than 2 to the 8th power bytes.
Frage 37
Frage
37. Given the SAS data sets:
Which SQL set operator completes the program and generates the desired output?
Antworten
-
A. intersect corr
-
B. except all
-
C. intersect all
-
D. left except
Frage 38
Frage
38. The following SAS program is submitted:
%macro CHECK(Num=4);
%let Result=%eval(&Num gt 5);
%put Result is &result;
%mend;
%check(Num=10)
What is written to the SAS log?
Antworten
-
A. Result is 0
-
B. Result is 1
-
C. Result is 10 gt 5
-
D. Result is true
Frage 39
Frage
39. The following SAS program is submitted:
%let Mv=shoes;
%macro PRODUCT(Mv=bicycles);
%let Mv=clothes;
%mend;
%PRODUCT(Mv=tents)
%put Mv is &Mv;
What is written to the SAS log?
Antworten
-
A. Mv is bicycles
-
B. Mv is clothes
-
C. Mv is shoes
-
D. Mv is tents
Frage 40
Frage
40. Which of the following SAS System options can aid in benchmarking?
Antworten
-
A. BUFSIZE= and BUFNO=
-
B. FULLSTIMER
-
C. IOBLOCKSIZE=
-
D. SYSTIMER
Frage 41
Frage
41. Given the following macro program:
Which option would provide feedback in the log about the parameter values passed into this macro when invoked?
Antworten
-
A. MPRINT
-
B. MDEBUG
-
C. MLOGIC
-
D. MPARAM
Frage 42
Frage
42. The NOTSORTED option on the BY statement cannot be used with which other statement or option?
Frage 43
Frage
43. Given the SAS data set WORK.ONE:
Rep Cost
----- ----
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100
Which SQL clause completes the program and generates the desired output?
Antworten
-
A. where calculated Average > (select avg(Cost) from WORK.ONE)
-
B. having Average > (select avg(Cost) from WORK.ONE)
-
C. having avg(Cost) < (select avg(Cost) from WORK.ONE)
-
D. where avg(Cost) > (select avg(Cost) from WORK.ONE)
Frage 44
Frage
44. Which dictionary table provides information on each occurrence of the variable named LastName?
Antworten
-
A. DICTIONARY.TABLES
-
B. DICTIONARY.COLUMNS
-
C. DICTIONARY.MEMBERS
-
D. DICTIONARY.VARIABLES
Frage 45
Frage
45. To create a list of unique Customer_Id values from the customer data set, which of the following techniques can be used?
technique 1: proc SORT with NODUPKEY and OUT=
technique 2: data step with IF FIRST.Customer_Id=1
technique 3: proc SQL with the SELECT DISTINCT statement
Antworten
-
A. only technique 1
-
B. techniques 1 and 2
-
C. techniques 1 and 3
-
D. techniques 1, 2, or 3
Frage 46
Frage
46. Given the SAS data sets:
Which SQL set operator completes the program and generates the desired output?
Antworten
-
A. intersect corr
-
B. except
-
C. intersect
-
D. left except
Frage 47
Frage
47. The following SAS program is submitted:
Which statement completes the program so that the PROC PRINT step executes on Thursday?
Antworten
-
A. if &sysday = Thursday then %do;
-
B. %if &sysday = Thursday %then %do;
-
C. %if "&sysday" = Thursday %then %do;
-
D. %if &sysday = "Thursday" %then %do;
Frage 48
Frage
48. Given the following program and data:
What is the WHERE statement that successfully completes the PROC PRINT and selects the observation for Barb?
Antworten
-
A. where Birthday=&Want;
-
B. where Birthday="&Want";
-
C. where Birthday="&Want"d;
-
D. where Birthday='&Want'd;
Frage 49
Frage
49. Which macro statement would remove the macro variable Mv_Info from the symbol table?
Antworten
-
A. %mdelete &Mv_Info;
-
B. %symerase Mv_Info;
-
C. %symdel &Mv_Info;
-
D. %symdel Mv_Info;
Frage 50
Frage
50. The table WORK.PILOTS contains the following data:
Which select statement could NOT have produced this output?
Frage 51
Frage
51. The SAS data set WORK.TEMP is indexed on the variable Id:
Which BY statement completes the program, creates a listing report that is grouped by Id, and completes without errors?
Antworten
-
A. by Id;
-
B. by Id grouped;
-
C. by Id descending;
-
D. by descending Id;
Frage 52
Frage
52. To create a dataset with unique values of a given variable using a data step and the FIRST. VARIABLES and LAST.VARIABLES, it is assumed that the input dataset is:
Antworten
-
A. sorted on that variable.
-
B. indexed by that variable.
-
C. naturally in order.
-
D. any of the above A, B, or C
Frage 53
Frage
53.The SASFILE statement requests that a SAS data set be opened and loaded into memory:
Antworten
-
A. one page at a time.
-
B. one variable at a time.
-
C. one observation at a time.
-
D. in its entirety, if possible.
Frage 54
Frage
54. The following SAS program is submitted:
%let Name1=Shoes;
%let Name2=Clothes;
%let Root=name;
%let Suffix=2;
%put &&&Root&Suffix;
What is written to the SAS log?
Frage 55
Frage
55. Given the SAS data sets:
Which join operator completes the program
and generates the desired output?
Antworten
-
A. left join
-
B. right join
-
C. full join
-
D. outer join
Frage 56
Frage
56. The SAS data set WORK.ADDRESSES contains the email addresses of The XYZ Corporation's customers in a variable named Email_Address. The following DATA step is submitted:
Which statement completes the program and creates a SAS program file?
Frage 57
Frage
57. Which of the following is true about the COMPRESS=YES data set option?
Antworten
-
A. It uses the Ross Data Compression method to compress numeric data.
-
B. It is most effective with character data that contains repeated characters.
-
C. It is most effective with numeric data that represents large numeric values.
-
D. It is most effective with character data that contains patterns, rather than simple repetitions.
Frage 58
Frage
Given the SAS dataset WORK.ONE:
Salary
------
200
205
.
523
Which WHERE expression completes the program and generates the desired output?
Frage 59
Frage
59. The SAS data set WORK.TEST has an index on the variable Id and the following SAS
program is submitted.
Antworten
-
A. The index on Id is deleted.
-
B. The index on Id is updated as an index on Id_Code.
-
C. The index on Id is deleted and an index on Id_Code is created.
-
D. The index on Id is recreated as an index on Id_Code.
Frage 60
Frage
Given the data set SASHELP.CLASS:
Which PROC steps execute successfully?
Frage 61
Frage
61. In a data step merge, the BY variables in all data sets must have the same:
Frage 62
Frage
62. Given the following macro program and invocation:
Which of these choices shows the correct %PUT statement output if the program is submitted at the beginning of a new SAS session? Note that other lines may be written to the SAS log by the program, but only the %PUT output is shown here.
Antworten
-
A. ---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation WORK.NEW SASHELP.CLASS
-
B. ---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation &NEWNAME &SETNAME
-
C. ---> inside macro &NEWNAME &SETNAME
---> outside invocation WORK.NEW SASHELP.CLASS
-
D. ---> inside macro &NEWNAME &SETNAME
---> outside invocation &NEWNAME &SETNAME
Frage 63
Frage
63. The following SAS program is submitted:
Which VAR statement successfully completes the program to produce a report containing four variables?
Frage 64
Frage
如何在 Log 中輸出 global macro variables
%put [blank_start]GLOBAL[blank_end]
Frage 65
Frage
選出 unique value of a grouped variable
If [blank_start]first.model[blank_end] =1 then output=xxx
(model 是這個 variable 的名字)
Frage 66
Frage
outer union [blank_start]corr[blank_end]
Frage 67
Frage
A Data has 2000million observations and 300 Character variables
Compress=[blank_start]YES[blank_end]
Frage 68
Frage
Data Set
ONE
State_ID state
TWO
State_ID City
Quit 前的最後一句:
Ask: where s.state= [blank_start]“&selection”[blank_end]
(注意一定要加引號)
Frage 69
Frage
HASH object
[blank_start]HashAlpha[blank_end]
Frage 70
Frage
Given 2 Data Set
ONE
Name Year
Joyce 9
John 4
John 2
Jane 6
Thomas 8
TWO
Name Age(不需要理會)
Joyce
John
Thomas
Robert
Jeff
The following SAS program is submitted:
select Name, avg(Year) as average
from WORK.ONE
Except Corr
WORK.TWO
.............. quit;
Average of [blank_start]7[blank_end]
Frage 71
Frage
FCMP 填空
proc fcmp outlib=sasuser.funcs.trial;
...
endsub;
options [blank_start]cmplib[blank_end] =sasuser.funcs; data null;
...
run;
Frage 72
Frage
Given data set and macro program, choose missing correct code
call symputx('&Num', California)
Frage 73
Frage
the first part of code gives Key:valuepair definition, the variables are somekey and someAlpha, we need to fill in the hash object definition.
Some.definedata( [blank_start]“ someAlpha”[blank_end] );
Frage 74
Frage
declare has Goal();
Goal.definekey(“QtrNum”);
Goal.definedata([blank_start]“GoalAmount”[blank_end]);
Goal.definedone();
Frage 75
Frage
repeated need a local data set, what kind of effect does SASFILE statement has to the Global statement.
Antworten
-
reduce CPU
-
reduce I/O
-
increase memory
Frage 76
Frage
考察in line view。程序大致如下: proc sql;
create table forecast as
select a.*, b.sales
from actual a,_______ where a.dept=b.dept
quit;
Frage 77
Frage
%let this_year=%substr(&sysdate9,6);
%let next_year=&this_year+1;
%let check_year=%eval(&next_year<2016);
%put two years after this year is &next_year+1;
%put &check_year is &check_year;
Assume system time is 01Jan2013, what is the output?
Frage 78
Frage
A data set has 300,000 observations, 20 character variables, 50 numeric variables, 我们需要 其中的 5 character variables 和 7 numeric variables,which is most efficient:
Antworten
-
A. DROP= option in data step
-
B. KEEP= option in data step
-
C. KEEP= option in set statement
-
D. KEEP statement
Frage 79
Frage
Array multi{1:2,2} (1,2);
Do i=1 to 2;
Do j=1 to 2;
Output =multi{i.j};
问 i,j 和对应 output 的值,答案:
Frage 80
Frage
给定一个 data set 和 SQL 代码,问输出结果一致的是: 具体不记得了,摘一段类似的, 考点在 nodupkey,注意要 drop 掉一个 variable
proc sort data=retail.order_fact
out=work.sorted (drop=XXX) nodupkey;
by order_date;
run;
需要选有nodupkey, drop掉一个variable,而且by variable 不能有descending的, 因为SQL中的order by 默认是ascending的
Frage 81
Frage
data company.newdata / view=company.newdata;
infile <fileref>;
<DATA step statements>
run;
以上代码 create a data step view 之后,要在 proc means 中使用 view,问应该用哪个代码:
Submit the above code and create a data step view, then we need to use this view in the PROC MEANS procedure, which one to use:
Antworten
-
A. proc means view= company.newdata;
-
B. proc means data=company.newdata / view=company.newdata;
-
C. proc means data company.newdata / view
-
D. proc means data=company.newdata
Frage 82
Frage
Pagesize info
Which of proc can check the pagesize info?
Antworten
-
A Proc Contents
-
B Proc print
-
C Proc report
-
D Proc catalog
Frage 83
Frage
Given two format with the same name $Gender, one store in Mylib, and the other in library. Proc print data=... ; run;
Using the format $Gender. From the desired output, we can tell that the format in Mylib is used. Options fmtsearch=______________; Which statement should be filled in here?
Antworten
-
A. no fmsearch needed
-
B. fmsearch=(mylib, library)
-
C. fmsearch=(library, mylib)
-
D. fmsearch=(mylib)
Frage 84
Frage
Horizontal join set operator (i) right join
Two data sets
Work.One
year sales
2001 800
2001 500
2003 700
Work.Two
year profit
2001 100
2002 200
proc sql;
select sum(profit)
from one right join two
on one.year=two.year;
quit;
What is the output?
Antworten
-
A. 100
-
B. 300
-
C. 400
-
D. 500
Frage 85
Frage
IDXNAME=... (instruct SAS to use a specific index for where processing)
IDXWHERE
sas里如何指定使用某一个index,用inxname
选inxname
Frage 86
Frage
It is about except operator, given two data sets,
Ask about the output. Choose the answer with one
Antworten
-
Answer: Charlie Omar
-
Answer:
Charlie
Omar
Frage 87
Frage
Given two data sets and SQL code, ask for the output.
Antworten
-
Choose the answer with Thomas, Jones, Smith, but no Adam.
-
Besides, there is a descreasing option in the code, so the Sales need to be in decreasing order.
Frage 88
Frage
哪个个 view 的命名 code 正确?
Frage 89
Frage
Efficiency of If-then/Else and Where clauses
A compressed data set has 200,000 observations, 300 variables. We need 20% of character observations, What method can minimize computer resource usage?
Antworten
-
A. If-then/Else clause
-
B. Case
-
C. Where
-
D. ...
Frage 90
Frage
Macro variable with macro trigger signs.
Output title “RECENT A&M ACTIVITY”, which macro definition should be used.
Antworten
-
A. title %sysfundc(“RECENT A&M ACTIVITY”)
-
B. title %str(“RECENT A&M ACTIVITY”);
-
C. title %nrstr(“RECENT A&M ACTIVITY”);
-
D. title %bquote(“RECENT A&M ACTIVITY);
Frage 91
Frage
Effect on SASFILE for repeating a local data set
Repeated need a local data set, what kind of effect does SASFILE statement has to the Global statement.
Frage 92
Frage
left join and in-line view
Product
Product_id Product
1 1001
2 1002
3 1003
Sales
Product_id Sales
3 100
1 200
5 100
1 200
3 100
1 100
Proc sql;
Select p.product s.totalsales
From product as p
left join (
select sum(sales) as totalsales
from sales as s)
on p.product_id=s.product_id;
quit;
What is the output?
Frage 93
Frage
Work.temp is indexed
Antworten
-
A Stops to executes as this is not in ascending order
-
B Stops to executes as this is not in descending order
-
C continue to executes without problem
-
D continue to executes but index=USE
Frage 94
Frage
in-line view
给了一段 code 明确告知 in-line view 中给定的 condition 有
multiply observations satisfied the condition, 问 program 运行结果。
Frage 95
Frage
in-line view
给了一段 code 明确告知运行出错没有结果,问原因
given a failed program, ask the reason of failure.
Proc sql;
select Jobcode, Salary,
(select avg(Salary)
from WORK.PILOTS
order by Jobcode) as Avg
from WORK.PILOTS
order by ID;
quit;
Antworten
-
Order By statement cannot be used inside of an in-line view.
-
There is another choice says that if using in-line view then we cannot use Order By statement. This is not true. The ORDER BY ID statement in the outside query is OK.
Frage 96
Frage
用 sql 生成多个宏变量
Proc sql...;
select column1, column2
<insert code>;
Antworten
-
into: c1varibale1-: c1varibale3
: c2varibale1-: c2varibale3
-
into: c1varibale1- c1varibale3
: c2varibale1- c2varibale3
-
into: c1varibale1: c1varibale2: c1varibale3
: c2varibale1: c2varibale2: c2varibale3
-
into : type1 -:type3 , :sale1- :sale3
-
INTO: shoesales1-: shoesales3, shoetype1-:shoetype3
Frage 97
Frage
展示数据库中两个数据集的名字、储存的行数和被删除的行数
问怎么在一个 library 里挑出删除了 5%以上 observation 的 dataset
选项太长了不记得具体的了,是考 dictionary table 的
Antworten
-
select menname, nobs, delobs from dictionary.tables
-
select menname, nlobs, delobs from dictionary.tables
-
select menname, nobs, delobs from dictionary.members
Frage 98
Frage
multiple datasets 想用 set 和 key 合并的时候,应该应用在什么样的 dataset 上 (chapter 15)
mergedataset时,什么时候用multipleSETstatement最有效率
Antworten
-
A: dataset 都是 large,两个里面都有 index。
-
B: larger dataset,一个 smaller dataset,index in larger dataset
-
C: larger dataset,一个 smaller dataset,index in smaller dataset
Frage 99
Frage
考点: create index 时 unique 是已经确认的,不能被更改
Frage 100
Frage
引用 index 时,哪个效率高(题干和选项都没记清,仅提供考点)
在 index 很复杂的情况下,在 where statement 中选择怎样 index 最有效?
Frage 101
Frage
给了data set 和desired output,要求选code。 发现是要生成unique value of key variable.
Frage 102
Frage
什么样 characteristic 的 index can only be set up with DATASET procedure.
Frage 103
Frage
要选出 inactive_date 为 missing 时候的 observation。题目是 prol sql;
Select *
From dataset1 A
Full join dataset2 B
On A.ID = B.ID
Where inactive_date is missing;
问 data dataset3;
merge dataset1 (In=Ina)
dataset2 (In=Inb);
By ID;
<insert statement>;
Antworten
-
A: where inactive_date is missing and (Ina and Inb)
-
B: where inactive_date is missing and (Ina or Inb)
-
C:想不起来了 好像是 if inactive_date is missing and (ina and inb)
-
D: If inactive_date ne .