BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JuanVte
Calcite | Level 5

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;

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

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

5 REPLIES 5
ballardw
Super User

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.

JuanVte
Calcite | Level 5

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!

ballardw
Super User

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

Cynthia_sas
SAS Super FREQ

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

Catrin
Obsidian | Level 7

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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