+ All Categories
Home > Documents > SAS- · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File...

SAS- · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File...

Date post: 25-Mar-2018
Category:
Upload: phungkhanh
View: 218 times
Download: 1 times
Share this document with a friend
66
A00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0 http://www.gratisexam.com/ SAS Institute A00-212 A00-212 SAS Advanced Programming
Transcript
Page 1: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A00-212qa153

Number: 000-000Passing Score: 800Time Limit: 120 minFile Version: 1.0

http://www.gratisexam.com/

SAS Institute A00-212

A00-212 SAS Advanced Programming

Page 2: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Exam A

QUESTION 1The following SAS program is submitted:Data sasuser.history;Set sasuser.history(keep=state x yRename = (state=ST));Total=sum(x,y);Run;The SAS data set SASUSER.HISTORY has an index on the variable STATE. Which describes the result ofsubmitting the SAS program?

A. The index on STATE is deleted and an index on ST is createdB. The index on STATE is recreated as an index on STC. The index on STATE is deletedD. The index on STATE is updated as an index on ST

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 2The 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 ONEmacro

B. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWOmacro

C. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol tableD. A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 3Which SET statements option names a variable that contains the number of the observation to read duringthe current iteration of the DATA step?

A. OBS=pointobsB. POINT=pointobsC. KEY=pointobsD. NOBS=pointobs

Page 3: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 4When 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 fileC. A variable that represents the total number of observations in the input data set(s)D. A variable that represents the current observation number

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 5CORRECT TEXT

http://www.gratisexam.com/

CORRECT TEXTThe 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 isresult is 10result is 10.5result is 10+0.5

A.B.C.D.

Correct Answer: Section: (none)Explanation

Explanation/Reference:

QUESTION 6The following SAS program is submitted:%micro test(var);

Page 4: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

%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. 0B. NullC. 6D. 3

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 7The 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 trueB. result is 10 gt 5C. result is 1D. result is 0

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 8The following SAS program is submitted:data temp;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 lengthsB. The data set TEMP is created, but variable X is not createdC. The data set TEMP is not created because variable A has an invalid lengthD. The data set TEMP is created and variable X has a length of 8

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 5: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 9Given 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 JOINB. INNER JOINC. LEFT JOIND. RIGHT JOIN

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

The following SAS program is submitted:%macro highway;

Page 6: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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;%highwayHow many reports are produced?

A. 2B. 6C. 0D. 5

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 11The following SAS program is submitted:%let dept=prod;%let prod=merchandise;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. %put the value is "&&&dept";B. %put the value is "&&&dept";C. %put the value is "&&&dept";D. %put the value is %quote(&&&dept);

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 12The SAS data set WORK.TEMPDATA contains the variables FMTNAME, START and LABEL and itconsists 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 formatB. All formats created will be stored in two WORK.TEMPDATA SAS data setC. An ERROR message is written to the SAS log because the program is incompleteD. NO formats are created in this step

Correct Answer: ASection: (none)Explanation

Page 7: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 13The 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 thecurrent editor window

B. The program retrieves the SAS source code that creates the view and places it in the output windowC. The program creates a DATA step view called SASUSER.RANCH and places it in the SAS logD. the program retrieves the SAS source code that creates the view and places it in the SAS log

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 14Which SET statement option names a variable that contains the number of the observation to read duringthe current iteration of the DATA step?

A. NOBS=pointobsB. OBS=pointobsC. KEY=pointobsD. POINT=pointobs

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

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

A. DATASETSB. MODIFYC. FORMATD. REGISTRY

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 16The following SAS program is submitted:%macro check(num=4);%let result=%sysevalf(&num+0.5);%put result is &result;%mend;%check(num=10)

Page 8: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

What is the written to the SAS log?

A. result isB. result is 10.5C. result is 10+0.5D. result is 10

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 17Given the SAS data set ONE:ONEDIVISION SALESA 1234A 3654B 5678The following SAS program is submitted:Data_null_;Set one;By divition;If first.division thenDo;%let mfirst=sales;end;run;What is the value of the macro variable MFRIST when the program finishes execution?

A. 1234B. salesC. 5678D. null

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 18The following SAS program is submitted:%let first=yourname;%let last=first;%put &&&last;What is written to the SAS Log?

A. FirstB. YournameC. &&FirstD. &yourname

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 9: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 19The 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 pigB. a set catC. a is frogD. a is bird

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 20Which SQL procedure program deletes rows from the data set CLASS?

A. proc sql;Select * from classWhere age<(select stop_age from threshold);Quit;

B. proc sql;Modify table classDelete where age<(select stop_age from threshold); Quit

C. proc sql;Delete from classWhere age<(select stop_age from threshold);Quit;

D. proc sql;Alter from classDelete where age<(select stop_age from threshold); Quit;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 21The 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 SASUSERB. A report showing the number of columns in each table in SASUSERC. A report showing the numeric columns in each table in SASUSERD. A report showing the number of numeric columns in each table in SASUSER

Page 10: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 22The following SAS program is submitted:%macro loop;data one;%do I=1 %to 3;var&I=&I;%endrun;%mend;%loopAfter 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 no3; loop will iterate again (LOOP): %DO loop index variable l is no 4; loop will iterate again (LOOP): EndingexecutionWhich SAS system option displays the notes in the SAS log?

A. SYMBOLGENB. MLOGICC. MACROD. MPRINT

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 23Given 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;

Page 11: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Create table combine asSelect coalesce (one.id, two.id) as id,Name,salary from one, two where one.id=two.id; Quit;

B. proc sql;Create table combine asSelect one.id,Name, salary from one full join two where one.id=two.id; Quit

C. proc sql;Create table combine asSelect one.id,name,salary from one inner join two on one.id=two.id Quit

D. proc sql;Create table combine asSelect coalesce (one id, two id) as id,Name,salary from one full join two on one.id=two.id; Quit;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 24The following SAS program is submitted:%let first=yourname;%lest last=first%put &&last;What is written to the SAS log?

A. FirstB. &yournameC. &&FirstD. Yourname

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 25The following SAS program is submitted:proc contents data = testdata.one;run;Which SQL procedure program produces similar information about the column attributes of the datasetTESTDATA.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;

Page 12: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 26The 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 PDVB. The variables named POINTS10, POINTS15, POINTS20,POINTS25,POINTS30, POINTS35 are

created in the PDVC. The variables named POINTS1, POINTS2, POINTS3 POINTS4, POINTS5, POINTS6 are created in the

PDVD. The variables named POINTS11, POINTS12, POINTS21, POINTS22, POINTS23 are created in the

PDV

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 27The 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 birdB. a is frogC. a is catD. a is pig

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 28Given the SAS data set ONE:ONENUM VAR1 A2 B3 CWhich SQL procedure program deletes the data set ONE?

A. proc sql;

Page 13: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 29The 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 onlyB. COMPANY,COUNTRY and DEPTC. COMPANY OnlyD. COMPANY and COUNTRY only

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 30What 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 timeB. It requests that a SAS data set the opened and loaded into SAS memory one variable at a timeC. It requests that a SAS data set be opened and loaded into SAS memory one observation at a timeD. It requests that a SAS data set be opened and loaded into SAS memory in its entirety

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 31Given the SAS date sets CLASS1 and CLASS2

Page 14: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

CLASS1 CLASS2NAME COURSE NAME COURSELauren MATH1 Smith MATH2Patel MATH1 Farmer MATH2Chang MATH1 Patel MATH2Chang MATH3 Hiller MATH2The 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 desiredNAMEChangChangLaurenWhich SQL set operator completes the program and generates the desired output?

A. UNION ALLB. EXCEPT ALLC. INTERSECT ALLD. OUTER UNION ALL

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 32The 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 operationsB. To reduce network trafficC. To reduce memory usageD. To reduce the amount of data read

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 33The 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 spaceB. It allows a permanently stored SAS data set to be replacedC. It allows users to access the same SAS data set concurrently

Page 15: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

D. It allows updates in place

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 34Given the SAS data sets ONE and TWO:

The following SAS program is submitted:

Proc sql;Select two.*, budgetFrom one <insert JOIN operator here> twoOn one.year=two.year;Quit;The following output is desired:Which JOIN operator completes the program and generates the desired output?

A. FULL JOINB. LEFT JOINC. RIGHT JOIND. INNER JOIN

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 35The 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;

Page 16: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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);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;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 36The 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 onlyB. COMPANY OnlyC. COMPANY and DEPT onlyD. COMPANY,COUNTRY and DEPT

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 37The following SAS program is submitted:

Page 17: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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;runSASUSER.HISTORY is sorted by the SAS date variable DATE.The following output is required:Date Total1 133 154 25Which 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

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 38Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS datalibrary?

A. MODIFY and CHANGE statementsB. RENAME statement onlyC. CHANGE statement onlyD. MODIFY and RENAME statements

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 39Given has SAS dataset ONE:

Page 18: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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=BONUSB. Select salary, salary*.10 label='BONUS'C. Select salary, salary *.10 column='BONUS'D. Select salary, salary*.10 name='BONUS'

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 40The SAS data set WORK.TEMPDATA contains the variable FMTNAME, START and LABEL and it consistsof 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

Page 19: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

B. All formats created will be stored in the WORK.TEMPDATA SAS setC. An ERROR message is written to the SAS log because the program is incompleteD. It uses the WORK.TEMPDATA SAS data set as input to create the format

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 41Given the non-indexed SAS data set TEMP:TEMPX Y- -P 52P 45A 13A 56R 34R 12R 78The 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 completeswithout errors?

A. By X notsorted;B. By X grouped;C. By Descending X;D. By X;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 42The 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. 3B. NullC. 6D. 0

Correct Answer: CSection: (none)Explanation

Page 20: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 43Given the data set SASHELP.CLASSSASHELP.CLASSNAME AGEMary 15Philip 16Robert 12Ronald 15The 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);

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 44Following 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 specifieshow the data in the SAS data set TEMP will be sorted?

A. ORDEREDBY=XB. GROUPBY=XC. SORTEDBY=XD. SORTSYNC=X

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 45Given 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?

Page 21: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A. DESCRIBE TABLEB. LIST TABLEC. VALIDATE TABLED. CREATE TABLE

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 46The 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 exampleB. It writes the original program code inside the marco definition to the SAS logC. It writes macro execution messages to the SAS.logD. It echoes the text sent to the SAS compiler as a result of macro execution in the SAS log

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 47Given the SAS data set ONE:ONEREP COSTSMITH 200SMITH 400JONES 100SMITH 600JONES 100The following SAS program is submitted:Proc sql;Select rep, avg(cost) as AVERAGEFrom oneGroup 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);B. Having avg(cost)>(select avg(cost) from one);

Page 22: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

C. Where avg(cost)>(select avg(cost) from one);D. Where calculated average > (select avg(cost) from one);

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 48Given the data set SASHELP.CLASS:SASHELP.CLASSNAME AGEMary 15Philip 16Robert 12Ronald 15The 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)";

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 49The 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 8B. The data set TEMP is not created because variable A has an invalid lengthC. The data set TEMP is not created because variable A and B have invalid lengthsD. The data set TEMP is created, but variable X is not created

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 50The following SAS program is submitted:%macro test(var);

Page 23: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

%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. 6B. nullC. 0D. 3

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 51Given the SAS dataset ONEONESALARYThe following SAS program is submittedProc sql;Select * from one<Insert Where expression here>;quit;The following output is desired:SALARYWhich WHERE expression completes the program and generates the desired output?

A. Where salary is notB. Where salary ne nullC. Where salary is not missingD. Where salary ne missing

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 52Given the SAS dataset ONE:ONESALARYThe following SAS program is submitted:Proc sql;Select * from one <insert WHERE expression here>; Quit;The following output is desired:SALARYWhich WHERE expression completes the program and generates the desired output?

A. Where salary ne missingB. Where salary ne nullC. Where salary is not missingD. Where salary is not

Correct Answer: C

Page 24: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Section: (none)Explanation

Explanation/Reference:

QUESTION 53At 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;%mend;%one()What is the result?

A. The marco variable PRCO is stored in the SAS catalog WORK.SASMACRB. The program fails to execute because PROC is a reserved wordC. The macro variable PROC is stored in the local symbol tableD. The macro variable PROC is stored in the global symbol table

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 54The 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. nullB. 2C. 1D. 1.8

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 55Given the non-indexed SAS data set TEMP:TEMPX YP 52P 45A 13A 56R 34R 12R 78The following SAS program is submitted:Proc print data=temp;

Page 25: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

<insert By statement here?Run;Which by statement completes the program, create a listing report that is grouped by X and completeswithout errors?

A. X;B. By X groupd;C. By X notsorted;D. By descending X;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 56Which statement(s) in the DATASETS procedure alter(s) the name of a SAS data set stored in a SAS datalibrary?

A. CHANGE statement onlyB. RENAME statement onlyC. MODIFY and CHANGE statementsD. MODIFY and RENAME statements

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 57Which of the following is true about the COMPRESS=YES data set option?

A. It is most effective with numeric data that represents large numeric valuesB. It is most effective with character data that contains patterns, rather than simple repetitionsC. It uses the Ross Data Compression method to compress numeric dataD. It is most effective with character data that contains repeated characters

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 58The following SAS program is submitted:data new;do i=1,2,3nextfile=compress('March' || |);infile abc filevar=nextfileend=eof;do until (eof);input dept $sales;end;run;What is the purpose of the FILEVAR=option on the INFILE statement?

Page 26: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A. It names the variable NEXTFILE, whose value is output to the SAS data set NEWB. It names the variable NEXTFILE, whose values point to an aggregate storage locationC. It names the variable NEXTFILE, whose value is a SAS file referenceD. It names the variable NEXTFILE, whose change in value causes in INFILE statement to open a new

input file

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 59The following SAS program is submitted:%micro cols1;name age;%mend;%macro cols2;height weight%mendproc print data=sashelp.class;<insert VAR statement here>runWhich 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;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 60The 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?

A. BUFSIZE=specifies the size of the output buffer in kilobytes; BUFNO=specifies the number of outputbuffers

B. BUFSIZE= specifies the size of the input buffer in bytes; BUFFNO= specifies the number of inputbuffers

C. BUFSIZE= specifies the size of the input buffer in kilobytes; BUFNO=specifies the number of inputbuffers

D. BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of outputbuffers

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

Page 27: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 61The SAS data set ONE contains the variables X,Y,Z and W.The following SAS program is submitted:Proc transpose data =oneOut=transName=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 onlyC. new, Y and COL1 onlyD. new, X and Y only

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 62The 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 thecurrent editor window

B. The program creates a DATA step view called SASUSER.RANCH and places it in the SAS logC. The program retrieves the SAS source code that creates the view and places it in the output windowD. The program retrieves the SAS source code that creates the view and places it in the SAS log

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 63The 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 lengthsB. The data set TEMP is not created because variable AS has an invalid lengthC. The data set TEMP is created, but variable X is not createdD. The data set TEMP is created and variable X has a length of 8

Correct Answer: BSection: (none)Explanation

Page 28: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 64Which SAS integrity constraint type ensures that a specific set or range of values are the only values in avariable?

A. CHECKB. NOT NULLC. PRIMARY KEYD. UNIQUE

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

A. DATASETSB. REGISTRYC. MODIFYD. FORMAT

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 66The 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 threeB. What displays is twoC. What displays is oneD. What displays is last

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 67The 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)?

Page 29: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A. The variables named POINTS10, POINTS15,POINTS20,POINTS25,POINTS30, POINTS35 are createdin the PDV

B. No variables are created in the PDVC. The variables named POINTS1, POINTS2, POINTS4, POINTS5, POINTS6 are created in the PDVD. The variables named POINTS11, POINTS12, POINTS13, POINTS21, POINTS22, POINTS23 are

created in the PDV

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 68Which DICTIONARY table provides information on all the tables containing a variable named LASTNAME?

A. DICTIONARY.COLUMNSB. DICTIONARY.VARIABLESC. DICTIONARY.MEMBERSD. DICTIONARY.TABLES

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 69What 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 functionB. A different sequence of random numbers with each program executionC. A random number between 0 and 123D. A consistent sequence of random numbers with each program execution

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 70What is an advantage of using a hash object in a SAS DATA step?

A. The hash object persists after the DATA step has executedB. The hash object key values can be multiple numeric and character data valuesC. The hash object automatically sorts the dataD. The hash object does not require unique keys

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 30: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 71The 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 TWOmacro

B. A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol tableC. A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol tableD. A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE

macro

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 72Which of the following statement(s) in the DATASETS procedure alters the name of a SAS data set storedin a SAS data library?

A. RENAME statement onlyB. CHANGE statement onlyC. MODIFY and RENAME statementsD. MODIFY and CHANGE statements

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 73The 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;Which one of the following statements completes the above and resolves title1 to "Forresearch&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);

Page 31: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

http://www.gratisexam.com/

QUESTION 74Which one of the following options controls the pagesize of a SAS data set?

A. SIZE=B. BUFNO=C. BUFSIZE=D. PAGESIZE=

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 75Given the following SAS data set ONE:ONEREP COSTSMITH 200SMITH 400JONES 100SMITH 600JONES 100JONES 200JONES 400SMITH 800JONES 100JONES 300The following SAS program is submitted:proc sql;select rep, avg(cost) as AVERAGEfrom onegroup by rephaving avg(cost) > (select avg(cost) from one); quit;Which one of the following reports is generated?

A. REP AVERAGEJONES 200

B. REP AVERAGEJONES 320

C. REP AVERAGESMITH 320

D. REP AVERAGESMITH 500

Correct Answer: D

Page 32: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Section: (none)Explanation

Explanation/Reference:

QUESTION 76The 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 onlyB. CPU usage onlyC. I/O and CPU usageD. temporary disk usage

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 77The following SAS program is submitted:data one;do i = 1 to 10;ptobs = ceil(ranuni(0) * totobs);set temp point = ptobsnobs = totobs;output;end;stop;run;The SAS data set TEMP contains 2,500,000 observations. Which one of the following represents thepossible values for PTOBS?

A. any integer between 1 and 10B. any real number between 0 and 1C. any integer between 1 and 2,500,000D. any real number between 1 and 2,500,000

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 78Which one of the following programs contains a syntax error?

A. proc sql;select product.*, cost.unitcost, sales.quantity from product p, cost c, sales swhere p.item = c.item and

B. item = s.item;quit;

C. proc sql;select product.*, cost.unitcost, sales.quantity from product, cost, sales

Page 33: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

where product.item = cost.item andproduct.item = sales.item;quit;

D. proc sql;select p.*, c.unitcost, s.quantityfrom product as p, cost as c, sales as swhere p.item = c.item and

E. item = s.item;quit;

F. proc sql;select p.*, c.unitcost, s.quantityfrom product, cost, saleswhere product.item = cost.item andproduct.item = sales.item;quit;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 79The 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.ranchB. work.housesC. WORK.RANCHD. WORK.HOUSES

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 80Given the following SAS data sets ONE and TWO:ONE TWONUM COUNTRY NUM CITY1 CANADA 3 BERLIN2 FRANCE 5 TOKYO3 GERMANY 4 BELGIUM5 JAPANThe following SAS program is submitted:proc sql;select countryfrom onewhere not exists(select *

Page 34: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

from twowhere one.num = two.num);quit;Which one of the following reports is generated?

A. COUNTRYGERMANYJAPAN

B. COUNTRYFRANCEBELGIUM

C. COUNTRYCANADAFRANCEBELGIUM

D. COUNTRYCANADAFRANCEGERMANY

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 81Which 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.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 82The 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 81 year Num 8 0 3 sales Char 8 161 year Num 8 0Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets aresorted by the variable YEAR.The following SAS program is submitted:data three;merge one two;by year;run;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.

Page 35: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 83Given 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);

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 84The 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.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 85Consider 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 rununder a different operating system.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 followingexplains why the PRINT procedure fails?

Page 36: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 86Which 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.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 87Given the following SAS data sets ONE and TWO:ONE TWOYEAR QTR BUDGET YEAR QTR SALES2001 3 500 2001 4 3002001 4 400 2002 1 6002002 1 700The following SAS program is submitted:proc sql;select one.*, salesfrom one, two;quit;Which one of the following reports is generated?

A. YEAR QTR BUDGET SALES2001 4 400 3002002 1 700 600

B. YEAR QTR BUDGET SALES2001 3 500 .2001 4 400 3002002 1 700 600

C. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 600

D. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 3002001 3 500 6002001 4 400 6002002 1 700 600

Correct Answer: D

Page 37: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Section: (none)Explanation

Explanation/Reference:

QUESTION 88Given the following SAS data set ONE:ONENUM VAR1 A2 B3 CWhich one of the following SQL programs deletes the SAS data set ONE?

A. proc sql;delete table one;quit;

B. proc sql;alter table onedrop num, var;quit;

C. proc sql;drop table one;quit;

D. proc sql;delete from one;quit;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 89Given the following SAS data sets ONE and TWO:ONE TWOYEAR QTR BUDGET YEAR QTR SALES2001 3 500 2001 4 3002001 4 400 2002 1 600 ]2002 1 700The following SAS program is submitted:proc sql;select one.*, salesfrom one, twowhere one.year = two.year;quit;Which one of the following reports is generated?

A. YEAR QTR BUDGET SALES2001 4 400 3002002 1 700 600

B. YEAR QTR BUDGET SALES2001 3 500 .2001 4 400 3002002 1 700 600

C. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 600

Page 38: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

D. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 3002001 3 500 6002001 4 400 6002002 1 700 600

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 90The SAS data set TEMP has the following distribution of values for variable A:A Frequency1 500,0002 500,0006 7,000,0008 3,000Which one of the following SAS programs requires the least CPU time to be processed?

A. data new;set temp;if a = 8 thenb = 'Small ';else if a in(1, 2) thenb = 'Medium';else if a = 6 thenb = 'Large';run;

B. data new;set temp;if a in (1, 2) thenb = 'Medium';else if a = 8 thenb = 'Small';else if a = 6 thenb = 'Large';run;

C. data new;set temp;if a = 6 thenb = 'Large ';else if a in (1, 2) thenb = 'Medium';else if a = 8 thenb = 'Small';

D. data new;set temp;if a = 6 thenb = 'Large ';if a in (1, 2) thenb = 'Small';run;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 39: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 91The 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. 1B. 2C. 1.8D. null

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 92The following SAS program is submitted:%let lib = %upcase(sasuser);proc sql;select nvarfrom dictionary.tableswhere libname = "&lib";quit;Given that several SAS data sets exist in the SASUSER library, which one of the following is generated asoutput?

A. no result setB. a syntax error in the logC. a report showing the names of each table in SASUSERD. a report showing the number of columns in each table in SASUSER

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 93Given the following SAS data set ONE:ONEGROUP SUMA 765B 123C 564The 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.

Page 40: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

D. Macro variable GROUP has a value of 1452.

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 94The SAS data set ONE consists of five million observations and has 25 variables. Which one of thefollowing SAS programs successfully creates three new variables TOTREV, TOTCOST, and PROFIT andrequires the least CPU time to be processed?

A. data two;set one;totrev = sum(price * quantity);totcost = sum(fixed,variable);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;

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 95Given the following SAS data set ONE:ONECOUNTRY CITY VISITUSA BOSTON 10UK LONDON 5USA DALLAS 10UK MARLOW 10USA BOSTON 20UK LONDON 15USA DALLAS 10The following SAS program is submitted:proc sql;

Page 41: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

select country, city, sum(visit) as TOTALfrom onegroup by country, cityorder by country, total desc;quit;Which one of the following reports is generated?

A. COUNTRY CITY TOTALUK MARLOW 10UK LONDON 20USA BOSTON 50USA DALLAS 20

B. COUNTRY CITY TOTALUK LONDON 20UK MARLOW 10USA BOSTON 50USA DALLAS 20

C. COUNTRY CITY TOTALUSA BOSTON 50

D. COUNTRY CITY TOTALUK MARLOW 10UK LONDON 20USA DALLAS 20USA BOSTON 50

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 96Given the following SAS data sets ONE and TWO:ONE TWONUM CHAR1 NUM CHAR21 A 2 X2 B 3 Y4 D 5 VThe following SAS program is submitted creating the output table THREE:data three;set one two;run;THREENUM CHAR1 CHAR21 A2 B4 D2 X3 Y5 VWhich one of the following SQL programs creates an equivalent SAS data set THREE?

A. proc sql;create table three asselect *from oneouter union corrselect *from two;quit;

B. proc sql;create table three as

Page 42: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

select *from oneouter unionselect *from two;quit;

C. proc sql;create table three asselect *from oneouter unionselect *quit;

D. proc sql;create table three asselect *from oneunion corrselect *from two;quit;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 97Which one of the following automatic SAS macro variables contains the return code from a previouslyexecuted step?

A. &RCB. &ERRC. &SYSRCD. &SYSERR

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 98The SAS data set ONE has a variable X on which an index has been created. The data sets ONE andTHREE 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;

Page 43: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

D. data two;set three;set one (key = X);run;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 99Given the following SAS data set ONE:ONEREP AREA COSTSMITH NORTH 100SMITH SOUTH 200JONES EAST 100SMITH NORTH 300JONES WEST 100JONES NORTH 200JONES NORTH 400SMITH NORTH 400JONES WEST 100JONES WEST 300The following SAS program is submitted:proc sql;select rep, area, count(*) as TOTALfrom onegroup by rep, area;quit;Which one of the following reports is generated?

A. REP AREA COUNTJONES EAST 100JONES NORTH 600JONES WEST 500SMITH NORTH 800SMITH SOUTH 200

B. REP AREA TOTALJONES EAST 100JONES NORTH 600JONES WEST 500SMITH NORTH 800SMITH SOUTH 200

C. REP AREA TOTALJONES EAST 1JONES NORTH 2JONES WEST 3SMITH NORTH 3JONES WEST 3SMITH NORTH 3SMITH SOUTH 1

D. REP AREA TOTALJONES EAST 1JONES NORTH 2JONES WEST 3SMITH NORTH 3SMITH SOUTH 1SMITH NORTH 3SMITH SOUTH 1

Page 44: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: CDSection: (none)Explanation

Explanation/Reference:

QUESTION 100Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS dataset?

A. MODIFYB. FORMATC. CONTENTSD. DATASETS

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 101Given the following SAS data set SASUSER.HIGHWAY:SASUSER.HIGHWAYSTEERING SEATBELT SPEED STATUS COUNTabsent no 0-29 serious 31absent no 0-29 not 1419absent no 30-49 serious 191absent no 30-49 not 2004absent no 50+ serious 216The following SAS program is submitted:%macro highway;proc sql noprint;select count(distinct status)into :numgrpfrom sasuser.highway;%let numgrp = &numgrp;select distinct statusinto :group1-:group&numgrpfrom sasuser.highway;quit;%do i = 1 %to &numgrp;proc print data = sasuser.highway;where status = "&&group&i" ;run;%end;%mend;%highwayHow many reports are produced by the above program?

A. 0B. 1C. 2D. 5

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 45: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 102Text is sent to the SAS compiler as a result of macro execution. Which one of the following SAS systemoptions writes that text to the log?

A. MPRINTB. MLOGICC. MSOURCED. SOURCE2

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

A. CATEGORY EARNINGSM 200M 110F 150F 210

B. CATEGORY EARNINGSM .M 110F 150F 210

C. CATEGORY SALARY BONUS EARNINGSM 200 . 200M 100 10 110F 100 50 150F 200 10 210

D. CATEGORY SALARY BONUS EARNINGSM 200 . .M 100 10 110M 200 . 200M 100 10 110F 100 50 150F 200 10 210

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 46: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 104Which one of the following SAS SORT procedure options eliminates identical consecutive observations?

A. NODUPB. UNIQUEC. DISTINCTD. NODUPKEY

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 105The following SAS program is submitted:data temp;array points{3,2}_temporary_ (10,20,30,40,50,60); score = points{2,1}run;Which one of the following is the value of the variable SCORE in the data set TEMP?

A. 10B. 20C. 30D. 40

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 106The 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. 10B. MILDC. WARMD. BELOW FREEZING

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 107Which one of the following SAS programs uses the most amount of memory resources for output buffers?

Page 47: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A. data new(bufsize = 1000 bufno = 5);set temp;run;

B. data new(bufsize = 1000 bufno = 2);set temp;run;

C. data new(bufsize = 2000 bufno = 3);set temp;run;

D. data new(bufsize = 4000 bufno = 1);set temp;run;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 108Given the following SAS data sets ONE and TWO:ONE TWONUM CHAR1 NUM CHAR21 A1 2 X11 A2 2 X22 B1 3 Y2 B2 5 V4 DThe following SAS program is submitted creating the output table THREE:proc sql;create table three asselect one.num, char1, char2from one, twowhere one.num = two.num;quit;THREENUM CHAR1 CHAR2

2 B1 X12 B1 X22 B2 X12 B2 X2Which 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;set two;by num;run;merge one two;by num;run;

C. data three;set one;set two;by num;run;

Page 48: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

by num;run;

D. data three;set one;do i = 1 to numobs;set two(rename = (num = num2)) point = inobs = numobs;if num2 = num then output;end;drop num2;run;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 109The 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;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 110Which 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.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 111Given the following SAS data sets ONE and TWO:ONE TWOOBS COMMON X OBS COMMON Y1 A 10 1 A 1

Page 49: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

2 A 13 2 A 33 A 14 3 B 44 B 9 4 B 25 C 8 5 C 56 C 14The 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 Y1 A 10 12 A 13 33 A 14 34 B 9 45 B 9 26 C 8 57 C 14 5

B. OBS COMMON X Y1 A 10 12 A 13 33 B 9 44 C 8 5

C. OBS COMMON X Y1 A 10 12 A 13 33 B 14 44 B 9 25 C 8 5

D. OBS COMMON X Y1 A 10 12 A 13 13 A 14 14 A 10 35 A 13 36 A 14 37 B 9 48 B 9 29 C 8 510 C 14 5

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 112Assume today is Tuesday, July 23, 2002. Which one of the following statements submitted at the beginningof 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.);

Correct Answer: CSection: (none)Explanation

Page 50: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 113The following SAS program is submitted:%macro test(var);%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;%let type = %index(&jobs,&var);%mend;%test(SMITH)Which one of the following is the resulting value of the macro variable TYPE?

A. 0B. 3C. 6D. null

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 114Which one of the following SAS integrity constraint types ensures that a specific set or range of values arethe only values in a variable?

A. CHECKB. UNIQUEC. FORMATD. DISTINCT

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 115Which one of the following options displays the value of a macro variable in the SAS log?

A. MACROB. SOURCEC. SOURCE2D. SYMBOLGEN

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

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

Page 51: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

A. 3B. 7C. 8D. 11

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 117When is it appropriate to create indexes on a SAS data set for efficient processing?

A. if small subsets of data are often retrievedB. if the key variable has very few unique valuesC. if the data are often used for BY group processingD. if the SAS data set file page count is less than three pages

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 118The 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 1920prior to submitting the above program. Which one of the following is the value of YEARCUTOFF when themacro finishes execution?

A. 1900B. 1920C. 1950D. 2000

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 119

Page 52: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 120Given the following SAS data set ONE:ONELEVEL AGE1 102 203 202 101 102 303 102 203 301 10The following SAS program is submitted:proc sql;select level, max(age) as MAXfrom onegroup by levelhaving max(age) > (select avg(age) from one); quit;Which one of the following reports is generated?

A. LEVEL AGE2 203 20

B. LEVEL AGE2 303 30

C. LEVEL MAX2 203 30

D. LEVEL MAX2 303 30

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 121Which one of the following is true regarding the KEEP statement?

A. The KEEP statement is available in both the DATA and the PROC steps.

Page 53: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

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.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 122Which one of the following displays the definition of a stored SQL procedure view in the SAS log?

A. ECHOVIEW optionB. EXPANDVIEW optionC. VALIDATE VIEW statementD. DESCRIBE VIEW statement

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 123The 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. 2B. 3C. 5D. 6

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 124Which 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.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 54: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

QUESTION 125The DICTIONARY.MACROS table stores information about which of the following?

A. user defined macro variables onlyB. system defined macro variables onlyC. both user and system defined macro variablesD. macros stored in the autocall macro library only

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 126Given the following SAS data set named WORK.INTERNAT:WORK.INTERNATLOCATION SUMUSA 30EUR 40The following SAS program is submitted:%let LOC = Usa;proc sql;select *from internatwhere 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.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 127The 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 &aB. a is catC. a is pigD. a is bird

Correct Answer: BSection: (none)Explanation

Page 55: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 128The following SAS program is submitted:proc sql;select *from dictionary.tables;quit;Which one of the following is reported?

A. metadata on all tables in all librariesB. metadata on all tables in the WORK library onlyC. metadata on all tables in the SASUSER library onlyD. metadata on all tables in the DICTIONARY library only

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 129The 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)

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 130Which one of the following options is available for SAS macro debugging?

A. MLOGICB. MDEBUGC. MSGLEVELD. MAUTOSOURCE

Correct Answer: ASection: (none)Explanation

Page 56: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation/Reference:

QUESTION 131The 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. firstB. &firstC. yournameD. &yourname

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 132Given the following SAS data sets ONE and TWO:ONE TWOYEAR QTR BUDGET YEAR QTR SALES2001 3 500 2001 4 3002001 4 400 2002 1 6002002 1 700The following SAS program is submitted:proc sql;select one.*, salesfrom one left join twoon one.year = two.year;quit;Which one of the following reports is generated?

A. YEAR QTR BUDGET SALES2001 3 500 .

B. YEAR QTR BUDGET SALES2001 4 400 3002002 1 700 600

C. YEAR QTR BUDGET SALES2001 3 500 .2001 4 400 3002002 1 700 600

D. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 600

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 133Given the following SAS data sets ONE and TWO:ONE TWOYEAR QTR BUDGET YEAR QTR SALES

Page 57: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

2001 3 500 2001 4 3002001 4 400 2002 1 6002002 1 700The following SAS program is submitted:proc sql;select one.*, salesfrom one, two;quit;Which one of the following reports is generated?

A. YEAR QTR BUDGET SALES2001 4 400 3002002 1 700 600

B. YEAR QTR BUDGET SALES2001 3 500 .2001 4 400 3002002 1 700 600

C. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 600

D. YEAR QTR BUDGET SALES2001 3 500 3002001 4 400 3002002 1 700 3002001 3 500 6002001 4 400 6002002 1 700 600

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 134Given the following SAS program:proc sql;select product, type, sum(sales) as revenuefrom onegroup by product, type;quit;Which one of the following clauses should be added to the program to sort the output by PRODUCT anddecreasing REVENUE?

A. order by 1, 3B. order by 1, 3 descC. orderby product, revenue descD. order by product, desc revenue

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 135The following SAS program is submitted:%macro test(var);proc print data = sasuser.class;

Page 58: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

where age > &var;run;%mend;Which type of parameter is the macro variable VAR?

A. defaultB. keywordC. positionalD. command

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 136The following SAS program is submitted:proc datasets lib = testdata;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.onenum format = 4.label = 'Number';quit;

B. proc sql;alter table testdata.onemodify num format = 4.label = 'Number';quit;

C. proc sql;modify table testdata.onealter num format = 4.label = 'Number';quit;

D. proc sql;alter table testdata.onemodify num (format = 4.label = 'Number');quit;

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 137Which one of the following techniques concatenates data in SAS?

A. the APPEND procedureB. the DATA step with a MERGE statementC. the DATA step with a COMBINE statementD. the INTERSECT operator in the SQL procedure

Page 59: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 138In 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 asselect *from one, twowhere one.char1 > two.char1;quit;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 139Given the following SAS data set ONE:ONECATEGORY AGE SALARY BONUSM 28 200 20M 25 100 10M 28 300 10M 33 300 30F 18 100 50F 25 200 10F 35 400 50The following SQL program is submitted:proc sql;create table two asselect distinct agefrom onewhere age < 33;quit;How many rows are written to the SAS data set TWO?

A. 3B. 4C. 5D. 6

Page 60: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 140Which one of the following should be avoided when creating and using an SQL procedure view?

A. using a HAVING clauseB. using summary functionsC. referencing a view multiple times in the same programD. creating views on tables whose structures remain constant

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 141The 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.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 142The SAS data set ONE contains the variables X, Y, Z, and W.The following SAS program is submitted:proc transpose data = oneout = transname = 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 WB. _NAME_, X, and YC. new, X, and COL1D. new, X, Y, and _COL1_

Correct Answer: CSection: (none)

Page 61: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation

Explanation/Reference:

QUESTION 143Given the following SAS data set ONE:ONEJOB LEVEL SALARYACC 2 300SEC 1 100SEC 2 200MGR 3 700ACC 1 .ACC 3 .MGR 2 400The following SAS data set TWO is created:TWOJOB LEVEL BONUSACC 2 30MGR 3 70MGR 2 40Which one of the following SAS programs creates data set TWO?

A. proc sql;create table two asselect job, level, salary * 0.1 as bonusfrom onewhere bonus > 20;quit;

B. proc sql;create table two asselect job, level, salary * 0.1 as bonusfrom onewhere salary > 20;quit;

C. proc sql;create table two asselect job, level, salary * 0.1 as bonusfrom onewhere calculated salary * 0.1 > 20;quit;

D. proc sql;D.proc sql;create table two asselect job, level, salary * 0.1 as bonusfrom onewhere calculated bonus > 20;quit;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 144Given the following SAS data set ONE:ONECATEGORY AGE SALARY BONUSM 28 200 20M 25 100 10M 28 300 10

Page 62: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

M 33 300 30F 18 100 50F 25 200 10F 35 400 50The following SAS program is submitted:proc sql;select distinct category,sum(sum(salary,bonus)) as EARNINGSfrom onewhere age < 30group by categoryhaving calculated EARNINGS < 500;quit;Which one of the following reports will be generated?

A. CATEGORY EARNINGSF 360

B. CATEGORY EARNINGSM 640F 360

C. CATEGORY EARNINGSF 150F 210

D. CATEGORY EARNINGSM 220M 110M 310F 150F 210

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 145The following are values of the variable STYLE from the SAS data set SASUSER.HOUSES:SASUSERS.HOUSESOBS STYLE1 RANCH2 SPLIT3 CONDO4 TWOSTORY5 RANCH6 SPLIT7 SPLITThe following SAS program is submitted:proc sql noprint;select distinct styleinto :styles separated by ' 'from sasuser.housesorder by style;quit;Which one of the following is the value of the resulting macro variable?

A. CONDO RANCH SPLIT TWOSTORYB. RANCH SPLIT CONDO TWOSTORYC. CONDO RANCH RANCH SPLIT SPLIT SPLIT TWOSTORYD. RANCH SPLIT CONDO TWOSTORY RANCH SPLIT SPLIT

Page 63: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 146The 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. 5B. 5.5C. .5 + 5D. null

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 147Which 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.

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 148Given the following SAS data set ONE:ONEDIVISION SALESA 1234A 3654B 5678The following SAS program is submitted:data _null_;set one;by division;if first.division thencall symput('mfirst',sales);if last.division thencall symput('mlast',sales);run;Which one of the following is the value of the macro variable MFIRST when the above program finishesexecution?

A. null

Page 64: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

B. 1234C. 3654D. 5678

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 149The 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 theabove 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;quit;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 150Which one of the following SAS programs displays the descriptor portion of each data set stored in theSASUSER 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;

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 151

Page 65: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Given the following SAS data sets ONE and TWO:ONE TWOOBS COMMON X OBS COMMON Y1 A 10 1 A 12 A 13 2 A 33 A 14 3 B 44 B 9 4 B 25 C 8 5 C 56 C 14The following SAS DATA step is submitted: data combine; set one; set two; run; Which one of the followingrepresents the data values stored in data set COMBINE?

A. OBS COMMON X Y1 A 10 12 A 13 33 A 14 34 B 9 45 B 9 26 C 8 57 C 14 5

B. OBS COMMON X Y1 A 10 12 A 13 33 B 9 44 C 8 5

C. OBS COMMON X Y1 A 10 12 A 13 33 B 14 44 B 9 25 C 8 5

D. OBS COMMON X Y1 A 10 12 A 13 13 A 14 14 A 10 35 A 13 36 A 14 37 B 9 48 B 9 29 C 8 510 C 14 5

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 152The 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);

Correct Answer: DSection: (none)

Page 66: SAS-  · PDF fileA00-212qa153 Number : 000-000 Passing Score : 800 Time Limit : 120 min File Version : 1.0   SAS Institute A00-212 A00-212 SAS Advanced

Explanation

Explanation/Reference:

QUESTION 153The 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.

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

http://www.gratisexam.com/


Recommended