Quiz

  1. If a substring is not found in a string, the FIND function returns which value?
    1. 0
    2. 1
    3. 2
    4. Not found.
  2. Given the following DATA step, what is the value of USNum and WordNum?
    data work.Count;
       Text='AUSTRALIA, ENGLAND, CANADA, AUSTRIA, ITALY, US, SPAIN';
       USNum=count(Text,'CANADA');
       WordNum=countw(Text);
    run;
    1. 0, 7
    2. 1, 7
    3. 3, 0
    4. 3, 0
  3. Which program would correctly generate two separate lagged variables for each observation?
    1. data work.samp1;
         set work.lag0;
         y=lag1-lag2(item);
      run;
      proc print data=work.samp1;
      run;
    2. data work.samp2;
         set work.lag0;
         y=lag2(item);
      run;
      proc print data=work.samp2;
      run;
    3. data work.samp3; set work.lag0; x=lag1(item); y=lag2(item); run; proc print data=work.samp3; ...

Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.