You are on page 1of 39

A00-211qa70

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

http://www.gratisexam.com/
SAS Institute A00-211
SAS Base Programming for SAS 9

Exam A
QUESTION 1
After a SAS program is submitted,thefollowing is written to the SAS log:

What issue generated the error in the log?
A.
B.
C.
D.

The syntax of the drop statement does not use an equals sign.
There should have been commas between the variable names.
The list of variables should have been enclosed in parentheses.
A drop statement and a keep= data set option cannotboth be used at the same time.

Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Explanation:
QUESTION 2
Given the SAS data set WORK.PRODUCTS:

How many variables does the WORK.REVENUE data set contain?
A.
B.
C.
D.

2
3
4
6

Correct Answer: A
Section: (none)
Explanation
Explanation/Reference:
Explanation:

QUESTION 3
Given the SAS data set WORK.PRODUCTS:

How many observations does the WORK.OUTDOOR data set contain?
A.
B.
C.
D.

1
2
3
6

Correct Answer: B
Section: (none)
Explanation
Explanation/Reference:
Explanation:
QUESTION 4
The following SAS program is submitted:

What will the data set WORK.TEST contain?

Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 6 . It is automatically dropped.gratisexam. B. C. It can be put into a keep statement or keep= option. It cannot be used in an if/then condition. D.com/ A. C. It cannot be used in an assignment statement.A. Option A Option B Option C Option D Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 5 Which statement is true concerning the SAS automatic variable _ERROR_? http://www. B. D.

D. B. C.csv that can be opened in Excel or in any text editor. A text file named test. A file named test. C. C.csv that can only be opened in Excel. the numeric value 0 the character value "01011960" a missing value due to syntax errors the step will not compile because ofthe character argument in the mdy() function. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 7 The following SAS program is submitted: What is the value of the variable X? A.The following SAS program is submitted: What is produced as output? A. what is the value of the variable Description? A. A file named test. A text file named test. Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 8 The following SAS program is submitted: If the value for the variable Jobcode is: PILOT2. ' ' (missing character value) Unknown Senior Pilot SENIOR PILOT . D. B.csv that can only be opened by SAS.csv that can only be opened in a text editor. B. D.

B. D. D.EmpFName. FullName=EmpFName + EmpLName. Correct Answer: A Section: (none) Explanation Explanation/Reference: .txt: Which SAS statement completes the program and results in a value of "James Stevens" for the variable FullName? A. FullName=CAT(' '. Fail Pass 50.EmpFName. FullName=EmpFName!!EmpLName.EmpLName).EmpLName). B.5 (missing numeric value) Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 10 Given the raw data record in the file phone. C.Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 9 The following SAS program is submitted: How will the Exam variable value be displayed in the FREQ procedure output? A. FullName=CATX(' '. C.

output nobs min max mean maxdec=1. proc means data=SASHELP. B. D. var Height / nobs min max mean maxdec=1.CLASS min max mean maxdec=1. C. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 12 Given the contents of the raw data file 'EMPLOYEE.CLASS maxdec=1 . proc means data=SASHELP.TXT' Which SAS informat correctly completes the program? .Explanation: QUESTION 11 The following code was modified to generate the results further below: The following results were generated to display only specific statistics and limit the decimals with the modification: Which statement below was modified or added to generate the results above: A.

libname "_SAS_data_library_location_". D. libname mysasdata "_SAS_data_library_location_". B. The keep= data set option should be (keep=MonthSales*). libname sasdata "_SAS_data_library_location_". The keep= data set option should be (keep=MonthSales). An array cannot be referenced on a keep= data set option. C. B. B. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 14 The following SAS program is submitted: The program fails execution due to syntax errors.A. An array can only be referenced in a KEEP statement not within a keep= data set option. D. Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 15 Given the SAS data set WORK.P2000: . C. D. What is the cause of the syntax error? A. libname work "_SAS_data_library_location_". C. date9 mmddyy10 ddmmyy10 mondayyr10 Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 13 Which is a valid LIBNAME statement? A.

Option A B. Option C . Option B C.Andthe SAS data set WORK.P2008: The following output is desired: Which SAS program correctly combines the data? A.

C. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 18 The following SAS program is submitted: . Sales. the following is written to the SAS log: What changes should be made to the KEEP statement to correct the errors in the LOG? A. B.D. B.AUTHORS? A. keep=Product. D. keep Product. Hemingway Hemingwa ' ' (a missing value) The program contains errors. No variables are created. Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 16 The following SAS program is submitted: What is the value of the second variable in the data set WORK. keep=(Product Sales). keep Product Sales. Sales. D. C. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 17 After a SAS program is submitted.

C. Option A Option B Option C Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 20 The following SAS program is submitted: . 0 1 2 12 Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 19 The following SAS program is submitted: Which ODS statements inserted. respectively. B. D. B.What value will SAS assign to Pos? A. C. D. in the two location indicated above creates a report stored in an html file? A.

EMP_NAME: Given the SAS data set WORK. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 22 Given the SAS data set WORK. D. C.What is the initial value of the variable Total in the listed program? A. B. The type of the variable CharEmpid is numeric. C. 0 Missing The value of the first observations Wagerate Cannot be determined from the information given Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 21 The following SAS program is submitted: Which statement is true about the output data set? A. The program fails to execute due to errors. The type of the variable CharEmpid is unknown. D.EMP_DEPT: . The type of the variable CharEmpid is character. B.

1 2 3 5 Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 23 Which statement specifies that records 1 through 10 are to be read from the raw data file customer. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 24 The following output is created by the FREQUENCY procedure: . D. infile 'customer. C. input 'customer. input 'customer.txt' obs=10.txt' end=10.txt' stop=10. C.txt? A. D. infile 'customer.txt' obs=1-10. B.The following program is submitted: How many observations are in data set WORK.ALL after submitting the program? A. B.

A. B.TEMPS: .product. infinite loop. C. tables region. tables region product. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 27 Given the SAS data set WORK. C. B. tables region*product. D. D. run. C. D. MSOFFICE2K EXCELXP CSVALL WINXP Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 26 The following SAS program is submitted: What is the value of the variable Prod in the output data set? A. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 25 Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel? A. (missing) 6 7 Undetermined. . tables region by product.Which TABLES statement was used to completed the following program that produced the output? proc freq data=sales. B.

Option C . Option B C. Option A B.The following program is submitted: Which output is correct? A.

6 7 8 . D. D.D.No messages are written to the SAS log. B. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 30 Given the SAS data set WORK. The variable Discount in the output data set is set to zero. C.A note in the SAS log refers to invalid numeric data. The value of the variable Discount in the output data set is 2000. Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 28 The following SAS program is submitted: What is the value of the variable Prod in the output data set? A.ONE: . (missing numeric) Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 29 The following SAS program is submitted: What is the result? A. The value of the variable Discount in the output data set is 2000.A note that conversion has taken place is written to the SAS log.No messages are written to the SAS log. B. C. The value of the variable Discount in the output data set is missing.

B. D. 3 1. C. The format name contains a period in the VALUE statement. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 32 Consider the following data step: . D. B.What value will SAS assign to Total? A. C. The LABEL option is missing from the PROC PRINT statement. The PAGENO option is invalid in the OPTIONS statement. The RUN statement is missing after the FORMAT procedure.8 The program fails to execute due to errors. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 31 The following program is submitted: Why does the program fail? A.6 4.

It is assigned a value of missing at compile time. C. Which statement regarding this variable is true? A. It is assigned a value 0 at compile time. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 33 The following output is created by the FREQUENCY procedure: http://www. D. B. D. norowcount nocolcount freq percent norow nocol nocounts Correct Answer: C Section: (none) Explanation .gratisexam. It is assigned a value of missing after the data step begins execution. B.com/ Which TABLES option(s) would be used to eliminate the row and column counts and just see the frequencies and percents? A. C.The variable Count is created using a sum statement. It is assigned a value 0 after the data step begins execution.

Diff2 and Diff3 Janpt. Difcount1.Banks contains a variable Open_Date which has been assigned a permanent label of "Open Date". Difcount2 and Difcount3 Diff1. B. D. Which SAS program temporarily replaces the label "Open Date" with the label "Starting Date" in the output? . D. B. Gender Department Gender Department Department Gender Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 35 The following SAS program is submitted: What new variables are created? A. C. Febpt. Patients2 and Patients3 Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 36 The SAS data set Fed.Explanation/Reference: Explanation: QUESTION 34 The following SAS program is submitted: The SAS data set WORK. Which inserted code will accumulate subtotals for each Gender within Department? A. and Marpt Patients1.SALARY is currently ordered by Gender within Department. C.

ONE: . The _ERROR_ variable maintains a count of thenumber of data errors in a DATA step.A. The _ERROR_ variable can only be used in expressionsin the DATA step. The _ERROR_ variable is added to the program datavector and becomes part of the data set being created. Option A Option B Option C Option D Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 37 Which statement describes a characteristic of the SAS automatic variable _ERROR_? A. C. The _ERROR_ variable contains the number of theobservation that caused the data error. B. B. D. D. C. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 38 Given the SAS data set WORK.

B. Option A Option B Option C Option D Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 39 Which step displays a listing of all the data sets in the WORK library? A. D. C.The following SAS program is submitted: Which report is produced? A. proc contents lib=WORK .

C. B.run. B. run. The RETAIN statement is fine. but thevalue of City will be truncated to 8 bytes as the LENGTHstatement has been omitted._all_. run. D. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 41 The following SAS program is submitted: How many observations are written to the WORK. B. C. 0 1 5 60 Correct Answer: B Section: (none) . proc contents lib=WORK. State'svalue 5 times. City's value will be assigned one time. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 40 Consider the following data step: The computed variables City and State have their values assigned using two different methods. run. proc contents data=WORK. C. a RETAIN statement and an Assignment statement. D. D. but the valueof City will be truncated to 8 bytes as the LENGTHstatement has been omitted. proc contents data=WORK _ALL_.all.SALES data set? A. The method used is only a matter ofprogrammer preference. Which statement regarding this program is true? A. The assignment statement is fine. Both the RETAIN and assignment statement arebeing used to initialize new variables and are equallyefficient.

The descending option applies to the Date and Cost variables. The variable Code is sorted by ascending order. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 44 The following SAS program is submitted: Which statement is true about the output data set? A.Explanation Explanation/Reference: Explanation: QUESTION 42 The following SAS program is submitted: Assuming that SASUSER. The PSORT data set is stored in the SASUSER library.ONE exists. how many temporary and permanent SAS data sets are created? A. D. The label of the variable Jobcode is Job (only the first word). The descending option applies to the variable Code. D. 2 temporary and 1 permanent SAS data sets are created 3 temporary and 2 permanent SAS data sets are created 2 temporary and 2 permanent SAS data sets are created there is an error and no new data sets are created Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 43 The following program is submitted: Which of the following is true concerning the submitted program? A. B. C. C. C. B. B. The label of the variable Jobcode is Job Description. . The label of the variable Jobcode is Job Desc (only the first 8 characters).

D. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 45 Given the SAS data set WORK.ONE: Andthe SAS data set WORK. Labels can only be defined in PROC steps.TWO: The following program is submitted: What is the first observation in the SAS data set WORK. Option A Option B Option C Option D . D.BOTH? A. The program fails to executedue to errors and the data set is not created. B. C.

dayofweek(BeginDate) .TWO is created. D. . day(BeginDate) B. where Day would be 1 for Sunday. : Which expression successfully completed the program and creates the variable DAY? A. 1 2 3 4 Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 47 Given the SAS data set WORK. 3 for Tuesday. B.ONE: The following SAS program is submitted: The data set WORK. C.Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 46 The following SAS program is submitted: How many raw data records are read during each iteration of the DATA step? A. 2 for Monday... weekday(BeginDate) C.

xls'. libname mydata 'qtr1. C. D. libname qtrdata 'qtr1.XLS contains the followingthree worksheets: JAN FEB MAR.sheets=(jan. the numeric value 0 the character value "01Jan1960" the date value 01011960 the code contains a syntax error and does not execute.D.feb. libname 'qtr1.today()) Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 48 The Excel workbook QTR1. Which statement correctly assigns a library reference to the Excel workbook? A. C. getday(BeginDate. B. libname jan feb mar 'qtr1. D. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 50 The following SAS program is submitted: . Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 49 The following SAS program is submitted: What variable X contains what value? A.xls'.xls' WORK.xls' sheets=3. B.mar).

TXT: The following output is desired: Which SAS program correctly produces the desired output? . Year. else Group=2.16) then Group=1. DayOfMonth. else Group=2. MonthOfYear is character. D. both A or C will work. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 51 Consider the data step: Which of the following assignment statements for variable group are functionally equivalent to the original statement used in the above data step? A. DayOfMonth. where Age not between 15 and 16 then Group=1. else Group=2. and MonthOfYear are numeric. and MonthOfYear are character. Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 52 Given the following raw data records in TEXTFILE. B. if (Age NE 16) or (Age NE 15) then Group=1. MonthOfYear. DayOfMonth and Year are numeric. B. DayOfMonth. and MonthOfYear are date values. C. and Year? A. Year.What types of variables are DayOfMonth. Year. D. if Age not in(15. C.

TXT: . C. D.A. Option A Option B Option C Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 53 Given the following raw data records in DATAFILE. B.

C. B.Which output is correct based on the submitted program? A. D.ORDERS: . Option A Option B Option C Option D Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 54 Given the SAS data set WORK.

The variable Order_id is numeric.'Order'.)). D.'shipped on'.date9. note=catx(' '.)). Note would look like the following: "Order 9341 shipped on 02FEB2009". and Ship_date is a numeric containing a SAS date value. what will data set WORK.'Order'. A programmer would like to create a new variable called Note. format. note=catx(' '. note=catx(' '.order_id.input(ship_date.transwrd(ship_date.date9. B. Customer is character. that shows a character value with the Order_id and Ship_date shown with a date9.'shipped on'.order_id.)). Which of the following statement will correctly create the value and assign it to Note? A.put(ship_date.GEO contain? .'Order'.order_id. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 55 Given the following data step: After data step execution.char(ship_date. C. For the first observation.'Order'.order_id.date9.date9.)). note=catx(' '.'shipped on'.'shipped on'.

A. The following SAS program is submitted: Which statement is true? A. The by statement in the DATA step causes a syntax error. The values of the variable Payroll represent a monthlytotal for all values of WAGERATE in the WORK. The values of the variable Payroll represent the monthlytotal for each department in the WORK. B. D.SALARY contains 10 observations for each department. D. C. The statement Payroll+(MonthlyWageRate*12).SALARY data set. .SALARY data set. Option A Option B Option C Option D Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 56 The SAS data set named WORK. in the datastep causes a syntax error. and is currently ordered by Department. C. B.

ONE has 5 observations data set SASUSER.TWO has 2 observations data set WORK. No data sets are output.TWO has 2 observations data set WORK. D. B. How is it stored? A.Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 57 Given the SAS data set SASDATA. data set SASUSER. in a SAS catalog in a memory resident lookup table in a SAS data set in the WORK library in a SAS data set in a permanent SAS data library Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: . data set SASUSER.OTHER has 5 observations D. data set SASUSER. Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 58 A user-defined format has been created using the FORMAT procedure.OTHER has 3 observations B.TWO has 5 observations data set WORK.TWO: The following SAS program is submitted: data What is the result? A.OTHER has 1 observations C.ONE has 2 observations data set SASUSER. The DATA step fails execution due to syntax errors. C.ONE has 2 observations data set SASUSER.

The 1st of potentially many errors. C. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 60 You're attempting to read a raw data file and you see the following messages displayed in the SAS Log: What does it mean? A. triggered by an invalid characterfor the variable Salary. B. The output displays only the variables in the SAS data setsthat are contained in the WORK library. C. this one occurringon the 4th observation. An execution error. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 61 Given the following raw data records: The following output is desired: Which SAS program correctly reads in the raw data? . The output displays only the contents of the SAS data setsthat are contained in the WORK library. The output displays only a list of the SAS data setsthat are contained in the WORK library. An error on the INPUT statement specification forreading the variable Salary. A compiler error. triggered by an invalid characterfor the variable Salary. D. B. The output displays a list of the SAS data sets that arecontained in the WORK library and displays their contents. D.QUESTION 59 The following program is submitted: Which statement best describes the output from the submitted program? A.

A. Type=daisy. C. Color= . Color=w Type=daisy.DAT: The following SAS program is submitted: What are the values of the variables Type and Color? A. D. C. Option A Option B Option C Option D Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 62 Given the contents of the raw data file TYPECOLOR. Color=daisyyellow Type=daisy. B. D. Color=yellow Type=daisy. B.

and CountryFee has a format of percent7. The following SAS program is submitted: What are the formats of the variables LOCALFEE and COUNTRYFEE in the output data set? A. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 65 . B. where substr(Job_Title. LocalFee has format of 9. where Job_Title='% Manager '.2 The data step fails execution. D. and a variable CountryFee with a format of 7.(length(Job_Title)-6))='Manager'. C.Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 63 The data set WORK..2 Both LocalFee and CountryFee have a format of percent7.REALESTATE has the variable LocalFee with a format of 9. B. where Job_Title like '%Manager%'. there is no format for LocalFee.EMPDATA: Which one of the following where statements would display observations with job titles containing the word 'Manager'? A. Correct Answer: C Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 64 Given the data set WORK.' '))='MANAGER'. where upcase(scan(Job_Title. D. C. and CountryFee has a format of 7. LocalFee has format of 9.-1.

B. B. C.Given the following code: How many observations will be displayed? A. D. 11 15 10 or fewer 11 or fewer Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 66 Which of the following programs correctly invokes the DATA Step Debugger? A. C. D. Option A Option B Option C Option D Correct Answer: C Section: (none) Explanation .

Option A Option B Option C Option D Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 68 Which step sorts the observations of a permanent SAS data set by two variables and stores the sorted observations in a temporary SAS data set? A. . B. C.ONE contains a numeric variable named Num and a character variable named Char: The following SAS program is submitted: What is output? A. Fname. proc sort data=SASUSER.Explanation/Reference: Explanation: QUESTION 67 The SAS data set WORK. by Lname. D. run.EMPLOYEES out=EMPSORT.

by Lname. . by Lname Fname. X would get a value of 1. run. run. proc sort data=SASUSER. C. proc print data=MYXLS. X would retain its original value of missing.B. Which PROC PRINT step correctly displays the NORTH worksheet? A.EMPLOYEES out=TEMPORARY.'NORTH'e. B.NORTH. D. Fname.OLD. X would get a value of 3. proc print data=MYXLS. proc print data=MYXLS. D.XLS contains the following four worksheets: EAST WEST NORTH SOUTH The following program is submitted: libname MYXLS 'regions.xls'.EMPSORT. run. proc sort data=SASUSER. run. C. B.XLS. C.EMPLOYEES out=TEMPORARY. run.EMPLOYEES out=EMPSORT.EMPSORT. what new value would be assigned to X if its original value was a missing value? A. Correct Answer: B Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 69 Consider the following data step: In filtering the values of the variable X in data set WORK. run. proc sort data=SASUSER. by Lname Fname.NORTH$. This step does not run because of syntax errors. Correct Answer: A Section: (none) Explanation Explanation/Reference: Explanation: QUESTION 70 The Excel workbook REGIONS.

proc print data=MYXLS.gratisexam.com/ . run. Correct Answer: D Section: (none) Explanation Explanation/Reference: Explanation: http://www.D.'NORTH$'n.