OpenExamsFREE PRACTICE — ANY EXAM

Free SAS 9.4 Advanced Programming Performance-Based Exam Practice Questions

100 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 Advanced 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. 1A PROC SQL query uses SELECT Region, Revenue, Cost FROM work.sales. In what order are the output columns displayed?

    1. A.Region, Revenue, CostCorrect answer: A
    2. B.Cost, Region, Revenue
    3. C.Revenue, Cost, Region
    4. D.The table's stored column order

    Explanation: SAS states, "When you select specific columns, PROC SQL displays the columns in the order in which you specify them in the SELECT clause." The explicit SELECT list determines the display; neither stored nor alphabetical column order overrides it.

    Reference: SAS 9.4 SQL Procedure User’s Guide, Fourth Edition — Chapter 2 / Selecting Multiple Columns

  2. 2Given %LET city=Denver; in open code, which TITLE construction resolves CITY as a macro variable?

    1. A.TITLE with a single-quoted ampersand variable reference
    2. B.TITLE with a double-quoted ampersand variable referenceCorrect answer: B
    3. C.TITLE with a single-quoted percent macro invocation
    4. D.TITLE with a double-quoted percent macro invocation

    Explanation: The reference states, "In quoted strings in open code, the macro processor resolves macro variable references within double quotation marks but not within single quotation marks." The double-quoted ampersand reference resolves CITY. Single quotes prevent that resolution, and %city is a macro invocation form rather than a variable reference.

    Reference: SAS 9.4 Macro Language: Reference, Fifth Edition — Chapter 1 / Replacing Text Strings Using Macro Variables

  3. 3An existing numeric variable SALES and an existing character variable REGION are to be grouped by one SAS ARRAY statement. What prevents this definition?

    1. A.An array cannot contain previously defined variables.
    2. B.An array cannot mix numeric and character elements.Correct answer: B
    3. C.An array cannot contain variables with unequal names.
    4. D.An array cannot be declared after a LENGTH statement.

    Explanation: The reference states, "Array-elements must be either all numeric or all character, and they can be listed in any order." A single array must use one element type. The problem is not prior definition, variable-name length, or a preceding attribute statement.

    Reference: SAS 9.4 DATA Step Statements: Reference — Chapter 2 / ARRAY Statement / array-elements

  4. 4A report must sort Department alphabetically and, within each department, sort Sales from largest to smallest. Which clause meets that requirement?

    1. A.order by Department desc, Sales
    2. B.order by Sales desc, Department
    3. C.order by Department, Sales descCorrect answer: C
    4. D.order by Department desc, Sales desc

    Explanation: SAS states, "To order the results, specify ASC for ascending or DESC for descending. You can specify a sort order for each column in the ORDER BY clause." Department is the first ascending key and Sales is its descending secondary key. The alternatives reverse the key priority or reverse Department.

    Reference: SAS 9.4 SQL Procedure User’s Guide, Fourth Edition — Chapter 2 / Specifying a Sort Order

  5. 5Given %LET lib=WORK; which reference resolves to the two-level SAS name WORK.SALES?

    1. A.&lib.sales — one period after LIB
    2. B.&lib..sales — two periods after LIBCorrect answer: B
    3. C.&libsales — no period after LIB
    4. D.&lib...sales — three periods after LIB

    Explanation: The reference states, "When the character following a macro variable reference is a period, use two periods. The first is the delimiter for the macro reference, and the second is part of the text." One period terminates LIB and the second remains as the library separator. One period leaves WORKSALES, three leave two literal periods, and LIBSALES names a different macro variable.

    Reference: SAS 9.4 Macro Language: Reference, Fifth Edition — Chapter 3 / Creating a Period to Follow Resolved Text

  6. 6Given ARRAY a{2,3} x1-x6;, which variable is referenced by a{2,1}?

    1. A.x2
    2. B.x3
    3. C.x4Correct answer: C
    4. D.x6

    Explanation: The reference states, "SAS places variables into a two-dimensional array by filling all rows in order, beginning at the upper left corner of the array (known as row-major order)." The first row contains x1, x2, x3; the second contains x4, x5, x6. Row 2, column 1 is x4.

    Reference: SAS 9.4 DATA Step Statements: Reference — Chapter 2 / ARRAY Statement / dimension-size(s)

  7. 7A SQL category must use Amount < 100 and Amount >= 100. Why use searched WHEN conditions rather than the CASE Amount WHEN value form?

    1. A.The operand form requires character comparison values.
    2. B.The operand form permits only equality-test conditions.Correct answer: B
    3. C.The operand form requires an aggregate in each result.
    4. D.The operand form evaluates only missing-value conditions.

    Explanation: SAS states, "When you use the CASE-OPERAND form of the CASE expression, the conditions must all be equality tests." The required range comparisons are not equality tests. No character-only, aggregate-only or missing-only requirement explains the distinction.

    Reference: SAS 9.4 SQL Procedure User’s Guide, Fourth Edition — Chapter 2 / Using the CASE-OPERAND Form

  8. 8A global macro variable RATE is 5. Inside a macro, %LOCAL rate; is followed by %LET rate=8;. What value does &RATE resolve to inside that macro?

    1. A.5
    2. B.8Correct answer: B
    3. C.58
    4. D.A null string

    Explanation: The reference states, "In this case, the macro processor finds the local value first and uses it instead of the global value." The explicit local RATE shadows the global RATE and receives 8. The global value remains separate; resolution does not concatenate them or leave the assigned local value null.

    Reference: SAS 9.4 Macro Language: Reference, Fifth Edition — Chapter 5 / Global Macro Variables

  9. 9A DATA step declares ARRAY t{1} _TEMPORARY_ (50); and executes t{1}=t{1}+10; once on every iteration. No other statement changes t{1}. What is its value at the end of the second iteration?

    1. A.20
    2. B.50
    3. C.60
    4. D.70Correct answer: D

    Explanation: The reference states, "Temporary data element values are always automatically retained, rather than being reset to missing at the beginning of the next iteration of the DATA step." Starting at 50, the first addition gives 60. Retaining 60 for the next iteration and adding 10 again gives 70. Resetting to the initial value would incorrectly give 60; ignoring the initial value or the assignments gives the other distractors.

    Reference: SAS 9.4 DATA Step Statements: Reference — Chapter 2 / ARRAY Statement / _TEMPORARY_

  10. 10Which keyword completes this PROC SQL expression: CASE WHEN Units > 0 THEN Revenue/Units ELSE 0 ... AS UnitPrice?

    1. A.ELSE
    2. B.STOP
    3. C.QUIT
    4. D.ENDCorrect answer: D

    Explanation: SAS states, "You must close the CASE logic with the END keyword." END closes the expression before its alias. ELSE introduces a result branch; STOP and QUIT do not close CASE.

    Reference: SAS 9.4 SQL Procedure User’s Guide, Fourth Edition — Chapter 2 / Using a Simple CASE Expression

Exam Review

About SAS 9.4 Advanced Programming Performance-Based Exam

SAS 9.4 Advanced Programming Performance-Based Exam · US

Key exam facts

Provider
SAS Institute Inc. (SAS) owns the certification program; SAS and Pearson VUE administer this examination.
Format
Hybrid performance-based programming projects in a supplied remote SAS lab, followed by standard multiple-choice and short-answer questions. Projects are assessed by a scoring macro and candidates submit its three-digit response; practical questions may have greater weight, identified on the exam.
Time limit
2 hours 5 minutes examination time; 2 hours 30 minutes total Pearson appointment including introductory material.
Passing score
725 on a 200 to 1,000 scaled-score range.
Exam fee
US$180 standard exam fee in the US and most other countries; academic discounts have separate eligibility.

Topics covered

  • Accessing Data Using SQL (35%)

    • Generate detail reports by working with a single table, joining tables, or using set operators in SQL
    • Generate summary reports by working with a single table, joining tables, or using set operators in the SQL
    • Construct sub-queries and in-line views within an SQL procedure step
    • Use SAS SQL procedure enhancements
  • Macro Processing (35%)

    • Create and use user-defined and automatic macro variables within the SAS Macro Language
    • Automate programs by defining and calling macros using the SAS Macro Language
    • Use macro functions
    • Debug macros
    • Create data-driven programs using SAS Macro Language
  • Advanced Techniques (30%)

    • Process data using 1 and 2 dimensional arrays
    • Process data using hash objects
    • Use SAS utility procedures
    • Use advanced functions

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?

Hybrid performance-based programming projects in a supplied remote SAS lab, followed by standard multiple-choice and short-answer questions. Projects are assessed by a scoring macro and candidates submit its three-digit response; practical questions may have greater weight, identified on the exam.

How long is the exam?

2 hours 5 minutes examination time; 2 hours 30 minutes total Pearson appointment including introductory material.

What is the passing score?

725 on a 200 to 1,000 scaled-score range.

How much does the exam cost?

US$180 standard exam fee in the US and most other countries; academic discounts have separate eligibility.

Official sources and references

Confirm current exam arrangements with the exam provider.