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-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!

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
  • 653 views
  • 0 likes
  • 2 in conversation