Question: Hi can I get some help with my practice test could I get the solution code to compare with my answers /* Q1. Create a

Hi can I get some help with my practice test could I get the solution code to compare with my answers

/* Q1. Create a new folder (name - Test3) on the SAS server. Create a library with the name test3 pointing to the folder Test3. Upload any XLSX file in folder Test3. Use proc import to import the data in the test3 library as a dataset. */

/* Q2. Write SAS program to find all cars (use sashelp.cars) with cylinders 4 & horsepower more than 200. Print the output dataset using proc print. */

/* Q3. Write SAS program (use sashelp.cars) to create an array from MPG_City & MPG_Highway. Use the Array & of operator to calculate avg mpg in a new column. Print the output dataset using proc print. */

/* Q4. Write a SAS program to create a new column that gives you the length of model name (use sashelp.cars). If the length of model name for any car is more than 10 characters, then trim it down to first 10 characters. Print the output dataset using proc print. */

/* Q5. Write a SAS program to create a new column (name - discount) that gives you the difference between MSRP & Invoice (use sashelp.cars). Calculate percentage discount (100*discount/msrp), round it off to 1 decimal place. If the discount percentage is more then 10 then filter such rows in a dataset with only model, make, msrp, invoice, discount percentage. Print the output dataset using proc print. */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!