ods listing close;
/* Try pdf & rtf as well */
%let dest =html;
options nodate nonumber;
ods &dest file="test.&dest";
title j=c 'Main Title' j=r "DATE: %SYSFUNC(TODAY(),MMDDYY10.)";
proc print data=sashelp.class;
run;
title;
data _null_;
set sashelp.class end=eof;
if _n_ = 1 then do;
dcl odsout obj();
obj.title(text: "Main Title",
overrides: "width=5.5in just=right",
text: "Date %SYSFUNC(TODAY(), MMDDYY10.)",
overrides: "width=4.5in just=right");
obj.table_start();
obj.row_start(type: "header");
obj.format_cell(text: "Name");
obj.format_cell(text: "Sex" );
obj.row_end();
end;
obj.row_start();
obj.format_cell(text: name);
obj.format_cell(text: sex);
obj.row_end();
put eof=;
if eof = 1 then do;
obj.table_end();
obj.delete();
end;
run;
ods &dest close;
... View more