Question 41

You have a SAS dataset with a variable 'BIRTH DATE' in the format 'YYYYMMDD'. You want to create a new variable 'AGE' representing the person's age in years. Which SAS code snippet accomplishes this correctly?
  • Question 42

    You have a SAS dataset named 'CUSTOMERS' with variables 'NAME', 'AGE', 'CITY', and 'STATE'. You need to create a new dataset named YOUNG CUSTOMERS' containing only customers under 30 years old, residing in 'New York' state and having a name starting with 'J'. Which WHERE statement would you use in the DATA step?
  • Question 43

    You have a SAS dataset named 'CUSTOMER DATA' with variables 'CUST_ID' (numeric), 'CUST NAME' (character), and 'ANNUAL INCOME' (numeric). You need to create a new dataset 'HIGH INCOME CUSTOMERS' containing only customers with an annual income greater than $100,000. Which SAS code snippet correctly achieves this?
  • Question 44

    You have a CSV file named 'sales_data.csv' with the following structure: Product,Region,Sales Apple,North, 100 Banana,South,200 You need to import this data into a SAS dataset named 'SalesData' and ensure that the 'Sales' column is numeric. Which code snippet achieves this correctly?
  • Question 45

    Which of the following statements about global SAS statements are true? (Select all that apply)