The following SAS program is submitted: options pageno = 1; proc print data = sasuser.houses; run; proc means data = sasuser.shoes; run; The report created by the PRINT procedure step generates 5 pages of output. What is the page number on the first page of the report generated by the MEANS procedure step?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
The following program is submitted: proc contents data=_all_; Which statement best describes the output from the submitted program?
-
A
The output displays only a list of the SAS data sets that are contained in the WORK library.
-
B
The output displays only the contents of the SAS data sets that are contained in the WORK library.
-
C
The output displays only the variables in the SAS data sets that are contained in the WORK library.
-
D
The output displays a list of the SAS data sets that are contained in the WORK library and displays their contents.
Reveal answer details
Close answer details
The following SAS program is submitted:  What is the value of the second variable in the data set WORK.AUTHORS?
-
A
-
B
-
C
-
D
The program contains errors. No variables are created.
Reveal answer details
Close answer details
The following SAS program is submitted: data work.january; set work.allmonths (keep = product month num_sold cost); if month = 'Jan' then output work.january; sales = cost * num_sold; keep = product sales; run; Which variables does the WORK.JANUARY data set contain?
-
A
-
B
PRODUCT, MONTH, NUM_SOLD and COST only
-
C
PRODUCT, SALES, MONTH, NUM_SOLD and COST only
-
D
An incomplete output data set is created due to syntax errors.
Reveal answer details
Close answer details
Given the contents of the raw data file TYPECOLOR: ----I----10---I----20---I----30 Daisyyellow The following SAS program is submitted: data flowers; infile `typecolor'; input type$ 1-5+1 color$; run; What are the values of the variables TYPE and COLOR?
-
A
-
B
-
C
type color daisyyellow" "(missing character value)
-
D
No values are stored for the TYPE and COLOR variables.
Reveal answer details
Close answer details
After a SAS program is submitted, 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
-
C
-
D
Reveal answer details
Close answer details
Which statement describes a characteristic of the SAS automatic variable_ERROR_?
-
A
The_ERROR_ variable maintains a count of the number of data errors in a DATA step.
-
B
The_ERROR_ variable is added to the program data vector and becomes part of the data set being created.
-
C
The_ERROR_ variable can be used in expressions in the DATA step.
-
D
The_ERROR_ variable contains the number of the observation that caused the data error.
Reveal answer details
Close answer details
Given the SAS data set WORK.TEMPS with numeric variables Day and Temp and character variable Month:  The following SAS program is submitted: proc sort data=WORK.TEMPS; by Day descending Month; run; proc print data=WORK.TEMPS; run; Which output is correct?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
The SAS data set EMPLOYEE_INFO is listed below: IDNumber Expenses 2542 100.00 3612 133.15 2198 234.34 2198 111.12 The following SAS program is submitted: proc sort data = employee_info; run; Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
-
A
by descending IDNumber Expenses;
-
B
by (IDNumber Expenses) descending;
-
C
by IDNumber descending Expenses descending;
-
D
by descending IDNumber descending Expenses;
Reveal answer details
Close answer details
Question 10
Single choice
Given the SAS data set PRICES: PRICES Prodid price producttype sales returns K125 5.10 NETWORK 15 2 B132S 2.34 HARDWARE 300 10 R18KY2 1.29 SOFTWARE 25 5 3KL8BY 6.37 HARDWARE 125 15 DY65DW 5.60 HARDWARE 45 5 DGTY23 4.55 HARDWARE 67 2 The following SAS program is submitted: data hware inter cheap; set prices(keep = productype price); if producttype = `HARDWARE' then output hware; else if producttype = `NETWORK' then output inter; if price le 5.00; run; if producttype = `HARDWARE' then output hware; else if producttype = `NETWORK' then output inter; if price le 5.00; run; How many observations does the HWARE data set contain?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 11
Single choice
Given the raw data file AMOUNT: ----I---- 10---I----20---I----30 $1,234 The following SAS program is submitted: data test; infile `amount'; input@1 salary 6.; if_error_then description = `Problems'; else description = `No Problems'; run; What is the result?
-
A
The value of the DESCRIPTION variable is No Probl.
-
B
The value of the DESCRIPTION variable is Problems.
-
C
The value of the DESCRIPTION variable is No Problems.
-
D
The value of the DESCRIPTION variable can not be determined.
Reveal answer details
Close answer details
Question 12
Single choice
The following SAS program is submitted: footnote1 `Sales Report for Last Month'; footnote2 `Selected Products Only'; footnote3 `All Regions'; footnote4 `All Figures in Thousands of Dollars'; proc print data = sasuser.shoes; footnote2 `All Products'; run; Which footnote(s) is/are displayed in the report?
-
A
-
B
Sales Report for Last Month All Products
-
C
All Products All Regions All Figures in Thousands of Dollars
-
D
Sales Report for Last Month All Products All Regions All Figures in Thousands of Dollars
Reveal answer details
Close answer details
Question 13
Single choice
The following SAS program is submitted: data work.test; array agents{4} $ 12 sales1 - sales4; run; Which one of the following represents the variables that are contained in the output data set?
-
A
SALES1, SALES2, SALES3, SALES4
-
B
AGENTS1, AGENTS2, AGENTS3, AGENTS4
-
C
None, the DATA step fails because the ARRAY statement can reference only numeric data.
-
D
None, the DATA step fails because the ARRAY statement can reference only pre-existing variables.
Reveal answer details
Close answer details
Question 14
Single choice
The following SAS program is submitted:  What is the initial value of the variable Total in the following program?
-
A
-
B
-
C
The value of the first observations Wagerate
-
D
Cannot be determined from the information given
Reveal answer details
Close answer details
Question 15
Single choice
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
if Age not in(15,16) then Group=1; else Group=2;
-
B
if (Age NE 16) or (Age NE 15) then Group=1; else Group=2;
-
C
where Age not between 15 and 16 then Group=1; else Group=2;
-
D
Reveal answer details
Close answer details
Question 16
Single choice
Given the following raw data records in DATAFILE.TXT:  Which output is correct based on the submitted program? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 17
Single choice
The following SAS DATA step is submitted: libname temp 'SAS-data-library'; data temp.report; set sasuser.houses; newvar = price * 1.04; run; Which one of the following statements is true regarding the program above?
-
A
The program is reading from a temporary data set and writing to a temporary data set.
-
B
The program is reading from a temporary data set and writing to a permanent data set.
-
C
The program is reading from a permanent data set and writing to a temporary data set.
-
D
The program is reading from a permanent data set and writing to a permanent data set.
Reveal answer details
Close answer details
Question 18
Single choice
The following SAS DATA step executes on Monday, April 25, 2000: data newstaff; set staff; start_date = today(); run; Which one of the following is the value of the variable START_DATE in the output data set?
-
A
a character string with the value '04/25/2000'
-
B
a character string with the value 'Monday, April 25, 2000'
-
C
the numeric value 14725, representing the SAS date for April 25, 2000
-
D
the numeric value 04252000, representing the SAS date for April 25, 2000
Reveal answer details
Close answer details
Question 19
Single choice
A user-defined format has been created using the FORMAT procedure. Where is it stored?
-
A
-
B
in an external binary file
-
C
in a SAS dataset in the WORK library
-
D
in a SAS dataset in a permanent SAS data library
Reveal answer details
Close answer details
Question 20
Single choice
Given the following code: proc print data=SASHELP.CLASS(firstobs=5 obs=15); where Sex='M'; run; How many observations will be displayed?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 21
Single choice
The data set WORK.REALESTATE has the variable LocalFee with a format of 9. and a variable CountryFee with a format of 7.; The following SAS program is submitted:  What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?
-
A
LocalFee has format of 9. and CountryFee has a format of 7.
-
B
LocalFee has format of 9. and CountryFee has a format of percent7.2
-
C
Both LocalFee and CountryFee have a format of percent7.2
-
D
The data step fails execution; there is no format for LocalFee.
Reveal answer details
Close answer details
Question 22
Single choice
The following SAS program is submitted: proc sort data = sasuser.houses out = houses; by style; run; proc print data = houses; run; Click on the Exhibit button to view the report produced. style bedrooms baths price CONDO 2 1.5 80050 3 2.5 79350 4 2.5 127150 2 2.0 110700 RANCH 2 1.0 64000 3 3.0 86650 3 1.0 89100 1 1.0 34550 SPLIT 1 1.0 65850 4 3.0 94450 3 1.5 73650 TWOSTORY 4 3.0 107250 2 1.0 55850 2 1.0 69250 4 2.5 102950 Which of the following SAS statement(s) create(s) the report?
-
A
-
B
id style; var style bedrooms baths price;
-
C
id style; by style; var bedrooms baths price;
-
D
id style; by style; var style bedrooms baths price;
Reveal answer details
Close answer details
Question 23
Single choice
Which program will create a comma delimited raw data file (CSV)?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 24
Single choice
The following SAS program is submitted: libname sasdata 'SAS-data-library'; data test; set sasdata.chemists (keep = job_code); if job_code = 'chem3' then description = 'Senior Chemist'; run; The variable JOB_CODE is a character variable with a length of 6 bytes. Which one of the following is the length of the variable DESCRIPTION in the output data set?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 25
Single choice
The observations in the SAS data set WORK.TEST are ordered by the values of the variable SALARY. The following SAS program is submitted: proc sort data = work.test out = work.testsorted; by name; run; Which one of the following is the result of the SAS program?
-
A
The data set WORK.TEST is stored in ascending order by values of the NAME variable.
-
B
The data set WORK.TEST is stored in descending order by values of the NAME variable.
-
C
The data set WORK.TESTSORTED is stored in ascending order by values of the NAME variable.
-
D
The data set WORK.TESTSORTED is stored in descending order by values of the NAME variable.
Reveal answer details
Close answer details
Question 26
Single choice
Given the following raw data record: 07Jan2005 Which INFORMAT reads this raw data and stores it as a SAS date value?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 27
Single choice
Consider the following data step:  The computed variables City and State have their values assigned using two different methods, a RETAIN statement and an Assignment statement. Which statement regarding this program is true?
-
A
The RETAIN statement is fine, but the value of City will be truncated to 8 bytes as the LENGTH statement has been omitted.
-
B
Both the RETAIN and assignment statement are being used to initialize new variables and are equally efficient. Method used is a matter of programmer preference.
-
C
The assignment statement is fine, but the value of City will be truncated to 8 bytes as the LENGTH statement has been omitted.
-
D
City's value will be assigned one time, State's value 5 times.
Reveal answer details
Close answer details
Question 28
Single choice
Which step displays a listing of all the data sets in the WORK library?
-
A
proc contents lib=WORK run;
-
B
proc contents lib=WORK.all; run;
-
C
proc contents data=WORK._all_; run;
-
D
proc contents data=WORK _ALL_; run;
Reveal answer details
Close answer details
Question 29
Single choice
Given the following raw data records:  The following output is desired:  Which SAS program correctly reads in the raw data? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 30
Single choice
The contents of the SAS data set PERM.JAN_SALES are listed below: VARIABLE NAME TYPE idnum character variable sales_date numeric date value A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form. Which one of the following SAS DATA steps correctly creates this raw data file?
-
A
libname perm 'SAS-data-library'; data _null_; set perm.jan_sales; file 'file-specification' dsd = ','; put idnum sales_date : mmddyy10.; run;
-
B
libname perm 'SAS-data-library'; data _null_; set perm.jan_sales; file 'file-specification' dlm = ','; put idnum sales_date : mmddyy10.; run;
-
C
libname perm 'SAS-data-library'; data _null_; set perm.jan_sales; file 'file-specification'; put idnum sales_date : mmddyy10. dlm = ','; run;
-
D
libname perm 'SAS-data-library'; data _null_; set perm.jan_sales; file 'file-specification'; put idnum sales_date : mmddyy10. dsd = ','; run;
Reveal answer details
Close answer details
Question 31
Single choice
Which statement is true concerning the SAS automatic variable_ERROR_?
-
A
It cannot be used in an if/then condition.
-
B
It cannot be used in an assignment statement.
-
C
It can be put into a keep statement or keep= option.
-
D
It is automatically dropped.
Reveal answer details
Close answer details
Question 32
Single choice
The following SAS program is submitted: Data_null_; set old; put sales 1 sales2; run; Where is the output written?
-
A
-
B
to the SAS data set_NULL_
-
C
to the SAS output window or to an output file
-
D
to the raw data file that was most recently opened
Reveal answer details
Close answer details
Question 33
Single choice
The following SAS DATA step is submitted: data work.accounting; set work.department; length jobcode $ 12; run; The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of 5. Which one of the following is the length of the variable JOBCODE in the output data set?
-
A
-
B
-
C
-
D
The length can not be determined as the program fails to execute due to errors.
Reveal answer details
Close answer details
Question 34
Single choice
Given the SAS data set PERM.STUDENTS: PERM.STUDENTS NAME AGE --------- ------- Alfred 14 Alice 13 Barbara 13 Carol 14 The following SAS program is submitted: libname perm `SAS data library'; data students; set perm.students; file `file specification'; put name $ age; <insert statement here> run; The following double-spaced file is desired as output Alfred 14 Alice 13 Barbara 13 Carol 14 Which statement completes the program and creates the desired file?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 35
Single choice
The following SAS program is submitted: data work.one; x = 3; y = 2; z = x ** y; run; Which one of the following is the value of the variable Z in the output data set?
-
A
-
B
-
C
. (missing numeric value)
-
D
The program fails to execute due to errors.
Reveal answer details
Close answer details
Question 36
Single choice
The following SAS program is submitted:  What will the data set WORK.TEST contain? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 37
Single choice
The following SAS program is submitted, creating the SAS data set ONE: data one; infile `file specification'; input num chars$; run; ONE NUM CHAR ------- --------- 1 23 3 23 1 77 The following SAS program is submitted: proc print data = one; where char = 23; run; What is output?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 38
Single choice
Given the data sets below: WORK.EMP with variables:  WORK.NEWHIRE with variables: The following SAS program is submitted:  The SAS data set WORK.EMP has 50 observations, and the data set WORK.NEWHIRE has 4 observations. How many variables will the data set WORK.ALLEMP contain?
-
A
-
B
The program fails execution.
-
C
-
D
Reveal answer details
Close answer details
Question 39
Single choice
The following SAS program is submitted:  What types of variables are DayOfMonth, MonthOfYear, and Year?
-
A
DayOfMonth, Year, and MonthOfYear are character.
-
B
DayOfMonth, Year, and MonthOfYear are numeric.
-
C
DayOfMonth and Year are numeric. MonthOfYear is character.
-
D
DayOfMonth, Year, and MonthOfYear are date values.
Reveal answer details
Close answer details
Question 40
Single choice
The following SAS program is submitted: data work.test; First = 'Ipswich, England'; City = substr(First,1,7); City_Country = City!!', '!!'England'; run; Which one of the following is the value of the variable CITY_COUNTRY in the output data set?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 41
Single choice
Given the following data set WORK.TOYS:  The following SAS program s submitted: data WORK.GROUPS; set WORK.TOYS; if Product="Cards" then Group_Desc="Indoors"; else if Product in ("Drum", "Recorder") then Group_Desc="Instruments"; else if Product="Ball" then Group_Desc="Outdoors"; run; proc print data=WORK.GROUPS noobs; run; Which output is produced?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
|