Date: Fri, 15 Oct 2004 09:49:22 -0400
Reply-To: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Subject: Proc Document; Replay. Was (Re: counting levels in table)
>> From: Adriano Rodrigues - Instituto GPP
>> if i have one simple table
>>
>> proc freq;
>> table a;
>> run;
>>
>> and want one footnote with numbers of rows of this table, how
>> to do that?
>>
>> example
>> a freq
>> 1 2
>> 3 2
>> 4 5
>> 5 8
>>
>> You have "4" itens in your table:-)
Hi,
I was trying to do this with proc document; replay;. It seems not
working... I was puzzled for a while, then I came to suspect that proc
document; replay; does replay everything, including footnotes and titles.
Could someone confirm this or supply a different explanation? I am running
it in 8.2. Thanks.
Cheers,
Chang
/* save the table in work.myDoc itemstor
and the frequencies into a dataset work.f */
ods document name=myDoc(write);
ods output OneWayFreqs=f;
proc freq data=sashelp.class;
table age;
run;
ods output close;
ods document close;
/* get the number of observations of data set work.f */
proc sql noprint;
select nobs into :nobs
from dictionary.tables
where libname="WORK" and memname="F"
;
quit;
options ps=20 ls=80 nocenter;
footnote "has %sysfunc(compbl(&nobs.)) categories.";
/* where is my footnote? */
proc document name=myDoc;
replay;
run;
quit;