Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free SAS 9.4 Programming Fundamentals Exam A00-215 Exam Questions

Last updated: · 10 practice questions with answers and explanations

Page: 1 / 8 Total 78 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Fundamental SAS Concepts

Skill tested: Distinguishes DATA-step syntax errors from logic errors by interpreting SAS log behavior.

A reporting team submits a DATA step that runs to completion and creates the expected output table, but several derived values are incorrect. The SAS log contains no ERROR messages and reports that the step executed successfully. The program uses valid SAS statements, and the input table contains the expected observations. The team must decide whether to investigate a parser failure or the calculations and conditions used to produce the derived values. Which conclusion is most appropriate?

Correct Answer: B. The problem is most likely a logic error; valid syntax can execute while producing unintended results.
Explanation:

A logic error occurs when valid SAS statements execute but do not implement the intended calculation or condition. Successful completion and an output table show that SAS processed the step, but they do not validate the meaning of the results. A syntax error generally prevents the affected code from being interpreted as intended and is typically identified in the log. The log should still be reviewed for notes and warnings, but the stated symptom points to checking formulas, variable references, and conditional logic rather than assuming a parser failure.

Question 2

New Single answer

Topic: Explore SAS Data Sets

Skill tested: Uses SAS data set options to limit observations and variables read from a data set.

An analyst must create a temporary review table from a large permanent SAS data set. The review should contain only the first 120 observations and the variables CUSTOMER_ID, REGION, and BALANCE; the permanent source must remain unchanged. The analyst wants the restriction applied while reading the source, rather than dropping variables after they have entered the DATA-step program data vector. Which DATA-step statement meets these requirements?

Correct Answer: A. data work.review; set finance.accounts (keep=CUSTOMER_ID REGION BALANCE obs=120); run;
Explanation:

KEEP= selects the variables to read from the input data set, and OBS= limits the number of observations read. Placing both options on the SET input applies the restrictions during input processing and leaves the permanent source unchanged. B drops the requested variables and places OBS= on the output data set, so it does not express the required input restriction. C excludes the variables the review needs. D uses KEEP= and OBS= as if they were executable DATA-step statements; they are data set options and must be attached to a data set reference.

Question 3

New Multiple answers

Topic: Using the DATA Step to Access SAS Data Sets

Skill tested: Combines compatible SAS data sets by concatenation and distinguishes it from a match-merge.

A quality team receives two SAS data sets containing the same variables and compatible types: Q1_CASES and Q2_CASES. Each holds different case observations, and the team needs one table containing all observations from both sources, with no matching or alignment by a key. Both tables are to contribute all their observations, and the output should be created in WORK. Which two statements about the appropriate DATA-step approach are correct? Select TWO answers.

Correct Answer: A. The concatenated output has the variables from the input data sets, and each input's observations are read in sequence.; D. Use SET with both data sets in one DATA step to concatenate their observations.
Explanation:

A SET statement naming multiple data sets reads observations from the first input and then the next, producing a concatenated table. Since the inputs have the same compatible variables, the result contains those variables and all observations in sequence. MERGE is a different combining method and does not meet the stated requirement for simple concatenation; matching by keys requires BY processing, while an unkeyed merge has different behavior. A later DATA step using the same output name replaces that output rather than automatically appending to it, and sorting is unnecessary.

Question 4

New Single answer

Topic: Using the DATA Step to Manipulate Data

Skill tested: Uses RETAIN to preserve an accumulating total across DATA-step iterations.

A finance analyst reads transactions in their existing order and must produce a running total of AMOUNT for each observation. The first running total must equal the first transaction amount, and each subsequent value must include the current transaction. The analyst has confirmed that AMOUNT is numeric and nonmissing. Which code fragment correctly accumulates the total in a DATA step?

Correct Answer: A. retain running_total 0; running_total + amount;
Explanation:

The sum statement `running_total + amount;` automatically retains the accumulator across DATA-step iterations and initializes it to zero when needed. Explicitly specifying `retain running_total 0;` makes the initialization clear and preserves the value between observations. In A, the ordinary assignment resets the variable to zero on every iteration before the sum statement. B retains the variable but leaves its initial value missing; adding a number to a missing value does not produce the intended first total. D assigns only the current amount and therefore does not accumulate.

Question 5

New Multiple answers

Topic: Generate Reports Using PROC Steps

Skill tested: Configures PROC MEANS to summarize a numeric measure across classification groups.

A customer-support manager needs a report showing the mean resolution time for each combination of service tier and region. The input data set contains one numeric variable, RESOLUTION_HOURS, and character variables SERVICE_TIER and REGION. The manager does not need a separate listing of individual tickets, and the report should include one summary row for each observed combination. Which two PROC MEANS elements should be used? Select TWO answers.

Correct Answer: A. Specify SERVICE_TIER and REGION in a CLASS statement.; D. Specify RESOLUTION_HOURS in a VAR statement.
Explanation:

PROC MEANS summarizes numeric analysis variables, so RESOLUTION_HOURS belongs in the VAR statement. CLASS identifies the grouping variables; listing both SERVICE_TIER and REGION there requests summaries for their observed combinations. A BY statement would require appropriately sorted data and is not the direct choice for this grouped summary. PROC PRINT displays observations rather than calculating the requested mean, and PROC FREQ produces frequency statistics rather than a mean of the numeric measure.

Question 6

New Single answer

Topic: Use Utility Procedures

Skill tested: Defines a custom format with PROC FORMAT and applies it to report values.

A program must display a numeric STATUS_CODE as readable labels in reports without changing the stored values in the source data. Codes 1 and 2 mean Pending and Closed, respectively, and all other nonmissing codes should display as Other. The report uses several procedures, so the labeling rule should be reusable through a SAS format. Which approach is appropriate?

Correct Answer: A. Use PROC FORMAT to define a numeric format with ranges for 1 and 2 and an OTHER clause, then assign that format to STATUS_CODE.
Explanation:

A numeric format can associate displayed labels with numeric values while leaving the underlying values unchanged. PROC FORMAT can define entries for 1 and 2 and an OTHER mapping for remaining nonmissing codes; assigning the format to STATUS_CODE makes it available to reporting procedures. An informat is used to read or convert external text, not to label values for display. PROC SORT orders observations but does not recode values, and converting the variable to character is unnecessary and would alter its type rather than provide reusable display labels.

Question 7

New Single answer

Topic: Import and Export non-SAS files

Skill tested: Imports a delimited CSV file using PROC IMPORT and specifies its delimiter and header behavior.

A department receives a comma-delimited file named monthly.csv. Its first row contains column names, and the team needs a SAS data set for analysis. No custom informats or type corrections are required, and the file should be imported directly rather than read with a hand-written DATA step. Which PROC IMPORT configuration is appropriate?

Correct Answer: A. Use DBMS=CSV, set GETNAMES=YES, and identify monthly.csv with the DATAFILE= option.
Explanation:

PROC IMPORT reads external files and creates a SAS data set. For a comma-delimited file, DBMS=CSV identifies the file type, DATAFILE= points to the input file, and GETNAMES=YES tells SAS to use the first row as variable names. XLSX is the engine/type for Excel workbooks, not a CSV file. GETNAMES=NO would treat the header row as data rather than variable names, and PROC EXPORT writes a SAS data set to an external file rather than importing one.

Question 8

New Multiple answers

Topic: Explore SAS Data Sets

Skill tested: Interprets SAS date values and selects an appropriate date format for display.

A data set contains a numeric variable EVENT_DATE whose values were created with the SAS DATE() function. A reviewer sees numbers rather than calendar dates in PROC PRINT and asks the analyst to correct the data. The analyst must preserve the stored date values and make them display as dates. Which two statements accurately describe the solution? Select TWO answers.

Correct Answer: A. SAS date values are numeric counts of days relative to January 1, 1960.; D. Assigning a date format such as DATE9. changes how EVENT_DATE is displayed without changing its stored numeric value.
Explanation:

SAS date values are numeric day counts from January 1, 1960. A format such as DATE9. controls how that numeric value appears in output; it does not change the stored value or variable type. This is distinct from SAS datetime values, which use seconds. Converting the date to character is not necessary for display and can make date calculations more difficult. Multiplying by 86400 would confuse date values with datetime values and would not solve the display issue.

Question 9

New Single answer

Topic: Using the DATA Step to Manipulate Data

Skill tested: Applies conditional processing to control which observations a DATA step writes.

An operations team reads a table containing one row per shipment and a numeric variable DELAY_DAYS. The new exception table must contain only shipments delayed by more than three days. The team wants the DATA step to stop processing the current observation as soon as it fails the rule, and it does not need a separate output table for rejected shipments. Which statement belongs in the DATA step to implement the filter?

Correct Answer: D. if delay_days
Explanation:

The DELETE statement terminates processing of the current DATA-step iteration without writing that observation to the output data set. Deleting observations whose delay is three days or less leaves only those with DELAY_DAYS greater than three. A explicitly outputs the observations the team wants to exclude. B deletes the qualifying exceptions. D selects the opposite condition, retaining observations at or below three days. The stated requirement calls for conditional control within the DATA step and no separate rejected output.

Question 10

New Single answer

Topic: Fundamental SAS Concepts

Skill tested: Recognizes that a global statement affects subsequent SAS steps rather than one DATA step.

A programmer runs a SAS program containing a DATA step followed by PROC PRINT. They want the title "Quarterly Exceptions" to appear on the report, not as a data value in the output table. The title must remain in effect for the following procedure, and the programmer has placed the TITLE statement before PROC PRINT. Which description of the statement is correct?

Correct Answer: A. TITLE is a global statement; it sets report title state for subsequent procedures and is not a DATA-step executable statement.
Explanation:

TITLE is a global statement that establishes title text for subsequent SAS output-producing steps. It is not executed once per observation and does not create or modify a data set. Placing it before PROC PRINT is appropriate when the title should appear on that report. It is not a statement specific to PROC PRINT, and it does not terminate a DATA step or create a new table. This distinction helps separate global SAS statements from statements processed inside DATA or PROC steps.