Description
Scope:
This assignment covers concepts presented in all lectures through Lecture 20. You will use the ncaam06 dataset that was used in the previous assignment. Use all three system options that will cause macro resolution, macro code and macro execution information to be written to the log.
Specific Instructions for this Assignment:
2. Your objective in this step is to overhaul the data driven macro that will produce a separate report for each region in the data as created on step 9 of assignment 11. The reworked macro will produce essentially the same output but will only use SQL statements. The only parameter of the macro will be the name of the input dataset. Use only one instance of the SQL procedure for the entire macro. No other procedures or data steps are to be used in this macro. The macro shall accomplish sub-steps a through e below:
a. Create a table containing an unduplicated list of the regions.
b. Assign a macro variable containing the number of regions from the sqlobs macro value.
c. Create macro variables for each region.
d. Replace the report procedure from the last assignment with an SQL statement that outputs the data exactly as shown in the PDF posted on eCampus. NOTE: You can use a column in an order by or group by statement as long as it is in the input tables even though it is not in the select statement.
e. Use a loop to iteratively process the SQL statement once for each of the regions in the data.
f. Call the macro supplying the name of the dataset created in step 1.
3. Use an SQL procedure to create a report of the top 20 players with the highest number of points from the ncaam06 dataset as shown on page 5 of the posted output. (Points are found in the ppg column.)
4. Create a macro to report on the rebounders from the ncaam06 dataset, subset by a selected region and greater than or equal to a selected minimum number of rebounds per game (rpg). This macro will have a positional parameter for the region and a keyword parameter for number of rebounds with a default value of 7.
a. Use a macro function to transform the region parameter so that you can enter it in upper, lower, or mixed case and still get the appropriate results.
b. Use a data step to create in the work library a table that is a subset of ncaam06 based on the two macro parameters.
c. Use an SQL statement to read the number of observations in your new table from the appropriate SASHELP view and place this number in a macro variable.
e. If records are found use an SQL statement to produce the output as shown on page 7 of the posted output. Make sure all rebounds per game values display one decimal place.
f. Call the macro using wdc as the region and 10 as the rebounding threshold.
g. Call the macro again specifying only ATL as the region.
5. Three PDF files must be uploaded to WebAssign. Convert your program and the SAS log to PDF files. The third file will contain all the requested output from ODS PDF.




Reviews
There are no reviews yet.