See if this code of mine can help you.
Pay attention to the ODS statements and read the documentation about the ODS markup options I'm using
[pre]
%macro build_html(host);
%let configuration = &host.__configuration.html;
%let buttons = &host.__buttons.html;
%let graphs = &host.__graphs.html;
ods listing close;
filename body "&base_dir\&host..html";
ods chtml body = body (no_bottom_matter);
ods chtml close;
filename body "&base_dir\&host..html" mod;
data _null_;
file body;
put '';
put " ";
put " ";
put " ";
put "";
run;
ods chtml body=body (no_top_matter);
ods chtml close;
filename body clear;
filename body "&base_dir\&configuration";
ods htmlcss body = body (no_bottom_matter)
stylesheet = styles;
ods htmlcss close;
filename body "&base_dir\&configuration" mod;
data _null_;
set static.system_configuration;
where node_name = "&host";
by node_name;
file body;
if last.node_name;
put '
';
put ' ';
put ' Server Name: ' node_name $;
put ' | ';
put ' | data as of ' date;
put ' |
';
put ' Vendor = ' cpu_vendor $;
put ' | model = ' system_model $;
if number_processors = 1 then
put ' | ' number_processors 2. ' processor' ;
else
put ' | ' number_processors 2. ' processors' ;
put ' |
';
run;
ods htmlcss body=body (no_top_matter);
ods htmlcss close;
filename body clear;
filename body "&base_dir\&graphs";
ods htmlcss body = body (no_bottom_matter)
stylesheet = styles;
ods htmlcss close;
filename body "&base_dir\&graphs" mod;
data _null_;
file body;
if fileexist("&base_dir\&host")
then do;
fileref="dir";
rc = filename(fileref,"&base_dir\&host");
did = dopen(fileref);
files = dnum(did);
columns = ceilz(sqrt(files));
rows = roundz(sqrt(files));
put '';
put '
';
rc = dclose(did);
rc = filename(fileref);
end;
run;
ods htmlcss body=body (no_top_matter);
ods htmlcss close;
filename body clear;
filename body "&base_dir\&buttons";
ods htmlcss body = body (no_bottom_matter)
stylesheet = styles;
ods htmlcss close;
filename body "&base_dir\&buttons" mod;
data _null_;
file body;
if fileexist("&base_dir\&host")
then do;
fileref="dir";
rc = filename(fileref,"&base_dir\&host");
did = dopen(fileref);
files = dnum(did);
columns = files+1;
width = 'width='||trim(left(put(floor(100/columns),3.)))||'%';
put '
';
put ' ';
put ' All Charts";
do i=1 to files;
member = dread(did,i);
pointer = scan(member,1,".");
put ' | " pointer $ '';
end;
put ' |
';
rc = dclose(did);
rc = filename(fileref);
end;
run;
ods htmlcss body=body (no_top_matter);
ods htmlcss close;
filename body clear;
ods listing;
%mend;
[/pre]