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 with our comprehensive quiz. Study with multiple-choice questions, detailed explanations, and helpful hints to boost your confidence. Ace your certification test!

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.


Which SAS statement associates the fileref Crime with the raw data file C:\States\Data\crime.dat?

  1. filename crime 'c:\states\data\crime.dat';

  2. filename crime c:\states\data\crime.dat;

  3. fileref crime 'c:\states\data\crime.dat';

  4. filename 'c:\states\data\crime' crime.dat;

The correct answer is: filename crime 'c:\states\data\crime.dat';

The statement that correctly associates the fileref Crime with the raw data file located at C:\States\Data\crime.dat is the first option, which uses the appropriate syntax for the filename statement in SAS. In SAS, the `filename` statement is used to assign a fileref (file reference) to a specific data source, allowing easy reference within your SAS program. The correct syntax for this statement includes the keyword `filename`, followed by the desired fileref (in this case, "crime"), and then the path to the file enclosed in quotes. The inclusion of quotes around the file path is essential in scenarios where the path contains spaces or special characters. Although the path provided here does not contain spaces, using quotes is a good practice to avoid potential issues. The correct association created by this statement indicates to SAS where to find the data file, enabling operations such as reading or processing the file contents in subsequent steps of the SAS program. As a result, option A is the only choice that correctly adheres to the required syntax for establishing this association, ensuring that the raw data file can be effectively used in the program.