SASInstitute SAS Certified Associate: Programming Fundamentals Using SAS 9.4 - A00-215 Exam Practice Test

You have a dataset called 'Employees' with variables 'EmployeelD', 'Department', and 'Salary'. You want to categorize employees into three groups based on their salaries: 'High', 'Medium', and 'Low'. 'High' salary is defined as greater than $100,000, 'Medium' salary is between $50,000 and $100,000, and 'Low' salary is less than $50,000. Which code snippet correctly creates a new variable 'SalaryGroup' and assigns the appropriate category to each employee?
Correct Answer: C Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are running a SAS program that reads data from a file and performs calculations. The following error message appears in the SAS log:

Which of the following is the most likely cause of this error, and where would you look in your code to find the issue?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have three datasets: 'CUSTOMER INFO', 'ORDER DETAILS', and 'PRODUCT_DATA', each containing a unique 'CUSTOMER ID', 'ORDER ID', and 'PRODUCT ID' respectively. You need to create a new dataset 'COMPLETE DATA' that combines the data from all three datasets based on the following logic: 1. Merge 'CUSTOMER INFO' and 'ORDER DETAILS' datasets on 'CUSTOMER ID'. 2. Then, merge the resulting dataset with 'PRODUCT DATA' on 'ORDER ID'. Write the SAS code to achieve this using MERGE statements.
Correct Answer: C,E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a SAS dataset named 'sales_data' containing monthly sales figures. You want to create a PDF report that includes a table summarizing total sales per region and a chart visualizing sales trends over time. Which of the following ODS statements correctly configures the PDF output and includes both the table and chart within the report?
Correct Answer: E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a SAS data set named 'SALES' stored in a directory \\server\dat a. You need to access this data set using a LIBNAME statement. Which of the following LIBNAME statements will successfully access the data set and allow you to read its contents?
Correct Answer: C Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
In your report generation process, you need to display a title spanning two lines, with the first line aligned left and the second line aligned right. Which of the following options correctly achieves this using the TITLE statement?
Correct Answer: A Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a dataset called 'EMPLOYEES' with variables 'DEPARTMENT', 'SALARY', and 'YEARS OF SERVICE'. You want to create a new variable called 'AVG SALARY DEPT' that contains the average salary for each department, considering only employees with more than 5 years of service. What SAS code snippet would correctly achieve this?
Correct Answer: A,E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You need to import a CSV file with dates formatted as YYYY-MM-DD. However, the file has an additional column containing time data formatted as HH:MM:SS. You want to import the date column as a SAS date value, but the time column should be a SAS time value. How would you achieve this in PROC IMPORT?
Correct Answer: E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You are analyzing a SAS dataset named 'CUSTOMER' with a variable 'SALES' of type numeric. You want to identify the rows where 'SALES' is missing and has a value of '999999' using a data step. Which code snippet correctly achieves this?
Correct Answer: D Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You need to generate a report showing the median and standard deviation of a variable 'Weight' for different age groups (under 18, 18-30, 30-50, 50+). Which of the following PROC MEANS statements would you use?
Correct Answer: E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a dataset called 'Sales' with variables 'Region', 'Product', and 'SalesAmount'. You need to create a new variable called 'Bonus' that assigns a 10% bonus to sales in the 'North' region only if the 'SalesAmount' is greater than $1000. Which code snippet correctly accomplishes this?
Correct Answer: B Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).
You have a dataset with a variable 'STATUS' containing values 'Active', 'Inactive', 'Pending'. You want to create a custom format 'statusfmt' to display these values as 'A', 'P' respectively, but also handle any unknown values as 'U'. Which PROC FORMAT code achieves this?
Correct Answer: D,E Vote an answer
Explanation: Only visible for PassTestking members. You can sign-up / login (it's free).