Which of the following DATA steps will correctly read the numeric variables score1, score2, and score3 using a 6. informat?

Master the SAS Base Programming Certification Exam with our comprehensive study tool. Utilize flashcards and multiple choice questions with detailed explanations. Gear up for success on your exam!

The correct answer is based on the proper syntax required for reading a range of variables in a DATA step using an informat.

In SAS, when you want to read variables that are listed in a range—like score1, score2, and score3—you can use the syntax score1-score3. This tells SAS to apply the specified informat to each variable in that range. The correct format for specifying the informat for a range of variables requires parentheses around the informat if it is applied to a whole list.

Option C uses the correct syntax by putting the range (score1-score3) and the informat (6.) together. This indicates that scores will be read as a list of variables, each formatted with the 6. informat, ensuring that they are processed correctly as numeric variables with a width of 6.

In contrast, other options either misuse parentheses or do not specify the informat correctly to apply to the range of variables. Therefore, Option C stands out as the most accurate and functional way to achieve the stated goal within the context of SAS programming.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy