Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Assignment #9 | STAT674

1. (20 pts) This question uses the bookstore datasets we used in module 9.  

1.1 Use %let to assign the dataset name to a macro variable, and then use this macro variable in a PROC CONTENTS to show the variables of each of the 6 datasets : cumstoers, items, list, orders, prices, and salesrep.  Also, extract the ODS table that contains the description of variables like below.

proc contents data=&dataset.;

ods table variables=v_&dataset.;

run;

1.2 Use a data step to stack these ods tables to one big dataset, and copy your final table here.

2. (20 pts) Follow the logic in the part of ‘data driven programming’ to find out the earliest published book in these datasets.  If more than one published in the same year, assume the lower ISBN refers to an earlier publication.  Be sure NOT to use hard coding.

3. (15 pts) Use data driven programming to figure out which book is the best seller among the available datasets.  At the end, print that result and copy it here.

4. (25 pts) Let’s help the manager again, to find out which sales rep sold the most books in 2014.  Feel free to build on your code in assignment M9, but with macro variables and data driven programming.  Do not hard code.  As a final report to the manager, show the rep’s name, his/her total sales of 2014, and the date and day you created your report.  Use automatic macro variables here, do not hard code.

5. (20 pts) The dataset prices logged the price changes of each book over time.  Find out which book has changed prices the most times. Use data driven programming.  At the end, Print the information of that book (year, author(s), title, ISBN) and copy your result here.