OpenExamsFREE PRACTICE — ANY EXAM

Free SAS® 9.4 Base Programming - Performance-Based Exam Practice Questions

150 free questions · Answer explanations · No signup required

View examination details, outline and sources

Loading selected examination banks…

Sample Practice Questions

Try these 10 sample questions from the SAS® 9.4 Base Programming - Performance-Based Exam practice bank. Each includes the answer and explanation. Continue with the interactive practice above to review the full question set.

  1. 1SAVEIT is assigned to a permanent SAS library, SALES is assigned to a different library, and USER is not assigned. Which DATA statement creates a data set named SALES in SAVEIT?

    1. A.data sales;
    2. B.data work.sales;
    3. C.data saveit.sales;Correct answer: C
    4. D.data sales.saveit;

    Explanation: The SAS guide states, "To create a new permanent SAS data set and store it in this SAS library, you must use the two-level name SAVEIT.WEIGHT_CLUB in the DATA statement." The same two-level convention places SALES in the SAVEIT library; the reversed name identifies a different library and data set.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 3, Introduction to DATA Step Processing, permanent SAS data set example

  2. 2How can PROC SORT preserve WORK.SALES and write the sorted observations to WORK.SORTED?

    1. A.Use `proc sort data=work.sales out=work.sorted;`.Correct answer: A
    2. B.Use `proc sort data=work.sorted out=work.sales;`.
    3. C.Use `proc sort data=work.sales nodupkey;`.
    4. D.Use `proc sort data=work.sorted noduprecs;`.

    Explanation: The guide states, "If you specify the OUT= option, the sorted data is stored in a different SAS data set than the input data." DATA= names the input and OUT= names the separate result.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 12, Working with Grouped or Sorted Observations

  3. 3SCORE is numeric. Which PUTLOG approach writes both the literal label `score=` and the current SCORE value to the SAS log?

    1. A.Write the literal label, followed by the SCORE variable.Correct answer: A
    2. B.Write the literal word SCORE with no variable value.
    3. C.Write the literal label without a following variable.
    4. D.Write the literal label, followed by the automatic _N_ value.

    Explanation: The reference states, "Text can include character literals (enclosed in single or double quotation marks), variable names, formats, and pointer controls." Writing the label as a literal followed by SCORE writes its current value.

    Reference: SAS 9.4 DATA Step Statements: Reference — PUTLOG Statement, Optional Arguments

  4. 4Which PROC PRINT option suppresses the default observation-number column?

    1. A.NOOBSCorrect answer: A
    2. B.LABEL
    3. C.NODUPKEY
    4. D.NLEVELS

    Explanation: The guide uses "the NOOBS option in the PROC PRINT statement to suppress the Obs column" to omit observation numbers.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 27, Producing Detail Reports with the PRINT Procedure

  5. 5USER is not assigned, and the SAS session ends normally. What is the lifetime of a data set created by `data results;` in the default WORK library?

    1. A.It normally lasts for the current SAS session.Correct answer: A
    2. B.It normally lasts until the next DATA step.
    3. C.It normally lasts until the next PROC step.
    4. D.It normally lasts across subsequent SAS sessions.

    Explanation: The guide says, "When you use a DATA step to create a SAS data set with a one-level name, you normally create a temporary SAS data set, one that exists only for the duration of your current session." With USER unassigned, the one-level name uses WORK; normal session termination removes WORK data.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 3, Creating and Using Temporary SAS Data Sets

  6. 6Which PROC SORT option removes observations with duplicate BY values even when other variables differ?

    1. A.NODUPKEYCorrect answer: A
    2. B.NODUPRECS
    3. C.OUT=
    4. D.DESCENDING

    Explanation: The manual states, "To eliminate observations whose BY values duplicate BY values in other observations (but not necessarily values of other variables), use the NODUPKEY option in the SORT procedure." NODUPRECS addresses identical records, not duplicate keys with differing other values.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 12, Working with Grouped or Sorted Observations

  7. 7A DATA step must process every input observation, but write a log message only when COST is negative. Which statement does that?

    1. A.if cost < 0 then putlog cost=;Correct answer: A
    2. B.if cost < 0 then output;
    3. C.where cost < 0; putlog cost=;
    4. D.putlog cost=; if cost < 0;

    Explanation: The reference says, "The PUTLOG statement writes a message that you specify to the SAS log." The IF condition executes PUTLOG only for negative COST; an unconditional PUTLOG would log every processed observation. A WHERE filter would discard other observations before processing.

    Reference: SAS 9.4 DATA Step Statements: Reference — PUTLOG Statement, Details

  8. 8What does an ID statement do in a PROC PRINT report?

    1. A.Displays the ID variable's values in the first column.Correct answer: A
    2. B.Selects only observations with nonmissing ID values.
    3. C.Calculates the total of the ID variable.
    4. D.Sorts the input data set by the ID variable.

    Explanation: SAS states, "When you identify a variable in the ID statement, PROC PRINT displays the values of this variable in the first column of each row of the report." Sorting is a separate operation.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 27, Producing Detail Reports with the PRINT Procedure

  9. 9In `data work.new; set work.old; run;`, which statement names the output data set being created?

    1. A.The SET statement names WORK.NEW.
    2. B.The RUN statement names WORK.NEW.
    3. C.The DATA statement names WORK.NEW.Correct answer: C
    4. D.The INPUT statement names WORK.NEW.

    Explanation: The manual says, "The DATA statement begins the process of building a SAS data set and names the data set." Here WORK.NEW follows DATA and is the output; SET reads WORK.OLD.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 3, Overview of the DATA Step

  10. 10Which BY statement sorts REGION in ascending order and, within REGION, SALES in descending order?

    1. A.by descending region sales;
    2. B.by region descending sales;Correct answer: B
    3. C.by region sales descending;
    4. D.by descending region descending sales;

    Explanation: SAS explains, "To produce a descending order for a particular variable, place the DESCENDING option before the name of the variable in the BY statement of the SORT procedure." DESCENDING before SALES affects SALES; REGION retains the default ascending order.

    Reference: Step-by-Step Programming with Base SAS 9.4, Second Edition — Chapter 12, Working with Grouped or Sorted Observations

Exam Review

About SAS® 9.4 Base Programming - Performance-Based Exam

SAS® 9.4 Base Programming - Performance-Based Exam · US

Key exam facts

Provider
SAS and Pearson VUE
Format
Performance based: write SAS programs for coding challenges and answer result questions; multiple choice and short-answer questions.
Exam questions
Total questions: 40–45.
Time limit
135 minutes
Passing score
725 on a 200–1,000 scale
Exam fee
USD 180; academic discounts are conditional, not the standard fee.

Topics covered

The authority publishes percentage ranges for each content area. The practice percentages below use the midpoint of each range, normalized to 100%; they are not exact percentages published by the authority. Practice question counts may differ slightly because of rounding.

  • Access and Create Data Structures — Official range: 20–25% (Practice allocation: 23.68%)

    • Create temporary and permanent SAS data sets.
    • Investigate SAS data libraries using base SAS utility procedures.
    • Access data.
    • Combine SAS data sets.
    • Create and manipulate SAS date values.
    • Control which observations and variables in a SAS data set are processed and output.
  • Manage Data — Official range: 35–40% (Practice allocation: 39.47%)

    • Sort observations in a SAS data set.
    • Conditionally execute SAS statements.
    • Use assignment statements in the DATA step.
    • Modify variable attributes using options and statements in the DATA step.
    • Accumulate sub-totals and totals using DATA step statements.
    • Use SAS functions to manipulate character data, numeric data, and SAS date values.
    • Use SAS functions to convert character data to numeric and vice versa.
    • Process data using DO LOOPS.
    • Restructure SAS data sets with PROC TRANSPOSE.
    • Use macro variables to simplify program maintenance.
  • Error Handling — Official range: 15–20% (Practice allocation: 18.42%)

    • Identify and resolve programming logic errors.
    • Recognize and correct syntax errors.
  • Generate Reports and Output — Official range: 15–20% (Practice allocation: 18.42%)

    • Generate list reports using the PRINT procedure.
    • Generate summary reports and frequency tables using base SAS procedures.
    • Enhance reports using user-defined formats, titles, footnotes, and SAS System reporting options.
    • Generate reports using ODS statements.
    • Export data

How to prepare

Work through the topics, read the explanation after each answer, and revisit the areas where you miss questions. Use the official outline and reference materials below to guide your study.

These independent practice questions are not actual exam items and do not guarantee a passing result.

Frequently asked questions

What is the exam format?

Performance based: write SAS programs for coding challenges and answer result questions; multiple choice and short-answer questions.

How many questions are on the exam?

Total questions: 40–45.

How long is the exam?

135 minutes

What is the passing score?

725 on a 200–1,000 scale

How much does the exam cost?

USD 180; academic discounts are conditional, not the standard fee.

Official sources and references

Confirm current exam arrangements with the exam provider.