A00-215 Exam Question 146
You have a dataset with a variable called 'PRODUCT ID' containing numeric values. You want to create a new variable called 'PRODUCT CATEGORY' based on the following logic: ' If 'PRODUCT_ID' is between 100 and 200, then 'PRODUCT CATEGORY' should be 'Electronics'. ' If 'PRODUCT is between 201 and 300, then 'PRODUCT CATEGORY' should be 'Clothing'. ' If 'PRODUCT ID' is outside these ranges, then 'PRODUCT CATEGORY' should be 'Other'. Which of the following SAS code snippets will correctly implement this logic?
A00-215 Exam Question 147
You have a dataset named 'CUSTOMERS' containing customer information. You need to create a sorted dataset named 'CUSTOMERS SORTED' based on the 'STATE' variable, but only for customers who are 'Active'. Which PROC SORT statement achieves this?
A00-215 Exam Question 148
You are working with a SAS program that reads data from a file and performs some calculations. The program runs without errors, but the results seem incorrect. You suspect that the program is not reading the data correctly from the file. Which of the following statements would be the most effective way to resolve this issue?
A00-215 Exam Question 149
You are analyzing customer data and need to generate a report that displays the frequency distribution of customer age groups (18-25, 26-35, 36-45, 46-55, 56+) along with the corresponding percentages. Which of the following PROC FREQ statements would achieve this?
A00-215 Exam Question 150
You have a dataset with a character variable 'CITY' that currently has a length of 20 bytes. You need to shorten the length of the variable to 10 bytes, but only for records where the variable 'STATE' equals 'CA'. How would you achieve this in the DATA step using the LENGTH statement and conditional processing?
