Advanced SAS Certification Exam Questions And
Correct Answers
SASFILE SAS-data-set LOAD;
SASFILE SAS-data-set CLOSE; - Answer Use the SASFILE global statement to process a
small SAS data set repeatedly. If your program reads the same data set multiple times,
you can use the SASFILE statement in order to reduce I/O. The first SASFILE statement
completely loads the SAS data set into memory, a page at a time. You specify the
keyword SASFILE, the data set that is to be loaded into memory, and the LOAD
argument. SAS uses the in-memory version whenever the data set is requested for
processing. Reduces I/O
RANUNI (seed) - Answer the RANUNI function to generate random numbers from a
uniform distribution. The RANUNI function returns a decimal value between 0 and 1
non-inclusive. The RANUNI function uses the seed, a numeric value, the first time it
executes, to initialize the stream of random numbers.
CEIL (argument) - Return To round up the number returned by the RANUNI function to
integers, you can use the CEIL function. The CEIL function takes one argument which is
a numeric constant, variable, or expression.
SAS-data-set (POINTOBS=YES | NO)
OPTIONS POINTOBS=YES | NO; - Return Allows SAS to access a compressed
setData set by randomly pointing to a specific observation. This is the default. You may
want to set POINTOBS=NO to access
compress a file.
SAS-data-set (COMPRESS=YE | CHAR )
OPTIONS COMPRESS=YE | CHAR; - Response the RLE (run-length encoding) algorithm
reduces consecutive repeating blanks, binary zeros, and repeating characters to a
single byte.
,Is to be used with character data with repeated characters
SAS-data-set (COMPRESS=BINARY)
OPTIONS COMPRESS=BINARY; - Answer the RDC (Ross Data Compression) algorithm
uses both run-length encoding, which handles the repeated values, and sliding-window
compression, which handles the patterns of values.
for numeric data, character data w/ patterns, and observations > 1000 bytes
SAS-data-set (REUSE=NO | YES)
OPTIONS REUSE=NO | YES; - Answer Deleted observation space can be reused if the
REUSE=YES data set or system option was turned on
when the SAS data file was compressed .
noncorrelated subquery -Answer is a self-sufficient query, it executes independently of
the outer query
correlated subquery -Answer requires a value or values to be passed to it by the outer
(main) query before it can be successfully resolved
True or False: By default, the UNION, INTERSECT, and EXCEPT set operators remove
duplicate rows from the query output? - Answer TRUE
TRUE or False: Views save disk storeage at the cost of extra CPU and memory USAGE? -
Answer TRUE
What is the default sort order when using an ORDER BY clause? - Answer ASCEND
If the summary function specifies only one column, the statistic is calculated for the
column.
sum(Qtr1)
What is the difference between count(*) and count('column-name') - Answer Count(*)
count all rows in a table while count('column-name') count the # of nonmissing values in
,that column.
FIND() - Answer The FIND function returns the starting position of the first
occurrence of a substring within a string (character value). Evaluates to true (1) or false
(0)
FIND(string, substring<,modifier(s)><,startpos>)
IN ANY Keyword -Answer is true if it is true for some of the values returned by the
subquery
IN ALL Keyword - Answer is true if it is true for all the values returned by the subquery
Which DATA step statement produces the same result as OUTER UNION CORR?
a. MERGE
b. APPEND
What other Base SAS procedures would provide output that is similar to the output from
the PROC SQL DESCRIBE and SELECT statements? -Answer PROC CONTENTS
provides output that is similar to the output of the PROC SQL DESCRIBE statement.
PROC PRINT provides a report similar to the
PROC SQL SELECT statement.
How would you display the structure of dictionary tables? -Answer describe table
dictionary.tables;
OPTIONS STATS | NOSTATS; OPTIONS MEMRPT | NOMEMRPT; - Answer STATS,
MEMRPT- are used to control the statistics that are printed. STATS controls whether any
statistics are listed and MEMRPT specifies whether memory usage statistics are written
to the SAS log.
, OPTIONS STIMER | NOSTIMER; - Answer On by default in all operating environments.
This option prints the familiar statistics for real time and CPU time in the SAS log after
each step.
OPTIONS STIMER | NOSTIMER;
OPTIONS FULLSTIMER | NOFULLSTIMER; - Answer More useful than STIMER for
benchmarking; writes all available system performance statistics to the SAS log. The
statistics shown vary by SAS version and operating environment.
OPTIONS FULLSTIMER | NOFULLSTIMER;
IDXWHERE=YES - Instructs SAS to choose the most beneficial index to optimize a
WHERE expression and bypasses the possibility of the decision algorithm doing
sequential processing. An example could be that if you knew how large a subset was
going to be then you might want SAS to bypass the decision algorithm and use the index.
IDXWHERE=NO - specifies that SAS should not use an index, but instead read a data set
sequentially. You should use the IDXWHERE=NO option when you know that an available
index will not optimize the WHERE processing.
IDXNAME= - Answer option instructs SAS to use the given index. You could use the
IDXNAME= option when you know which index is better, so SAS doesn't waste the time
in comparison of indexes. For instance, say you have a compound WHERE expression
having two simple indexes and you know which index will yield least observations, you
may instruct SAS to use it.
INTNX(interval, start-from, increment<, alignment>) - Answer To increment a date, time,
or datetime value by an interval or intervals, and return a date, time, or datetime value,
you can use the INTNX function.
USING LIBNAME-clause; - Answer A LIBNAME statement that is needed by a PROC SQL
view can be embedded in the view by specifying the USING clause. The USING clause
lets you store SAS libref information in the view.
%INCLUDE file-specification </SOURCE2>; - Answer The %INCLUDE statement retrieves
Correct Answers
SASFILE SAS-data-set LOAD;
SASFILE SAS-data-set CLOSE; - Answer Use the SASFILE global statement to process a
small SAS data set repeatedly. If your program reads the same data set multiple times,
you can use the SASFILE statement in order to reduce I/O. The first SASFILE statement
completely loads the SAS data set into memory, a page at a time. You specify the
keyword SASFILE, the data set that is to be loaded into memory, and the LOAD
argument. SAS uses the in-memory version whenever the data set is requested for
processing. Reduces I/O
RANUNI (seed) - Answer the RANUNI function to generate random numbers from a
uniform distribution. The RANUNI function returns a decimal value between 0 and 1
non-inclusive. The RANUNI function uses the seed, a numeric value, the first time it
executes, to initialize the stream of random numbers.
CEIL (argument) - Return To round up the number returned by the RANUNI function to
integers, you can use the CEIL function. The CEIL function takes one argument which is
a numeric constant, variable, or expression.
SAS-data-set (POINTOBS=YES | NO)
OPTIONS POINTOBS=YES | NO; - Return Allows SAS to access a compressed
setData set by randomly pointing to a specific observation. This is the default. You may
want to set POINTOBS=NO to access
compress a file.
SAS-data-set (COMPRESS=YE | CHAR )
OPTIONS COMPRESS=YE | CHAR; - Response the RLE (run-length encoding) algorithm
reduces consecutive repeating blanks, binary zeros, and repeating characters to a
single byte.
,Is to be used with character data with repeated characters
SAS-data-set (COMPRESS=BINARY)
OPTIONS COMPRESS=BINARY; - Answer the RDC (Ross Data Compression) algorithm
uses both run-length encoding, which handles the repeated values, and sliding-window
compression, which handles the patterns of values.
for numeric data, character data w/ patterns, and observations > 1000 bytes
SAS-data-set (REUSE=NO | YES)
OPTIONS REUSE=NO | YES; - Answer Deleted observation space can be reused if the
REUSE=YES data set or system option was turned on
when the SAS data file was compressed .
noncorrelated subquery -Answer is a self-sufficient query, it executes independently of
the outer query
correlated subquery -Answer requires a value or values to be passed to it by the outer
(main) query before it can be successfully resolved
True or False: By default, the UNION, INTERSECT, and EXCEPT set operators remove
duplicate rows from the query output? - Answer TRUE
TRUE or False: Views save disk storeage at the cost of extra CPU and memory USAGE? -
Answer TRUE
What is the default sort order when using an ORDER BY clause? - Answer ASCEND
If the summary function specifies only one column, the statistic is calculated for the
column.
sum(Qtr1)
What is the difference between count(*) and count('column-name') - Answer Count(*)
count all rows in a table while count('column-name') count the # of nonmissing values in
,that column.
FIND() - Answer The FIND function returns the starting position of the first
occurrence of a substring within a string (character value). Evaluates to true (1) or false
(0)
FIND(string, substring<,modifier(s)><,startpos>)
IN ANY Keyword -Answer is true if it is true for some of the values returned by the
subquery
IN ALL Keyword - Answer is true if it is true for all the values returned by the subquery
Which DATA step statement produces the same result as OUTER UNION CORR?
a. MERGE
b. APPEND
What other Base SAS procedures would provide output that is similar to the output from
the PROC SQL DESCRIBE and SELECT statements? -Answer PROC CONTENTS
provides output that is similar to the output of the PROC SQL DESCRIBE statement.
PROC PRINT provides a report similar to the
PROC SQL SELECT statement.
How would you display the structure of dictionary tables? -Answer describe table
dictionary.tables;
OPTIONS STATS | NOSTATS; OPTIONS MEMRPT | NOMEMRPT; - Answer STATS,
MEMRPT- are used to control the statistics that are printed. STATS controls whether any
statistics are listed and MEMRPT specifies whether memory usage statistics are written
to the SAS log.
, OPTIONS STIMER | NOSTIMER; - Answer On by default in all operating environments.
This option prints the familiar statistics for real time and CPU time in the SAS log after
each step.
OPTIONS STIMER | NOSTIMER;
OPTIONS FULLSTIMER | NOFULLSTIMER; - Answer More useful than STIMER for
benchmarking; writes all available system performance statistics to the SAS log. The
statistics shown vary by SAS version and operating environment.
OPTIONS FULLSTIMER | NOFULLSTIMER;
IDXWHERE=YES - Instructs SAS to choose the most beneficial index to optimize a
WHERE expression and bypasses the possibility of the decision algorithm doing
sequential processing. An example could be that if you knew how large a subset was
going to be then you might want SAS to bypass the decision algorithm and use the index.
IDXWHERE=NO - specifies that SAS should not use an index, but instead read a data set
sequentially. You should use the IDXWHERE=NO option when you know that an available
index will not optimize the WHERE processing.
IDXNAME= - Answer option instructs SAS to use the given index. You could use the
IDXNAME= option when you know which index is better, so SAS doesn't waste the time
in comparison of indexes. For instance, say you have a compound WHERE expression
having two simple indexes and you know which index will yield least observations, you
may instruct SAS to use it.
INTNX(interval, start-from, increment<, alignment>) - Answer To increment a date, time,
or datetime value by an interval or intervals, and return a date, time, or datetime value,
you can use the INTNX function.
USING LIBNAME-clause; - Answer A LIBNAME statement that is needed by a PROC SQL
view can be embedded in the view by specifying the USING clause. The USING clause
lets you store SAS libref information in the view.
%INCLUDE file-specification </SOURCE2>; - Answer The %INCLUDE statement retrieves