Hi:
Olivier is right. First.BYVAR and Last.BYVAR only work for the DATA step. However, PROC REPORT gives you the ability to execute a COMPUTE block BEFORE a group or order variable and/or AFTER a group or order variable and this is the closest you would come to a similar ability in a PROC. So, for example, in PROC REPORT, if you wanted a running total of some variable, for each COUNTRY, then COUNTRY would be your GROUP variable and you might have something like this:
[pre]
compute before country;
runtot = 0;
endcomp;
compute sales;
runtot + sales.sum;
endcomp;
compute after country;
line 'The running total is: ' runtot dollar14. ' for ' country $15.;
endcomp;
[/pre]
In this instance, the compute before country processing might be equivalent to what you do for an IF FIRST.BYVAR condition; and the compute after country processing might be equivalent to what you do for an IF LAST.BYVAR condition. Of course, what you can do here is limited to what you can do with PROC REPORT.
cynthia