Create HTML output and view the contents of the SAS data set. The ODS HTML statement specifies the destination to write to and the file name of the output. The CONTENTS procedure shows the contents of the SAS data set SasHelp.Class. The ODS HTML CLOSE statement closes the HTML destination and the files that are associated with it. If you do not close the destination, then you will not be able to view the files.


ods html file="MyFile.html" ;
ods select variables;
proc contents data=sashelp.class; run;

ods html close;