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