Chapter 7: Understanding DATA Step Processing

  1. Correct answer: b
    During the compilation phase, the program data vector is created. The program data vector includes the two automatic variables _N_ and _ERROR_. The descriptor portion of the new SAS data set is created at the end of the compilation phase. The descriptor portion includes the name of the data set, the number of observations and variables, and the names and attributes of the variables. Observations are not written until the execution phase.
  2. Correct answer: a
    Syntax checking can detect many common errors, but it cannot verify the values of variables or the correctness of formats.
  3. Correct answer: c
    The DATA step executes once for each record in the input file, unless otherwise directed.
  4. Correct answer: d
    The remaining variables are initialized to missing. Missing numeric values are represented by periods, and missing character values are represented by blanks.
  5. Correct answer: b
    The default value of _ERROR_ is 0, which means there is no data error. When an error occurs, whether one error or multiple errors, the value is set to 1.
  6. Correct answer: d
    By default, at the end of the DATA step, the values in the program data vector are written to the data set as an observation. Then, control returns to the top of the DATA step, the value of the automatic variable _N_ is incremented by one, and the values of variables that were created in programming statements are reset to missing. The automatic variable _ERROR_ is reset to 0 if necessary.
  7. Correct answer: a
    The order in which variables are defined in the DATA step determines the order in which the variables are stored in the data set.
  8. Correct answer: c
    When SAS cannot detect syntax errors, the DATA step compiles, but it does not execute.
  9. Correct answer: d
    The variable type for Bonus is incorrect. When there is an incorrect variable type, SAS attempts to automatically convert to the correct variable type. If it cannot, SAS continues processing and produces output with missing values.
  10. Correct answer: c
    The FREQ procedure detects invalid character and numeric values by looking at distinct values. You can use PROC FREQ to identify any variables that were not given an expected value.
  11. Correct answer: d
    At the bottom of the DATA step, the compilation phase is complete, and the descriptor portion of the new SAS data set is created. There are no observations because the DATA step has not yet executed.
Last updated: August 23, 2018
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.34.80