Hi:
Well, here's a totally silly example that modifies the previous program. Basically, it's taking what would be IF logic in the compute block and moving it to a macro program,
%DOOTHR, that just builds an assignment statement.
I still have a hard time figuring out WHAT your macro was doing or supposed to do. It looked like you expected some date to change??? Were you trying to MAKE the across report columns/values based on a start and end date that were not in the data???
This paper has some good examples of PROC REPORT, including a particularly useful macro program to determine how many across values you're going to have.
http://support.sas.com/rnd/papers/sgf07/sgf2007-report.pdf
Otherwise perhaps you might consider contacting Tech Support with your data and your report requirement and see whether they can zero in on the best technique. If you run the program below, you will see that the %DOOTHR macro executes 1 time for every report row that is built. As I said, I was happy to find out that %PUT worked within the context of PROC REPORT -- but I don't find it very useful except for debugging, as shown in my modified program.
cynthia
[pre]
%macro doothr(div=);
%if &div = CONSUMER %then %do;
other = 99;
%put value of div = ÷
%end;
%else %if &div = EDUCATION %then %do;
other = _c5_ + _c9_ + _c13_;
%put value of div = ÷
%end;
%else %if &div = GTOT %then %do;
other = 9999;
%put value of div = ÷
%end;
%mend doothr;
ods html file='c:\temp\show_across.html' style=sasweb;
proc report data=sashelp.prdsale nowd
out=work.acr_look;
where month between '01JAN94'd and '31MAR94'd;
column division month,(n actual predict newvar) other;
define division / group;
define month /across format=monyy5. order=internal;
define actual / sum;
define predict / sum;
define newvar / computed;
define other / computed;
compute newvar;
_c5_ = _c4_ - _c3_;
_c9_ = _c8_ - _c7_;
_c13_ = _c12_ - _c11_;
endcomp;
compute other;
if division = 'CONSUMER' then do;
%doothr(div=CONSUMER);
end;
else if division = 'EDUCATION' then do;
%doothr(div=EDUCATION);
end;
else if _break_ = '_RBREAK_' then do;
%doothr(div=GTOT);
end;
endcomp;
rbreak after / summarize;
run;
ods html close;
[/pre]