Quiz:
Debugging
and Testing DATA Steps
Select the best answer for each question and click Score My Quiz.
-
When the SET statement is compiled,
a slot is added to the program data vector for each variable in the
input data set. The input data set supplies . . .
-
Look at the DATA step below. Not
counting the automatic variables, how many variables should the program
data vector contain?
data region2.current;
set region2.reps;
Bonus=350;
RepCurrent=salary+bonus;
run;
|
Description of Region2.Reps
Variable |
Type |
Length |
Rep |
C |
3 |
Salary |
N |
8 |
Region |
C |
1 |
Sale |
N |
8 |
|
|
-
Illegal mathematical operations
or processing a character variable as a numeric variable are considered:
-
Syntax errors such as missing
or invalid punctuation or misspelled keywords are considered:
-
When SAS software encounters a
syntax error it . . .
-
If SAS software cannot interpret
syntax errors . . .
-
Which of these programs will run
without error?
-
What is the result of submitting
the following program?
data _null_;
set finance.loans;
Interest=amount*rate;
run;
-
What is the result of submitting
the following program?
options obs=0;
data finance.newcalc;
set finance.loans;
Interest=amount*rate;
run;
-
Suppose you expect the variable
Code to contain a value of 1 or 2.
To place a message in the log when other values occur, what statement
should be used in your program?
data work.test;
if code='1' then Type='Variable';
else if code='2' then Type='Fixed';
else ... 'ALERT! bad value: ' code=;
run;
|