When a FILENAME statement
is used to assign a fileref to multiple raw data files, the list of
files must be enclosed in a single set of parentheses. Each filename
specified must be enclosed in quotation marks.
Correct answer: d
The FILEVAR= option
enables you to dynamically change the currently opened input file
to a new input file. The FILEVAR= variable must contain a character
string that is a physical filename. Like automatic variables, the
FILEVAR= variable is not written to the data set.
Correct answer: b
The DO statement creates
the index variable x and assigns it the values of 8, 9, and 10. The
assignment statement assigns the name of a raw data file to Readfile
using the current value of x and the PUT function, which concatenates
the values of x with the text strings c:datamonth and .dat. The
COMPRESS function removes blank spaces from the values of Readfile.
Correct answer: a
The TODAY function returns
the current date from the system clock as a SAS date value. The year
number is then extracted from the current date using the YEAR function.
The value of the current year, 2003, is assigned to y3. The year values
2002 and 2001 are assigned to y2 and y1, respectively. The PUT function
concatenates the text string c:dataY with the year values and the
text string .dat.
Correct answer: a
The END= option names
a variable whose value is controlled by SAS. The value of the variable
is 1 when you read the last record in an input file. Otherwise it
is 0. You can test the value of the END= variable to determine if
the DATA step should continue processing. Like automatic variables,
the END= variable is not written to the SAS data set.
Correct answer: b
PROC APPEND uses the
BASE= and DATA= arguments. BASE=SAS-data-set names
the data set to which you want to add observations. DATA=SAS-data-set names
the SAS data set containing observations that you want to append to
the end of the BASE= data set.
Correct answer: d
If a DATA= data set
contains variables that are longer than the corresponding variables
in the BASE= data set, the FORCE option must be used with PROC APPEND.
Using the FORCE option enables you to append the data sets. However,
some of the variable values may be truncated in the observations that
are read in from the DATA= data set.
Correct answer: c
You must use the FORCE
option with PROC APPEND when the DATA= data set contains a variable
that does not have the same type as the corresponding variable in
the BASE= data set.
Correct answer: a
When the BASE= data
set contains more variables than the DATA= data set, missing values
for the additional variables are assigned to the observations that
are read in from the DATA= data set.
Correct answer: b
The FORCE option does not need
to be used if the BASE= data set contains variables that are not in
the DATA= data set. The FORCE option must be used if
the DATA= data set contains variables
that are not in the BASE= data set
the variables in the DATA= data
set are longer than the corresponding variables in the BASE= data
set
the variables in the DATA= data
set have a different type than the corresponding variables in the
BASE= data set.