** Original code without macro variables; PROC FREQ DATA = sasdata.cats; TABLES Origin; TITLE 'Cat Breeds by = Origin’; RUN; PROC PRINT DATA = sasdata.cats; WHERE Origin = 'Thailand'; TITLE 'Cat Breeds with Origin = Thailand'; RUN; a.Use %LET statements to create two macro variables: one to replace the variable name Origin, and another to replace the data value ‘Thailand’.Use an option that will enable you to see the standard SAS statements generated by the macro processor. b. Use the macro variables to produce counts for the variable Derivation, and to list data for breeds that were derived by mutation. c. Convert the code to a macro. Pass the values for the two macro variables into the macro as parameters. Call the macro to produce counts for the variable Hair, and to list data for breeds with long hair. d. Add programming to your macro from part c) that will save your output in a PDF file. Name this file CatRpt, and append the filename with a suffix that is the name of the variable used in the TABLES statement. ------------------------------------------------------------------------------------------ The following is my code for (a), but i can't print it successfully :S and for (B) (c) (d) i am completely lost 😞 been stock on this questions for days 😞 %let Origin=from; %let Thailand=Island; %macro coco; PROC FREQ DATA = sec.cats; TABLES Origin; TITLE 'Cat Breeds by = Origin'; RUN; PROC PRINT DATA = se.cats; WHERE Origin = 'Thailand'; TITLE 'Cat Breeds with Origin = Thailand'; RUN; %mend coco;
... View more