Hi:
When PROC REPORT builds a report using ACROSS variables, it assigns absolute column numbers (such as _C2_, _C3_, _C4_) to each column that is underneath an ACROSS item. That means in your COMPUTE block that you cannot refer to the YR_MONTH variable by name, you would instead need to refer to the absolute column numbers. And, further, the value of _C2_, _C3_, etc would NOT be the value of YR_MONTH, but would, instead, be the value of REC_COUNT for that particular YR_MONTH. So, you'd have to use the absolute column number a different way.
This previous posting contains an example that's almost exactly what you want to do.
http://support.sas.com/forums/thread.jspa?messageID=33214膾
(although that posting has some typos in quoting, so a corrected example is shown below using your data and a simpler URL.)
For another explanation of using absolute column numbers, see:
http://support.sas.com/forums/thread.jspa?messageID=45079뀗
Another alternative would be to set the URL in the header, with a user-defined format (as shown in #2) -- this doesn't get ProcessID into the URL, though, I just offer it as a possible alternative approach.
Also, remember that if you are using this code to invoke a SAS Stored Process using SASStoredProcess/do? that not every client application may be able to receive HTML streaming results from invoking a URL. Just FYI.
cynthia
[pre]
ods html file='c:\temp\bldurl1.html' style=sasweb;
proc report data=sum_rpt split='_' nowd out=rpt_data;
title '1) Use absolute column numbers';
column Process_ID rec_count,Yr_Month;
define Process_ID / group 'Process ID';
define Yr_Month / across 'Processing Period';
define rec_count / ' ';
compute rec_count;
href201011 = 'http://www.setgame.com'||'?q=2010-11';
href201012 = 'http://www.setgame.com'||'?q=2010-12';
href201101 = 'http://www.setgame.com'||'?q=2011-01';
href201102 = 'http://www.setgame.com'||'?q=2011-02';
call define ('_c2_', 'URLBP', href201011);
call define ('_c3_', 'URLBP', href201012);
call define ('_c4_', 'URLBP', href201101);
call define ('_c5_', 'URLBP', href201102);
endcomp;
run;
proc print data=rpt_data label split='*';
title 'what is absolute column number for each YR_MONTH';
label _c2_ = '_c2_*2010-11'
_c3_ = '_c3_*2010-12'
_c4_ = '_c4_*2011-01'
_c5_ = '_c5_*2011-02';
run;
ods html close;
*** alternate: put URL on Header with format;
proc format;
value $yrurl
'2010-11' = 'http://www.google.com?q=2010-11'
'2010-12' = 'http://www.google.com?q=2010-12'
'2011-01' = 'http://www.google.com?q=2011-01'
'2011-02' = 'http://www.google.com?q=2011-02'
;
run;
ods html file='c:\temp\bldurl2.html' style=sasweb;
proc report data=sum_rpt split='_' nowd;
title '2) Put URL in Header only';
column Process_ID rec_count,Yr_Month;
define Process_ID / group 'Process ID';
define Yr_Month / across 'Processing Period'
style(header)={url=$yrurl.};
define rec_count / ' ';
run;
ods html close;
[/pre]