Chapter 15: Processing Data with DO Loops

  1. Correct answer: c
    DO loops are DATA step statements and cannot be used in conjunction with PROC steps.
  2. Correct answer: c
    The number of iterations is determined by the DO statement's stop value, which in this case is 12.
  3. Correct answer: a
    Use a DO loop to perform repetitive calculations starting at 1 and looping 15 times.
  4. Correct answer: d
    At the end of the 15th iteration of the DO loop, the value for Year is incremented to 2005. Because this value exceeds the stop value, the DO loop ends. At the bottom of the DATA step, the current values are written to the data set.
  5. Correct answer: b
    The OUTPUT statement overrides the automatic output at the end of the DATA step. On the last ...

Get SAS Certification Prep Guide, 4th Edition 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.