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 SAS log.
      • Correct the errors.
      • Resubmit the program.
      • Check the Output window.
      • Check the SAS log.
      • 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 PROC SORT running message appears at the top of the active window, and 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 PROC PRINT running message appears at the top of the active window, and 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 form of the elements in a SAS statement is correct, but the elements are not valid for that usage.
    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. The message PROC STEP running or DATA STEP running appears at the top of the active window.
    4. You cannot tell until you view the output from the program.
  6. Which of the following programs contains a syntax error?
    1. proc sort data=cert.mysales;
        by region;
      run;
    2. dat 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 should you do after submitting the following program in the Windows or UNIX operating environment?
    proc print data=mysales; 
      where state='NC; 
    run;
    1. Submit a RUN statement to complete the PROC step.
    2. Recall the program. Then add a quotation mark and resubmit the corrected program.
    3. Cancel the submitted statements. Then recall the program, add a quotation mark, and resubmit the corrected program.
    4. Recall the program. Then replace the invalid option and resubmit the corrected program.
  8. Suppose you submit a short, simple DATA step. If the active window displays the message DATA step running for a long time, what probably happened?
    1. You misspelled a keyword.
    2. You forgot to end the DATA step with a RUN statement.
    3. You specified an invalid data set option.
    4. Some data values were not appropriate for the SAS statements that you specified.
  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: 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
18.118.160.245