BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello SAS Masters 🙂

I have 2 (I think) simple questions.

1) When I submit code like this:

/**********************/
Data a;
a=1;
Run;

Data b;
b=1;
Run;

ODS HTML BODY="C:\Temp\Job.html" Style=ASTRONOMY;

Data _null_;
Set a;
File print Ods;
Put _ods_;
Run;

Data _null_;
Set b;
File print Ods;
Put _ods_;
Run;

ODS HTML CLOSE;
/**********************/

...I get two tables. One below another.
What should I do to get One table next to another.

2) How to mask a breakline beetwen Tables in this HTML file ?

Thanks for help...

Kosa.
3 REPLIES 3
David_SAS
SAS Employee
Here's code to address the second question:
[pre]
proc template;
define tagset tagsets.myhtml;
parent=tagsets.html4;

block event pagebreak;

end;
run;

/**********************/
Data a;
a=1;
Run;

Data b;
b=1;
Run;

ODS tagsets.myhtml BODY="C:\Temp\Job.html" Style=astronomy;

Data _null_;
Set a;
File print Ods;
Put _ods_;
Run;

Data _null_;
Set b;
File print Ods;
Put _ods_;
Run;

ODS tagsets.myhtml CLOSE;
/**********************/
[/pre]
Look for a subsequent post about the first question.

-- David Kelley, SAS
David_SAS
SAS Employee
To get side-by-side tables in HTML, use the HTMLPANEL tagset:
[pre]
/**********************/
Data a;
a=1;
Run;

Data b;
b=1;
Run;

ODS tagsets.htmlpanel BODY="C:\Temp\Job.html" Style=astronomy;
ods tagsets.htmlpanel event=row_panel(start);

Data _null_;
Set a;
File print Ods;
Put _ods_;
Run;


Data _null_;
Set b;
File print Ods;
Put _ods_;
Run;

ods tagsets.htmlpanel event=row_panel(finish);
ODS tagsets.htmlpanel CLOSE;
/**********************/
[/pre]

HTMLPANEL takes care of your page break issue as well; it's a two-fer!
deleted_user
Not applicable
Thanks for Your help David@SAS.

HTMLPANEL working correct.

In pagebreak I have some error but Your idea was OK.
I use code like this:

/*****************/
proc template;
define tagset tagsets.myhtml;
parent=tagsets.html4;
define event pagebreak;
end;
end;
run;
/*****************/

Now everything is OK.

Thx.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1540 views
  • 0 likes
  • 2 in conversation