Date: Sun, 4 Jan 2004 23:56:49 -0800
Reply-To: "Leslie J. Somos" <LJSomos@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Leslie J. Somos" <LJSomos@AOL.COM>
Organization: http://groups.google.com
Subject: Re: ods number of reports per page
Content-Type: text/plain; charset=ISO-8859-1
William Kossack <kossackw@njc.org> wrote in message news:<3FE8B804.3DE658F5@njc.org>...
> I'm trying to control the amount of output per page in pdf output.
>
> I have a large number of reports that are split up into different pdf
> reports by a grouping variable. However, using proc freq to generate
> tables I'm getting many pages with only one small table on them.
>
> How can I force ods to not create a new page
>
> here is my code...it is cleaned up a bit
>
> %macro freqs2;
> ods listing;
> ods &report_type (id=&FormNm) file="&report_nam";
> %do y=1 %to &amax;
> title1 'variable frequency Analysis';
> title2 "&FormNm Form";
> title3 "&LabelTitle";
> ods proclabel "&&LabelTitle";
> proc freq data=var&dataname; table &&att&y;
> %end;
>
> run;quit;
> ods &report_type (id=&FormNm) close;
> run;quit;
>
> %end;
> run;
> quit;
>
> ods _all_ close;
> %mend freqs2;
> %freqs2;
>
> run;
> quit;
One way: move the beginning of the macro %do-loop
so that only the "table" statement is within the loop.
(The %do-loop variable &y only appears on the "table" statement.)
%macro freqs2;
ods listing;
ods &report_type (id=&FormNm) file="&report_nam";
title1 'variable frequency Analysis';
title2 "&FormNm Form";
title3 "&LabelTitle";
ods proclabel "&&LabelTitle";
proc freq data=var&dataname;
%do y=1 %to &amax;
table &&att&y;
%end;