83
https://www.gratisexam.com/ A00-212.exam.106q Number : A00-212 Passing Score : 800 Time Limit : 120 min https://www.gratisexam.com/ A00-212 SAS Advanced Programming

SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A00-212.exam.106q

Number: A00-212Passing Score: 800Time Limit: 120 min

https://www.gratisexam.com/

A00-212

SAS Advanced Programming

Page 2: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Exam A

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

https://www.gratisexam.com/

Page 3: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. FULL JOIN

B. INNER JOIN

C. LEFT JOIN

D. RIGHT JOIN

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 2Given the SAS data set SAUSER.HIGWAY:

SASUSER.HIGHWAY

The following SAS program is submitted:

%macro highway;proc sql nonprint;%let numgrp=6;select distinct status into:group1-:group&numgrp from sasuser.highway;quit;%do i=1 %to &numgrp;proc print data =sasuser.highway;where status ="&&group&I";run;

Page 4: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

%end;%mend;%highway

How many reports are produced?

A. 2

B. 6

C. 0

D. 5

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 3The 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:

Page 5: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

QUESTION 4Given 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. 1234

B. sales

C. 5678

D. null

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 5The following SAS program is submitted:

%let first=yourname;%let last=first;%put &&&last;

Page 6: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

What is written to the SAS Log?

A. First

B. Yourname

C. &&First

D. &yourname

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 6The following SAS program is submitted:

%let a=cat;%macro animal(a=frog);%let a=bird;%mend;%animal(a=pig)%put a is &a;

What is written to the SAS log?

A. a is pig

B. a set cat

C. a is frog

D. a is bird

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 7

Page 7: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Which 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 8The 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?

Page 8: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

https://www.gratisexam.com/

A. A report showing the names of the columns in each table in SASUSER

B. A report showing the number of columns in each table in SASUSER

C. A report showing the numeric columns in each table in SASUSER

D. A report showing the number of numeric columns in each table in SASUSER

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 9The following SAS program is submitted:

%macro loop;data one;%do I=1 %to 3;var&I=&I;%endrun;%mend;%loop

After this program executes; the following is written to the SAS log:(LOOP): Beginning execution(LOOP): %DO loop beginning; index variable l; start value is 1; stop value is 3; by value is 1(LOOP): %DO loop index variable l is now 2; loop will iterate again(LOOP): %DO loop index variable l is no 3; loop will iterate again(LOOP): %DO loop index variable l is no 4; loop will iterate again(LOOP): Ending execution

Which SAS system option displays the notes in the SAS log?

A. SYMBOLGEN

B. MLOGIC

C. MACRO

D. MPRINT

Page 9: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 10The following SAS program is submitted:

proc contents data = testdata.one;run;

Which SQL procedure program produces similar information about the column attributes of the dataset TESTDATA.ONE?

A. proc sql;Contents table testdata.one;Quit;

B. proc sql;Describe table testdata.one;Quit;

C. proc sql;describe testdata.one;Quit;

D. proc sql;Contents testdata.one;Quit;

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 11The following SAS program is submitted:

data temp;array points{2,3} (10,15,20,25,30,35);

Page 10: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

run;

What impact does the ARRAY statement have in the Program Data Vector(PDV)?

A. No variable are created in the PDV

B. The variables named POINTS10, POINTS15, POINTS20, POINTS25, POINTS30, POINTS35 are created in the PDV

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

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

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 12Given the SAS date sets CLASS1 and CLASS2CLASS1 CLASS2NAME COURSE NAME COURSELauren MATH1 Smith MATH2Patel MATH1 Farmer MATH2Chang MATH1 Patel MATH2Chang MATH3 Hiller MATH2

The following SAS program is submitted:

Proc sql;Select name from CLASS1<insert SQL set operator here>select name from CLASS;quit;The following output is desiredNAMEChangChangLauren

Which SQL set operator completes the program and generates the desired output?

A. UNION ALL

Page 11: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

B. EXCEPT ALL

C. INTERSECT ALL

D. OUTER UNION ALL

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 13The following SAS program is submitted:

options reuse=YES;data sasuser RealEstate(compress=CHAR);set sasuser houses;run;

What is the effect of the REUSE=YES SAS system option?

A. It tracks and recycles free space

B. It allows a permanently stored SAS data set to be replaced

C. It allows users to access the same SAS data set concurrently

D. It allows updates in place

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 14The SAS data set ONE contains fifty million observations and contains the variablePRICE, QUANTITY, FIXED and VARIABLE. Which SAS program successfully creates three new variables TOTREV, TOTCOST and PROFIT and requires theleast amount of CPU resources to be processed?

A. data two;Set one;

Page 12: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 15The following SAS program is submitted:

data temp;set sasuser.history(kep=date);format date qtr<insert BY statement here>

Page 13: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

if first.date then total=0;total+1;if last.date;run;proc print data=temp;run

SASUSER.HISTORY is sorted by the SAS date variable DATE.

The following output is required:

Date Total1 133 154 25

Which By statement completes the data step and successfully generates the required output?

A. by groupformat date;

B. by formateed date;

C. by notsorted date;

D. by date qtr

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

A. MODIFY and CHANGE statements

B. RENAME statement only

C. CHANGE statement only

D. MODIFY and RENAME statements

Correct Answer: CSection: (none)

Page 14: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation

Explanation/Reference:

QUESTION 17Given 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 completes without errors?

A. By X notsorted;

B. By X grouped;

C. By Descending X;

D. By X;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 18Given the data set SASHELP.CLASS

SASHELP.CLASS

Page 15: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

NAME 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 19Following SAS program is submitted:

data temp(<insert option here>);infile 'rawdata';input x $ y z;run;

RAWDATA is a file reference to an external file that is ordered by the variable X.

Which option specifies how the data in the SAS data set TEMP will be sorted?

Page 16: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

https://www.gratisexam.com/

A. ORDEREDBY=X

B. GROUPBY=X

C. SORTEDBY=X

D. SORTSYNC=X

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 20Given 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

Page 17: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation/Reference:

QUESTION 21At 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.SASMACR

B. The program fails to execute because PROC is a reserved word

C. The macro variable PROC is stored in the local symbol table

D. The macro variable PROC is stored in the global symbol table

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 22The following SAS program is submitted:

%let value=9;%let add=5;%let newval=%eval(&value/&add);

What is the value of the macro variable NEWVAL?

A. null

B. 2

Page 18: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

C. 1

D. 1.8

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 23Given the non-indexed SAS data set TEMP:

TEMPX YP 52P 45A 13A 56R 34R 12R 78

The following SAS program is submitted:

Proc print data=temp;<insert By statement here?Run;Which by statement completes the program, create a listing report that is grouped by X and completes without errors?

A. X;

B. By X groupd;

C. By X notsorted;

D. By descending X;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 19: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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

A. It is most effective with numeric data that represents large numeric values

B. It is most effective with character data that contains patterns, rather than simple repetitions

C. It uses the Ross Data Compression method to compress numeric data

D. It is most effective with character data that contains repeated characters

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

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

A. It names the variable NEXTFILE, whose value is output to the SAS data set NEW

B. It names the variable NEXTFILE, whose values point to an aggregate storage location

C. It names the variable NEXTFILE, whose value is a SAS file reference

D. It names the variable NEXTFILE, whose change in value causes in INFILE statement to open a new input file

Correct Answer: DSection: (none)Explanation

Page 20: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation/Reference:

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

A. CHECK

B. NOT NULL

C. PRIMARY KEY

D. UNIQUE

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 27The following SAS program is submitted:

%let test=one;%let one=two;%let two=three;%let three=last;%put what displays is &&&&&test;

What is the written to the SAS log?

A. What displays is three

B. What displays is two

C. What displays is one

D. What displays is last

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

Page 21: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

QUESTION 28The following SAS program is submitted:

data temp:array points { 2,3 } (10,15,20,25,30,35);run;

What impact does the ARRAY statement have in the program Data vector (PDV)?

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

B. No variables are created in the PDV

C. The variables named POINTS1, POINTS2, POINTS4, POINTS5, POINTS6 are created in the PDV

D. The variables named POINTS11, POINTS12, POINTS13, POINTS21, POINTS22, POINTS23 are created in the PDV

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

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

A. DICTIONARY.COLUMNS

B. DICTIONARY.VARIABLES

C. DICTIONARY.MEMBERS

D. DICTIONARY.TABLES

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 30What is generated as a result of submitting the RANUNI function with a seed of 123?

Page 22: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. A missing value because 123 is an invalid argument for the RANUNI function

B. A different sequence of random numbers with each program execution

C. A random number between 0 and 123

D. A consistent sequence of random numbers with each program execution

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

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

A. The hash object persists after the DATA step has executed

B. The hash object key values can be multiple numeric and character data values

C. The hash object automatically sorts the data

D. The hash object does not require unique keys

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

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

A. RENAME statement only

B. CHANGE statement only

C. MODIFY and RENAME statements

D. MODIFY and CHANGE statements

Correct Answer: BSection: (none)

Page 23: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation

Explanation/Reference:

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

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

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

A. proc sql;select product.*, cost.unitcost, sales.quantityfrom product p, cost c, sales swhere p.item = c.item andp.item = s.item;quit;

B. proc sql;

Page 24: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

select product.*, cost.unitcost, sales.quantityfrom product, cost, saleswhere product.item = cost.item andproduct.item = sales.item;quit;

C. proc sql;select p.*, c.unitcost, s.quantityfrom product as p, cost as c, sales as swhere p.item = c.item andp.item = s.item;quit;

D. 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 35The following SAS code is submitted:

%macro houses(dsn = houses,sub = RANCH);data &dsn;set sasuser.houses;if style = "¬";run;%mend;%houses(sub = SPLIT)%houses(dsn = ranch)%houses(sub = TWOSTORY)

Which one of the following is the value of the automatic macro variable SYSLAST?

A. work.ranch

Page 25: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

B. work.houses

C. WORK.RANCH

D. WORK.HOUSES

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 36Given the following SAS data sets ONE and TWO:

ONE TWONUM COUNTRY NUM CITY1 CANADA 3 BERLIN2 FRANCE 5 TOKYO3 GERMANY 4 BELGIUM5 JAPAN

The following SAS program is submitted:proc sql;select countryfrom onewhere not exists(select *from twowhere one.num = two.num);quit;

Which one of the following reports is generated?

https://www.gratisexam.com/

Page 26: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. COUNTRYGERMANYJAPAN

B. COUNTRYFRANCEBELGIUM

C. COUNTRYCANADAFRANCEBELGIUM

D. COUNTRYCANADAFRANCEGERMANY

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 37Which 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 38The variable attributes of SAS data sets ONE and TWO are shown below: ONE TWO

Page 27: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

# Variable Type Len Pos # Variable Type Len Pos2 sales Num 8 8 2 budget Num 8 81 year Num 8 0 3 sales Char 8 161 year Num 8 0

Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR.The following SAS program is submitted:

data three;merge one two;by year;run;

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.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 39Given 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)

Page 28: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation

Explanation/Reference:

QUESTION 40The 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 41Consider the following SAS log:229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;230 set sasuser.houses;231 if style = 'RANCH' then output sasuser.ranch;232 else if style = 'CONDO' then output sasuser.condo;233 run;NOTE: DATA STEP view saved on file SASUSER.RANCH.NOTE: A stored DATA STEP view cannot run under a different operating system.234235 proc print data = sasuser.condo;ERROR: File SASUSER.CONDO.DATA does not exist.236 run;NOTE: The SAS System stopped processing this step because of errors.Which one of the following explains why the PRINT procedure fails?

Page 29: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 42Which 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 43Given 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;

Page 30: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 5002001 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 44Given the following SAS data set ONE:

ONENUM VAR1 A2 B3 C

Which one of the following SQL programs deletes the SAS data set ONE?

Page 31: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 45The SAS data set ONE consists of five million observations and has 25 variables.Which one of the following SAS programs successfully creates three new variablesTOTREV, TOTCOST, and PROFIT and requires the least CPU time to be processed?

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

Page 32: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 46Given 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;select country, city, sum(visit) as TOTALfrom onegroup by country, cityorder by country, total desc;quit;

Which one of the following reports is generated?

Page 33: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 47Given the following SAS data sets ONE and TWO:

ONE TWONUM CHAR1 NUM CHAR21 A 2 X2 B 3 Y4 D 5 V

The following SAS program is submitted creating the output table THREE:data three;set one two;run;THREENUM CHAR1 CHAR2

Page 34: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

1 A2 B4 D2 X3 Y5 V

Which 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 asselect *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;

Page 35: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 48Which one of the following automatic SAS macro variables contains the return code from a previously executed step?

A. &RC

B. &ERR

C. &SYSRC

D. &SYSERR

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 49The SAS data set ONE has a variable X on which an index has been created. The data sets ONE and THREE are sorted by X.

Which one of the following SAS programs uses the index to select observations from the data set ONE?

A. data two;set three;set one key = X;run;

B. data two;set three key = X;set one;run;

C. data two;set one;set three key = X;run;

D. data two;

Page 36: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

set three;set one (key = X);run;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 50Given 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

Page 37: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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

Correct Answer: CDSection: (none)Explanation

Explanation/Reference:

QUESTION 51Which one of the following SAS procedures changes a permanent format of a variable stored in a SAS data set?

A. MODIFY

B. FORMAT

C. CONTENTS

D. DATASETS

Correct Answer: DSection: (none)

Page 38: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation

Explanation/Reference:

QUESTION 52Given 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;%highway

How many reports are produced by the above program?

A. 0

B. 1

C. 2

D. 5

Page 39: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

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

A. MPRINT

B. MLOGIC

C. MSOURCE

D. SOURCE2

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 54Given 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 200

Page 40: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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

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

A. NODUP

B. UNIQUE

C. DISTINCT

D. NODUPKEY

Correct Answer: ASection: (none)Explanation

Page 41: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation/Reference:

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

https://www.gratisexam.com/

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 57Which 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.

Page 42: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

D. It contains a partially compiled DATA step.

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

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

Page 43: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 59Assume today is Tuesday, July 23, 2002. Which one of the following statements submitted at the beginning of a SAS session assigns the value Tuesday, July 23,2002 to the macro variable START?

A. %let start = today(),weekdate.;

B. %let start = today(),format=weekdate.;

C. %let start = %sysfunc(today(),weekdate.);

D. %let start = %sysfunc(%today(),weekdate.);

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 44: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

QUESTION 60The 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. 0

B. 3

C. 6

D. null

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

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

A. CHECK

B. UNIQUE

C. FORMAT

D. DISTINCT

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

Page 45: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. MACRO

B. SOURCE

C. SOURCE2

D. SYMBOLGEN

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 63The following SAS ARRAY statement is submitted:

array score{*} a4 - a10, a25 ;

Which one of the following is the maximum number of elements stored?

A. 3

B. 7

C. 8

D. 11

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

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

A. if small subsets of data are often retrieved

B. if the key variable has very few unique values

C. if the data are often used for BY group processing

D. if the SAS data set file page count is less than three pages

Page 46: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

A. ECHOVIEW option

B. EXPANDVIEW option

C. VALIDATE VIEW statement

D. DESCRIBE VIEW statement

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 66The following SAS program is submitted:

data temp;array points{2,3}_temporary_;run;

Which one of the following is the maximum number of elements that are stored?

A. 2

B. 3

C. 5

D. 6

Correct Answer: DSection: (none)

Page 47: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Explanation

Explanation/Reference:

QUESTION 67Which 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:

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

A. user defined macro variables only

B. system defined macro variables only

C. both user and system defined macro variables

D. macros stored in the autocall macro library only

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 69Given the following SAS data set named WORK.INTERNAT:WORK.INTERNATLOCATION SUMUSA 30

Page 48: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

EUR 40

The 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 70The following SAS program is submitted:

%let a = cat;%macro animal(a = frog);%let a = bird;%mend;%animal(a = pig)%put a is &a;

Which one of the following is written to the SAS log?

A. a is &a

B. a is cat

C. a is pig

Page 49: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

D. a is bird

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

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

B. metadata on all tables in the WORK library only

C. metadata on all tables in the SASUSER library only

D. metadata on all tables in the DICTIONARY library only

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 72The following SAS program is submitted:

data two;y = '2';run;%let x = 10;%let var = y;data one;set two (keep = &var);

Page 50: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 73Which one of the following options is available for SAS macro debugging?

A. MLOGIC

B. MDEBUG

C. MSGLEVEL

D. MAUTOSOURCE

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

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

Page 51: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. first

B. &first

C. yourname

D. &yourname

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 75Given 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 and decreasing REVENUE?

A. order by 1, 3

B. order by 1, 3 desc

C. orderby product, revenue desc

D. order by product, desc revenue

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 76The following SAS program is submitted:

%macro test(var);proc print data = sasuser.class;

Page 52: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

where age > &var;run;%mend;

Which type of parameter is the macro variable VAR?

A. default

B. keyword

C. positional

D. command

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 77Which 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

https://www.gratisexam.com/

D. creating views on tables whose structures remain constant

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

Page 53: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

QUESTION 78The 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 79The 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 theTRANSPOSE procedure?

A. X, Y, Z, and W

B. _NAME_, X, and Y

C. new, X, and COL1

Page 54: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

D. new, X, Y, and _COL1_

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 80Given 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 40

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

Page 55: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 81The following are values of the variable STYLE from the SAS data setSASUSER.HOUSES:

SASUSERS.HOUSESOBS STYLE1 RANCH2 SPLIT3 CONDO4 TWOSTORY5 RANCH6 SPLIT7 SPLIT

The following SAS program is submitted:

proc sql noprint;select distinct styleinto :styles separated by ' 'from sasuser.houses

Page 56: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

order by style;quit;

Which one of the following is the value of the resulting macro variable?

A. CONDO RANCH SPLIT TWOSTORY

B. RANCH SPLIT CONDO TWOSTORY

C. CONDO RANCH RANCH SPLIT SPLIT SPLIT TWOSTORY

D. RANCH SPLIT CONDO TWOSTORY RANCH SPLIT SPLIT

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 82The following SAS program is submitted:%let value = .5;%let add = 5;%let newval = %eval(&value + &add);

Which one of the following is the resulting value of the macro variable NEWVAL?

A. 5

B. 5.5

C. .5 + 5

D. null

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 83Which one of the following statements about compressed SAS data sets is always true?

Page 57: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

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 84This question will ask you to provide a segment of missing code.

The following SAS program submitted:

Which segment of code will successfully run an in-line view?

Page 58: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 85Given the SAS data sets:

Page 59: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

The SAS program is submitted:

What output will be produced?

A. Name----------LaurenSmithPatelFarmerChangHiller

B. Name----------ChangChangLauren

C. Name

Page 60: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

----------PatelChang

D. Name----------LaurenPatelChangChang

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 86Given the SAS data sets:

A SAS program is submitted and the following is written to SAS to:

Page 61: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

What would allow the program to successfully execute without errors?

A. Qualify the column names with the table names.

B. Replace the 104 with: Where EMPLOYEE.Name = Any (Select names separated with ‘,’From WORK.NEWEMPLOYEEWhere Salary > 40000);

C. Replace the where clause with: Where EMPLOYEE.Name = (Select Names delimited with ‘,’From WORK.NEWEMPLOYEEWhere Salary > 40000);

D. Replace the equal sign with In operator.

Correct Answer: BSection: (none)Explanation

Explanation/Reference:

QUESTION 87Given the data sets:

Page 62: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

The following SAS program is submitted:

Which result set would be generated?

A. 100

B. 200

C. 300

D. 400

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 88

Page 63: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Given the SAS data set WORK TRANSACT:

The following output is desired:

Which SQL statement was used?

Page 64: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Option A

B. Option B

C. Option C

D. Option D

Page 65: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 89This question will ask you to provide a segment of missing code.

Given the SAS data set WORK EXAM:

TotalScore----------------512657*782

The following SAS program is submitted:

The following output is desired:

TotalScore--------------512657782

Which WHERE expression completes the program and generates the desired output?

A. Where TotalScore is not missing

Page 66: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

B. Where TotalScore is null

C. Where TotalScore is not

D. Where AddToStringYN= ‘Y’

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 90Given the two output sets shown on the left, which program produced the output shown on the right?

Page 67: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Option A

B. Option B

C. Option C

D. Option D

Page 68: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Reference: http://web.utk.edu/sas/OnlineTutor/1.2/en/60477/m71/m71_26.htm

QUESTION 91Given the data sets shown on the left, the SAS program shown on the right is submitted.

What will be output by the program?

A. ERROR: Subquery evaluated to more than one row

B. Average of Employment 6

C. Average of Employment 5

D. Average of employment 7

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 92Given the following partial SAS log:

Page 69: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

Which SQL procedure statement generated this output?

A. DECREASE TABLE SASHELP.CLASS;

B. CONTENTS TABLE SASHELP.CLASS;

C. DESCRIBE TABLE=SASHELP.CLASS;

D. ATTRIBUTE TABLE=SASHELP.CLASS

Correct Answer: CSection: (none)Explanation

Explanation/Reference:Reference: http://www.sascommunity.org/wiki/Macro_CallText

QUESTION 93This question will ask you to provide a segment of missing code.

Given the following program and data:

Page 70: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

What is the WHERE statement that successfully completes the PROC PRINT and selects the observation from Barb?

A. Where Birthday=&“Want”;

B. Where Birthday=&‘Want’ d;

C. Birthday=&Want;

D. Birthday=&“Want” d;

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 94The following SAS program is submitted:

Page 71: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

The current system date macro variable is 30JUL2013.

Which output will be written to the log by the program?

A. In two years it will be: 2014+10

B. Error: Required operator not found in expression in two years it will be: 2013+12+1

C. In two years it will be: 2013+1+1+1

D. In two years it will be: 2014+1+1

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 95The following SAS program is submitted:

What is the value of the macro variable Newval when the %PUT statement executes?

Page 72: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. 0.555

B. 2.2

C. 1

D. 2

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Explanation:%PUT statement shows that %EVAL discards the fractional part when it performs division on integers that would result in a fraction.

QUESTION 96Which macro statement would remove the macro variable mv_Info from the symbol table?

A. %symercase Mv_Info;

B. %symdel & Mv_Info;

C. %symdel Mv_Info;

D. %mdelete & Mv_Info;

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 97This question will ask you to provide a segment of missing code.

Given the SAS data set SASUSER.HIGHWAY:

Page 73: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

The following SAS program is submitted:

Which SQL clause stores the text 0-29, 30-49, 60+ in the macro variable GROUPS?

A. into : GROUPS separated by ‘ , ’

B. : into GROUPS separated = ‘ , ’

C. Into : GROUPS delimited by ‘ , ’

D. : into GROUPS delimited by ‘ , ’

Correct Answer: ASection: (none)Explanation

Explanation/Reference:Reference: http://analytics.ncsu.edu/sesug/2006/CC01_06.PDF (page 2, creating the macro variable)

QUESTION 98Which MACRO option is responsible for this partial SAS log?

Page 74: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. MAUTOLOCDISPLAY

B. MLOGIC

C. MPRINTNEST

D. MPRINT

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Reference: http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a001066200.htm

QUESTION 99SIMULATIONThis question will ask you to provide a segment of missing code.

Given the two data sets on the left, the SAS program on the right is submitted.

Page 75: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

In the text box in the program above, complete the program so that it will properly use the macro variable to select the corresponding cities.

Case is ignored and standard SAS syntax rules apply.

Page 76: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

https://www.gratisexam.com/

Correct Answer: North CarolinaSection: (none)Explanation

Explanation/Reference:

QUESTION 100Given the data set shown in the left, the SAS program on the right is submitted.

Which program will result in the identical report?

Page 77: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: DSection: (none)Explanation

Explanation/Reference:Reference: http://www2.sas.com/proceedings/sugi31/030-31.pdf

Page 78: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

QUESTION 101This question will ask you to provide missing option.

Which option is required to complete the program correctly?

A. CAMPLIB

B. FMTSEARCH

C. LIBREF

D. UTILLOC

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 102In the data step merge, the BY variables in all data sets must have the same:

Page 79: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Name and length

B. Name, type, and length

C. Name and type

D. Name

Correct Answer: BSection: (none)Explanation

Explanation/Reference:Reference: http://www2.sas.com/proceedings/sugi28/098-28.pdf

QUESTION 103A data set stored on a network drive has the following characteristics:

14 Million observations400 numeric variables0 character variables of length 20Binary compression

A DATA Step query requires only 3 character and 15 numeric variables from this data set. What is the best way to reduce computer resource utilization in thisDATA Step?

A. A KEEP= data set option used on the SET Statement

B. A KEEP Statement used within the DATA Step

C. A KEEP= data set option used on the DATA Statement

D. A DROP= data set option used on the DATA Statement

Correct Answer: DSection: (none)Explanation

Explanation/Reference:

QUESTION 104The SAS data set WORK.TEMP is indexed on variable Id:

Page 80: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

The following SAS program is submitted:

A. Stops because the data is not descending order

B. Generates a report without a problem

C. Stops because the data is not in ascending order

D. Generates a report, but only if the index = USE option is turned on

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

QUESTION 105Which SAS produce can be used to report Page Size?

A. PRINT Procedure

B. CATALOG Procedure

C. REPORT Procedure

Page 81: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

D. CONTENTS Procedure

Correct Answer: CSection: (none)Explanation

Explanation/Reference:

QUESTION 106Given the SAS data sets:

The following SAS DATA step is submitted:

What data values are stored in data set WORK.COMBINE?

Page 82: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

A. Option A

B. Option B

C. Option C

D. Option D

Correct Answer: ASection: (none)Explanation

Explanation/Reference:

Page 83: SAS-Institute.Passguide.A00-212.v2018-11-09.by.Tyler · The following SAS program is submitted: %let lib=%upcase(sauser); proc sql; select nvar form dictionary.tables where libname='&lib";

https://www.gratisexam.com/

https://www.gratisexam.com/