A00-215 Exam Question 81
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?
A00-215 Exam Question 82
You are working with a dataset containing information about employees, including their 'HireDate' (in SAS date format) and 'TerminationDate' (also in SAS date format). You need to create a new variable 'Tenure' that represents the number of days an employee worked for the company. However, you want to treat employees who are still active as having their 'TerminationDate' set to today's date. Which code snippet correctly calculates the tenure, considering active employees?
A00-215 Exam Question 83
You have a dataset named 'ORDERS' with variables 'ORDER ID', 'CUSTOMER ID', 'ORDER DATE', and 'PRODUCT ID'. You need to sort the dataset based on 'ORDER DATE' in descending order, but only for orders where 'PRODUCT ID' is either 'A 123' or 'B456'. You also need to create a new dataset named 'SORTED ORDERS' containing the sorted dat a. Which PROC SORT statements would achieve this? (Select all that apply)
A00-215 Exam Question 84
You need to create a new character variable called 'Phone Number' in a dataset, which should store phone numbers in the format (XXX) XXX-XXXX. You want to ensure that the variable is capable of storing the entire formatted phone number and no more. Which of the following LENGTH statements will correctly define the variable and ensure that the format is preserved? ' 'Note' ': Assume that the original variable 'Phone' holds phone numbers in the format XXXXXXXXXX.
A00-215 Exam Question 85
You have a dataset called 'CustomerData' with variables 'Age' (numeric), 'Gender' (character), and 'PurchaseAmount' (numeric). You want to create a two-way frequency table showing the distribution of 'Age' by 'Gender', but only for customers whose 'PurchaseAmount' is greater than $100. Which code snippet would achieve this?