Help using Base SAS procedures

Pagebreak in SAS listing output

Accepted Solution Solved
Reply
Contributor
Posts: 43
Accepted Solution

Pagebreak in SAS listing output

Hello everybody,

In the SAS listing output, we can avoid the page breaks using options formdlim=" ". This makes the outputs being printed one after the other separated by 3 empty lines.

Is there any way to remove these 3 lines of separation printing the outputs continuously?

Thanks,

Juanvte

Example:

options formdlim=" ";

title "First output";

proc print data=sashelp.class;

run;

title "Second output - three lines after the previous";

proc print data=sashelp.class;

run;


Accepted Solutions
Solution
‎08-09-2012 11:26 AM
SAS Super FREQ
Posts: 8,742

Re: Pagebreak in SAS listing output

Hi:

  I believe there is some limited control about how much space appears between tables (such as a PROC PRINT table output followed by a PROC FREQ table output, using the PARSKIP style element with ODS TAGSETS.RTF. But otherwise, for HTML and PDF, I believe there is a certain amount of space "reserved" between tables, even with STARTPAGE=NO (option for PDF and RTF). In HTML, you can change the PAGEBREAKHTML style attribute, so it does not display a Horizonal Rule between outputs, but I think there's still some extra white space.

  For LISTING, I do not believe there is any control other than FORMDLIM -- so FORMDLIM removes the traditional "carriage control" character, but there is nothing "automatic" to reduce the space between output tables.

cynthia

View solution in original post


All Replies
Super User
Posts: 10,483

Re: Pagebreak in SAS listing output

The option pagesize controls how many lines are displayed on a "page" in the listing output.

Try

options pagesize=max;

to create the largest page your system will use.

Warning: use of FOOTNOTE will go at the bottom of this page. Depending on your setup and the actual output this could be tens of thousands of lines of blank before the footnote appears.

Contributor
Posts: 43

Re: Pagebreak in SAS listing output

Thanks Ballardw,

as you commented The option pagesize controls how many lines are displayed on a "page" in the listing output.

But I still have three lines between the two outputs.

Any other recommendation?

thanks!

Super User
Posts: 10,483

Re: Pagebreak in SAS listing output

The breaks between procedures don't seem to have any control. I've asked about that regarding ODS output as well.

Solution
‎08-09-2012 11:26 AM
SAS Super FREQ
Posts: 8,742

Re: Pagebreak in SAS listing output

Hi:

  I believe there is some limited control about how much space appears between tables (such as a PROC PRINT table output followed by a PROC FREQ table output, using the PARSKIP style element with ODS TAGSETS.RTF. But otherwise, for HTML and PDF, I believe there is a certain amount of space "reserved" between tables, even with STARTPAGE=NO (option for PDF and RTF). In HTML, you can change the PAGEBREAKHTML style attribute, so it does not display a Horizonal Rule between outputs, but I think there's still some extra white space.

  For LISTING, I do not believe there is any control other than FORMDLIM -- so FORMDLIM removes the traditional "carriage control" character, but there is nothing "automatic" to reduce the space between output tables.

cynthia

Occasional Contributor
Posts: 6

Re: Pagebreak in SAS listing output

Hi,
I am looking for a way to get rid of Horizontal Rules in ODS HTML5. Cynthia wrote, that it can be  done by changing the PAGBREAKHTML  style attribute. Could someone show the code, how to do it? I  am  not really familiar with proc template.

I use SAS 9.4M1 on AIX and use a code like the following one:

goptions reset=all; 
goptions device =png;
    
ods path
   WORK.TEMPLAT(UPDATE)
   TEMPL.TMPLMST(READ)
   SASUSER.TEMPLAT(READ)
   SASHELP.TMPLMST(READ)
  ;
 
/* Template für andere Tabellendarstellung */
 
 
proc template;
    define style tab_pearl /store = WORK.TEMPLAT;
        parent= styles.pearl;
                  
     style Body /
         marginright = 3
         marginleft = 2  
         pagebreakhtml = html('PageBreakLine');
 
     style html
         "Common HTML text used in the default style" /
         'expandAll' = "<span onclick=""expandCollapse()"">"
         'posthtml flyover line' = "</span><hr size=""3""/>"
         'prehtml flyover line' = "<span><hr size=""3""/>"
         'prehtml flyover bullet' = %nrstr("<span><b>&#183;</b>")
         'posthtml flyover' = "</span>"
         'prehtml flyover' = "<span>"
         'break' = "<br/>"
         'Line' = "<hr size=""3""/>"
         'PageBreakLine' =
         "<p style=""page-break-after: avoid;""><br/></p><hr size=""3""/>"
         'fake bullet' = %nrstr("<b>&#183;</b>");
  end;
run;
title;
 
 
ODS LISTING CLOSE;
ODS HTML Close;
 
ODS HTML5 options(bitmap_mode= 'inline'  )
 file="test.html" (title=" ") rs=none   
 style=tab_pearl ;
 
 proc print data=sashelp.class(obs=5);
 run;
 
 
proc sgplot data=sashelp.cars;
    vbar origin;
run;
 
proc sgplot data=sashelp.cars;
    vbar type;
run;
 
footnote justify=l "~S={font_weight=medium font_size=0.4cm} Erstellt am:  %sysfunc(today(),eurdfdd10.) "   ;
ods html5 close;
 
ods listing;
 

I tried to set page-break-after to "avoid" and an another few things, but always the Horizontal Rules stay there.

Any help is appreciated.
Catrin


HorizontalRules.png
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 10059 views
  • 3 likes
  • 4 in conversation