Quiz
Stats 124 Final Review
Crie uma conta grátis para terminar este quiz
Salve seu progresso e veja sua nota final.
Já tem uma conta? Inicie sessão
Perguntas do quiz (110)
1See image

- A3 Observations, 4 Variables
- B3 Observations, 3 Variables
- C4 Observations, 3 Variables
- DCan't tell because some values are missing
2How many program steps are executed when the program below is processed?
data user.tables;
infile jobs;
input date name $ job $;
run;
proc sort data = user.tables;
by name;
run;
proc print data = user.tables;
run;
SAS Institute (2011-08-08). SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition (Kindle Locations 13475-13478). SAS Institute/SAS Publishing. Kindle Edition.- Athree
- Bfour
- Cfive
- Dsix
3See Image

- Anumeric
- Bcharacter
- Ccan be either character or numeric
- Dcan't tell from the data shown
4See image

- Anumeric
- Bcharacter
- Ccan be either character or numeric
- Dcan't tell from the data shown
5Which of the following variable names is valid
- A4BirthDate
- B$Cost
- C_Items_
- DTax-Rate
6Which of the following files is a permanent SAS file?
- ASashelp.PrdSale
- BSasuser.MySales
- CProfits.Quarter1
- Dall the above
7In a DATA step, how can you reference a temporary SAS data set named Forecast?
- AForecast
- BWork.Forecast
- CSales.Forecast (after assigning the liberef Sales)
- DA and B
8See image

- A5
- B6
- C7
- D8
9How many statements does the following SAS program contain?
proc print data = new.prodsale
label double;
var state day price1 price2; where state =' NC';
label state =' Name of State'; run;- Athree
- Bfour
- Cfive
- Dsix
10What is a SAS library?
- Acollection of SAS files, such as SAS data sets and catalogs
- Bin some operating environments, a physical collection of SAS files
- Ca group of SAS files in the same folder or directory.
- Dall the above
11If you submit the following program, how does the output look?
options pagesize = 55 nonumber;
proc tabulate data = clinic.admit;
class actlevel;
var age height weight;
table actlevel, ( age height weight)* mean;
run;
options linesize = 80;
proc means data = clinic.heart min max maxdec = 1;
var arterial heart cardiac urinary;
class survive sex;
run;- AThe PROC MEANS output has a print line width of 80 characters, but the PROC TABULATE output has no print line width.
- BThe PROC TABULATE output has no page numbers, but the PROC MEANS output has page numbers
- CEach page of output from both PROC steps is 55 lines long and has no page numbers, and the PROC MEANS output has a print line width of 80 characters.
- DThe date does not appear on output from either PROC step.
12How can you create SAS output in HTML format on any SAS platform?
- Aby specifying system options
- Bby using programming statements
- Cby using SAS windows to specify the result format
- Dyou can't create HTML output on all SAS platforms
13In order for the date values 05May1955 and 04Mar2046 to be read correctly, what value must the YEARCUTOFF = option have?
- AA value between 1947 and 1954, inclusive
- B1955 of higher
- C1946 or higher
- Dany value
14When you specify an engine for a library, you always specify
- Athe file format for files that are stored in the library
- Bthe version of SAS you are using
- Caccess to other software vendors' files
- Dinstructions for creating temporary SAS files
15Which statement prints a summary of all the files stored in the library named Area51?
- Aproc contents data=Area51._all_ nods;
- Bproc contents data=Area51 _all_ nods;
- Cproc contents data=Area51 _all_ noobs
- Dproc contents data=Area51 _all_.nods;
16See image.

- AOBS=, DATE, and NONUMBER
- BNUMBER, PAGENO=1, and DATE
- CNUMBER and DATE only
- Dnone of the above
17Which of the following programs correctly references a SAS data set named SalesAnalysis that is stored in a permanent SAS library?
- Adata saleslibrary.salesanalysis;
set mydata.quarter1sales;
if sales > 100000;
run; - Bdata mysales.totals;
set sales_99. salesanalysis;
if totalsales > 50000;
run; - Caproc print data = salesanalysis.quarter1;
var sales salesrep month;
run; - Dproc freq data = 1999data.salesanalysis; t
ables quarter* sales;
run;
- Adata saleslibrary.salesanalysis;
18Which time span is used to interpret two-digit year values if the YEARCUTOFF = option is set to 1950?
- A1950-2049
- B1950-2050
- C1949-2050
- D1950-2000
19Assuming you are using SAS code and not special SAS windows, which one of the following statements is false?
- ALIBNAME statements can be stored with a SAS program to reference the SAS library automatically when you submit the program.
- BWhen you delete a libref, SAS no longer has access to the files in the library. However, the contents of the library still exist on your operating system.
- CLibrefs can last from one SAS session to another.
- DYou can access files that were created with other vendors' software by submitting a LIBNAME statement.
20What does the following statement do?
libname osiris spss 'c:\ myfiles\ sasdata\ data.spss';- Adefines a library called Spss using the OSIRIS engine
- Bdefines a library called Osiris using the SPSS engine
- Cdefines two libraries called Osiris and Spss using the default engine
- Ddefines the default library using the OSIRIS and SPSS engines
21As you write and edit SAS programs it's a good idea to
- Abegin DATA and PROC steps in column one
- Bindent statements within a step
- Cbegin RUN statements in column one
- Dall the above
22Suppose you have submitted a SAS program that contains spelling errors. Which set of steps should you perform, in the order shown, to revise and resubmit the program?
- ACorrect the errors.
Clear the Log window.
Resubmit the program.
Check the Log window. - BCorrect the errors.
Resubmit the program.
Check the Output window.
Check the Log window. - CCorrect the Errors.
Clear the Log window.
Resubmit the program.
Check the Output window. - DCorrect the errors.
Clear the Output window.
Resubmit the program.
Check the Output window.
- ACorrect the errors.
23What happens if you submit the following program?
proc sort data = clinic.stress out = maxrates; by maxhr;
run;
proc print data = maxrates label double noobs;
label rechr =' Recovery Heart Rate;
var resthr maxhr rechr date;
where toler =' I' and resthr > 90;
sum fee;
run;- ALog messages indicate that the program ran successfully
- BA “PROC SORT running” message appears at the top of the active window, and a log message may indicate an error in a statement that seems to be valid.
- CA log message indicates that an option is not valid or not recognized.
- DA “PROC PRINT running” message appears at the top of the active window, and a log message may indicate that a quoted string has become too long or that the statement is ambiguous.
24What generally happens when a syntax error is detected?
- ASAS continues processing the step
- BSAS continues to process the step, and the Log window displays messages about the error
- CSAS stops processing the step in which the error occurred and the Log window displays messages about the error
- DSAS stops processing the step in which the error occurred, and the Output window displays messages about the error.
25A syntax error occurs when
- ASome data values are not appropriate for the SAS statements that are specified in a program.
- Bthe form of the elements in a SAS statement is correct, but the elements are not valid for that usage.
- Cprogram statements do not conform to the rules of the SAS language.
- Dnone of the above
26How can you tell whether you have specified an invalid option in a SAS program?
- AA log message indicates an error in a statement that seems to be valid.
- BA log message indicates that an option is not valid or not recognized.
- CThe message “PROC running” or “DATA step running” appears at the top of the active window.
- DYou can't tell until you view the output from the program.
27Which of the following programs contains a syntax error?
- Aproc sort data = sasuser.mysales;
by region;
run; - Bdat sasuser.mysales;
set mydata.sales99;
run; - Cproc print data = sasuser.mysales label;
label region =' Sales Region';
run; - Dnone of the above
- Aproc sort data = sasuser.mysales;
28What should you do after submitting the following program in the Windows or UNIX operating environment?
proc print data = mysales;
where state =' NC;
run;- ASubmit a RUN statement to complete the PROC step.
- BRecall the program. Then add a quotation mark and resubmit the corrected program.
- CCancel the submitted statements. Then recall the program, add a quotation mark, and resubmit the corrected program
- DRecall the program. Then replace the invalid option and resubmit the corrected program.
29Which of the following commands opens a file in the code editing window?
- Afile 'd:\ programs\ sas\ newprog.sas'
- Binclude 'd:\ programs\ sas\ newprog.sas'
- Copen 'd:\ programs\ sas\ newprog.sas'
- Dall of the above
30Suppose you submit a short, simple DATA step. If the active window displays the message “DATA step running” for a long time, what probably happened?
- AYou misspelled a keyword
- BYou forgot to end the DATA step with a RUN statement
- CYou specified an invalid data set option
- DSome data values weren't appropriate for the SAS statements that you specified.
31See image

- Aproc print data = flights.laguardia noobs;
var on changed flight;
where on > = 160;
run; - Bproc print data = flights.laguardia;
var date on changed flight;
where changed > 3;
run; - Cproc print data = flights.laguardia label;
id date;
var boarded transferred flight;
label boarded =' On' transferred =' Changed';
where flight =' 219';
run; - Dproc print flights.laguardia noobs;
id date;
var date on changed flight;
where flight =' 219';
run;
- Aproc print data = flights.laguardia noobs;
32Which of the following PROC PRINT steps is correct if labels are not stored with the data set?
- Aproc print data = allsales.totals label;
label region8 =' Region 8 Yearly Totals';
run; - Bproc print data = allsales.totals;
label region8 =' Region 8 Yearly Totals';
run; - Cproc print data allsales.totals label noobs;
run; - Dproc print allsales.totals label;
run;
- Aproc print data = allsales.totals label;
33Which of the following statements selects from a data set only those observations for which the value of the variable Style is RANCH, SPLIT, or TWOSTORY?
- Awhere style =' RANCH' or 'SPLIT' or 'TWOSTORY';
- Bwhere style in 'RANCH' or 'SPLIT' or 'TWOSTORY';
- Cwhere style in (RANCH, SPLIT, TWOSTORY);
- Dwhere style in (' RANCH',' SPLIT',' TWOSTORY');
34If you want to sort your data and create a temporary data set named Calc to store the sorted data, which of the following steps should you submit?
- Aproc sort data = work.calc out = finance.dividend;
run; - Bproc sort dividend out = calc;
by account;
run; - Cproc sort data = finance.dividend out = work.calc;
by account;
run; - Dproc sort from finance.dividend to calc;
by account;
run;
- Aproc sort data = work.calc out = finance.dividend;
35See image.

- Athe DATE system option and the LABEL option in PROC PRINT
- Bthe DATE and NONUMBER system options and the DOUBLE and NOOBS options in PROC PRINT
- Cthe DATE and NONUMBER system options and the DOUBLE option in PROC PRINT
- Dthe DATE and NONUMBER system options and the NOOBS option in PROC PRINT
36Which of the following statements can you use in a PROC PRINT step to create this output?

- Avar month instructors;
sum instructors aerclass walkjogrun swim; - Bvar month;
sum instructors aerclass walkjogrun swim; - Cvar month instructors aerclass;
sum instructors aerclass walkjogrun swim; - Dall the above
- Avar month instructors;
37What happens if you submit the following program?
proc sort data = clinic.diabetes;
run;
proc print data = clinic.diabetes;
var age height weight pulse;
where sex =' F';
run- AThe PROC PRINT step runs successfully, printing observations in their sorted order.
- BThe PROC SORT step permanently sorts the input data set.
- CThe PROC SORT step generates errors and stops processing, but the PROC PRINT step runs successfully, printing observations in their original (unsorted) order.
- DThe PROC SORT step runs successfully, but the PROC PRINT step generates errors and stops processing.
38If you submit the following program, which output does it create?
proc sort data = finance.loans out = work.loans;
by months amount;
run;
proc print data = work.loans noobs;
var months;
sum amount payment;
where months < 360;
run;- Aa

- Bb

- Cc

- Dd

- Aa
39Choose the statement below that selects rows in which
the amount is less than or equal to $ 5000
the account is 101-1092 or the rate equals 0.095.- Awhere amount < = 5000 and account =' 101-1092' or rate = 0.095;
- Bwhere (amount le 5000 and account =' 101-1092') or rate = 0.095;
- Cwhere amount < = 5000 and (account =' 101-1092' or rate eq 0.095);
- Dwhere amount < = 5000 or account =' 101-1092' and rate = 0.095;
40What does PROC PRINT display by default?
- APROC PRINT does not create a default report; you must specify the rows and columns to be displayed.
- BPROC PRINT displays all observations and variables in the data set. If you want an additional column for observation numbers, you can request it.
- CPROC PRINT displays columns in the following order: a column for observation numbers, all character variables, and all numeric variables.
- DPROC PRINT displays all observations and variables in the data set, a column for observation numbers on the far left, and variables in the order in which they occur in the data set.
41Which SAS statement associates the fileref Crime with the raw data file C:\ States\ Data\Crime.dat?
- Afilename crime 'c:\ states\ data\ crime.dat';
- Bfilename crime c:\ states\ data\ crime.dat;
- Cfileref crime 'c:\ states\ data\ crime.dat';
- Dfilename 'c:\ states\ data\ crime' crime.dat;
42Filerefs remain in effect until . . .
- AYou change them
- BYou cancel them
- Cyou end your SAS session
- Dall the above
43Which statement identifies a raw data file to be read with the fileref Products and specifies that the DATA step read only records 1-15?
- Ainfile products obs 15;
- Binfile products obs = 15;
- Cinput products obs = 15;
- Dinput products 1-15;
44Which of the following programs correctly writes the observations from the data set below to a raw data file?

- Adata _null_;
set work.patients;
infile 'c:\ clinic\ patients\ referals.dat';
input id 1-4 sex 6 age 8-9 height 11-12 weight 14-16 pulse 18-20;
run; - Bdata referals.dat;
set work.patients;
input id 1-4 sex 6 age 8-9 height 11-12 weight 14-16 pulse 18-20;
run; - Cdata _null_;
set work.patients;
file c:\ clinic\ patients\ referals.dat;
put id 1-4 sex 6 age 8-9 height 11-12 weight 14-16 pulse 18-20;
run; - Ddata _null_;
set work.patients;
file 'c:\ clinic\ patients\ referals.dat';
put id 1-4 sex 6 age 8-9 height 11-12 weight 14-16 pulse 18-20;
run;
- Adata _null_;
45Which raw data file can be read using column input?
- Aa

- Bb

- Cc

- Dall the above
- Aa
46See image

- Adata work.salesrep;
infile empdata;
input ID $ 1-4 LastName $ 6-12 FirstName $ 14-18 City $ 20-29;
run;
proc print data = work.salesrep;
run; - Bdata work.salesrep;
infile empdata;
input ID $ 1-4 Name $ 6-12 FirstName $ 14-18 City $ 20-29;
run;
proc print data = work.salesrep;
run; - Cdata work.salesrep;
infile empdata;
input ID $ 1-4 name1 $ 6-12 name2 $ 14-18 City $ 20-29;
run;
proc print data = work.salesrep;
run; - DAll the above
- Adata work.salesrep;
47See image

- Ainput StockNumber $ 1-3 Finish $ 5-9 Style $ 11-18 Item $ 20-24 Price 27-32;
- Binput StockNumber $ 1-3 Price 27-32 Item $ 20-24 Finish $ 5-9 Style $ 11-18;
- Cinput $ StockNumber 1-3 Price 27-32 $ Item 20-24 $ Finish 5-9 $ Style 11-18;
- Dinput StockNumber $ 1-3 Price $ 27-32 Item $ 20-24 Finish $ 5-9 Style $ 11-18;
48Which statement correctly re-defines the values of the variable Income as 100 percent higher?
- Aincome = income* 1.00;
- Bincome = income +( income* 2.00);
- Cincome = income* 2;
- Dincome =* 2;
49Which program correctly reads instream data?
- Adata finance.newloan;
input datalines;
if country =' JAPAN';
MonthAvg = amount/ 12;
1998 US CARS 194324.12
1998 US TRUCKS 142290.30
1998 CANADA CARS 10483.44
1998 CANADA TRUCKS 93543.64
1998 MEXICO CARS 22500.57
1998 MEXICO TRUCKS 10098.88
1998 JAPAN CARS 15066.43
1998 JAPAN TRUCKS 40700.34
; - Bdata finance.newloan;
input Year 1-4 Country $ 6-11 Vehicle $ 13-18 Amount 20-28;
if country =' JAPAN';
MonthAvg = amount/ 12;
datalines;
run; - Cdata finance.newloan;
input Year 1-4 Country 6-11 Vehicle 13-18 Amount 20-28;
if country =' JAPAN';
MonthAvg = amount/ 12;
datalines;
1998 US CARS 194324.12
1998 US TRUCKS 142290.30
1998 CANADA CARS 10483.44
1998 CANADA TRUCKS 93543.64
1998 MEXICO CARS 22500.57
1998 MEXICO TRUCKS 10098.88
1998 JAPAN CARS 15066.43
1998 JAPAN TRUCKS 40700.34
; - Ddata finance.newloan;
input Year 1-4 Country $ 6-11 Vehicle $ 13-18 Amount 20-28;
if country =' JAPAN';
MonthAvg = amount/ 12;
datalines;
1998 US CARS 194324.12
1998 US TRUCKS 142290.30
1998 CANADA CARS 10483.44
1998 CANADA TRUCKS 93543.64
1998 MEXICO CARS 22500.57
1998 MEXICO TRUCKS 10098.88
1998 JAPAN CARS 15066.43
1998 JAPAN TRUCKS 40700.34
;
- Adata finance.newloan;
50Which SAS statement subsets the raw data shown below so that only the observations in which Sex (in the second field) has a value of F are processed?

- Aif sex = f;
- Bif sex = F;
- Cif sex =' F';
- Da or b
51Which of the following is not created during the compilation phase?
- Aa. the data set descriptor
- Bb. the first observation
- Cc. the program data vector
- Dd. the _N_and_ERROR_ automatic variables
52During the compilation phase, SAS scans each statement in the DATA step, looking for syntax errors. Which of the following is not considered a syntax error?
- Aa. incorrect values and formats
- Bb. invalid options or variable names
- Cc. missing or invalid punctuation
- Dd. missing or misspelled keywords
53Unless otherwise directed, the DATA step executes...
- Aa. once for each compilation phase.
- Bb. once for each DATA step statement
- Cc. once for each record in the input file
- Dd. once for each variable in the input file
54At the beginning of the execution phase, the value of _N_ is 1, the value of _ERROR_ is 0, and the values of the remaining variables are set to:
- Aa. 0
- Bb. 1
- Cc. undefined
- Dd. missing
55Suppose you run a program that causes three DATA errors. What is the value of the automatic variable _ERROR_ when the observation that contains the third error is processed?
- Aa. 0
- Bb. 1
- Cc. 2
- Dd. 3
56Which of the following actions occurs at the beginning of an iteration of the DATA step?
- Aa. The automatic variables _N_ and _ERROR_ are incremented by one.
- Bb. The DATA step stops execution.
- Cc. The descriptor portion of the data set is written.
- Dd. The values of variables created in programming statements are re-set to missing in the program data vector.
57Based on the DATA step shown below, in what order will the variables be stored in the new data set?
data perm.update;
infile invent;
input IDnum $ Item $ 1-13 Instock 21-22 BackOrd 24-25;
Total = instock + backord;
run;- Aa. IDnum Item InStock BackOrd Total
- Bb. Item IDnum InStock BackOrd Total
- Cc. Total IDnum Item InStock BackOrd
- Dd. Total Item IDnum InStock BackOrd
58If SAS detects syntax errors, then...
- Aa. data set variables will contain missing values.
- Bb. the DATA step does not compile.
- Cc. the DATA step still compiles, but it does not execute.
- Dd. the DATA step still compiles and executes.
59What is wrong with this program?
data perm.update;
infile invent
input Item $ 1-13 IDnum $ 15-19 Instock 21-22
BackOrd 24-25;
total = instock + backord;
run;- Aa. missing semicolon on second line
- Bb. missing semicolon on third line
- Cc. incorrect order of variables
- Dd. incorrect variable type
60See image

- Aa. A keyword was misspelled in the DATA step.
- Bb. A semicolon was missing from the INFILE statement.
- Cc. A variable was misspelled in the INPUT statement.
- Dd. A dollar sign was missing in the INPUT statement.
61If you don't specify the LIBRARY = option on the PROC FORMAT statement, your formats are stored in Work.Formats, and they exist ...
- Aa. only for the current procedure.
- Bb. only for the current DATA step.
- Cc. only for the current SAS session.
- Dd. permanently.
- Aa. only for the current procedure.
62Which of the following statements will store your formats in a permanent catalog?
- Aa. libname library 'c:\ sas\ formats\ lib';
proc format lib = library ...; - Bb. libname library 'c:\ sas\ formats\ lib';
format lib = library ...; - Cc. library =' c:\ sas\ formats\ lib';
proc format library ...; - Dd. library =' c:\ sas\ formats\ lib';
proc library ...;
- Aa. libname library 'c:\ sas\ formats\ lib';
63When creating a format with the VALUE statement, the new format's name
-cannot end with a number
-cannot end with a period
-cannot be the name of a SAS format, and...- Aa. cannot be the name of a data set variable.
- Bb. must be at least two characters long.
- Cc. must be at least eight characters long.
- Dd. must begin with a dollar sign ($) if used with a character variable.
64Which of the following FORMAT procedures is written correctly?
- Aa. proc format lib = library value colorfmt; 1 =' Red' 2 =' Green' 3 =' Blue' run;
- Bb. proc format lib = library; value colorfmt 1 =' Red' 2 =' Green' 3 =' Blue'; run;
- Cc. proc format lib = library; value colorfmt; 1 =' Red' 2 =' Green' 3 =' Blue' run;
- Dd. proc format lib = library; value colorfmt 1 =' Red'; 2 =' Green'; 3 =' Blue'; run;
65Which of these is false? Ranges in the VALUE statement can specify...
- Aa. a single value, such as 24 or 'S'.
- Bb. a range of numeric values, such as 0-1500.
- Cc. a range of character values, such as 'A'-' M'.
- Dd. a list of numeric and character values separated by commas, such as 90,' B', 180,' D', 270.
66How many characters can be used in a label?
- Aa. 40
- Bb. 96
- Cc. 200
- Dd. 256
67Which keyword can be used to label missing numeric values as well as any values that are not specified in a range?
- Aa. LOW
- Bb. MISS
- Cc. MISSING
- Dd. OTHER
68You can place the FORMAT statement in either a DATA step or a PROC step. What happens when you place it in a DATA step?
- Aa. You temporarily associate the formats with variables.
- Bb. You permanently associate the formats with variables.
- Cc. You replace the original data with the format labels.
- Dd. You make the formats available to other data sets.
69The format JOBFMT was created in a FORMAT procedure. Which FORMAT statement will apply it to the variable JobTitle in the program output?
- Aa. format jobtitle jobfmt;
- Bb. format jobtitle jobfmt.;
- Cc. format jobtitle = jobfmt;
- Dd. format jobtitle =' jobfmt';
70Which keyword, when added to the PROC FORMAT statement, will display all the formats in your catalog?
- Aa. CATALOG
- Bb. LISTFMT
- Cc. FMTCAT
- Dd. FMTLIB
71The default statistics produced by the MEANS procedure are n, mean, minimum, maximum, and...
- Aa. median
- Bb. range
- Cc. standard deviation
- Dd. standard error of the mean.
72Which statement will limit a PROC MEANS analysis to the variables Boarded, Transfer, and Deplane?
- Aa. by boarded transfer deplane;
- Bb. class boarded transfer deplane;
- Cc. output boarded transfer deplane;
- Dd. var boarded transfer deplane;
73The data set Survey.Health includes the following variables. Which is a poor candidate for PROC MEANS analysis?
- Aa. IDnum
- Bb. Age
- Cc. Height
- Dd. Weight
74Which of the following statements is true regarding BY group processing?
- Aa. BY variables must be either indexed or sorted.
- Bb. Summary statistics are computed for BY variables.
- Cc. BY group processing is preferred when you are categorizing data that contains few variables.
- Dd. BY group processing overwrites your data set with the newly grouped observations.
75Which group processing statement produced the PROC MEANS output shown below?

- Aa. class sex survive;
- Bb. class survive sex;
- Cc. by sex survive;
- Dd. by survive sex;
76Which program can be used to create the following output?

- Aa. proc means data = clinic.diabetes; var age height weight; class sex; output out = work.sum_gender mean = AvgAge AvgHeight AvgWeight; run;
- Bb. proc summary data = clinic.diabetes print; var age height weight; class sex; output out = work.sum_gender mean = AvgAge AvgHeight AvgWeight; run;
- Cc. proc means data = clinic.diabetes noprint; var age height weight; class sex; output out = work.sum_gender mean = AvgAge AvgHeight AvgWeight; run;
- Dd. Both a and b.
77By default, PROC FREQ creates a table of frequencies and percentages for which data set variables?
- Aa. character variables
- Bb. numeric variables
- Cc. both character and numeric variables
- Dd. none: variables must always be specified
78Frequency distributions work best with variables that contain
- Aa. continuous values.
- Bb. numeric values.
- Cc. categorical values.
- Dd. unique values.
79Which PROC FREQ step produced this two-way table?

- Aa. proc freq data = clinic.diabetes; tables height weight;format height htfmt. weight wtfmt.; run;
- Bb. proc freq data = clinic.diabetes; tables weight height; format weight wtfmt. height htfmt.; run;
- Cc. proc freq data = clinic.diabetes; tables height* weight; format height htfmt. weight wtfmt.; run;
- Dd. proc freq data = clinic.diabetes; tables weight* height; format weight wtfmt. height htfmt.; run;
80Which PROC FREQ step produced this table?

- Aa. proc freq data = clinic.diabetes; tables sex weight / list; format weight wtfmt.; run;
- Bb. proc freq data = clinic.diabetes; tables sex* weight / nocol; format weight wtfmt.; run;
- Cc. proc freq data = clinic.diabetes; tables sex weight / norow nocol; format weight wtfmt.; run;
- Dd. proc freq data = clinic.diabetes; tables sex* weight / nofreq norow nocol; format weight wtfmt.; run;
81Using ODS statements, how many types of output can you generate at once?
- Aa. 1 (only HTML output)
- Bb. 2
- Cc. 3
- Dd. as many as you want
82If ODS is set to its default settings in the SAS windowing environment for Microsoft Windows and UNIX, , what types of output are created by the code below?
ods html file =' c:\ myhtml.htm';
ods pdf file =' c:\ mypdf.pdf';- Aa. HTML and PDF
- Bb. PDF only
- Cc. HTML, PDF, and listing
- Dd. No output is created because ODS is closed by default.
83In the SAS windowing environment for Microsoft Windows and UNIX, what is the purpose of closing the HTML destination in the code shown below?
ods html close;
ods rtf ... ;- Aa. It conserves system resources.
- Bb. It simplifies your program.
- Cc. It makes your program compatible with other hardware platforms.
- Dd. It makes your program compatible with previous versions of SAS.
84When the code shown below is run, what will the file D:\ Output\ body.html contain?
ods html body =' d:\ output\ body.html';
proc print data = work.alpha;
run;
proc print data = work.beta;
run;
ods html close;- Aa. The PROC PRINT output for Work.Alpha.
- Bb. The PROC PRINT output for Work.Beta.
- Cc. The PROC PRINT output for both Work.Alpha and Work.Beta.
- Dd. Nothing. No output will be written to D:\ Output\body.html.
85When the code shown below is run, what file will be referenced by the links in D:\ Output\contents.html?
ods html body =' d:\ output\ body.html'
contents =' d:\ output\ contents.html'
frame =' d:\ output\ frame.html';- Aa. D:\ Output\ body.html
- Bb. D:\ Output\ contents.html
- Cc. D:\ Output\ frame.html
- Dd. There are no links from the file D:\ Output\contents.html.
86The table of contents created by the CONTENTS = option contains a numbered heading for
- Aa. each procedure
- Bb. each procedure that creates output.
- Cc. each procedure and DATA step.
- Dd. each HTML file created by your program.
87When the code shown below is run, what will the file D:\ Output\ frame.html display?
ods html body =' d:\ output\ body.html'
contents =' d:\ output\ contents.html'
frame =' d:\ output\ frame.html';- Aa. The file D:\ Output\contents.html.
- Bb. The file D:\ Output\frame.html.
- Cc. The files D:\ Output\ contents.html and D:\ Output\body.html.
- Dd. It displays no other files.
88What is the purpose of the URL = suboptions shown below?
ods html body =' d:\ output\ body.html' (url =' body.html')
contents =' d:\ output\ contents.html'
(url =' contents.html')
frame =' d:\ output\ frame.html';- Aa. To create absolute link addresses for loading the files from a server.
- Bb. To create relative link addresses for loading the files from a server.
- Cc. To allow HTML files to be loaded from a local drive.
- Dd. To send HTML output to two locations.
89Which ODS HTML option was used in creating the following table?

- Aa. format = brown
- Bb. format =' brown'
- Cc. style = brown
- Dd. style =' brown'
90What is the purpose of the PATH = option?
ods html path =' d:\ output' (url = none)
body =' body.html'
contents =' contents.html'
frame =' frame.html';- Aa. It creates absolute link addresses for loading HTML files from a server.
- Bb. It creates relative link addresses for loading HTML files from a server.
- Cc. It allows HTML files to be loaded from a local drive.
- Dd. It specifies the location of HTML file output.
91Which program creates the output shown below?

- Aa. data test2; infile furnture; input StockNum $ 1-3 Finish $ 5-9 Style $ 11-18 Item $ 20-24 Price 26-31; if finish =' oak' then delete; retain TotPrice 100; totalprice + price; drop price; run; proc print data = test2 noobs; run;
- Bb. data test2; infile furnture; input StockNum $ 1-3 Finish $ 5-9 Style $ 11-18 Item $ 20-24 Price 26-31; if finish =' oak' and price < 200 then delete; TotalPrice + price; run; proc print data = test2 noobs; run;
- Cc. data test2( drop = price); infile furnture; input StockNum $ 1-3 Finish $ 5-9 Style $ 11-18 Item $ 20-24 Price 26-31; if finish =' oak' and price < 200 then delete; TotalPrice + price; run; proc print data = test2 noobs; run;
- Dd. data test2; infile furnture; input StockNum $ 1-3 Finish $ 5-9 Style $ 11-18 Item $ 20-24 Price 26-31; if finish = oak and price < 200 then delete price; TotalPrice + price; run; proc print data = test2 noobs; run;
92How is the variable Amount labeled and formatted in the PROC PRINT output? data credit; infile creddata; input Account $ 1-5 Name $ 7-25 Type $ 27 Transact $ 29-35 Amount 37-50; label amount =' Amount of Loan'; format amount dollar12.2; run; proc print data = credit label; label amount =' Total Amount Loaned'; format amount comma10.; run;
- Aa. label Amount of Loan, format DOLLAR12.2
- Bb. label Total Amount Loaned, format COMMA10.
- Cc. label Amount, default format
- Dd. The PROC PRINT step does not execute because two labels and two formats are assigned to the same variable.
93Consider the IF-THEN statement shown below. When the statement is executed, which expression is evaluated first?
if finlexam > = 95 and (research =' A' or (project =' A' and present =' A')) then Grade =' A +';- Aa. finlexam > = 95
- Bb. research =' A'
- Cc. project =' A' and present =' A'
- Dd. research =' A' or (project =' A' and present =' A')
94Consider the small raw data file and program shown below. What is the value of Count after the fourth record is processed?
data work.newnums; infile numbers; input Tens 2-3; Count + tens; run;
- Aa. missing
- Bb. 0
- Cc. 30
- Dd. 70
95Now consider the revised program below. What is the value of Count after the third observation is read?
data work.newnums; infile numbers; input Tens 2-3; retain Count 100; count + tens; run;
- Aa. missing
- Bb. 0
- Cc. 100
- Dd. 130
96For the observation shown below, what is the result of the IF-THEN statements?
if status =' OK' and type = 3 then Count + 1;
if status =' S' or action =' E' then Control =' Stop';
- Aa. Count = 12 Control = Go
- Bb. Count = 13 Control = Stop
- Cc. Count = 12 Control = Stop
- Dd. Count = 13 Control = Go
97Which of the following can determine the length of a new variable?
- Aa. the length of the variable's first reference in the DATA step
- Bb. the assignment statement
- Cc. the LENGTH statement
- Dd. all of the above
98Which set of statements is equivalent to the code shown below?
if code =' 1' then Type =' Fixed';
if code =' 2' then Type =' Variable';
if code ^ =' 1' and code ^ =' 2' then Type =' Unknown';- Aa. if code =' 1' then Type =' Fixed'; else if code =' 2' then Type =' Variable'; else Type =' Unknown';
- Bb. if code =' 1' then Type =' Fixed'; if code =' 2' then Type =' Variable'; else Type =' Unknown';
- Cc. if code =' 1' then type =' Fixed'; else code =' 2' and type =' Variable'; else type =' Unknown';
- Dd. if code =' 1' and type =' Fixed'; then code =' 2' and type =' Variable'; else type =' Unknown';
99What is the length of the variable Type, as created in the DATA step below?
data finance.newloan; set finance.records; TotLoan + payment; if code =' 1' then Type =' Fixed'; else Type =' Variable'; length type $ 10; run;- Aa. 5
- Bb. 8
- Cc. 10
- Dd. It depends on the first value of Type
100Which program contains an error?
- Aa. data clinic.stress( drop = timemin timesec); infile tests; input ID $ 1-4 Name $ 6-25 RestHR 27-29 MaxHR 31-33 RecHR 35-37 TimeMin 39-40 TimeSec 42-43 Tolerance $ 45; TotalTime =( timemin* 60) + timesec; SumSec + totaltime; run;
- Bb. proc print data = clinic.stress; label totaltime =' Total Duration of Test'; format timemin 5.2; drop sumsec; run;
- Cc. proc print data = clinic.stress( keep = totaltime timemin); label totaltime =' Total Duration of Test'; format timemin 5.2; run;
- Dd. data clinic.stress; infile tests; input ID $ 1-4 Name $ 6-25 RestHR 27-29 MaxHR 31-33 RecHR 35-37 TimeMin 39-40 TimeSec 42-43 Tolerance $ 45; TotalTime =( timemin* 60) + timesec; keep id totaltime tolerance; run;
101If you submit the following program, which variables appear in the new data set?
data work.cardiac( drop = age group); set clinic.fitness( keep = age weight group); if group = 2 and age > 40; run;- Aa. none
- Bb. Weight
- Cc. Age, Group
- Dd. Age, Weight, Group
102Which of the following programs correctly reads the data set Orders and creates the data set FastOrdr?
- Aa. data catalog.fastordr( drop = ordrtime); set july.orders( keep = product units price); if ordrtime < 4; Total = units* price; run;
- Bb. data catalog.orders( drop = ordrtime); set july.fastordr( keep = product units price); if ordrtime < 4; Total = units* price; run;
- Cc. data catalog.fastordr( drop = ordrtime); set july.orders( keep = product units price ordrtime); if ordrtime < 4; Total = units* price; run;
- Dd. None of the above
103Which of the following statements is false about BY-group processing?
When you use the BY statement with the SET statement:- Aa. The data sets listed in the SET statement must be indexed or sorted by the values of the BY variable( s).
- Bb. The DATA step automatically creates two variables, FIRST. and LAST., for each variable in the BY statement.
- Cc. FIRST. and LAST. identify the first and last observation in each BY group, respectively.
- Dd. FIRST. and LAST. are stored in the data set.
104There are 500 observations in the data set Usa. What is the result of submitting the following program?
data work.getobs5; obsnum = 5; set company.usa( keep = manager payroll) point = obsnum; stop; run;- Aa. an error
- Bb. an empty data set
- Cc. continuous loop
- Dd. a data set that contains one observation
105There is no end-of-file condition when you use direct access to read data, so how can your program prevent a continuous loop?
- Aa. Do not use a POINT = variable.
- Bb. Check for an invalid value of the POINT = variable.
- Cc. Do not use an END = variable.
- Dd. Include an OUTPUT statement.
106Assuming that the data set Company.USA has five or more observations, what is the result of submitting the following program?
data work.getobs5; obsnum = 5; set company.usa( keep = manager payroll) point = obsnum; output; stop; run;- Aa. an error
- Bb. an empty data set
- Cc. a continuous loop
- Dd. a data set that contains one observation
107Which of the following statements is true regarding direct access of data sets?
- Aa. You cannot specify END = with POINT =.
- Bb. You cannot specify OUTPUT with POINT =.
- Cc. You cannot specify STOP with END =.
- Dd. You cannot specify FIRST. with LAST.
108What is the result of submitting the following program?
data work.addtoend;
set clinic.stress2 end = last;
if last;
run;- Aa. an error
- Bb. an empty data set
- Cc. a continuous loop
- Dd. a data set that contains one observation
109At the start of DATA step processing, during the compilation phase, variables are created in the program data vector (PDV), and observations are set to:
- Aa. blank
- Bb. missing
- Cc. 0
- Dd. there are no observations.
110The DATA step executes:
- Aa. continuously if you use the POINT = option and the STOP statement.
- Bb. once for each variable in the output data set.
- Cc. once for each observation in the input data set.
- Dd. until it encounters an OUTPUT statement.
Informações
- Descrição
- SAS Basic Programming Multiple Choice
- Autor
- James Blair
- Idioma
- English
- Visualizações
- 330
- Etiquetas
- Avaliação
- Ainda sem avaliações Avalie este quiz