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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 3 replies
  • 799 views
  • 0 likes
  • 2 in conversation