Multiple choice technology programming languages

Which of the following can be used to read numeric values that contain numeric values and commas into a SAS dataset?

  1. comma. informat

  2. dollar. format

  3. comma. format

  4. w.d informat

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The COMMA informat (e.g., comma8.) reads numeric values that contain commas and converts them to standard numbers. Formats control output display; informats control input reading. Dollar is a format, not an informat for comma-separated input.

AI explanation

The COMMA. informat is used in SAS to read numeric text values that include commas (and optionally dollar signs, parentheses for negatives) and strip them out while converting to a numeric value, e.g., reading '1,234' correctly as 1234. FORMAT (not informat) directives like 'dollar.' or 'comma.' control how SAS displays a value on output, not how it reads raw text into a dataset — using a format instead of an informat in an INPUT statement would fail or misread the data. 'w.d informat' is a generic numeric informat that can't handle embedded commas. So COMMA. informat is correct because it's specifically built for reading comma-formatted numeric text.