前天我发帖悬赏了一个SAS macro的编写,有个牛人迅速编出,其他各路牛人纷纷赞同,学术奖章纷至沓来,我也设此为最佳答案,可是Q4,Q5这两个macro编写对于macro新手的我还是不太理解,能否请其他高手翻译一下这位高手的编程思路?
数据表如下:
Q4. Complete the following macro.
%macroprocessyear(Inputds=StudentScore, Year=91,Outputds=Year_out);
%mend;
Year _out should have the following variables:
Year- Year specified in the input.
StudentHighScore- “StudentID “of the student with thehighest score for that year.
YearAvg- Average for the input year.
高手回复:
Q5. Write a SAS macro to create individual student files foreach student/year combination.
高手回复: