Tuesday, April 2, 2013

Base SAS Example Question 6.1

dta work.il_corn;
    set corn.state_data;
    if state = 'Illinois';
run;


The keyword "data" is misspelled above. What happens to this program during the compilation phase assuming "corn" is a valid libref?


a) The program fails due to syntax errors
b) The DATA step compiles but doesn't execute
c) The DATA step compiles and executes
d) None of the above

************************

Leave your answer as a comment below...good luck!

-SAS Cert

15 comments:

  1. in the log window you can see that SAS assumed that the 'dta' was data

    ReplyDelete
  2. C..it compiles and executes but leaves a warning in log

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete

  4. ans C

    log shows following error

    140 proc print dta=work.donations;
    ---
    1
    WARNING 1-322: Assuming the symbol DATA was misspelled as dta.
    141 run;

    ReplyDelete
  5. WARNING 14-169: Assuming the symbol DATA was misspelled as dta.

    ReplyDelete
  6. Which of the following programs contains a syntax error?
    a. proc sort data=sasuser.mysales;
    by region;
    run;
    b. dat sasuser.mysales;
    set mydata.sales99;
    run;
    c. proc print data=sasuser.mysales label;
    label region='Sales Region';
    run;
    d. none of the above
    Correct answer: b

    Your answer: b

    The DATA step contains a misspelled keyword (dat instead of data). However, this is such a common (and easily interpretable) error that SAS produces only a warning message, not an error. Return to top

    Here I guess syntax error occurs but it can still run.

    ReplyDelete
  7. For latest and updated SAS certification dumps in PDF format contact us at completeexamcollection@gmail.com.
    Refer our blog for more details http://completeexamcollection.blogspot.in/2015/12/sas-certification-dumps.html

    ReplyDelete