Question: Using SAS programs can someone help me my practice test. /* Q1. Create a new folder (name - Pratice3) on the SAS server. Create a

Using SAS programs can someone help me my practice test.

/* Q1. Create a new folder (name - Pratice3) on the SAS server. Create a library with the name pratice3 pointing to the folder pratice3. Upload any XLSX file in folder pratice3. Use proc import to import the data in the pratice3 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!