Don't forget to create account on our site to get access to more material made only for free registered user.  
SAS A00-211 Certification SAS A00-212 Certification Questions and Answers SAS A00 240 Certification Material SAS A00-250 Exam Material Certification SAS Packaged Solutions

Question 10 : Which one of the following is true when SAS encounters a data error in a DATA step?
1.    The DATA step stops executing at the point of the error, and no SAS data set is created.
2.    A note is written to the SAS log explaining the error, and the DATA step continues to execute.
3.    A note appears in the SAS log that the incorrect data record was saved to a separate SAS file for further examination.
4.    The DATA step stops executing at the point of the error, and the resulting DATA set contains observations up to that point.

Correct Answer : 2
Exp : Notice what happens when SAS encounters invalid data.
1 An error message is printed on the log.
NOTE: Invalid data for DOB in line 6 9-15.
2 The raw data line is printed with a ruler.
6 1 SMITH 1/23/66 68 144 M 26
Aside: Notice how the error message "for DOB in line 6 9-15" points you to the variable being read, the line number and the column range where the input error occurred.
3 The resulting values of all the variables (after the input process) are printed.
Aside: The special variables _ERROR_ and _N_ are used in the data set
to indicate whether a run-time error has occurred with this observation, and
to indicate how many times the data step has executed.
These two variables are not included in the output dataset.
4 The data step keeps running.
NOTE: The data set WORK.WONTWORK has 4 observations and 7 variables.
Also see that the Proc Print output shows that a dataset with values was created. All the variables have been given values for all the observations (a missing value is a value).
Data errors occur when some data values are not appropriate for the SAS statements that you have specified in the program. For example, if you define a variable as numeric, but the data value is actually character, SAS generates a data error. SAS detects data errors during program execution and continues to execute the program, and does the following:
writes an invalid data note to the SAS log.
prints the input line and column numbers that contain the invalid value in the SAS log. Unprintable characters appear in hexadecimal. To help determine column numbers, SAS prints a rule line above the input line.
prints the observation under the rule line.
sets the automatic variable _ERROR_ to 1 for the current observation.

You have no rights to post comments