Sunteți pe pagina 1din 81

SAS Institute A00-212: Practice Exam QUESTION NO: 1 The following SAS program is submitted: Data sasuser.

history; Set sasuser.history(keep=state x y Rename = (state=ST)); Total=sum(x,y); Run; The SAS data set SASUSER.HISTORY has an index on the variable STATE. Which describes the result of submitting the SAS program? A. The index on STATE is deleted and an index on ST is created B. The index on STATE is recreated as an index on ST C. The index on STATE is deleted D. The index on STATE is updated as an index on ST Answer: C

QUESTION NO: 2 The following SAS program is submitted: %macro one(input); %two; %put the value is &date; %mend; %macro two; data _null_; call symput('date','12SEP2008'); run; %mend; %let date=31DEC2006; %one(&date) What is the result when the %PUT statement executes? A. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro B. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro C. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table D. A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table "Pass Any Exam. Any Time." - Guaranteed 2

SAS Institute A00-212: Practice Exam Answer: C

QUESTION NO: 3 Which SET statements option names a variable that contains the number of the observation to read during the current iteration of the DATA step? A. OBS=pointobs B. POINT=pointobs C. KEY=pointobs D. NOBS=pointobs Answer: B

QUESTION NO: 4 When reading a SAS data file, what does the NOBS=option on the SET statement represent? A. A variable that represents the total number of observation in the output data set(s) B. A variable that represents a flag indicating the end of the file C. A variable that represents the total number of observations in the input data set(s) D. A variable that represents the current observation number Answer: C

QUESTION NO: 5 CORRECT TEXT CORRECT TEXT The following SAS program is submitted: %macro check(num=4); %let result=%sysevalf(&num+0.5); %put result is &result; %mend; %check(num=10) What is the written to the SAS log? result is result is 10 result is 10.5 result is 10+0.5

"Pass Any Exam. Any Time." - Guaranteed

SAS Institute A00-212: Practice Exam Answer: C

QUESTION NO: 6 The following SAS program is submitted: %micro test(var); %let jobs=BLACKSMITH WORDSMITH SWORDSMITH; %let type=%index(&jobs,&var); %put type = &type; %mend; %test(SMITH) What is the value of the macro variable TYPE when the %PUT statement executes? A. 0 B. Null C. 6 D. 3 Answer: C

QUESTION NO: 7 The following SAS program is submitted: %macro check(num=4); %let result=%eval(&nm gt 5); %put result is &result; %mend; %check (num=10) What is written to the SAS log? A. result is true B. result is 10 gt 5 C. result is 1 D. result is 0 Answer: C

QUESTION NO: 8 The following SAS program is submitted: data temp; "Pass Any Exam. Any Time." - Guaranteed 4

SAS Institute A00-212: Practice Exam length 1 b 3 x; infile 'file reference'; input a b x; run; What is the result? A. The data set TEMP is not created because variables A and B have invalid lengths B. The data set TEMP is created, but variable X is not created C. The data set TEMP is not created because variable A has an invalid length D. The data set TEMP is created and variable X has a length of 8 Answer: C

QUESTION NO: 9 Given the SAS data sets ONE and TWO:

The following SAS program is submitted: Proc sql; Select two.*,budget from one <insert JOIN operator here> two on one.year=two.year, Quit; The following output is desired:

Which JOIN operator completes the program and generates the desired output? A. FULL JOIN B. INNER JOIN C. LEFT JOIN D. RIGHT JOIN Answer: A "Pass Any Exam. Any Time." - Guaranteed 5

SAS Institute A00-212: Practice Exam

QUESTION NO: 10 Given the SAS data set SAUSER.HIGWAY: SASUSER.HIGHWAY

The following SAS program is submitted: %macro highway; proc sql nonprint; %let numgrp=6; select distinct status into:group1-:group&numgrp from sasuser.highway; quit; %do i=1 %to &numgrp; proc print data =sasuser.highway; where status ="&&group&I"; run; %end; %mend; %highway How many reports are produced? A. 2 B. 6 C. 0 D. 5 Answer: A

QUESTION NO: 11 The following SAS program is submitted: %let dept=prod; %let prod=merchandise; The following message is written to the SAS log: The value is "merchandise" "Pass Any Exam. Any Time." - Guaranteed 6

SAS Institute A00-212: Practice Exam Which SAS System option writes this message to the SAS log? A. %put the value is "&&&dept"; B. %put the value is "&&&dept"; C. %put the value is "&&&dept"; D. %put the value is %quote(&&&dept); Answer: A

QUESTION NO: 12 The SAS data set WORK.TEMPDATA contains the variables FMTNAME, START and LABEL and it consists of 10 observations. The following SAS program is submitted: Proc format cntlin=wor.tempdata; Run; What is the result of submitting the FORMAT procedure step? A. It uses the WORK.TEMPDATA SAS data set as input to create the format B. All formats created will be stored in two WORK.TEMPDATA SAS data set C. An ERROR message is written to the SAS log because the program is incomplete D. NO formats are created in this step Answer: A

QUESTION NO: 13 The following SAS program is submitted: date view=sauser.ranch; describe; run; What is the result? A. The program creates a DATA step view called SASUSER.RANCH and places the program cod in the current editor window B. The program retrieves the SAS source code that creates the view and places it in the output window C. The program creates a DATA step view called SASUSER.RANCH and places it in the SAS log D. the program retrieves the SAS source code that creates the view and places it in the SAS log

"Pass Any Exam. Any Time." - Guaranteed

SAS Institute A00-212: Practice Exam Answer: D

QUESTION NO: 14 Which SET statement option names a variable that contains the number of the observation to read during the current iteration of the DATA step? A. NOBS=pointobs B. OBS=pointobs C. KEY=pointobs D. POINT=pointobs Answer: D

QUESTION NO: 15 Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set? A. DATASETS B. MODIFY C. FORMAT D. REGISTRY Answer: A

QUESTION NO: 16 The following SAS program is submitted: %macro check(num=4); %let result=%sysevalf(&num+0.5); %put result is &result; %mend; %check(num=10) What is the written to the SAS log? A. result is B. result is 10.5 C. result is 10+0.5 D. result is 10

"Pass Any Exam. Any Time." - Guaranteed

SAS Institute A00-212: Practice Exam Answer: B

QUESTION NO: 17 Given the SAS data set ONE: ONE DIVISION SALES A 1234 A 3654 B 5678 The following SAS program is submitted: Data_null_; Set one; By divition; If first.division then Do; %let mfirst=sales; end; run; What is the value of the macro variable MFRIST when the program finishes execution? A. 1234 B. sales C. 5678 D. null Answer: B

QUESTION NO: 18 The following SAS program is submitted: %let first=yourname; %let last=first; %put &&&last; What is written to the SAS Log? A. First B. Yourname C. &&First D. &yourname

"Pass Any Exam. Any Time." - Guaranteed

SAS Institute A00-212: Practice Exam Answer: B

QUESTION NO: 19 The following SAS program is submitted: %let a=cat; %macro animal(a=frog); %let a=bird; %mend; %animal(a=pig) %put a is &a; What is written to the SAS log? A. a is pig B. a set cat C. a is frog D. a is bird Answer: B

QUESTION NO: 20 Which SQL procedure program deletes rows from the data set CLASS? A. proc sql; Select * from class Where age<(select stop_age from threshold); Quit; B. proc sql; Modify table class Delete where age<(select stop_age from threshold); Quit C. proc sql; Delete from class Where age<(select stop_age from threshold); Quit; D. proc sql; Alter from class Delete where age<(select stop_age from threshold); Quit;

"Pass Any Exam. Any Time." - Guaranteed

10

SAS Institute A00-212: Practice Exam Answer: C

QUESTION NO: 21 The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib"; quit; Several SAS data sets exist in the SAUSER library. What is generated as output? A. A report showing the names of the columns in each table in SASUSER B. A report showing the number of columns in each table in SASUSER C. A report showing the numeric columns in each table in SASUSER D. A report showing the number of numeric columns in each table in SASUSER Answer: B

QUESTION NO: 22 The following SAS program is submitted: %macro loop; data one; %do I=1 %to 3; var&I=&I;% end run; %mend; %loop After this program executes; the following is written to the SAS log: (LOOP): Beginning execution (LOOP): %DO loop beginning; index variable l; start value is 1; stop value is 3; by value is 1 (LOOP): %DO loop index variable l is now 2; loop will iterate again (LOOP): %DO loop index variable l is no 3; loop will iterate again (LOOP): %DO loop index variable l is no 4; loop will iterate again (LOOP): Ending execution Which SAS system option displays the notes in the SAS log? A. SYMBOLGEN "Pass Any Exam. Any Time." - Guaranteed 11

SAS Institute A00-212: Practice Exam B. MLOGIC C. MACRO D. MPRINT Answer: B

QUESTION NO: 23 Given the SAS data sets ONE and TWO:

The following SAS program is submitted: Data combine; Merge one two; By id; Run; Which SQL procedure program procedures the same results? A. proc sql; Create table combine as Select coalesce (one.id, two.id) as id, Name,salary from one, two where one.id=two.id; Quit; B. proc sql; Create table combine as Select one.id, Name, salary from one full join two where one.id=two.id; Quit C. proc sql; Create table combine as Select one.id,name,salary from one inner join two on one.id=two.id Quit D. proc sql; Create table combine as Select coalesce (one id, two id) as id, Name,salary from one full join two on one.id=two.id; "Pass Any Exam. Any Time." - Guaranteed 12

SAS Institute A00-212: Practice Exam Quit; Answer: D

QUESTION NO: 24 The following SAS program is submitted: %let first=yourname; %lest last=first %put &&last; What is written to the SAS log? A. First B. &yourname C. &&First D. Yourname Answer: D

QUESTION NO: 25 The following SAS program is submitted: proc contents data = testdata.one; run; Which SQL procedure program produces similar information about the column attributes of the dataset TESTDATA.ONE? A. proc sql; Contents table testdata.one; Quit; B. proc sql; Describe table testdata.one; Quit; C. proc sql; describe testdata.one; Quit; D. proc sql; Contents testdata.one; Quit; Answer: B

"Pass Any Exam. Any Time." - Guaranteed

13

SAS Institute A00-212: Practice Exam

QUESTION NO: 26 The following SAS program is submitted: data temp; array points{2,3} (10,15,20,25,30,35); run; What impact does the ARRAY statement have in the Program Data Vector(PDV)? A. No variable are created in the PDV B. The variables named POINTS10, POINTS15, POINTS20,POINTS25,POINTS30, POINTS35 are created in the PDV C. The variables named POINTS1, POINTS2, POINTS3 POINTS4, POINTS5, POINTS6 are created in the PDV D. The variables named POINTS11, POINTS12, POINTS21, POINTS22, POINTS23 are created in the PDV Answer: C

QUESTION NO: 27 The following SAS program is submitted: %let a =cat; %macro animal(a=frog); %let a = bird; %mend; %animal(a=ping); %put a is &a; What is written to the SAS log? A. a is bird B. a is frog C. a is cat D. a is pig Answer: C

QUESTION NO: 28 Given the SAS data set ONE: ONE "Pass Any Exam. Any Time." - Guaranteed 14

SAS Institute A00-212: Practice Exam NUM VAR 1A 2B 3C Which SQL procedure program deletes the data set ONE? A. proc sql; Drop table one; Quit; B. proc sql; Remove table one; Quit; C. proc sql; Delete table one; Quit; D. proc sql; Delete from one; Quit; Answer: A

QUESTION NO: 29 The following SAS program is submitted: %macro location; data _null_; call symput ('dept','sales'); run; %let country=Germany; %put_global_; %mend; %let company = ABC; %location; Which macro variables are written to the SAS log? A. COMPANY and DEPT only B. COMPANY,COUNTRY and DEPT C. COMPANY Only D. COMPANY and COUNTRY only Answer: A

"Pass Any Exam. Any Time." - Guaranteed

15

SAS Institute A00-212: Practice Exam QUESTION NO: 30 What is the purpose of the SASFILE statement? A. It requests that SAS data set be opened and loaded into SAS memory one page at a time B. It requests that a SAS data set the opened and loaded into SAS memory one variable at a time C. It requests that a SAS data set be opened and loaded into SAS memory one observation at a time D. It requests that a SAS data set be opened and loaded into SAS memory in its entirety Answer: D

QUESTION NO: 31 Given the SAS date sets CLASS1 and CLASS2 CLASS1 CLASS2 NAME COURSE NAME COURSE Lauren MATH1 Smith MATH2 Patel MATH1 Farmer MATH2 Chang MATH1 Patel MATH2 Chang MATH3 Hiller MATH2 The following SAS program is submitted: Proc sql; Select name from CLASS1 <insert SQL set operator here> select name from CLASS; quit; The following output is desired NAME Chang Chang Lauren Which SQL set operator completes the program and generates the desired output? A. UNION ALL B. EXCEPT ALL C. INTERSECT ALL D. OUTER UNION ALL Answer: B

"Pass Any Exam. Any Time." - Guaranteed

16

SAS Institute A00-212: Practice Exam

QUESTION NO: 32 The following SAS program is submitted: data new (bufnp=4); set old(bufno=4); run; Why are the BUFNO options used? A. To reduce the number I/O operations B. To reduce network traffic C. To reduce memory usage D. To reduce the amount of data read Answer: A

QUESTION NO: 33 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? A. It tracks and recycles free space B. It allows a permanently stored SAS data set to be replaced C. It allows users to access the same SAS data set concurrently D. It allows updates in place Answer: A

QUESTION NO: 34 Given the SAS data sets ONE and TWO:

"Pass Any Exam. Any Time." - Guaranteed

17

SAS Institute A00-212: Practice Exam The following SAS program is submitted:

Proc sql; Select two.*, budget From one <insert JOIN operator here> two On one.year=two.year; Quit; The following output is desired: Which JOIN operator completes the program and generates the desired output? A. FULL JOIN B. LEFT JOIN C. RIGHT JOIN D. INNER JOIN Answer: C

QUESTION NO: 35 The SAS data set ONE contains fifty million observations and contains the variable PRICE, QUANTITY, FIXED and VARIABLE. Which SAS program successfully creates three new variables TOTREV, TOTCOST and PROFIT and requires the least amount of CPU resources to be processed? A. data two; Set one; Where totrev>1000; Totrev=sum(price*quantity); Totcost=sum(fixed,variable); Profit=sum(totrev,-totcost); Run; B. data two; Set one; totrev=sum(price*quantity); where totrev>1000; totcost=sum(fixed,variable); profit=sum(totrev,-totcost); "Pass Any Exam. Any Time." - Guaranteed

18

SAS Institute A00-212: Practice Exam run; C. data two; Set one; Totrev=sum(price*quantity); If totrev>1000; Totcost=sum(fixed,variable); Profit=sum(totrev,-totcost); Run; D. data two; Set one; Totrev = sum(price*quantity); Totcost= sum(fixed,variable); If totrev>1000; Profit=sum(totrev,-totcost); Run; Answer: C

QUESTION NO: 36 The following SAS program is submitted: %macro location; data _null_; call symput ('dept','sales'); run; %let country=Germany; %put_global_; %mend; %let company = ABC; %location; Which macro variables are written to the SAS log? A. COMPANY and COUNTRY only B. COMPANY Only C. COMPANY and DEPT only D. COMPANY,COUNTRY and DEPT Answer: C

QUESTION NO: 37

"Pass Any Exam. Any Time." - Guaranteed

19

SAS Institute A00-212: Practice Exam The following SAS program is submitted: data temp; set sasuser.history(kep=date); format date qtr <insert BY statement here> if first.date then total=0; total+1; if last.date; run; proc print data=temp; run SASUSER.HISTORY is sorted by the SAS date variable DATE. The following output is required: Date Total 1 13 3 15 4 25 Which By statement completes the data step and successfully generates the required output? A. by groupformat date; B. by formateed date; C. by notsorted date; D. by date qtr Answer: A

QUESTION NO: 38 Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library? A. MODIFY and CHANGE statements B. RENAME statement only C. CHANGE statement only D. MODIFY and RENAME statements Answer: C

QUESTION NO: 39 Given has SAS dataset ONE:

"Pass Any Exam. Any Time." - Guaranteed

20

SAS Institute A00-212: Practice Exam

The following SAS program is submitted:

Proc sql; <insert SQL clause here> from one; quit; The following output is desired: Which SQL procedure clause completes the program and generates the desired output? A. Select salary, salary*.10 var=BONUS B. Select salary, salary*.10 label='BONUS' C. Select salary, salary *.10 column='BONUS' D. Select salary, salary*.10 name='BONUS' Answer: B

"Pass Any Exam. Any Time." - Guaranteed

21

SAS Institute A00-212: Practice Exam QUESTION NO: 40 The SAS data set WORK.TEMPDATA contains the variable FMTNAME, START and LABEL and it consists of 10 observations. The following SAS program is submitted: proc format cntlin=work.tempdata; run; What is the result of submitting the FORMAT procedure step? A. No formats are created in this step B. All formats created will be stored in the WORK.TEMPDATA SAS set C. An ERROR message is written to the SAS log because the program is incomplete D. It uses the WORK.TEMPDATA SAS data set as input to create the format Answer: D

QUESTION NO: 41 Given the non-indexed SAS data set TEMP: TEMP XY -P 52 P 45 A 13 A 56 R 34 R 12 R 78 The following SAS program is submitted: Proc print data=temp; <insert BY statement here> run; Which BY statement completes the program, creates a listing report that is grouped by X and completes without errors? A. By X notsorted; B. By X grouped; C. By Descending X; D. By X; Answer: A

"Pass Any Exam. Any Time." - Guaranteed

22

SAS Institute A00-212: Practice Exam

QUESTION NO: 42 The following SAS program is submitted: %micro test(var); %let jobs=BLACKSMITH WORDSMITH SWORDSMITH; %let type=%index(&jobs,&var); %put type = &type; %mend; %test(SMITH) What is the value of the macro variable TYPE when the %PUT statement executes? A. 3 B. Null C. 6 D. 0 Answer: C

QUESTION NO: 43 Given the data set SASHELP.CLASS SASHELP.CLASS NAME AGE Mary 15 Philip 16 Robert 12 Ronald 15 The following SAS program is submitted %let value = Philip; proc print data =sashelp.class; <insert Where statement here> run; Which WHERE statement successfully completes the program and produces a report? A. Where upcase(name)="upcase(&value)"; B. Where upcase(name)="%upcase(&value)"; C. Where upcase(name)=upcase(&value); D. Where upcase(name)=%upcase(&value); Answer: B

"Pass Any Exam. Any Time." - Guaranteed

23

SAS Institute A00-212: Practice Exam

QUESTION NO: 44 Following SAS program is submitted: data temp(<insert option here>); infile 'rawdata'; input x $ y z; run; RAWDATA is a file reference to an external file that is ordered by the variable X. Which option specifies how the data in the SAS data set TEMP will be sorted? A. ORDEREDBY=X B. GROUPBY=X C. SORTEDBY=X D. SORTSYNC=X Answer: C

QUESTION NO: 45 Given the following partial SAS log: NOTE: SQL table SASHELP.CLASS was created line Create table SASHELP.CLASS(bufsize=4096) ( Name char(8); Gender Char(1); Age num; Height num; Weight num ); Which SQL procedure statement generated this output? A. DESCRIBE TABLE B. LIST TABLE C. VALIDATE TABLE D. CREATE TABLE Answer: A

QUESTION NO: 46 "Pass Any Exam. Any Time." - Guaranteed 24

SAS Institute A00-212: Practice Exam The following SAS program is submitted: options mprint; %macro test(parm); proc &parm data = sashelp.prdsale; run; %mend; %test(print) What is the result of the MPRINT options? A. It has no effect in this example B. It writes the original program code inside the marco definition to the SAS log C. It writes macro execution messages to the SAS.log D. It echoes the text sent to the SAS compiler as a result of macro execution in the SAS log Answer: D

QUESTION NO: 47 Given the SAS data set ONE: ONE REP COST SMITH 200 SMITH 400 JONES 100 SMITH 600 JONES 100 The following SAS program is submitted: Proc sql; Select rep, avg(cost) as AVERAGE From one Group by rep <insert SQL procedure clause here> quit; The following output is desired:

Which SQL procedure clause completes the program and generates the desired output? A. having avg(cost) < select avg(cost) from one);

"Pass Any Exam. Any Time." - Guaranteed

25

SAS Institute A00-212: Practice Exam B. Having avg(cost)>(select avg(cost) from one); C. Where avg(cost)>(select avg(cost) from one); D. Where calculated average > (select avg(cost) from one); Answer: B

QUESTION NO: 48 Given the data set SASHELP.CLASS: SASHELP.CLASS NAME AGE Mary 15 Philip 16 Robert 12 Ronald 15 The following SAS program is submitted: %let value = Philip; proc print data = sashelp.class; <insert WHERE statement here> run; Which WHERE statement successfully completes the program and procedures a report? A. Where upcase(name)=%upcase(&value); B. Where upcase(name)="upcase(&value)"; C. Where upcase(name)=upcase(&value); D. Where upcase(name)="%upcase(&value)"; Answer: D

QUESTION NO: 49 The following SAS program is submitted: date temp; length a 1 b 3 x; infile 'file reference'; input a b x; run; What is the result? A. The data set TEMP is created and variable X has a length of 8 B. The data set TEMP is not created because variable A has an invalid length

"Pass Any Exam. Any Time." - Guaranteed

26

SAS Institute A00-212: Practice Exam C. The data set TEMP is not created because variable A and B have invalid lengths D. The data set TEMP is created, but variable X is not created Answer: B

QUESTION NO: 50 The following SAS program is submitted: %macro test(var); %let jobs=BLACKSMITH WORDSMITH SWORDSMITH; %let type=%index(&jobs,&var); %put type=&type; %mend; %test(SMITH); What is the value of the macro variable TYPE when the %PUT statement executes? A. 6 B. null C. 0 D. 3 Answer: A

QUESTION NO: 51 Given the SAS dataset ONE ONE SALARY 200 205 523 The following SAS program is submitted Proc sql; Select * from one <Insert Where expression here>; quit; The following output is desired: SALARY 200 205 523 Which WHERE expression completes the program and generates the desired output? "Pass Any Exam. Any Time." - Guaranteed

27

SAS Institute A00-212: Practice Exam A. Where salary is not B. Where salary ne null C. Where salary is not missing D. Where salary ne missing Answer: C

QUESTION NO: 52 Given the SAS dataset ONE: ONE SALARY 200 205 523 The following SAS program is submitted: Proc sql; Select * from one <insert WHERE expression here>; Quit; The following output is desired: SALARY 200 205 523 Which WHERE expression completes the program and generates the desired output? A. Where salary ne missing B. Where salary ne null C. Where salary is not missing D. Where salary is not Answer: C

QUESTION NO: 53 At the start of a new SAS session; the following program is submitted: %macro one; data _null_; call symput('proc','measn); run; proc &proc data=sashelp.class; run; "Pass Any Exam. Any Time." - Guaranteed

28

SAS Institute A00-212: Practice Exam %mend; %one() What is the result? A. The marco variable PRCO is stored in the SAS catalog WORK.SASMACR B. The program fails to execute because PROC is a reserved word C. The macro variable PROC is stored in the local symbol table D. The macro variable PROC is stored in the global symbol table Answer: D

QUESTION NO: 54 The following SAS program is submitted: %let value=9; %let add=5; %let newval=%eval(&value/&add); What is the value of the macro variable NEWVAL? A. null B. 2 C. 1 D. 1.8 Answer: C

QUESTION NO: 55 Given the non-indexed SAS data set TEMP: TEMP XY P 52 P 45 A 13 A 56 R 34 R 12 R 78 The following SAS program is submitted: Proc print data=temp; <insert By statement here? Run; "Pass Any Exam. Any Time." - Guaranteed 29

SAS Institute A00-212: Practice Exam Which by statement completes the program, create a listing report that is grouped by X and completes without errors? A. X; B. By X groupd; C. By X notsorted; D. By descending X; Answer: C

QUESTION NO: 56 Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library? A. CHANGE statement only B. RENAME statement only C. MODIFY and CHANGE statements D. MODIFY and RENAME statements Answer: A

QUESTION NO: 57 Which of the following is true about the COMPRESS=YES data set option? A. It is most effective with numeric data that represents large numeric values B. It is most effective with character data that contains patterns, rather than simple repetitions C. It uses the Ross Data Compression method to compress numeric data D. It is most effective with character data that contains repeated characters Answer: D

QUESTION NO: 58 The following SAS program is submitted: data new; do i=1,2,3 nextfile=compress('March' || |); infile abc filevar=nextfile end=eof; "Pass Any Exam. Any Time." - Guaranteed 30

SAS Institute A00-212: Practice Exam do until (eof); input dept $sales; end; run; What is the purpose of the FILEVAR=option on the INFILE statement? A. It names the variable NEXTFILE, whose value is output to the SAS data set NEW B. It names the variable NEXTFILE, whose values point to an aggregate storage location C. It names the variable NEXTFILE, whose value is a SAS file reference D. It names the variable NEXTFILE, whose change in value causes in INFILE statement to open a new input file Answer: D

QUESTION NO: 59 The following SAS program is submitted: %micro cols1; name age; %mend; %macro cols2; height weight %mend proc print data=sashelp.class; <insert VAR statement here> run Which VAR statement successfully completes the program and produces a report? A. var heigh %cols1; B. var %cols1 %cols2 height; C. var %cols1 height; D. var %cols2 %cols1; Answer: A

QUESTION NO: 60 The following SAS program is submitted: data new(bufsize = 6144 bufno = 4); set old; run; What is the difference between the usage of BUFFSIZE= and BUFNO= options? "Pass Any Exam. Any Time." - Guaranteed 31

SAS Institute A00-212: Practice Exam A. BUFSIZE=specifies the size of the output buffer in kilobytes; BUFNO=specifies the number of output buffers B. BUFSIZE= specifies the size of the input buffer in bytes; BUFFNO= specifies the number of input buffers C. BUFSIZE= specifies the size of the input buffer in kilobytes; BUFNO=specifies the number of input buffers D. BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output buffers Answer: D

QUESTION NO: 61 The SAS data set ONE contains the variables X,Y,Z and W. The following SAS program is submitted: Proc transpose data =one Out=trans Name=new; By x; var y; run; What are the names of all of the columns created by the TRANSPOSE procedure? A. new, X,Y and _COL1_ B. new, X and COL1 only C. new, Y and COL1 only D. new, X and Y only Answer: B

QUESTION NO: 62 The following SAS program is submitted: data view=sasuser ranch; describe; run; What is the result? A. The program creates a DATA step view called SASUSER.RANCH and places the program code in the current editor window B. The program creates a DATA step view called SASUSER.RANCH and places it in the SAS log "Pass Any Exam. Any Time." - Guaranteed 32

SAS Institute A00-212: Practice Exam C. The program retrieves the SAS source code that creates the view and places it in the output window D. The program retrieves the SAS source code that creates the view and places it in the SAS log Answer: D

QUESTION NO: 63 The following SAS program is submitted: data temp; length a 1 b 3 x; infile 'file reference'; input a b x; run; What is the result? A. The data set TEMP is not created because variables A and B have invalid lengths B. The data set TEMP is not created because variable AS has an invalid length C. The data set TEMP is created, but variable X is not created D. The data set TEMP is created and variable X has a length of 8 Answer: B

QUESTION NO: 64 Which SAS integrity constraint type ensures that a specific set or range of values are the only values in a variable? A. CHECK B. NOT NULL C. PRIMARY KEY D. UNIQUE Answer: A

QUESTION NO: 65 Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set?

"Pass Any Exam. Any Time." - Guaranteed

33

SAS Institute A00-212: Practice Exam A. DATASETS B. REGISTRY C. MODIFY D. FORMAT Answer: A

QUESTION NO: 66 The following SAS program is submitted: %let test=one; %let one=two; %let two=three; %let three=last; %put what displays is &&&&&test; What is the written to the SAS log? A. What displays is three B. What displays is two C. What displays is one D. What displays is last Answer: B

QUESTION NO: 67 The following SAS program is submitted: data temp: array points { 2,3 } (10,15,20,25,30,35); run; What impact does the ARRAY statement have in the program Data vector (PDV)? A. The variables named POINTS10, POINTS15,POINTS20,POINTS25,POINTS30, POINTS35 are created in the PDV B. No variables are created in the PDV C. The variables named POINTS1, POINTS2, POINTS4, POINTS5, POINTS6 are created in the PDV D. The variables named POINTS11, POINTS12, POINTS13, POINTS21, POINTS22, POINTS23 are created in the PDV Answer: C

"Pass Any Exam. Any Time." - Guaranteed

34

SAS Institute A00-212: Practice Exam

QUESTION NO: 68 Which DICTIONARY table provides information on all the tables containing a variable named LASTNAME? A. DICTIONARY.COLUMNS B. DICTIONARY.VARIABLES C. DICTIONARY.MEMBERS D. DICTIONARY.TABLES Answer: A

QUESTION NO: 69 What is generated as a result of submitting the RANUNI function with a seed of 123? A. A missing value because 123 is an invalid argument for the RANUNI function B. A different sequence of random numbers with each program execution C. A random number between 0 and 123 D. A consistent sequence of random numbers with each program execution Answer: D

QUESTION NO: 70 What is an advantage of using a hash object in a SAS DATA step? A. The hash object persists after the DATA step has executed B. The hash object key values can be multiple numeric and character data values C. The hash object automatically sorts the data D. The hash object does not require unique keys Answer: B

QUESTION NO: 71 The following SAS program is submitted: %macro one (input); %two %put the value is &date; "Pass Any Exam. Any Time." - Guaranteed 35

SAS Institute A00-212: Practice Exam %mend; %macro two; data _null_; call symput('date','12SEP2008'); run %mend; %let date=31DEC2006; %one(&date) What is the result when the %PUT statement executes? A. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro B. A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table C. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table D. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro Answer: C

QUESTION NO: 72 Which of the following statement(s) in the DATASETS procedure alters the name of a SAS data set stored in a SAS data library? A. RENAME statement only B. CHANGE statement only C. MODIFY and RENAME statements D. MODIFY and CHANGE statements Answer: B

QUESTION NO: 73 The following SAS program is submitted: <insert statement here>; %let development = ontime; proc print data = sasuser.highway; title "For &dept"; title2 "This project was completed &development"; run; "Pass Any Exam. Any Time." - Guaranteed 36

SAS Institute A00-212: Practice Exam Which one of the following statements completes the above and resolves title1 to "For research&development"? A. %let dept = %str(research&development); B. %let dept = %str(research%&development); C. %let dept = %nrstr(research&development); D. %let dept = %nrstr(research%&development); Answer: C

QUESTION NO: 74 Which one of the following options controls the pagesize of a SAS data set? A. SIZE= B. BUFNO= C. BUFSIZE= D. PAGESIZE= Answer: C

QUESTION NO: 75 Given the following SAS data set ONE: ONE REP COST SMITH 200 SMITH 400 JONES 100 SMITH 600 JONES 100 JONES 200 JONES 400 SMITH 800 JONES 100 JONES 300 The following SAS program is submitted: proc sql; select rep, avg(cost) as AVERAGE from one group by rep having avg(cost) > (select avg(cost) from one); "Pass Any Exam. Any Time." - Guaranteed 37

SAS Institute A00-212: Practice Exam quit; Which one of the following reports is generated? A. REP AVERAGE JONES 200 B. REP AVERAGE JONES 320 C. REP AVERAGE SMITH 320 D. REP AVERAGE SMITH 500 Answer: D

QUESTION NO: 76 The following SAS program is submitted: proc sort data = sales tagsort; by month year; run; Which of the following resource(s) is the TAGSORT option reducing? A. I/O usage only B. CPU usage only C. I/O and CPU usage D. temporary disk usage Answer: D

QUESTION NO: 77 The following SAS program is submitted: data one; do i = 1 to 10; ptobs = ceil(ranuni(0) * totobs); set temp point = ptobs nobs = totobs; output; end; stop; run; The SAS data set TEMP contains 2,500,000 observations. Which one of the following "Pass Any Exam. Any Time." - Guaranteed 38

SAS Institute A00-212: Practice Exam represents the possible values for PTOBS? A. any integer between 1 and 10 B. any real number between 0 and 1 C. any integer between 1 and 2,500,000 D. any real number between 1 and 2,500,000 Answer: C

QUESTION NO: 78 Which one of the following programs contains a syntax error? A. proc sql; select product.*, cost.unitcost, sales.quantity from product p, cost c, sales s where p.item = c.item and p.item = s.item; quit; B. proc sql; select product.*, cost.unitcost, sales.quantity from product, cost, sales where product.item = cost.item and product.item = sales.item; quit; C. proc sql; select p.*, c.unitcost, s.quantity from product as p, cost as c, sales as s where p.item = c.item and p.item = s.item; quit; D. proc sql; select p.*, c.unitcost, s.quantity from product, cost, sales where product.item = cost.item and product.item = sales.item; quit; Answer: D

QUESTION NO: 79 "Pass Any Exam. Any Time." - Guaranteed 39

SAS Institute A00-212: Practice Exam The following SAS code is submitted: %macro houses(dsn = houses,sub = RANCH); data &dsn; set sasuser.houses; if style = "-"; 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

QUESTION NO: 80 Given the following SAS data sets ONE and TWO: ONE TWO NUM COUNTRY NUM CITY 1 CANADA 3 BERLIN 2 FRANCE 5 TOKYO 3 GERMANY 4 BELGIUM 5 JAPAN The following SAS program is submitted: proc sql; select country from one where not exists (select * from two where one.num = two.num); quit; Which one of the following reports is generated? A. COUNTRY GERMANY JAPAN "Pass Any Exam. Any Time." - Guaranteed 40

SAS Institute A00-212: Practice Exam B. COUNTRY FRANCE BELGIUM C. COUNTRY CANADA FRANCE BELGIUM D. COUNTRY CANADA FRANCE GERMANY Answer: C

QUESTION NO: 81 Which one of the following statements is true? A. The WHERE statement can be executed conditionally as part of an IF statement. B. The WHERE statement selects observations before they are brought into the PDV. C. The subsetting IF statement works on observations before they are read into the PDV. D. The WHERE and subsetting IF statements can be used interchangeably in all SAS programs. Answer: B

QUESTION NO: 82 The variable attributes of SAS data sets ONE and TWO are shown below: ONE TWO # Variable Type Len Pos # Variable Type Len Pos 2 sales Num 8 8 2 budget Num 8 8 1 year Num 8 0 3 sales Char 8 16 1 year Num 8 0 Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR. The following SAS program is submitted: data three; merge one two; by year; run; "Pass Any Exam. Any Time." - Guaranteed

41

SAS Institute A00-212: Practice Exam Which one of the following is the result of the program execution? A. No messages are written to the SAS log. B. ERROR and WARNING messages are written to the SAS log. C. Data set THREE is created with two variables and 50 observations. D. Data set THREE is created with three variables and 100 observations. Answer: B

QUESTION NO: 83 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); Answer: C

QUESTION NO: 84 The following SAS program is submitted: data new (bufsize = 6144 bufno = 4); set old; run; Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options? A. BUFSIZE= specifies the size of the input buffer in bytes; BUFNO= specifies the number of input buffers. B. BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output buffers. C. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of input buffers. D. BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of output buffers.

"Pass Any Exam. Any Time." - Guaranteed

42

SAS Institute A00-212: Practice Exam Answer: B

QUESTION NO: 85 Consider the following SAS log: 229 data sasuser.ranch sasuser.condo / view = sasuser.ranch; 230 set sasuser.houses; 231 if style = 'RANCH' then output sasuser.ranch; 232 else if style = 'CONDO' then output sasuser.condo; 233 run; NOTE: DATA STEP view saved on file SASUSER.RANCH. NOTE: A stored DATA STEP view cannot run under a different operating system. 234 235 proc print data = sasuser.condo; ERROR: File SASUSER.CONDO.DATA does not exist. 236 run; NOTE: The SAS System stopped processing this step because of errors. Which one of the following explains why the PRINT procedure fails? A. SASUSER.CONDO is a stored DATA step program. B. A SAS data file and SAS data view cannot be created in the same DATA step. C. A second VIEW=SASUSER.CONDO option was omitted on the DATA statement. D. The view SASUSER.RANCH must be processed before SASUSER.CONDO is created. Answer: D

QUESTION NO: 86 Which one of the following is an advantage of creating and using a SAS DATA step view? A. It can store an index. B. It always accesses the most current data. C. It works quickly through multiple passes of the data. D. It is useful when the underlying data file structure changes. Answer: B

QUESTION NO: 87 "Pass Any Exam. Any Time." - Guaranteed 43

SAS Institute A00-212: Practice Exam Given the following SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR SALES 2001 3 500 2001 4 300 2001 4 400 2002 1 600 2002 1 700 The following SAS program is submitted: proc sql; select one.*, sales from one, two; quit; Which one of the following reports is generated? A. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 B. YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600 C. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 300 2001 3 500 600 2001 4 400 600 2002 1 700 600 Answer: D

QUESTION NO: 88 Given the following SAS data set ONE: ONE NUM VAR 1A 2B 3C "Pass Any Exam. Any Time." - Guaranteed 44

SAS Institute A00-212: Practice Exam Which one of the following SQL programs deletes the SAS data set ONE? A. proc sql; delete table one; quit; B. proc sql; alter table one drop num, var; quit; C. proc sql; drop table one; quit; D. proc sql; delete from one; quit; Answer: C

QUESTION NO: 89 Given the following SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR SALES 2001 3 500 2001 4 300 2001 4 400 2002 1 600 ] 2002 1 700 The following SAS program is submitted: proc sql; select one.*, sales from one, two where one.year = two.year; quit; Which one of the following reports is generated? A. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 B. YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600

"Pass Any Exam. Any Time." - Guaranteed

45

SAS Institute A00-212: Practice Exam C. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 300 2001 3 500 600 2001 4 400 600 2002 1 700 600 Answer: C

QUESTION NO: 90 The SAS data set TEMP has the following distribution of values for variable A: A Frequency 1 500,000 2 500,000 6 7,000,000 8 3,000 Which one of the following SAS programs requires the least CPU time to be processed? A. data new; set temp; if a = 8 then b = 'Small '; else if a in(1, 2) then b = 'Medium'; else if a = 6 then b = 'Large'; run; B. data new; set temp; if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small'; else if a = 6 then b = 'Large'; run; "Pass Any Exam. Any Time." - Guaranteed 46

SAS Institute A00-212: Practice Exam C. data new; set temp; if a = 6 then b = 'Large '; else if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small'; D. data new; set temp; if a = 6 then b = 'Large '; if a in (1, 2) then b = 'Small'; run; Answer: C

QUESTION NO: 91 The following SAS program is submitted: %let value = 9; %let value2 = 5; %let newval = %eval(&value / &value2); Which one of the following is the resulting value of the macro variable NEWVAL? A. 1 B. 2 C. 1.8 D. null Answer: A

QUESTION NO: 92 The following SAS program is submitted: %let lib = %upcase(sasuser); proc sql; select nvar from dictionary.tables where libname = "&lib"; quit; "Pass Any Exam. Any Time." - Guaranteed

47

SAS Institute A00-212: Practice Exam Given that several SAS data sets exist in the SASUSER library, which one of the following is generated as output? A. no result set B. a syntax error in the log C. a report showing the names of each table in SASUSER D. a report showing the number of columns in each table in SASUSER Answer: D

QUESTION NO: 93 Given the following SAS data set ONE: ONE GROUP SUM A 765 B 123 C 564 The following SAS program is submitted: data _null_; set one; call symput(group,sum); run; Which one of the following is the result when the program finishes execution? A. Macro variable C has a value of 564. B. Macro variable C has a value of 1452. C. Macro variable GROUP has a value of 564. D. Macro variable GROUP has a value of 1452. Answer: A

QUESTION NO: 94 The SAS data set ONE consists of five million observations and has 25 variables. Which one of the following SAS programs successfully creates three new variables TOTREV, TOTCOST, and PROFIT and requires the least CPU time to be processed? A. data two; set one; totrev = sum(price * quantity); totcost = sum(fixed,variable); "Pass Any Exam. Any Time." - Guaranteed 48

SAS Institute A00-212: Practice Exam profit = sum(totrev,otcost); if totrev > 1000; run; B. data two; set one; totrev = sum(price * quantity); if totrev > 1000; totcost = sum(fixed,variable); profit = sum(totrev,otcost); run; C. data two; set one; totrev = sum(price * quantity); where totrev > 1000; totcost = sum(fixed,variable); profit = sum(totrev,otcost); run; D. data two; set one; where totrev > 1000; totrev = sum(price * quantity); totcost = sum(fixed,variable); profit = sum(totrev,otcost); run; Answer: B

QUESTION NO: 95 Given the following SAS data set ONE: ONE COUNTRY CITY VISIT USA BOSTON 10 UK LONDON 5 USA DALLAS 10 UK MARLOW 10 USA BOSTON 20 UK LONDON 15 USA DALLAS 10 The following SAS program is submitted: proc sql; select country, city, sum(visit) as TOTAL "Pass Any Exam. Any Time." - Guaranteed 49

SAS Institute A00-212: Practice Exam from one group by country, city order by country, total desc; quit; Which one of the following reports is generated? A. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA BOSTON 50 USA DALLAS 20 B. COUNTRY CITY TOTAL UK LONDON 20 UK MARLOW 10 USA BOSTON 50 USA DALLAS 20 C. COUNTRY CITY TOTAL USA BOSTON 50 D. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA DALLAS 20 USA BOSTON 50 Answer: B

QUESTION NO: 96 Given the following SAS data sets ONE and TWO: ONE TWO NUM CHAR1 NUM CHAR2 1A2X 2B3Y 4D5V The following SAS program is submitted creating the output table THREE: data three; set one two; run; THREE NUM CHAR1 CHAR2 1A 2B "Pass Any Exam. Any Time." - Guaranteed 50

SAS Institute A00-212: Practice Exam 4D 2X 3Y 5V Which one of the following SQL programs creates an equivalent SAS data set THREE? A. proc sql; create table three as select * from one outer union corr select * from two; quit; B. proc sql; create table three as select * from one outer union select * from two; quit; C. proc sql; create table three as select * from one outer union select * quit; D. proc sql; create table three as select * from one union corr select * from two; quit; Answer: A

QUESTION NO: 97 "Pass Any Exam. Any Time." - Guaranteed 51

SAS Institute A00-212: Practice Exam Which one of the following automatic SAS macro variables contains the return code from a previously executed step? A. &RC B. &ERR C. &SYSRC D. &SYSERR Answer: D

QUESTION NO: 98 The SAS data set ONE has a variable X on which an index has been created. The data sets ONE and THREE are sorted by X. Which one of the following SAS programs uses the index to select observations from the data set ONE? A. data two; set three; set one key = X; run; B. data two; set three key = X; set one; run; C. data two; set one; set three key = X; run; D. data two; set three; set one (key = X); run; Answer: A

QUESTION NO: 99 Given the following SAS data set ONE: ONE REP AREA COST SMITH NORTH 100 "Pass Any Exam. Any Time." - Guaranteed 52

SAS Institute A00-212: Practice Exam SMITH SOUTH 200 JONES EAST 100 SMITH NORTH 300 JONES WEST 100 JONES NORTH 200 JONES NORTH 400 SMITH NORTH 400 JONES WEST 100 JONES WEST 300 The following SAS program is submitted: proc sql; select rep, area, count(*) as TOTAL from one group by rep, area; quit; Which one of the following reports is generated? A. REP AREA COUNT JONES EAST 100 JONES NORTH 600 JONES WEST 500 SMITH NORTH 800 SMITH SOUTH 200 B. REP AREA TOTAL JONES EAST 100 JONES NORTH 600 JONES WEST 500 SMITH NORTH 800 SMITH SOUTH 200 C. REP AREA TOTAL JONES EAST 1 JONES NORTH 2 JONES WEST 3 SMITH NORTH 3 JONES WEST 3 SMITH NORTH 3 SMITH SOUTH 1 D. REP AREA TOTAL JONES EAST 1 JONES NORTH 2 JONES WEST 3 SMITH NORTH 3 SMITH SOUTH 1 "Pass Any Exam. Any Time." - Guaranteed

53

SAS Institute A00-212: Practice Exam SMITH NORTH 3 SMITH SOUTH 1 Answer: C,D

QUESTION NO: 100 Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS data set? A. MODIFY B. FORMAT C. CONTENTS D. DATASETS Answer: D

QUESTION NO: 101 Given the following SAS data set SASUSER.HIGHWAY: SASUSER.HIGHWAY STEERING SEATBELT SPEED STATUS COUNT absent no 0-29 serious 31 absent no 0-29 not 1419 absent no 30-49 serious 191 absent no 30-49 not 2004 absent no 50+ serious 216 The following SAS program is submitted: %macro highway; proc sql noprint; select count(distinct status) into :numgrp from sasuser.highway; %let numgrp = &numgrp; select distinct status into :group1-:group&numgrp from sasuser.highway; quit; %do i = 1 %to &numgrp; proc print data = sasuser.highway; where status = "&&group&i" ; run; "Pass Any Exam. Any Time." - Guaranteed

54

SAS Institute A00-212: Practice Exam %end; %mend; %highway How many reports are produced by the above program? A. 0 B. 1 C. 2 D. 5 Answer: C

QUESTION NO: 102 Text is sent to the SAS compiler as a result of macro execution. Which one of the following SAS system options writes that text to the log? A. MPRINT B. MLOGIC C. MSOURCE D. SOURCE2 Answer: A

QUESTION NO: 103 Given the following SAS data set ONE: ONE CATEGORY AGE SALARY BONUS ---M 28 200 . M 25 100 10 F 18 100 50 F 25 200 10 The following SAS program is submitted: proc sql; create table two as select category, salary + bonus as EARNINGS from one; quit; Which one of the following represents the data values stored in the data set TWO?

"Pass Any Exam. Any Time." - Guaranteed

55

SAS Institute A00-212: Practice Exam A. CATEGORY EARNINGS M 200 M 110 F 150 F 210 B. CATEGORY EARNINGS M. M 110 F 150 F 210 C. CATEGORY SALARY BONUS EARNINGS M 200 . 200 M 100 10 110 F 100 50 150 F 200 10 210 D. CATEGORY SALARY BONUS EARNINGS M 200 . . M 100 10 110 M 200 . 200 M 100 10 110 F 100 50 150 F 200 10 210 Answer: B

QUESTION NO: 104 Which one of the following SAS SORT procedure options eliminates identical consecutive observations? A. NODUP B. UNIQUE C. DISTINCT D. NODUPKEY Answer: A

QUESTION NO: 105 The following SAS program is submitted: data temp; array points{3,2}_temporary_ (10,20,30,40,50,60); "Pass Any Exam. Any Time." - Guaranteed

56

SAS Institute A00-212: Practice Exam score = points{2,1} run; Which one of the following is the value of the variable SCORE in the data set TEMP? A. 10 B. 20 C. 30 D. 40 Answer: C

QUESTION NO: 106 The following SAS FORMAT procedure is submitted: proc format lib = sasuser; value tempc low < 0 = 'BELOW FREEZING' 0 < 5 = 'COLD' 5 < 10 = 'MILD' 10 < 15 = 'WARM' 15 high = 'HOT'; run; How is the value 10 displayed when the format TEMPC is applied? A. 10 B. MILD C. WARM D. BELOW FREEZING Answer: C

QUESTION NO: 107 Which one of the following SAS programs uses the most amount of memory resources for output buffers? A. data new(bufsize = 1000 bufno = 5); set temp; run; B. data new(bufsize = 1000 bufno = 2); set temp; run;

"Pass Any Exam. Any Time." - Guaranteed

57

SAS Institute A00-212: Practice Exam C. data new(bufsize = 2000 bufno = 3); set temp; run; D. data new(bufsize = 4000 bufno = 1); set temp; run; Answer: C

QUESTION NO: 108 Given the following SAS data sets ONE and TWO: ONE TWO NUM CHAR1 NUM CHAR2 1 A1 2 X1 1 A2 2 X2 2 B1 3 Y 2 B2 5 V 4D The following SAS program is submitted creating the output table THREE: proc sql; create table three as select one.num, char1, char2 from one, two where one.num = two.num; quit; THREE NUM CHAR1 CHAR2 2 B1 X1 2 B1 X2 2 B2 X1 2 B2 X2 Which one of the following DATA step programs creates an equivalent SAS data set THREE? A. data three; merge one two; by num; run; B. data three; set one; "Pass Any Exam. Any Time." - Guaranteed 58

SAS Institute A00-212: Practice Exam set two; by num; run; merge one two; by num; run; C. data three; set one; set two; by num; run; by num; run; D. data three; set one; do i = 1 to numobs; set two(rename = (num = num2)) point = i nobs = numobs; if num2 = num then output; end; drop num2; run; Answer: D

QUESTION NO: 109 The following SAS program is submitted: %macro execute; <insert statement here> proc print data = sasuser.houses; run; %end; %mend; Which of the following completes the above program so that it executes on Tuesday? A. %if &sysday = Tuesday %then %do; B. %if &sysday = 'Tuesday' %then %do; C. %if "&sysday" = Tuesday %then %do; D. %if '&sysday' = 'Tuesday' %then %do;

"Pass Any Exam. Any Time." - Guaranteed

59

SAS Institute A00-212: Practice Exam Answer: A

QUESTION NO: 110 Which one of the following statements is true regarding a SAS DATA step view? A. It allows write capabilities. B. It contains global statements. C. It contains data and a descriptor portion. D. It contains a partially compiled DATA step. Answer: D

QUESTION NO: 111 Given the following SAS data sets ONE and TWO: ONE TWO OBS COMMON X OBS COMMON Y 1 A 10 1 A 1 2 A 13 2 A 3 3 A 14 3 B 4 4B94B2 5C85C5 6 C 14 The following SAS DATA step is submitted: data combine; merge one two; by common; run; Which one of the following represents the data values stored in data set COMBINE? A. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 A 14 3 4B94 5B92 6C85 7 C 14 5 B. OBS COMMON X Y 1 A 10 1 2 A 13 3 "Pass Any Exam. Any Time." - Guaranteed

60

SAS Institute A00-212: Practice Exam 3B94 4C85 C. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 B 14 4 4B92 5C85 D. OBS COMMON X Y 1 A 10 1 2 A 13 1 3 A 14 1 4 A 10 3 5 A 13 3 6 A 14 3 7B94 8B92 9C85 10 C 14 5 Answer: A

QUESTION NO: 112 Assume today is Tuesday, July 23, 2002. Which one of the following statements submitted at the beginning of a SAS session assigns the value Tuesday, July 23, 2002 to the macro variable START? A. %let start = today(),weekdate.; B. %let start = today(),format=weekdate.; C. %let start = %sysfunc(today(),weekdate.); D. %let start = %sysfunc(%today(),weekdate.); Answer: C

QUESTION NO: 113 The following SAS program is submitted: %macro test(var); %let jobs = BLACKSMITH WORDSMITH SWORDSMITH; %let type = %index(&jobs,&var); %mend; "Pass Any Exam. Any Time." - Guaranteed

61

SAS Institute A00-212: Practice Exam %test(SMITH) Which one of the following is the resulting value of the macro variable TYPE? A. 0 B. 3 C. 6 D. null Answer: C

QUESTION NO: 114 Which one of the following SAS integrity constraint types ensures that a specific set or range of values are the only values in a variable? A. CHECK B. UNIQUE C. FORMAT D. DISTINCT Answer: A

QUESTION NO: 115 Which one of the following options displays the value of a macro variable in the SAS log? A. MACRO B. SOURCE C. SOURCE2 D. SYMBOLGEN Answer: D

QUESTION NO: 116 The following SAS ARRAY statement is submitted: array score{*} a4 - a10, a25 ; Which one of the following is the maximum number of elements stored? A. 3

"Pass Any Exam. Any Time." - Guaranteed

62

SAS Institute A00-212: Practice Exam B. 7 C. 8 D. 11 Answer: C

QUESTION NO: 117 When is it appropriate to create indexes on a SAS data set for efficient processing? A. if small subsets of data are often retrieved B. if the key variable has very few unique values C. if the data are often used for BY group processing D. if the SAS data set file page count is less than three pages Answer: A

QUESTION NO: 118 The following SAS program is submitted: options yearcutoff = 1950; %macro y2kopt(date); %if &date >= 14610 %then %do; options yearcutoff = 2000; %end; %else %do; options yearcutoff = 1900; %end; %mend; data _null_ ; date = "01jan2000"d; call symput("date",left(date)); run; %y2kopt(&date) The SAS date for January 1, 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920 prior to submitting the above program. Which one of the following is the value of YEARCUTOFF when the macro finishes execution? A. 1900 B. 1920

"Pass Any Exam. Any Time." - Guaranteed

63

SAS Institute A00-212: Practice Exam C. 1950 D. 2000 Answer: D

QUESTION NO: 119 Which one of the following is the purpose of the REUSE= YES option in a compressed SAS data set? A. It temporarily compresses observations in a SAS data set. B. It allows users to update the same SAS data set concurrently. C. It allows new observations to be inserted wherever enough free space exists. D. It specifies that a new empty data set with a given name replaces an existing data set with the same name. Answer: C

QUESTION NO: 120 Given the following SAS data set ONE: ONE LEVEL AGE 1 10 2 20 3 20 2 10 1 10 2 30 3 10 2 20 3 30 1 10 The following SAS program is submitted: proc sql; select level, max(age) as MAX from one group by level having max(age) > (select avg(age) from one); quit; Which one of the following reports is generated? "Pass Any Exam. Any Time." - Guaranteed 64

SAS Institute A00-212: Practice Exam A. LEVEL AGE 2 20 3 20 B. LEVEL AGE 2 30 3 30 C. LEVEL MAX 2 20 3 30 D. LEVEL MAX 2 30 3 30 Answer: D

QUESTION NO: 121 Which one of the following is true regarding the KEEP statement? A. The KEEP statement is available in both the DATA and the PROC steps. B. The KEEP statement selects the variables read from the input data set(s). C. The KEEP statement applies to all data sets created within the same DATA step. D. The KEEP statement applies only to the first data set created within the same DATA step if more than one data set is created. Answer: C

QUESTION NO: 122 Which one of the following displays the definition of a stored SQL procedure view in the SAS log? A. ECHOVIEW option B. EXPANDVIEW option C. VALIDATE VIEW statement D. DESCRIBE VIEW statement Answer: D

QUESTION NO: 123

"Pass Any Exam. Any Time." - Guaranteed

65

SAS Institute A00-212: Practice Exam The following SAS program is submitted: data temp; array points{2,3}_temporary_; run; Which one of the following is the maximum number of elements that are stored? A. 2 B. 3 C. 5 D. 6 Answer: D

QUESTION NO: 124 Which one of the following is the purpose of the IDXNAME= data set option? A. It instructs SAS to name and store a specific index. B. It instructs SAS to store an index in a particular location. C. It instructs SAS to use a specific index for WHERE processing. D. It instructs SAS to use any available index for WHERE processing. Answer: C

QUESTION NO: 125 The DICTIONARY.MACROS table stores information about which of the following? A. user defined macro variables only B. system defined macro variables only C. both user and system defined macro variables D. macros stored in the autocall macro library only Answer: C

QUESTION NO: 126 Given the following SAS data set named WORK.INTERNAT: WORK.INTERNAT LOCATION SUM USA 30 EUR 40 "Pass Any Exam. Any Time." - Guaranteed 66

SAS Institute A00-212: Practice Exam The following SAS program is submitted: %let LOC = Usa; proc sql; select * from internat where location = "&Loc"; quit; Which one of the following is the result when the above code is executed on the above data set? A. A report is generated with one destination. B. No report is generated as the case of the compared values is different. C. No report is generated as the case of the macro variable name is different. D. A report is generated with the two original observations as the where clause does not work. Answer: B

QUESTION NO: 127 The following SAS program is submitted: %let a = cat; %macro animal(a = frog); %let a = bird; %mend; %animal(a = pig) %put a is &a; Which one of the following is written to the SAS log? A. a is &a B. a is cat C. a is pig D. a is bird Answer: B

QUESTION NO: 128 The following SAS program is submitted: proc sql; select * from dictionary.tables; "Pass Any Exam. Any Time." - Guaranteed 67

SAS Institute A00-212: Practice Exam quit; Which one of the following is reported? A. metadata on all tables in all libraries B. metadata on all tables in the WORK library only C. metadata on all tables in the SASUSER library only D. metadata on all tables in the DICTIONARY library only Answer: A

QUESTION NO: 129 The following SAS program is submitted: data two; y = '2'; run; %let x = 10; %let var = y; data one; set two (keep = &var); z = &var * &x; run; Which one of the following is the value of the variable Z when the program finishes execution? A. _ERROR_ B. 20 (as a numeric) C. 20 (as a character) D. . (missing numeric) Answer: B

QUESTION NO: 130 Which one of the following options is available for SAS macro debugging? A. MLOGIC B. MDEBUG C. MSGLEVEL D. MAUTOSOURCE Answer: A "Pass Any Exam. Any Time." - Guaranteed 68

SAS Institute A00-212: Practice Exam

QUESTION NO: 131 The following SAS program is submitted: %let first = yourname; %let last = first; %put &&&last; Which one of the following is the result in the log of the %PUT statement? A. first B. &first C. yourname D. &yourname Answer: C

QUESTION NO: 132 Given the following SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR SALES 2001 3 500 2001 4 300 2001 4 400 2002 1 600 2002 1 700 The following SAS program is submitted: proc sql; select one.*, sales from one left join two on one.year = two.year; quit; Which one of the following reports is generated? A. YEAR QTR BUDGET SALES 2001 3 500 . B. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 C. YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600 "Pass Any Exam. Any Time." - Guaranteed 69

SAS Institute A00-212: Practice Exam D. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 Answer: D

QUESTION NO: 133 Given the following SAS data sets ONE and TWO: ONE TWO YEAR QTR BUDGET YEAR QTR SALES 2001 3 500 2001 4 300 2001 4 400 2002 1 600 2002 1 700 The following SAS program is submitted: proc sql; select one.*, sales from one, two; quit; Which one of the following reports is generated? A. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 B. YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600 C. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 300 2001 3 500 600 2001 4 400 600 2002 1 700 600

"Pass Any Exam. Any Time." - Guaranteed

70

SAS Institute A00-212: Practice Exam Answer: D

QUESTION NO: 134 Given the following SAS program: proc sql; select product, type, sum(sales) as revenue from one group by product, type; quit; Which one of the following clauses should be added to the program to sort the output by PRODUCT and decreasing REVENUE? A. order by 1, 3 B. order by 1, 3 desc C. orderby product, revenue desc D. order by product, desc revenue Answer: B

QUESTION NO: 135 The following SAS program is submitted: %macro test(var); proc print data = sasuser.class; where age > &var; run; %mend; Which type of parameter is the macro variable VAR? A. default B. keyword C. positional D. command Answer: C

QUESTION NO: 136 The following SAS program is submitted: proc datasets lib = testdata; "Pass Any Exam. Any Time." - Guaranteed 71

SAS Institute A00-212: Practice Exam modify one; label num = 'Number'; format num 4.; quit; Which one of the following SQL programs produces the same results as the above DATASETS procedure? A. proc sql; modify table testdata.one num format = 4. label = 'Number'; quit; B. proc sql; alter table testdata.one modify num format = 4. label = 'Number'; quit; C. proc sql; modify table testdata.one alter num format = 4. label = 'Number'; quit; D. proc sql; alter table testdata.one modify num (format = 4. label = 'Number'); quit; Answer: B

QUESTION NO: 137 Which one of the following techniques concatenates data in SAS? A. the APPEND procedure B. the DATA step with a MERGE statement C. the DATA step with a COMBINE statement D. the INTERSECT operator in the SQL procedure Answer: A

"Pass Any Exam. Any Time." - Guaranteed

72

SAS Institute A00-212: Practice Exam QUESTION NO: 138 In which one of the following SAS programs is the SAS data set index named CHAR1 always used? A. data three; set one; set two key = char1; run; B. data three; set one; if char1 in ('new york' 'los angeles'); run; C. data three; set one; where char1 in ('new york' 'los angeles'); run; D. proc sql; create table three as select * from one, two where one.char1 > two.char1; quit; Answer: A

QUESTION NO: 139 Given the following SAS data set ONE: ONE CATEGORY AGE SALARY BONUS M 28 200 20 M 25 100 10 M 28 300 10 M 33 300 30 F 18 100 50 F 25 200 10 F 35 400 50 The following SQL program is submitted: proc sql; create table two as select distinct age "Pass Any Exam. Any Time." - Guaranteed 73

SAS Institute A00-212: Practice Exam from one where age < 33; quit; How many rows are written to the SAS data set TWO? A. 3 B. 4 C. 5 D. 6 Answer: A

QUESTION NO: 140 Which one of the following should be avoided when creating and using an SQL procedure view? A. using a HAVING clause B. using summary functions C. referencing a view multiple times in the same program D. creating views on tables whose structures remain constant Answer: C

QUESTION NO: 141 The following SAS program is submitted. filename sales ('external-file1' 'external-file2'); data new; infile sales; input date date9. company $ revenue; run; Which one of the following is the result of including the FILENAME statement in this program? A. The FILENAME statement produces an ERROR message in the SAS log. B. The FILENAME statement associates SALES with external-file2 followed by external-file1. C. The FILENAME statement associates SALES with external-file1 followed by external-file2. D. The FILENAME statement reads record 1 from external-file 1, reads record 1 from external-file 2, and combines them into one record. "Pass Any Exam. Any Time." - Guaranteed 74

SAS Institute A00-212: Practice Exam Answer: C

QUESTION NO: 142 The SAS data set ONE contains the variables X, Y, Z, and W. The following SAS program is submitted: proc transpose data = one out = trans name = new; by x; var y; run; Which one of the following contains all the names of the columns created by the TRANSPOSE procedure? A. X, Y, Z, and W B. _NAME_, X, and Y C. new, X, and COL1 D. new, X, Y, and _COL1_ Answer: C

QUESTION NO: 143 Given the following SAS data set ONE: ONE JOB LEVEL SALARY ACC 2 300 SEC 1 100 SEC 2 200 MGR 3 700 ACC 1 . ACC 3 . MGR 2 400 The following SAS data set TWO is created: TWO JOB LEVEL BONUS ACC 2 30 MGR 3 70 MGR 2 40 Which one of the following SAS programs creates data set TWO? "Pass Any Exam. Any Time." - Guaranteed 75

SAS Institute A00-212: Practice Exam A. proc sql; create table two as select job, level, salary * 0.1 as bonus from one where bonus > 20; quit; B. proc sql; create table two as select job, level, salary * 0.1 as bonus from one where salary > 20; quit; C. proc sql; create table two as select job, level, salary * 0.1 as bonus from one where calculated salary * 0.1 > 20; quit; D. proc sql;D.proc sql; create table two as select job, level, salary * 0.1 as bonus from one where calculated bonus > 20; quit; Answer: D

QUESTION NO: 144 Given the following SAS data set ONE: ONE CATEGORY AGE SALARY BONUS M 28 200 20 M 25 100 10 M 28 300 10 M 33 300 30 F 18 100 50 F 25 200 10 F 35 400 50 The following SAS program is submitted: proc sql; select distinct category, "Pass Any Exam. Any Time." - Guaranteed 76

SAS Institute A00-212: Practice Exam sum(sum(salary,bonus)) as EARNINGS from one where age < 30 group by category having calculated EARNINGS < 500; quit; Which one of the following reports will be generated? A. CATEGORY EARNINGS F 360 B. CATEGORY EARNINGS M 640 F 360 C. CATEGORY EARNINGS F 150 F 210 D. CATEGORY EARNINGS M 220 M 110 M 310 F 150 F 210 Answer: A

QUESTION NO: 145 The following are values of the variable STYLE from the SAS data set SASUSER.HOUSES: SASUSERS.HOUSES OBS STYLE 1 RANCH 2 SPLIT 3 CONDO 4 TWOSTORY 5 RANCH 6 SPLIT 7 SPLIT The following SAS program is submitted: proc sql noprint; select distinct style into :styles separated by ' ' "Pass Any Exam. Any Time." - Guaranteed 77

SAS Institute A00-212: Practice Exam from sasuser.houses order by style; quit; Which one of the following is the value of the resulting macro variable? A. CONDO RANCH SPLIT TWOSTORY B. RANCH SPLIT CONDO TWOSTORY C. CONDO RANCH RANCH SPLIT SPLIT SPLIT TWOSTORY D. RANCH SPLIT CONDO TWOSTORY RANCH SPLIT SPLIT Answer: A

QUESTION NO: 146 The following SAS program is submitted: %let value = .5; %let add = 5; %let newval = %eval(&value + &add); Which one of the following is the resulting value of the macro variable NEWVAL? A. 5 B. 5.5 C. .5 + 5 D. null Answer: D

QUESTION NO: 147 Which one of the following statements about compressed SAS data sets is always true? A. Each observation is treated as a single string of bytes. B. Each observation occupies the same number of bytes. C. An updated observation is stored in its original location. D. New observations are added to the end of the SAS data set. Answer: A

QUESTION NO: 148 Given the following SAS data set ONE: ONE "Pass Any Exam. Any Time." - Guaranteed 78

SAS Institute A00-212: Practice Exam DIVISION SALES A 1234 A 3654 B 5678 The following SAS program is submitted: data _null_; set one; by division; if first.division then call symput('mfirst',sales); if last.division then call symput('mlast',sales); run; Which one of the following is the value of the macro variable MFIRST when the above program finishes execution? A. null B. 1234 C. 3654 D. 5678 Answer: D

QUESTION NO: 149 The following SAS program is submitted: proc contents data = testdata.one; run; Which one of the following SQL statements produces similar information about the column attributes as the above CONTENTS procedure? A. proc sql; show testdata.one; quit; B. proc sql; describe testdata.one; quit; C. proc sql; show table testdata.one; quit; D. proc sql; describe table testdata.one; "Pass Any Exam. Any Time." - Guaranteed 79

SAS Institute A00-212: Practice Exam quit; Answer: D

QUESTION NO: 150 Which one of the following SAS programs displays the descriptor portion of each data set stored in the SASUSER library? A. proc datasets lib = sasuser.all; quit; B. proc datasets lib = sasuser._all_; quit; C. proc datasets lib = sasuser; contents data = all; quit; D. proc datasets lib = sasuser; contents data = _all_; quit; Answer: D

QUESTION NO: 151 Given the following SAS data sets ONE and TWO: ONE TWO OBS COMMON X OBS COMMON Y 1 A 10 1 A 1 2 A 13 2 A 3 3 A 14 3 B 4 4B94B2 5C85C5 6 C 14 The following SAS DATA step is submitted: data combine; set one; set two; run; Which one of the following represents the data values stored in data set COMBINE? A. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 A 14 3 4B94 5B92 "Pass Any Exam. Any Time." - Guaranteed 80

SAS Institute A00-212: Practice Exam 6C85 7 C 14 5 B. OBS COMMON X Y 1 A 10 1 2 A 13 3 3B94 4C85 C. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 B 14 4 4B92 5C85 D. OBS COMMON X Y 1 A 10 1 2 A 13 1 3 A 14 1 4 A 10 3 5 A 13 3 6 A 14 3 7B94 8B92 9C85 10 C 14 5 Answer: C

QUESTION NO: 152 The following SAS program is submitted: %let name = Patel's Restaurant; Which one of the following statements avoids problems associated with the unbalanced quotation mark? A. %let name = Patel%'s Restaurant; B. %let name = %str(Patel's Restaurant); C. %let name = Patel%str(')s Restaurant; D. %let name = %str(Patel%'s Restaurant); Answer: D

"Pass Any Exam. Any Time." - Guaranteed

81

SAS Institute A00-212: Practice Exam QUESTION NO: 153 The following SAS program is submitted: %let var = chicago, 1; data a; var = 'new york, 2'; newvar = %scan(&var,2,%str()); run; Which one of the following explains why the program fails to execute? A. The %STR() is invalid syntax. B. The %SCAN function does not exist. C. The %SCAN function has too many arguments. D. The macro variable VAR does not get created properly. Answer: C

"Pass Any Exam. Any Time." - Guaranteed

82

S-ar putea să vă placă și