Chapter 22: Conditioning Raw Data Files

  1. Correct answer: d
    In order to create one observation per detail record, it is necessary to distinguish between header and detail records. Use a RETAIN statement to keep header data as part of each observation until the next header record is encountered. You also need to use the @ line-hold specifier to hold the current record so that other values in the record can be read.
  2. Correct answer: a
    An INPUT statement is used to read the value for code. The single @ sign at the end of the INPUT statement holds the current record for a later INPUT statement in the same iteration of the DATA step.
  3. Correct answer: b
    The IF-THEN statement defines the condition that Record equals C and executes an INPUT ...

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.