questions fully solved
If you submit the following program, how does the output look?
options page size=55 no number; proc tabulate data=clinic. Admit; class act level; var age height
weight; table act level,(age height weight)*mean;
6
run; options line size=80; proc means data=clinic. Heart min max made=1; var arterial heart
cardiac urinary; class survive sex; run;
a. The PROC MEANS output has a print line width of 80 characters, but the PROC TABULATE
output has no print line width.
b. The PROC TABULATE output has no page numbers, but the PROC MEANS output has page
numbers.
c. Each 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.
d. The date does not appear on output from either PROC step. - correct answer ✔✔ c
When you specify a system option, it remains in effect until you change the option or end your
SAS session, so both PROC steps generate output that is printed 55 lines per page with no page
numbers. If you don't specify a system option, SAS uses the default value for that system option.
In order for the date values 05May1955 and 04Mar2046 to be read correctly, what value must
the YEARCUTOFF= option have?
a. a value between 1947 and 1954, inclusive
b. 1955 or higher
c. 1946 or higher
,d. any value - correct answer ✔✔ d
As long as you specify an informat with the correct field width for reading the entire date value,
the YEARCUTOFF= option doesn't affect date values that have four-digit years.
When you specify an engine for a library, you are always specifying
a. the file format for files that are stored in the library.
7
b. the version of SAS that you are using.
c. access to other software vendors' files.
d. instructions for creating temporary SAS files. - correct answer ✔✔ a
A SAS engine is a set of internal instructions that SAS uses for writing to and reading from files in
a SAS library. Each engine specifies the file format for files that are stored in the library, which in
turn enables SAS to access files with a particular format. Some engines access SAS files, and
other engines support access to other vendors' files
Which statement prints a summary of all the files stored in the library named Area51?
a. proc contents data=area51._all_ nods;
b. proc contents data=area51 _all_ nods;
c. proc contents data=area51 _all_ noobs;
d. proc contents data=area51 _all_.nods - correct answer ✔✔ a
To print a summary of library contents with the CONTENTS procedure, use a period to append
the _ALL_ option to the libref. Adding the NODS option suppresses detailed information about
the files.
, Which of the following programs correctly references a SAS data set named SalesAnalysis that is
stored in a permanent SAS library?
a. data saleslibrary.salesanalysis;
set mydata.quarter1sales; if sales>100000;
run;
b. data mysales.totals;
set sales_99.salesanalysis;
if totalsales>50000;
run;
c. proc print data=salesanalysis.quarter1;
var sales salesrep month; run;
d. proc freq data=1999data.salesanalysis;
9 tables quarter*sales; run; - correct answer ✔✔ b
Librefs must be 1 to 8 characters long, must begin with a letter or underscore, and can contain
only letters, numbers, or underscores. After you assign a libref, you specify it as the first element
in the two-level name for a SAS file.
Which time span is used to interpret two-digit year values if the YEARCUTOFF= option is set to
1950?
a. 1950-2049
b. 1950-2050
c. 1949-2050
d. 1950-2000 - correct answer ✔✔ A
The YEARCUTOFF= option specifies which 100-year span is used to interpret two-digit year
values. The default value of YEARCUTOFF= is 1920. However, you can override the default and