Statistical Analysis System (SAS) Programming Certification Practice Exam

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the SAS Programming Certification Exam. Study with multiple choice questions and detailed explanations. Enhance your exam readiness!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


In a DATA step, how can you reference a temporary SAS data set named Forecast?

  1. Forecast

  2. Work.Forecast

  3. Sales.Forecast (after assigning the libref Sales)

  4. only a and b above

The correct answer is: only a and b above

The ability to reference a temporary SAS data set created during a session is essential in SAS programming. Temporary data sets are stored in the WORK library by default, which is a special library that exists only during the session and is deleted afterward. To directly reference a temporary SAS data set named Forecast, you can simply use the name "Forecast." When called in a DATA step, SAS automatically assumes it is looking for the data set within the WORK library. This is why this option is valid. Alternatively, you can also reference the same data set using the complete library name, which would be "Work.Forecast." Here, "Work" explicitly specifies the library where the data set is stored, which is also acceptable. Options that involve referencing a different library, such as assigning a libref like Sales, would require that the data set be located within that specified library. Since this question is focused on a temporary data set that does not require such a libref to be assigned, the references “Forecast” and “Work.Forecast” are the correct methods to access it. Thus, saying that both the direct reference and the library-specific reference are valid leads to the conclusion that both methods provided are correct, affirming the understanding of how to access temporary data