SAS advance 63

Descrição

Quiz sobre SAS advance 63, criado por Grace Li em 26-09-2018.
Grace Li
Quiz por Grace Li, atualizado more than 1 year ago
Grace Li
Criado por Grace Li quase 6 anos atrás
486
2

Resumo de Recurso

Questão 1

Questão
1. When attempting to minimize memory usage, the most efficient way to do group processing when using the MEANS procedure is to use:
Responda
  • A. the BY statement.
  • B. GROUPBY with the NOTSORTED specification.
  • C. the CLASS statement.
  • D. multiple WHERE statements.

Questão 2

Questão
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?
Responda
  • 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;

Questão 3

Questão
3. Given the SAS data sets: What would allow the program to successfully execute without errors?
Responda
  • 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.

Questão 4

Questão
4. Given the SAS data set SASUSER.HIGHWAY: Which SQL clause stores the text 0-29, 30-49, 50+ in the macro variable GROUPS?
Responda
  • A. into &GROUPS
  • B. into :GROUPS
  • C. into :GROUPS separated by ','
  • D. into &GROUPS separated by ','

Questão 5

Questão
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?
Responda
  • 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.

Questão 6

Questão
6. The table WORK.PILOTS contains the following data: Which SQL statement could NOT generate this result?
Responda
  • 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.)

Questão 7

Questão
7. A quick rule of thumb for the space required to run PROC SORT is:
Responda
  • 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.

Questão 8

Questão
8. Multi-threaded processing for PROC SORT will affect which of these system resources?
Responda
  • 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

Questão 9

Questão
9. Given the SAS data set WORK.TRANSACT: Which SQL statement was used?
Responda
  • 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 ;

Questão 10

Questão
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?
Responda
  • A. 0.555
  • B. 2
  • C. 1.8
  • D. 1

Questão 11

Questão
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?
Responda
  • 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.

Questão 12

Questão
12. Which title statement would always display the current date?
Responda
  • A. title "Today is: &sysdate.";
  • B. title "Today is: &sysdate9.";
  • C. title "Today is: &today.";
  • D. title "Today is: %sysfunc(today(),worddate.)";

Questão 13

Questão
13. Given the SAS data sets: Which SQL procedure statement produces the same results?
Responda
  • 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 ;

Questão 14

Questão
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?
Responda
  • 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;

Questão 15

Questão
15. Given the SAS data set WORK.ONE: Which result set would be generated?
Responda
  • A. JONES 280 JONES 280 SMITH 280 SMITH 280 SMITH 280
  • B. JONES 600 SMITH 100
  • C. JONES 280 SMITH 280
  • D. JONES 100 JONES 100 SMITH 600 SMITH 600 SMITH 600

Questão 16

Questão
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?
Responda
  • A. append corr
  • B. union corr
  • C. outer union corr
  • D. intersect corr

Questão 17

Questão
17. Which of the following is an advantage of SAS views?
Responda
  • 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

Questão 18

Questão
18. In what order does SAS search for format definitions by default?
Responda
  • 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.

Questão 19

Questão
19. Function %UPCASE: Which WHERE statement successfully completes the program and produces a report?
Responda
  • A. where upcase(Name)=upcase(&Value);
  • B. where upcase(Name)=%upcase(&Value);
  • C. where upcase(Name)="upcase(&Value)";
  • D. where upcase(Name)="%upcase(&Value)";

Questão 20

Questão
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?
Responda
  • A. 3
  • B. 8
  • C. WORK.TEMP is not created - X has an invalid length.
  • D. Unknown.

Questão 21

Questão
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:
Responda
  • 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.

Questão 22

Questão
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?
Responda
  • A. CONTENTS FROM SASHELP.CLASS;
  • B. CREATE FROM SASHELP.CLASS INTO LOG;
  • C. DESCRIBE TABLE SASHELP.CLASS;
  • D. VALIDATE SELECT * FROM SASHELP.CLASS;

Questão 23

Questão
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?
Responda
  • A. &Status&i
  • B. &&Status&i
  • C. &Status&Count
  • D. &&Status&Count

Questão 24

Questão
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?
Responda
  • A. 2.3
  • B. 2
  • C. . (missing value)
  • D. 2.33333333333333

Questão 25

Questão
25. Macros That Include Keyword Parameters: Given the SAS data set SASUSER.HIGHWAY: How many observations appear in the generated report?
Responda
  • A. 0
  • B. 2
  • C. 3
  • D. 5

Questão 26

Questão
26. Given the following SAS data sets: Which of the following SQL statements was most likely used to generate this result?
Responda
  • 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 ;

Questão 27

Questão
27. Given the SAS data sets: What data values are stored in data set WORK.COMBINE?

Questão 28

Questão
28. Which of the following ARRAY statements is similar to the statement array Yr{1974:2007} Yr1974-Yr2007; and will compile without errors?
Responda
  • 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;

Questão 29

Questão
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?
Responda
  • 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

Questão 30

Questão
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"
Responda
  • 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."";

Questão 31

Questão
31. Given the SAS data sets: What data values are stored in data set WORK.COMBINE?
Responda
  • 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

Questão 32

Questão
32. The following SAS program is submitted: data WORK.NEW(bufno=4); set WORK.OLD(bufno=3); run; Why are the BUFNO options used?
Responda
  • 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

Questão 33

Questão
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?
Responda
  • 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;

Questão 34

Questão
34. Given the SAS dataset WORK.ONE Which SQL procedure clause completes the program and generates the desired output?
Responda
  • 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"

Questão 35

Questão
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?
Responda
  • 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.

Questão 36

Questão
36. Which statement is true for Data step HASH objects?
Responda
  • 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.

Questão 37

Questão
37. Given the SAS data sets: Which SQL set operator completes the program and generates the desired output?
Responda
  • A. intersect corr
  • B. except all
  • C. intersect all
  • D. left except

Questão 38

Questão
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?
Responda
  • A. Result is 0
  • B. Result is 1
  • C. Result is 10 gt 5
  • D. Result is true

Questão 39

Questão
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?
Responda
  • A. Mv is bicycles
  • B. Mv is clothes
  • C. Mv is shoes
  • D. Mv is tents

Questão 40

Questão
40. Which of the following SAS System options can aid in benchmarking?
Responda
  • A. BUFSIZE= and BUFNO=
  • B. FULLSTIMER
  • C. IOBLOCKSIZE=
  • D. SYSTIMER

Questão 41

Questão
41. Given the following macro program: Which option would provide feedback in the log about the parameter values passed into this macro when invoked?
Responda
  • A. MPRINT
  • B. MDEBUG
  • C. MLOGIC
  • D. MPARAM

Questão 42

Questão
42. The NOTSORTED option on the BY statement cannot be used with which other statement or option?
Responda
  • A. SET
  • B. MERGE
  • C. IF FIRST.by-variable
  • D. BY GROUPFORMAT by-variable

Questão 43

Questão
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?
Responda
  • 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)

Questão 44

Questão
44. Which dictionary table provides information on each occurrence of the variable named LastName?
Responda
  • A. DICTIONARY.TABLES
  • B. DICTIONARY.COLUMNS
  • C. DICTIONARY.MEMBERS
  • D. DICTIONARY.VARIABLES

Questão 45

Questão
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
Responda
  • A. only technique 1
  • B. techniques 1 and 2
  • C. techniques 1 and 3
  • D. techniques 1, 2, or 3

Questão 46

Questão
46. Given the SAS data sets: Which SQL set operator completes the program and generates the desired output?
Responda
  • A. intersect corr
  • B. except
  • C. intersect
  • D. left except

Questão 47

Questão
47. The following SAS program is submitted: Which statement completes the program so that the PROC PRINT step executes on Thursday?
Responda
  • A. if &sysday = Thursday then %do;
  • B. %if &sysday = Thursday %then %do;
  • C. %if "&sysday" = Thursday %then %do;
  • D. %if &sysday = "Thursday" %then %do;

Questão 48

Questão
48. Given the following program and data: What is the WHERE statement that successfully completes the PROC PRINT and selects the observation for Barb?
Responda
  • A. where Birthday=&Want;
  • B. where Birthday="&Want";
  • C. where Birthday="&Want"d;
  • D. where Birthday='&Want'd;

Questão 49

Questão
49. Which macro statement would remove the macro variable Mv_Info from the symbol table?
Responda
  • A. %mdelete &Mv_Info;
  • B. %symerase Mv_Info;
  • C. %symdel &Mv_Info;
  • D. %symdel Mv_Info;

Questão 50

Questão
50. The table WORK.PILOTS contains the following data: Which select statement could NOT have produced this output?

Questão 51

Questão
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?
Responda
  • A. by Id;
  • B. by Id grouped;
  • C. by Id descending;
  • D. by descending Id;

Questão 52

Questão
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:
Responda
  • A. sorted on that variable.
  • B. indexed by that variable.
  • C. naturally in order.
  • D. any of the above A, B, or C

Questão 53

Questão
53.The SASFILE statement requests that a SAS data set be opened and loaded into memory:
Responda
  • A. one page at a time.
  • B. one variable at a time.
  • C. one observation at a time.
  • D. in its entirety, if possible.

Questão 54

Questão
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?
Responda
  • A. &Name2
  • B. Clothes
  • C. &&&Root&Suffix
  • D. WARNING: Apparent symbolic reference ROOT2 not resolved.

Questão 55

Questão
55. Given the SAS data sets: Which join operator completes the program and generates the desired output?
Responda
  • A. left join
  • B. right join
  • C. full join
  • D. outer join

Questão 56

Questão
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?
Responda
  • A. infile "c:\email.sas";
  • B. output "c:\email.sas";
  • C. file "c:\email.sas";
  • D. None of the above.

Questão 57

Questão
57. Which of the following is true about the COMPRESS=YES data set option?
Responda
  • 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.

Questão 58

Questão
Given the SAS dataset WORK.ONE: Salary ------ 200 205 . 523 Which WHERE expression completes the program and generates the desired output?
Responda
  • A. where Salary is not .
  • B. where Salary ne missing
  • C. where Salary ne null
  • D. where Salary is not missing

Questão 59

Questão
59. The SAS data set WORK.TEST has an index on the variable Id and the following SAS program is submitted.
Responda
  • 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.

Questão 60

Questão
Given the data set SASHELP.CLASS: Which PROC steps execute successfully?
Responda
  • A. PROC MEANS only
  • B. PROC PRINT only
  • C. PROC MEANS and PROC PRINT
  • D. No PROC steps execute successfully

Questão 61

Questão
61. In a data step merge, the BY variables in all data sets must have the same:
Responda
  • A. name.
  • B. name and type.
  • C. name and length.
  • D. name, type, and length.

Questão 62

Questão
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.
Responda
  • 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

Questão 63

Questão
63. The following SAS program is submitted: Which VAR statement successfully completes the program to produce a report containing four variables?
Responda
  • A. var %COLS1 %COLS2;
  • B. var %COLS1-%COLS2;
  • C. var %COLS1 Weight Height;
  • D. var Weight Height %COLS1;

Questão 64

Questão
如何在 Log 中輸出 global macro variables %put [blank_start]GLOBAL[blank_end]
Responda
  • _GLOBAL_

Questão 65

Questão
選出 unique value of a grouped variable If [blank_start]first.model[blank_end] =1 then output=xxx (model 是這個 variable 的名字)
Responda
  • first.model

Questão 66

Questão
outer union [blank_start]corr[blank_end]
Responda
  • corr

Questão 67

Questão
A Data has 2000million observations and 300 Character variables Compress=[blank_start]YES[blank_end]
Responda
  • YES

Questão 68

Questão
Data Set ONE State_ID state TWO State_ID City Quit 前的最後一句: Ask: where s.state= [blank_start]“&selection”[blank_end] (注意一定要加引號)
Responda
  • "&selection"

Questão 69

Questão
HASH object [blank_start]HashAlpha[blank_end]
Responda
  • HashAlpha

Questão 70

Questão
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]
Responda
  • 7

Questão 71

Questão
FCMP 填空 proc fcmp outlib=sasuser.funcs.trial; ... endsub; options [blank_start]cmplib[blank_end] =sasuser.funcs; data null; ... run;
Responda
  • cmplib

Questão 72

Questão
Given data set and macro program, choose missing correct code call symputx('&Num', California)
Responda
  • True
  • False

Questão 73

Questão
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] );
Responda
  • "someAlpha"

Questão 74

Questão
declare has Goal(); Goal.definekey(“QtrNum”); Goal.definedata([blank_start]“GoalAmount”[blank_end]); Goal.definedone();
Responda
  • “GoalAmount”

Questão 75

Questão
repeated need a local data set, what kind of effect does SASFILE statement has to the Global statement.
Responda
  • reduce CPU
  • reduce I/O
  • increase memory

Questão 76

Questão
考察in line view。程序大致如下: proc sql; create table forecast as select a.*, b.sales from actual a,_______ where a.dept=b.dept quit;
Responda
  • (select avg(revenue) as average from Budegt group by 1) b
  • select ( avg(revenue) as average from Budegt group by 1) b

Questão 77

Questão
%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?
Responda
  • two years after this year is 2013+1+1
  • check_year is 1

Questão 78

Questão
A data set has 300,000 observations, 20 character variables, 50 numeric variables, 我们需要 其中的 5 character variables 和 7 numeric variables,which is most efficient:
Responda
  • A. DROP= option in data step
  • B. KEEP= option in data step
  • C. KEEP= option in set statement
  • D. KEEP statement

Questão 79

Questão
Array multi{1:2,2} (1,2); Do i=1 to 2; Do j=1 to 2; Output =multi{i.j}; 问 i,j 和对应 output 的值,答案:
Responda
  • i j output 111 122 21 . 22 .
  • i j output 111 122 21. 22.

Questão 80

Questão
给定一个 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的
Responda
  • True
  • False

Questão 81

Questão
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:
Responda
  • 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

Questão 82

Questão
Pagesize info Which of proc can check the pagesize info?
Responda
  • A Proc Contents
  • B Proc print
  • C Proc report
  • D Proc catalog

Questão 83

Questão
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?
Responda
  • A. no fmsearch needed
  • B. fmsearch=(mylib, library)
  • C. fmsearch=(library, mylib)
  • D. fmsearch=(mylib)

Questão 84

Questão
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?
Responda
  • A. 100
  • B. 300
  • C. 400
  • D. 500

Questão 85

Questão
IDXNAME=... (instruct SAS to use a specific index for where processing) IDXWHERE sas里如何指定使用某一个index,用inxname 选inxname
Responda
  • True
  • False

Questão 86

Questão
It is about except operator, given two data sets, Ask about the output. Choose the answer with one
Responda
  • Answer: Charlie Omar
  • Answer: Charlie Omar

Questão 87

Questão
Given two data sets and SQL code, ask for the output.
Responda
  • 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.

Questão 88

Questão
哪个个 view 的命名 code 正确?
Responda
  • data xxx/ view=xxx
  • (view 和 data set 的命名必须一样)

Questão 89

Questão
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?
Responda
  • A. If-then/Else clause
  • B. Case
  • C. Where
  • D. ...

Questão 90

Questão
Macro variable with macro trigger signs. Output title “RECENT A&M ACTIVITY”, which macro definition should be used.
Responda
  • 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);

Questão 91

Questão
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.
Responda
  • A increase Network Bandwidth
  • B CPU increase
  • C I/O increase
  • D memory increase

Questão 92

Questão
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?
Responda
  • Product Totalsales 1001 500 1002 . 1003 200
  • Product Totalsales 1001 500 1002 . 1003 200

Questão 93

Questão
Work.temp is indexed
Responda
  • 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

Questão 94

Questão
in-line view 给了一段 code 明确告知 in-line view 中给定的 condition 有 multiply observations satisfied the condition, 问 program 运行结果。
Responda
  • 答案是运行出错没有结果
  • 因为 in-line view return multiple results

Questão 95

Questão
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;
Responda
  • 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.

Questão 96

Questão
用 sql 生成多个宏变量 Proc sql...; select column1, column2 <insert code>;
Responda
  • 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

Questão 97

Questão
展示数据库中两个数据集的名字、储存的行数和被删除的行数 问怎么在一个 library 里挑出删除了 5%以上 observation 的 dataset 选项太长了不记得具体的了,是考 dictionary table 的
Responda
  • select menname, nobs, delobs from dictionary.tables
  • select menname, nlobs, delobs from dictionary.tables
  • select menname, nobs, delobs from dictionary.members

Questão 98

Questão
multiple datasets 想用 set 和 key 合并的时候,应该应用在什么样的 dataset 上 (chapter 15) mergedataset时,什么时候用multipleSETstatement最有效率
Responda
  • A: dataset 都是 large,两个里面都有 index。
  • B: larger dataset,一个 smaller dataset,index in larger dataset
  • C: larger dataset,一个 smaller dataset,index in smaller dataset

Questão 99

Questão
考点: create index 时 unique 是已经确认的,不能被更改
Responda
  • create index 时 unique 是已经确认的
  • 不能被更改

Questão 100

Questão
引用 index 时,哪个效率高(题干和选项都没记清,仅提供考点) 在 index 很复杂的情况下,在 where statement 中选择怎样 index 最有效?
Responda
  • index include more rows
  • index unqualified more rows index that disqualify most variables
  • simple index
  • composite index

Questão 101

Questão
给了data set 和desired output,要求选code。 发现是要生成unique value of key variable.
Responda
  • 只有proc sort nodupkey; by var 的选项对
  • 有干扰选项proc sort nodup; by var;

Questão 102

Questão
什么样 characteristic 的 index can only be set up with DATASET procedure.
Responda
  • A: 关 于 index centiles 的,好像是 index centiles can be updated.
  • D:index 可以 包括 missing value
  • A. multiple variables;
  • B. unique key

Questão 103

Questão
要选出 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>;
Responda
  • 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 .

Semelhante

Porcentagens e Frações
luciahelenaferre
Matemática - Triângulos
Alessandra S.
Como fazer Mapas Mentais
Marina Faria
Phrasal Verbs - Inglês #5
Eduardo .
10 Dicas de Como Estudar Online
GoConqr suporte .
SIMULADO DO SPAECE PORTUGUÊS 2º ANO 2014
gilmarjunior24
Direito Processual Penal
thiago.tc3
Palácio das Memórias (técnica em 05 etapas) - SEJA O MESTRE DO SEU PALÁCIO
angrafederal
12 dicas para ter uma postura profissional
Liliane Tubino
Practice For First Certificate Grammar II
titaleoni
Contextualização da disciplina - Gestão - Administração da Carreira Profissional
Fabrícia Assunção