Chapter Quiz

Select the best answer for each question. Check your answers using the answer key in the appendix.
  1. Suppose you have submitted a SAS program that contains spelling errors. Which set of steps should you perform, in the order shown, to revise and resubmit the program?
      • Correct the errors.
      • Clear the SAS log.
      • Resubmit the program.
      • Check the Output window.
      • Check the SAS log.
      • Correct the errors.
      • Resubmit the program.
      • Check the Output window.
      • Correct the errors.
      • Clear the SAS log.
      • Resubmit the program.
      • Check the Output window.
      • Correct the errors.
      • Clear the Outputwindow.
      • Resubmit the program.
      • Check the Output window.
  2. What happens if you submit the following program?
    proc sort data=cert.stress out=maxrates;
       by maxhr; 
    run; 
    proc print data=maxrates label double noobs; 
       label rechr='Recovery Heart Rate; 
       var resthr maxhr rechr date; 
       where toler='I' and resthr>90; 
       sum fee; 
    run;
    1. SAS log messages indicate that the program ran successfully.
    2. A log message might indicate an error in a statement that seems to be valid.
    3. A SAS log message indicates that an option is not valid or not recognized.
    4. A SAS log message might indicate that a quoted string has become too long or that the statement is ambiguous.
  3. What generally happens when a syntax error is detected?
    1. SAS continues processing the step.
    2. SAS continues to process the step, and the SAS log displays messages about the error.
    3. SAS stops processing the step in which the error occurred, and the SAS log displays messages about the error.
    4. SAS stops processing the step in which the error occurred, and the Output window displays messages about the error.
  4. A syntax error occurs during the following actions:
    1. Some data values are not appropriate for the SAS statements that are specified in a program.
    2. The code executes successfully, but produces incorrect results.
    3. Program statements do not conform to the rules of the SAS language.
    4. none of the above
  5. How can you tell whether you have specified an invalid option in a SAS program?
    1. A SAS log message indicates an error in a statement that seems to be valid.
    2. A SAS log message indicates that an option is not valid or not recognized.
    3. You cannot tell until you view the output from the program.
    4. none of the above
  6. Which of the following programs contains a syntax error?
    1. proc sort data=cert.mysales;
        by region;
      run;
    2. data=work.mysales;
        set cert.sales17;
        where sales<5000;
      run;
    3. proc print data=work.mysales label;
        label region='Sales Region'; 
      run;
    4. none of the above
  7. What are the temporary variables that can be helpful when debugging a DATA step?
    1. OBS
    2. _N_
    3. _ERROR_
    4. b and c only
  8. When the source of the errors in the program is not apparent, which statement or statements can you use to examine errors and print messages to the log?
    1. PUTLOG statement
    2. PUT statement
    3. VAR statement
    4. a and b only
    5. none of the above
  9. What types of errors can the PUTLOG statement help you resolve?
    1. syntax errors
    2. semantic errors
    3. logic errors
    4. all of the above
Last updated: February 14, 2019
..................Content has been hidden....................

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