You are on page 1of 81

SAS Institute

EXAM A00-212
SAS Advanced Programming Exam for SAS 9

Total Questions:

153

Question: 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: 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

Answer: C

Question: 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: 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: 5
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

Answer: C

Question: 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: 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

length 1 b 3 x. Quit. but variable X is not created C. The data set TEMP is created. infile 'file reference'.Question: 8 The following SAS program is submitted: data temp. run. What is the result? A. The data set TEMP is created and variable X has a length of 8 Answer: C Question: 9 Given the SAS data sets ONE and TWO: The following SAS program is submitted: Proc sql. The following output is desired: Which JOIN operator completes the program and generates the desired output? . input a b x. Select two.year=two.budget from one <insert JOIN operator here> two on one.year.*. 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 A has an invalid length D.

proc print data =sasuser. %let numgrp=6. %do i=1 %to &numgrp. run. %highway How many reports are produced? A. %end. 5 Answer: A .highway. select distinct status into:group1-:group&numgrp from sasuser. quit. 6 C. where status ="&&group&I". FULL JOIN B.HIGHWAY The following SAS program is submitted: %macro highway. INNER JOIN C. 2 B. proc sql nonprint. LEFT JOIN D. 0 D.A. %mend.highway.HIGWAY: SASUSER. RIGHT JOIN Answer: A Question: 10 Given the SAS data set SAUSER.

tempdata. %put the value is "&&&dept". The program retrieves the SAS source code that creates the view and places it in the output window C. An ERROR message is written to the SAS log because the program is incomplete D.ranch. the program retrieves the SAS source code that creates the view and places it in the SAS log Answer: D .TEMPDATA SAS data set as input to create the format B. describe. The program creates a DATA step view called SASUSER. The program creates a DATA step view called SASUSER. NO formats are created in this step Answer: A Question: 13 The following SAS program is submitted: date view=sauser.RANCH and places the program cod in the current editor window B. run. All formats created will be stored in two WORK. %put the value is "&&&dept".TEMPDATA SAS data set C. What is the result of submitting the FORMAT procedure step? A. %put the value is "&&&dept". It uses the WORK. What is the result? A.Question: 11 The following SAS program is submitted: %let dept=prod. The following SAS program is submitted: Proc format cntlin=wor. START and LABEL and it consists of 10 observations. Run. The following message is written to the SAS log: The value is "merchandise" Which SAS System option writes this message to the SAS log? A.TEMPDATA contains the variables FMTNAME.RANCH and places it in the SAS log D. %put the value is %quote(&&&dept). C. B. %let prod=merchandise. D. Answer: A Question: 12 The SAS data set WORK.

%let result=%sysevalf(&num+0.Question: 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. POINT=pointobs Answer: D Question: 15 Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set? A.5 D. NOBS=pointobs B.5 C. FORMAT D. DATASETS B. %mend. KEY=pointobs D. result is 10+0. OBS=pointobs C. result is B.5). MODIFY C. %check(num=10) What is the written to the SAS log? A. result is 10 Answer: B . result is 10. REGISTRY Answer: A Question: 16 The following SAS program is submitted: %macro check(num=4). %put result is &result.

What is written to the SAS Log? A.division then Do. null Answer: B Question: 18 The following SAS program is submitted: %let first=yourname. %let mfirst=sales. If first. Yourname C. Set one. run. end. By divition. What is the value of the macro variable MFRIST when the program finishes execution? A. sales C. First B. 5678 D.Question: 17 Given the SAS data set ONE: ONE DIVISION SALES A 1234 A 3654 B 5678 The following SAS program is submitted: Data_null_. %put &&&last. &yourname Answer: B . &&First D. %let last=first. 1234 B.

a set cat C. a is frog D.Question: 19 The following SAS program is submitted: %let a=cat. Answer: C . %macro animal(a=frog). Quit. a is pig B. %let a=bird. %mend. Delete from class Where age<(select stop_age from threshold). proc sql. proc sql. Quit C. Quit. D. proc sql. Alter from class Delete where age<(select stop_age from threshold). a is bird Answer: B Question: 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). What is written to the SAS log? A. B. %animal(a=pig) %put a is &a. Quit. Modify table class Delete where age<(select stop_age from threshold).

tables where libname='&lib". A report showing the number of columns in each table in SASUSER C.Question: 21 The following SAS program is submitted: %let lib=%upcase(sauser). by value is 1 (LOOP): %DO loop index variable l is now 2. MACRO D. MPRINT Answer: B . %do I=1 %to 3. A report showing the names of the columns in each table in SASUSER B. data one. loop will iterate again (LOOP): %DO loop index variable l is no 3. %mend. select nvar form dictionary. MLOGIC C. What is generated as output? A. loop will iterate again (LOOP): %DO loop index variable l is no 4. the following is written to the SAS log: (LOOP): Beginning execution (LOOP): %DO loop beginning. loop will iterate again (LOOP): Ending execution Which SAS system option displays the notes in the SAS log? A. proc sql. Several SAS data sets exist in the SAUSER library. %loop After this program executes. start value is 1. stop value is 3. A report showing the numeric columns in each table in SASUSER D. index variable l. SYMBOLGEN B. quit. A report showing the number of numeric columns in each table in SASUSER Answer: B Question: 22 The following SAS program is submitted: %macro loop.% end run. var&I=&I.

id.name. Which SQL procedure program procedures the same results? A. Name. proc sql.salary from one inner join two on one.id Quit D. proc sql. Quit.id. Create table combine as Select coalesce (one. proc sql. two.id=two. salary from one full join two where one. By id. Quit. Merge one two. B. Quit C.salary from one full join two on one.id. Name. Create table combine as Select coalesce (one id.salary from one. Create table combine as Select one.id=two.id.id. proc sql. Run. Create table combine as Select one. Answer: D .Question: 23 Given the SAS data sets ONE and TWO: The following SAS program is submitted: Data combine.id=two.id) as id.id=two. Name.id. two where one. two id) as id.

describe testdata.one. proc sql.one. Yourname Answer: D Question: 25 The following SAS program is submitted: proc contents data = testdata. Which SQL procedure program produces similar information about the column attributes of the dataset TESTDATA. First B. D. C. Quit.one. &&First D. Answer: B . proc sql.Question: 24 The following SAS program is submitted: %let first=yourname. B. Quit.ONE? A. Contents table testdata. %lest last=first %put &&last. Quit. What is written to the SAS log? A. Contents testdata. proc sql. proc sql.one.one. Quit. &yourname C. run. Describe table testdata.

What impact does the ARRAY statement have in the Program Data Vector(PDV)? A. a is pig Answer: C . POINTS2. %let a = bird. POINTS3 POINTS4. The variables named POINTS10.30. %mend.20. run. POINTS21. POINTS5. The variables named POINTS1. POINTS6 are created in the PDV D. POINTS22. POINTS35 are created in the PDV C. %put a is &a.Question: 26 The following SAS program is submitted: data temp. %animal(a=ping). a is cat D.15. POINTS15. %macro animal(a=frog).25. What is written to the SAS log? A. POINTS23 are created in the PDV Answer: C Question: 27 The following SAS program is submitted: %let a =cat. POINTS20. POINTS12. a is bird B. array points{2.POINTS25.35). The variables named POINTS11.POINTS30. No variable are created in the PDV B.3} (10. a is frog C.

data _null_. %mend. proc sql. proc sql. Quit. C. Which macro variables are written to the SAS log? A. proc sql. Drop table one.Question: 28 Given the SAS data set ONE: ONE NUM VAR 1A 2B 3C Which SQL procedure program deletes the data set ONE? A.'sales'). Delete table one.COUNTRY and DEPT C. run. Quit. COMPANY and COUNTRY only Answer: A . Remove table one. Quit. %location. COMPANY Only D. COMPANY. B. %put_global_. %let country=Germany. call symput ('dept'. COMPANY and DEPT only B. Quit. %let company = ABC. proc sql. D. Answer: A Question: 29 The following SAS program is submitted: %macro location. Delete from one.

INTERSECT ALL D. UNION ALL B. 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: 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. OUTER UNION ALL Answer: B . It requests that SAS data set be opened and loaded into SAS memory one page at a time B. quit. The following output is desired NAME Chang Chang Lauren Which SQL set operator completes the program and generates the desired output? A.Question: 30 What is the purpose of the SASFILE statement? A. Select name from CLASS1 <insert SQL set operator here> select name from CLASS. EXCEPT ALL C. It requests that a SAS data set the opened and loaded into SAS memory one variable at a time C.

To reduce the amount of data read Answer: A Question: 33 The following SAS program is submitted: options reuse=YES. What is the effect of the REUSE=YES SAS system option? A. It tracks and recycles free space B. It allows users to access the same SAS data set concurrently D. set sasuser houses.Question: 32 The following SAS program is submitted: data new (bufnp=4). Why are the BUFNO options used? A. It allows updates in place Answer: A Question: 34 Given the SAS data sets ONE and TWO: The following SAS program is submitted: . run. To reduce network traffic C. data sasuser RealEstate(compress=CHAR). To reduce the number I/O operations B. run. It allows a permanently stored SAS data set to be replaced C. To reduce memory usage D. set old(bufno=4).

. Totcost=sum(fixed.variable).year=two. Quit.year. Set one. B.Proc sql. LEFT JOIN C. profit=sum(totrev. Profit=sum(totrev. totrev=sum(price*quantity). Select two. budget From one <insert JOIN operator here> two On one. FIXED and VARIABLE.variable). QUANTITY. Where totrev>1000. RIGHT JOIN D. The following output is desired: Which JOIN operator completes the program and generates the desired output? A. where totrev>1000. INNER JOIN Answer: C Question: 35 The SAS data set ONE contains fifty million observations and contains the variable PRICE. TOTCOST and PROFIT and requires the least amount of CPU resources to be processed? A. Run. FULL JOIN B.-totcost). Set one. totcost=sum(fixed. data two. Totrev=sum(price*quantity).*.-totcost). data two. Which SAS program successfully creates three new variables TOTREV. run.

%location. Totrev = sum(price*quantity). If totrev>1000. Totrev=sum(price*quantity). COMPANY Only C. data two. COMPANY and COUNTRY only B. Profit=sum(totrev. run.variable). %put_global_. Run.'sales'). Answer: C Question: 36 The following SAS program is submitted: %macro location.C. Set one. D. Totcost=sum(fixed.-totcost). call symput ('dept'. %mend. Which macro variables are written to the SAS log? A.COUNTRY and DEPT Answer: C . %let company = ABC. If totrev>1000. COMPANY. data two.-totcost). data _null_.variable). Totcost= sum(fixed. Run. %let country=Germany. Profit=sum(totrev. COMPANY and DEPT only D. Set one.

by groupformat date. B. proc print data=temp. C.date then total=0. if last. by notsorted date. set sasuser.Question: 37 The following SAS program is submitted: data temp. D. MODIFY and RENAME statements Answer: C . by formateed date. MODIFY and CHANGE statements B. 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. run. RENAME statement only C. CHANGE statement only D. format date qtr <insert BY statement here> if first. run SASUSER. total+1.history(kep=date). by date qtr Answer: A Question: 38 Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library? A.date.HISTORY is sorted by the SAS date variable DATE.

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

C. By Descending X. By X.Question: 40 The SAS data set WORK.TEMPDATA SAS data set as input to create the format Answer: D Question: 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. It uses the WORK. creates a listing report that is grouped by X and completes without errors? A. By X notsorted. B. By X grouped. All formats created will be stored in the WORK. Answer: A . The following SAS program is submitted: proc format cntlin=work. D. An ERROR message is written to the SAS log because the program is incomplete D. <insert BY statement here> run. START and LABEL and it consists of 10 observations. What is the result of submitting the FORMAT procedure step? A. Which BY statement completes the program.TEMPDATA SAS set C. run.tempdata. No formats are created in this step B.TEMPDATA contains the variable FMTNAME.

CLASS NAME AGE Mary 15 Philip 16 Robert 12 Ronald 15 The following SAS program is submitted %let value = Philip. Where upcase(name)=upcase(&value). B. %put type = &type. <insert Where statement here> run.&var). D. Where upcase(name)="upcase(&value)". %let jobs=BLACKSMITH WORDSMITH SWORDSMITH. 0 Answer: C Question: 43 Given the data set SASHELP. Where upcase(name)="%upcase(&value)".Question: 42 The following SAS program is submitted: %micro test(var). 6 D. 3 B. Which WHERE statement successfully completes the program and produces a report? A. Answer: B .class. Null C.CLASS SASHELP. Where upcase(name)=%upcase(&value). %mend. proc print data =sashelp. %test(SMITH) What is the value of the macro variable TYPE when the %PUT statement executes? A. C. %let type=%index(&jobs.

VALIDATE TABLE D. ORDEREDBY=X B. input x $ y z. RAWDATA is a file reference to an external file that is ordered by the variable X. SORTSYNC=X Answer: C Question: 45 Given the following partial SAS log: NOTE: SQL table SASHELP. SORTEDBY=X D. infile 'rawdata'. GROUPBY=X C. Gender Char(1).CLASS(bufsize=4096) ( Name char(8). Which SQL procedure statement generated this output? A. CREATE TABLE Answer: A . run. Weight num ). Which option specifies how the data in the SAS data set TEMP will be sorted? A. DESCRIBE TABLE B. Age num.Question: 44 Following SAS program is submitted: data temp(<insert option here>). Height num.CLASS was created line Create table SASHELP. LIST TABLE C.

It echoes the text sent to the SAS compiler as a result of macro execution in the SAS log Answer: D Question: 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. It has no effect in this example B. avg(cost) as AVERAGE From one Group by rep <insert SQL procedure clause here> quit. proc &parm data = sashelp.Question: 46 The following SAS program is submitted: options mprint. Select rep. It writes the original program code inside the marco definition to the SAS log C. run.prdsale. %test(print) What is the result of the MPRINT options? A. %mend. The following output is desired: Which SQL procedure clause completes the program and generates the desired output? .log D. %macro test(parm). It writes macro execution messages to the SAS.

Where upcase(name)=upcase(&value). having avg(cost) < select avg(cost) from one). B. D. C.CLASS: SASHELP. input a b x. Where upcase(name)="upcase(&value)". Which WHERE statement successfully completes the program and procedures a report? A.class. The data set TEMP is created and variable X has a length of 8 B. infile 'file reference'. Where calculated average > (select avg(cost) from one). length a 1 b 3 x. <insert WHERE statement here> run. Answer: D Question: 49 The following SAS program is submitted: date temp. run. The data set TEMP is not created because variable A and B have invalid lengths D. B.A. What is the result? A. Where upcase(name)=%upcase(&value).CLASS NAME AGE Mary 15 Philip 16 Robert 12 Ronald 15 The following SAS program is submitted: %let value = Philip. but variable X is not created Answer: B . D. The data set TEMP is created. Where upcase(name)="%upcase(&value)". Where avg(cost)>(select avg(cost) from one). C. proc print data = sashelp. The data set TEMP is not created because variable A has an invalid length C. Answer: B Question: 48 Given the data set SASHELP. Having avg(cost)>(select avg(cost) from one).

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 Answer: C . Select * from one <Insert Where expression here>. %test(SMITH).&var). Where salary ne null C. 6 B. %put type=&type. %let jobs=BLACKSMITH WORDSMITH SWORDSMITH. 3 Answer: A Question: 51 Given the SAS dataset ONE ONE SALARY 200 205 523 The following SAS program is submitted Proc sql. Where salary is not missing D. null C. quit. %let type=%index(&jobs. What is the value of the macro variable TYPE when the %PUT statement executes? A.Question: 50 The following SAS program is submitted: %macro test(var). 0 D. Where salary is not B. %mend.

The marco variable PRCO is stored in the SAS catalog WORK.Question: 52 Given the SAS dataset ONE: ONE SALARY 200 205 523 The following SAS program is submitted: Proc sql. data _null_. Select * from one <insert WHERE expression here>. Where salary is not Answer: C Question: 53 At the start of a new SAS session. %mend. The following output is desired: SALARY 200 205 523 Which WHERE expression completes the program and generates the desired output? A. Where salary is not missing D. run. proc &proc data=sashelp. The program fails to execute because PROC is a reserved word C. Where salary ne missing B. %one() What is the result? A. The macro variable PROC is stored in the global symbol table Answer: D . Where salary ne null C. the following program is submitted: %macro one. Quit.SASMACR B. The macro variable PROC is stored in the local symbol table D.'measn).class. call symput('proc'. run.

C. Which by statement completes the program. create a listing report that is grouped by X and completes without errors? A. Answer: C . 1 D. What is the value of the macro variable NEWVAL? A. 1. X. null B. %let add=5. 2 C.Question: 54 The following SAS program is submitted: %let value=9.8 Answer: C Question: 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. By X groupd. By descending X. <insert By statement here? Run. By X notsorted. D. %let newval=%eval(&value/&add). B.

whose value is output to the SAS data set NEW B. It names the variable NEXTFILE. What is the purpose of the FILEVAR=option on the INFILE statement? A. CHANGE statement only B. run. end.2. It names the variable NEXTFILE. input dept $sales. MODIFY and RENAME statements Answer: A Question: 57 Which of the following is true about the COMPRESS=YES data set option? A.3 nextfile=compress('March' || |). It names the variable NEXTFILE. infile abc filevar=nextfile end=eof. RENAME statement only C. It uses the Ross Data Compression method to compress numeric data D. MODIFY and CHANGE statements D. whose change in value causes in INFILE statement to open a new input file Answer: D . It names the variable NEXTFILE. It is most effective with numeric data that represents large numeric values B. whose values point to an aggregate storage location C. It is most effective with character data that contains patterns. do until (eof). do i=1. whose value is a SAS file reference D.Question: 56 Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS data library? A. rather than simple repetitions C. It is most effective with character data that contains repeated characters Answer: D Question: 58 The following SAS program is submitted: data new.

var %cols1 height. height weight %mend proc print data=sashelp. name age. BUFSIZE=specifies the size of the output buffer in kilobytes. run. BUFSIZE= specifies the size of the input buffer in bytes. BUFNO= specifies the number of output buffers Answer: D . set old. BUFNO=specifies the number of output buffers B. var %cols2 %cols1. var heigh %cols1. BUFSIZE= specifies the size of the output buffer in bytes. C. What is the difference between the usage of BUFFSIZE= and BUFNO= options? A. B. BUFSIZE= specifies the size of the input buffer in kilobytes. BUFNO=specifies the number of input buffers D. D. %macro cols2. var %cols1 %cols2 height.Question: 59 The following SAS program is submitted: %micro cols1. BUFFNO= specifies the number of input buffers C. %mend.class. <insert VAR statement here> run Which VAR statement successfully completes the program and produces a report? A. Answer: A Question: 60 The following SAS program is submitted: data new(bufsize = 6144 bufno = 4).

new.Z and W.Question: 61 The SAS data set ONE contains the variables X. new. run. new.RANCH and places it in the SAS log C. The program creates a DATA step view called SASUSER. Y and COL1 only D. X.Y.Y and _COL1_ B. run. describe. new. The program retrieves the SAS source code that creates the view and places it in the output window D. What is the result? A. X and Y only Answer: B Question: 62 The following SAS program is submitted: data view=sasuser ranch. X and COL1 only C. The program creates a DATA step view called SASUSER. What are the names of all of the columns created by the TRANSPOSE procedure? A.RANCH and places the program code in the current editor window B. The following SAS program is submitted: Proc transpose data =one Out=trans Name=new. By x. The program retrieves the SAS source code that creates the view and places it in the SAS log Answer: D . var y.

The data set TEMP is not created because variable AS has an invalid length C. NOT NULL C. What is the result? A. length a 1 b 3 x. DATASETS B. REGISTRY C. run. The data set TEMP is created. but variable X is not created D. MODIFY D. The data set TEMP is created and variable X has a length of 8 Answer: B Question: 64 Which SAS integrity constraint type ensures that a specific set or range of values are the only values in a variable? A. infile 'file reference'.Question: 63 The following SAS program is submitted: data temp. UNIQUE Answer: A Question: 65 Which SAS procedure changes the name of a permanent format for a variable stored in a SAS data set? A. FORMAT Answer: A . The data set TEMP is not created because variables A and B have invalid lengths B. PRIMARY KEY D. input a b x. CHECK B.

TABLES Answer: A . No variables are created in the PDV C. DICTIONARY. The variables named POINTS11. POINTS35 are created in the PDV B. POINTS15. POINTS5. What displays is last Answer: B Question: 67 The following SAS program is submitted: data temp: array points { 2. The variables named POINTS1. POINTS6 are created in the PDV D.30. POINTS4. What displays is three B.POINTS20. DICTIONARY.25. %let one=two.POINTS30. POINTS12. What impact does the ARRAY statement have in the program Data vector (PDV)? A.15.20.VARIABLES C. The variables named POINTS10. What is the written to the SAS log? A.MEMBERS D. POINTS2.POINTS25. What displays is one D. run. DICTIONARY. POINTS21. %put what displays is &&&&&test.Question: 66 The following SAS program is submitted: %let test=one. %let three=last. %let two=three.3 } (10. What displays is two C. DICTIONARY.COLUMNS B. POINTS22. POINTS13. POINTS23 are created in the PDV Answer: C Question: 68 Which DICTIONARY table provides information on all the tables containing a variable named LASTNAME? A.35).

A missing value because 123 is an invalid argument for the RANUNI function B. The hash object persists after the DATA step has executed B.Question: 69 What is generated as a result of submitting the RANUNI function with a seed of 123? A. The hash object does not require unique keys Answer: B Question: 71 The following SAS program is submitted: %macro one (input). The hash object automatically sorts the data D. The hash object key values can be multiple numeric and character data values C. %let date=31DEC2006. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro Answer: C . A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table C. data _null_. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro B. call symput('date'. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table D. %two %put the value is &date. %macro two. run %mend. %one(&date) What is the result when the %PUT statement executes? A.'12SEP2008'). A different sequence of random numbers with each program execution C. A random number between 0 and 123 D. %mend. A consistent sequence of random numbers with each program execution Answer: D Question: 70 What is an advantage of using a hash object in a SAS DATA step? A.

title "For &dept". PAGESIZE= Answer: C . Which one of the following statements completes the above and resolves title1 to "For research&development"? A. D. title2 "This project was completed &development". %let dept = %nrstr(research%&development).Question: 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. %let development = ontime. CHANGE statement only C. BUFNO= C. MODIFY and RENAME statements D. RENAME statement only B. C. run. %let dept = %str(research&development). Answer: C Question: 74 Which one of the following options controls the pagesize of a SAS data set? A. B. BUFSIZE= D. proc print data = sasuser. SIZE= B.highway. %let dept = %str(research%&development). %let dept = %nrstr(research&development). MODIFY and CHANGE statements Answer: B Question: 73 The following SAS program is submitted: <insert statement here>.

Which one of the following reports is generated? A. REP AVERAGE JONES 200 B. avg(cost) as AVERAGE from one group by rep having avg(cost) > (select avg(cost) from one). REP AVERAGE SMITH 320 D. quit. REP AVERAGE SMITH 500 Answer: D .Question: 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. REP AVERAGE JONES 320 C. select rep.

run. stop. run. Which one of the following represents the possible values for PTOBS? A. end.Question: 76 The following SAS program is submitted: proc sort data = sales tagsort. any integer between 1 and 10 B. do i = 1 to 10.500. temporary disk usage Answer: D Question: 77 The following SAS program is submitted: data one.000 D. any real number between 0 and 1 C. ptobs = ceil(ranuni(0) * totobs). set temp point = ptobs nobs = totobs.500. output.000 Answer: C . CPU usage only C. The SAS data set TEMP contains 2. any integer between 1 and 2. Which of the following resource(s) is the TAGSORT option reducing? A.500.000 observations. any real number between 1 and 2. by month year. I/O usage only B. I/O and CPU usage D.

quantity from product.*.item = c.Question: 78 Which one of the following programs contains a syntax error? A. proc sql.unitcost. sales. %houses(sub = SPLIT) %houses(dsn = ranch) %houses(sub = TWOSTORY) Which one of the following is the value of the automatic macro variable SYSLAST? . sales where product. C.*.quantity from product.item = cost.item and product.item and product. proc sql. select p. cost as c. if style = "".item.item = cost. %mend.*. cost. proc sql.item = sales.quantity from product as p.item.houses. quit. cost. select p. sales as s where p. c.item and p. sales s where p.unitcost. sales.unitcost. proc sql. s. D.item. quit. quit.item = c. s.unitcost. c. select product.item = s. cost c.item = sales. quit.*. B.item and p. cost. data &dsn. run.item.item = s.quantity from product p. cost.sub = RANCH). sales where product. set sasuser. Answer: D Question: 79 The following SAS code is submitted: %macro houses(dsn = houses. select product.

Which one of the following reports is generated? A.HOUSES Answer: D Question: 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.houses C. work.RANCH D. WORK. COUNTRY FRANCE BELGIUM C. COUNTRY CANADA FRANCE BELGIUM D.ranch B.num). quit. COUNTRY GERMANY JAPAN B. COUNTRY CANADA FRANCE GERMANY Answer: C . work. WORK.A. select country from one where not exists (select * from two where one.num = two.

C. Data set TWO contains 50 observations. C. D. Both data sets are sorted by the variable YEAR. The WHERE statement can be executed conditionally as part of an IF statement. B. The subsetting IF statement works on observations before they are read into the PDV. Answer: B Question: 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. Which one of the following is the result of the program execution? A. by year.Question: 81 Which one of the following statements is true? A. The WHERE statement selects observations before they are brought into the PDV. Answer: B . ERROR and WARNING messages are written to the SAS log. B. No messages are written to the SAS log. The following SAS program is submitted: data three. The WHERE and subsetting IF statements can be used interchangeably in all SAS programs. Data set THREE is created with three variables and 100 observations. run. Data set THREE is created with two variables and 50 observations. D. merge one two.

BUFSIZE= specifies the size of the input buffer in bytes. Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options? A. BUFNO= specifies the number of output buffers. B. set old. Answer: C Question: 84 The following SAS program is submitted: data new (bufsize = 6144 bufno = 4). C. BUFSIZE= specifies the size of the output buffer in kilobytes.%length(&idcode)-2). run. %let codenum = %substr(&idcode. BUFNO= specifies the number of input buffers. Which one of the following statements stores the value 567 in the macro variable CODENUM? A. BUFNO= specifies the number of input buffers. B. %let codenum = %substr(&idcode. D. %let codenum = substr(&idcode. D.length(&idcode)-2).%length(&idcode)-3).length(&idcode)-3). BUFSIZE= specifies the size of the output buffer in bytes. Answer: B . BUFSIZE= specifies the size of the output buffer in kilobytes. BUFNO= specifies the number of output buffers. C. %let codenum = substr(&idcode.Question: 83 Given the following SAS statement: %let idcode = Prod567.

DATA does not exist. NOTE: DATA STEP view saved on file SASUSER.CONDO option was omitted on the DATA statement. SASUSER. NOTE: A stored DATA STEP view cannot run under a different operating system.ranch. The view SASUSER. Answer: B . D. It can store an index. NOTE: The SAS System stopped processing this step because of errors. 236 run. B.Question: 85 Consider the following SAS log: 229 data sasuser. C. Which one of the following explains why the PRINT procedure fails? A. 230 set sasuser. B.RANCH. It always accesses the most current data.houses. 234 235 proc print data = sasuser. It works quickly through multiple passes of the data.ranch sasuser.ranch. 233 run.RANCH must be processed before SASUSER.CONDO is a stored DATA step program. A SAS data file and SAS data view cannot be created in the same DATA step. A second VIEW=SASUSER. It is useful when the underlying data file structure changes.condo.condo / view = sasuser. Answer: D Question: 86 Which one of the following is an advantage of creating and using a SAS DATA step view? A. ERROR: File SASUSER.condo. 231 if style = 'RANCH' then output sasuser.CONDO.CONDO is created. C. 232 else if style = 'CONDO' then output sasuser. D.

quit. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 B.Question: 87 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. two. 2001 4 400 300 2002 1 700 600 C. sales from one. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. select one. Which one of the following reports is generated? A.*. YEAR QTR BUDGET SALES 2001 3 500 . 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 .

var. quit. two where one. alter table one drop num. delete from one. proc sql.*. quit. Answer: C Question: 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. C. drop table one.year. sales from one. D.year = two. delete table one. proc sql. Which one of the following reports is generated? . quit. quit. proc sql. quit.Question: 88 Given the following SAS data set ONE: ONE NUM VAR 1A 2B 3C Which one of the following SQL programs deletes the SAS data set ONE? A. proc sql. select one. B.

B. set temp. 2) then b = 'Medium'. .000 6 7. 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. data new. 2) then b = 'Medium'.000. else if a in(1.A. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D.000 8 3. run. if a = 8 then b = 'Small '. set temp.000 Which one of the following SAS programs requires the least CPU time to be processed? A. else if a = 6 then b = 'Large'.000 2 500. else if a = 8 then b = 'Small'. if a in (1. 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: 90 The SAS data set TEMP has the following distribution of values for variable A: A Frequency 1 500. data new.

2) then b = 'Small'. 2 C. run. null Answer: A . set temp.else if a = 6 then b = 'Large'. %let newval = %eval(&value / &value2). set temp. %let value2 = 5. data new. run. Answer: C Question: 91 The following SAS program is submitted: %let value = 9. else if a = 8 then b = 'Small'. if a = 6 then b = 'Large '. if a = 6 then b = 'Large '. else if a in (1. 1. 2) then b = 'Medium'. 1 B. Which one of the following is the resulting value of the macro variable NEWVAL? A. D. data new. if a in (1. C.8 D.

Question: 92 The following SAS program is submitted: %let lib = %upcase(sasuser). Macro variable GROUP has a value of 564. call symput(group. a report showing the number of columns in each table in SASUSER Answer: D Question: 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_. Macro variable C has a value of 1452. which one of the following is generated as output? A. Which one of the following is the result when the program finishes execution? A. proc sql. no result set B. Given that several SAS data sets exist in the SASUSER library. C. run.tables where libname = "&lib". Answer: A . quit. Macro variable C has a value of 564. select nvar from dictionary. Macro variable GROUP has a value of 1452. a syntax error in the log C. B. D.sum). set one. a report showing the names of each table in SASUSER D.

profit = sum(totrev.variable). totrev = sum(price * quantity). if totrev > 1000. totcost = sum(fixed. set one.variable). run.otcost). run.otcost). totcost = sum(fixed. if totrev > 1000. run. profit = sum(totrev.variable). where totrev > 1000. TOTCOST.variable). totcost = sum(fixed. and PROFIT and requires the least CPU time to be processed? A. totcost = sum(fixed.otcost). C. data two. set one. data two.Question: 94 The SAS data set ONE consists of five million observations and has 25 variables. data two. profit = sum(totrev. run. Answer: B . totrev = sum(price * quantity). profit = sum(totrev.otcost). totrev = sum(price * quantity). totrev = sum(price * quantity). set one. set one. Which one of the following SAS programs successfully creates three new variables TOTREV. data two. D. B. where totrev > 1000.

COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA DALLAS 20 USA BOSTON 50 Answer: B . city order by country. COUNTRY CITY TOTAL UK MARLOW 10 UK LONDON 20 USA BOSTON 50 USA DALLAS 20 B. Which one of the following reports is generated? A. select country. quit. COUNTRY CITY TOTAL UK LONDON 20 UK MARLOW 10 USA BOSTON 50 USA DALLAS 20 C.Question: 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. city. total desc. COUNTRY CITY TOTAL USA BOSTON 50 D. sum(visit) as TOTAL from one group by country.

quit. proc sql. quit. create table three as select * from one outer union select * quit. B. create table three as select * from one outer union corr select * from two. create table three as select * from one outer union select * from two. THREE NUM CHAR1 CHAR2 1A 2B 4D 2X 3Y 5V Which one of the following SQL programs creates an equivalent SAS data set THREE? A. C.Question: 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. . proc sql. proc sql. set one two. run.

run. The data sets ONE and THREE are sorted by X. &SYSRC D. run. &RC B.D. quit. set one. set three key = X. &ERR C. set three. set one (key = X). C. data two. B. set one. Which one of the following SAS programs uses the index to select observations from the data set ONE? A. create table three as select * from one union corr select * from two. proc sql. D. run. data two. set three. data two. run. &SYSERR Answer: D Question: 98 The SAS data set ONE has a variable X on which an index has been created. Answer: A . set one key = X. Answer: A Question: 97 Which one of the following automatic SAS macro variables contains the return code from a previously executed step? A. data two. set three key = X.

area. area.Question: 99 Given the following SAS data set ONE: ONE REP AREA COST SMITH NORTH 100 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. REP AREA COUNT JONES EAST 100 JONES NORTH 600 JONES WEST 500 SMITH NORTH 800 SMITH SOUTH 200 B. select rep. count(*) as TOTAL from one group by rep. quit. Which one of the following reports is generated? A. REP AREA TOTAL JONES EAST 1 JONES NORTH 2 JONES WEST 3 SMITH NORTH 3 JONES WEST 3 SMITH NORTH 3 SMITH SOUTH 1 . REP AREA TOTAL JONES EAST 100 JONES NORTH 600 JONES WEST 500 SMITH NORTH 800 SMITH SOUTH 200 C.

highway. %do i = 1 %to &numgrp.D. FORMAT C. select count(distinct status) into :numgrp from sasuser. proc print data = sasuser. select distinct status into :group1-:group&numgrp from sasuser. proc sql noprint. %let numgrp = &numgrp.highway. CONTENTS D.HIGHWAY: SASUSER. run.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. where status = "&&group&i" . .D Question: 100 Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS data set? A.highway. DATASETS Answer: D Question: 101 Given the following SAS data set SASUSER. quit. %end. REP AREA TOTAL JONES EAST 1 JONES NORTH 2 JONES WEST 3 SMITH NORTH 3 SMITH SOUTH 1 SMITH NORTH 3 SMITH SOUTH 1 Answer: C. MODIFY B.

MPRINT B. 1 C. SOURCE2 Answer: A Question: 103 Given the following SAS data set ONE: ONE CATEGORY AGE SALARY BONUS ---M 28 200 . 0 B. %highway How many reports are produced by the above program? A. create table two as select category. Which one of the following represents the data values stored in the data set TWO? .%mend. quit. MSOURCE D. 2 D. 5 Answer: C Question: 102 Text is sent to the SAS compiler as a result of macro execution. M 25 100 10 F 18 100 50 F 25 200 10 The following SAS program is submitted: proc sql. MLOGIC C. salary + bonus as EARNINGS from one. Which one of the following SAS system options writes that text to the log? A.

CATEGORY SALARY BONUS EARNINGS M 200 .A. 200 M 100 10 110 F 100 50 150 F 200 10 210 Answer: B Question: 104 Which one of the following SAS SORT procedure options eliminates identical consecutive observations? A. NODUPKEY Answer: A . M 100 10 110 M 200 . DISTINCT D. CATEGORY EARNINGS M 200 M 110 F 150 F 210 B. 200 M 100 10 110 F 100 50 150 F 200 10 210 D. . UNIQUE C. CATEGORY SALARY BONUS EARNINGS M 200 . CATEGORY EARNINGS M. M 110 F 150 F 210 C. NODUP B.

50. 20 C. How is the value 10 displayed when the format TEMPC is applied? A.40. 10 B. 40 Answer: C Question: 106 The following SAS FORMAT procedure is submitted: proc format lib = sasuser. BELOW FREEZING Answer: C .Question: 105 The following SAS program is submitted: data temp. MILD C. score = points{2. 30 D.20. WARM D. 10 B.2}_temporary_ (10. array points{3. run.1} run.60).30. Which one of the following is the value of the variable SCORE in the data set TEMP? A. value tempc low < 0 = 'BELOW FREEZING' 0 < 5 = 'COLD' 5 < 10 = 'MILD' 10 < 15 = 'WARM' 15 high = 'HOT'.

set temp. char1.num = two. set temp.Question: 107 Which one of the following SAS programs uses the most amount of memory resources for output buffers? A. run. set temp. char2 from one.num. D. Answer: C Question: 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. 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? . data new(bufsize = 4000 bufno = 1). quit. B. run. data new(bufsize = 1000 bufno = 5). C.num. run. create table three as select one. two where one. data new(bufsize = 1000 bufno = 2). data new(bufsize = 2000 bufno = 3). run. set temp.

%if &sysday = Tuesday %then %do. run. B. run. by num. Which of the following completes the above program so that it executes on Tuesday? A. run. end.A. Answer: A . set two. run. drop num2. D. %end. data three. by num. set one. %mend. do i = 1 to numobs. Answer: D Question: 109 The following SAS program is submitted: %macro execute. data three. by num.houses. D. set one. by num. data three. merge one two. C. run. C. %if &sysday = 'Tuesday' %then %do. <insert statement here> proc print data = sasuser. if num2 = num then output. set two(rename = (num = num2)) point = i nobs = numobs. by num. data three. set two. %if "&sysday" = Tuesday %then %do. %if '&sysday' = 'Tuesday' %then %do. set one. merge one two. run. B. run.

Question: 110 Which one of the following statements is true regarding a SAS DATA step view? A. D. OBS COMMON X Y 1 A 10 1 2 A 13 3 3B94 4C85 . run. It allows write capabilities. B. Answer: D Question: 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. It contains global statements. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 A 14 3 4B94 5B92 6C85 7 C 14 5 B. Which one of the following represents the data values stored in data set COMBINE? A. C. merge one two. It contains a partially compiled DATA step. by common. It contains data and a descriptor portion.

July 23. %let start = %sysfunc(today(). %let start = %sysfunc(%today(). Which one of the following statements submitted at the beginning of a SAS session assigns the value Tuesday. D.&var). %let jobs = BLACKSMITH WORDSMITH SWORDSMITH. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 B 14 4 4B92 5C85 D. July 23. %mend. %test(SMITH) Which one of the following is the resulting value of the macro variable TYPE? .weekdate. B. %let start = today().C. 2002 to the macro variable START? A.weekdate.).). 2002. C.. Answer: C Question: 113 The following SAS program is submitted: %macro test(var).weekdate.. 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: 112 Assume today is Tuesday. %let type = %index(&jobs. %let start = today().format=weekdate.

UNIQUE C. SYMBOLGEN Answer: D Question: 116 The following SAS ARRAY statement is submitted: array score{*} a4 . SOURCE C. 0 B. 7 C. DISTINCT Answer: A Question: 115 Which one of the following options displays the value of a macro variable in the SAS log? A. null Answer: C Question: 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. 11 Answer: C .A. CHECK B. MACRO B. 8 D. FORMAT D. 3 B.a10. Which one of the following is the maximum number of elements stored? A. 3 C. a25 . 6 D. SOURCE2 D.

%macro y2kopt(date). %end. Which one of the following is the value of YEARCUTOFF when the macro finishes execution? A. options yearcutoff = 2000. %else %do. if the data are often used for BY group processing D. 1900 B. %if &date >= 14610 %then %do. %y2kopt(&date) The SAS date for January 1.Question: 117 When is it appropriate to create indexes on a SAS data set for efficient processing? A. call symput("date". 1920 C. 2000 Answer: D . data _null_ . run. %mend. if the SAS data set file page count is less than three pages Answer: A Question: 118 The following SAS program is submitted: options yearcutoff = 1950. options yearcutoff = 1900. if small subsets of data are often retrieved B. 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920 prior to submitting the above program. date = "01jan2000"d. 1950 D.left(date)). %end. if the key variable has very few unique values C.

It temporarily compresses observations in a SAS data set. select level. LEVEL AGE 2 20 3 20 B. LEVEL MAX 2 20 3 30 D. B. quit. It specifies that a new empty data set with a given name replaces an existing data set with the same name. max(age) as MAX from one group by level having max(age) > (select avg(age) from one). It allows new observations to be inserted wherever enough free space exists. D. C.Question: 119 Which one of the following is the purpose of the REUSE= YES option in a compressed SAS data set? A. Answer: C Question: 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. It allows users to update the same SAS data set concurrently. Which one of the following reports is generated? A. LEVEL AGE 2 30 3 30 C. LEVEL MAX 2 30 3 30 Answer: D .

Answer: C Question: 122 Which one of the following displays the definition of a stored SQL procedure view in the SAS log? A.3}_temporary_. The KEEP statement applies only to the first data set created within the same DATA step if more than one data set is created. VALIDATE VIEW statement D. run. The KEEP statement is available in both the DATA and the PROC steps. B. The KEEP statement applies to all data sets created within the same DATA step. C. 6 Answer: D . 2 B. 5 D. DESCRIBE VIEW statement Answer: D Question: 123 The following SAS program is submitted: data temp. D. Which one of the following is the maximum number of elements that are stored? A. EXPANDVIEW option C. The KEEP statement selects the variables read from the input data set(s).Question: 121 Which one of the following is true regarding the KEEP statement? A. 3 C. ECHOVIEW option B. array points{2.

proc sql. D. A report is generated with the two original observations as the where clause does not work. C. select * from internat where location = "&Loc". quit. It instructs SAS to name and store a specific index. Answer: C Question: 125 The DICTIONARY. It instructs SAS to use a specific index for WHERE processing.INTERNAT: WORK. both user and system defined macro variables D.MACROS table stores information about which of the following? A. B. No report is generated as the case of the macro variable name is different. Answer: B . B. It instructs SAS to use any available index for WHERE processing. system defined macro variables only C. macros stored in the autocall macro library only Answer: C Question: 126 Given the following SAS data set named WORK. user defined macro variables only B. A report is generated with one destination. D.Question: 124 Which one of the following is the purpose of the IDXNAME= data set option? A.INTERNAT LOCATION SUM USA 30 EUR 40 The following SAS program is submitted: %let LOC = Usa. No report is generated as the case of the compared values is different. C. It instructs SAS to store an index in a particular location. Which one of the following is the result when the above code is executed on the above data set? A.

select * from dictionary. %let a = bird. %animal(a = pig) %put a is &a. Which one of the following is reported? A. quit. metadata on all tables in the WORK library only C.Question: 127 The following SAS program is submitted: %let a = cat. %mend. a is cat C. a is bird Answer: B Question: 128 The following SAS program is submitted: proc sql. Which one of the following is written to the SAS log? A. metadata on all tables in the SASUSER library only D. a is pig D. a is &a B.tables. metadata on all tables in the DICTIONARY library only Answer: A . %macro animal(a = frog). metadata on all tables in all libraries B.

Which one of the following is the result in the log of the %PUT statement? A. MAUTOSOURCE Answer: A Question: 131 The following SAS program is submitted: %let first = yourname. MDEBUG C. %let var = y. Which one of the following is the value of the variable Z when the program finishes execution? A. y = '2'. MSGLEVEL D. yourname D. &first C. %put &&&last. &yourname Answer: C . run. first B. data one. (missing numeric) Answer: B Question: 130 Which one of the following options is available for SAS macro debugging? A. z = &var * &x. run.Question: 129 The following SAS program is submitted: data two. %let last = first. _ERROR_ B. MLOGIC B. 20 (as a numeric) C. %let x = 10. 20 (as a character) D. . set two (keep = &var).

YEAR QTR BUDGET SALES 2001 3 500 . 2001 4 400 300 2002 1 700 600 D.*. two.*. YEAR QTR BUDGET SALES 2001 3 500 . YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 C. quit. sales from one left join two on one. sales from one. B.year. Which one of the following reports is generated? A. select one.year = two. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 Answer: D Question: 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.Question: 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. Which one of the following reports is generated? . quit.

3 desc C. sum(sales) as revenue from one group by product. quit.A. order by product. order by 1. select product. desc revenue Answer: B . 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: 134 Given the following SAS program: proc sql. type. type. YEAR QTR BUDGET SALES 2001 4 400 300 2002 1 700 600 B. 3 B. revenue desc D. YEAR QTR BUDGET SALES 2001 3 500 . order by 1. YEAR QTR BUDGET SALES 2001 3 500 300 2001 4 400 300 2002 1 700 600 D. Which one of the following clauses should be added to the program to sort the output by PRODUCT and decreasing REVENUE? A. orderby product. 2001 4 400 300 2002 1 700 600 C.

. D. where age > &var.one num format = 4. keyword C. quit. modify table testdata. alter table testdata. label = 'Number'). modify one. modify table testdata. run. command Answer: C Question: 136 The following SAS program is submitted: proc datasets lib = testdata. label = 'Number'. format num 4. %mend.one modify num (format = 4. alter table testdata.Question: 135 The following SAS program is submitted: %macro test(var). quit. Answer: B . quit.one alter num format = 4. B. label num = 'Number'. C. proc sql. proc sql. Which type of parameter is the macro variable VAR? A. label = 'Number'.one modify num format = 4. quit. Which one of the following SQL programs produces the same results as the above DATASETS procedure? A. label = 'Number'. default B. proc sql.class. positional D. proc sql. proc print data = sasuser. quit.

Question: 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 Question: 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: 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 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: 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: 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.

Answer: C Question: 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: 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? 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

CATEGORY EARNINGS M 220 M 110 M 310 F 150 F 210 Answer: A . select distinct category. CATEGORY EARNINGS M 640 F 360 C.Question: 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.bonus)) as EARNINGS from one where age < 30 group by category having calculated EARNINGS < 500. CATEGORY EARNINGS F 360 B. sum(sum(salary. CATEGORY EARNINGS F 150 F 210 D. quit. Which one of the following reports will be generated? A.

RANCH SPLIT CONDO TWOSTORY RANCH SPLIT SPLIT Answer: A Question: 146 The following SAS program is submitted: %let value = . quit. CONDO RANCH RANCH SPLIT SPLIT SPLIT TWOSTORY D.HOUSES: SASUSERS.5 + 5 D. select distinct style into :styles separated by ' ' from sasuser. . null Answer: D . Which one of the following is the value of the resulting macro variable? A.5. RANCH SPLIT CONDO TWOSTORY C. 5 B.5 C. %let add = 5. Which one of the following is the resulting value of the macro variable NEWVAL? A.houses order by style. CONDO RANCH SPLIT TWOSTORY B. %let newval = %eval(&value + &add).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. 5.Question: 145 The following are values of the variable STYLE from the SAS data set SASUSER.

Which one of the following is the value of the macro variable MFIRST when the above program finishes execution? A. if last. 1234 C. null B. 3654 D. D. run.division then call symput('mlast'.sales). set one. B. New observations are added to the end of the SAS data set. An updated observation is stored in its original location.sales).division then call symput('mfirst'. C. Each observation occupies the same number of bytes. 5678 Answer: D . by division. Answer: A Question: 148 Given the following SAS data set ONE: ONE DIVISION SALES A 1234 A 3654 B 5678 The following SAS program is submitted: data _null_. Each observation is treated as a single string of bytes.Question: 147 Which one of the following statements about compressed SAS data sets is always true? A. if first.

proc sql. show table testdata. quit. proc sql. run. proc sql. describe table testdata._all_. quit. quit. quit.all. show testdata. proc datasets lib = sasuser.Question: 149 The following SAS program is submitted: proc contents data = testdata.one. C. proc datasets lib = sasuser. quit. D. C. contents data = all. contents data = _all_. proc sql.one. Answer: D Question: 150 Which one of the following SAS programs displays the descriptor portion of each data set stored in the SASUSER library? A. B. quit. D.one. quit.one. Which one of the following SQL statements produces similar information about the column attributes as the above CONTENTS procedure? A.one. proc datasets lib = sasuser. quit. proc datasets lib = sasuser. Answer: D . describe testdata. B.

set one. 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 . run. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 B 14 4 4B92 5C85 D. set two. 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 3B94 4C85 C.Question: 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. OBS COMMON X Y 1 A 10 1 2 A 13 3 3 A 14 3 4B94 5B92 6C85 7 C 14 5 B.

The %SCAN function has too many arguments. C.2.%str()). 1. var = 'new york. Answer: D Question: 153 The following SAS program is submitted: %let var = chicago. Which one of the following statements avoids problems associated with the unbalanced quotation mark? A. newvar = %scan(&var. Which one of the following explains why the program fails to execute? A. %let name = %str(Patel's Restaurant). %let name = Patel%'s Restaurant.Question: 152 The following SAS program is submitted: %let name = Patel's Restaurant. The macro variable VAR does not get created properly. D. %let name = Patel%str(')s Restaurant. The %STR() is invalid syntax. 2'. data a. The %SCAN function does not exist. B. run. B. %let name = %str(Patel%'s Restaurant). D. Answer: C . C.