To create an ODS
document, you can use the Documents window
or the ODS DOCUMENT Statement in SAS Output Delivery System: User's Guide. The following code creates the ODS document Work.Prddoc
within a document store:
ods listing close;
proc sort data=sashelp.prdsale out=prdsale;
by Country;
run;
ods document name=work.prddoc(write);
proc tabulate data=prdsale;
by Country;
var predict;
class prodtype;
table prodtype all,
predict*(min mean max);
run;
ods select ExtremeObs;
proc univariate data=prdsale;
by Country;
var actual;
run;
ods document close;
The following display
shows the ODS document Work.Prddoc and its contents. To view the
Documents window,
submit the following command on the command line:
odsdocuments
SAS Documents Window Showing Work.Prddoc Document and Documents
Icon
The following display
shows the properties of Table 1. You can see the document name and
the document path, as well as other information.
Table Properties for Table 1
An ODS
document store is not a SAS data set, as you can see by the Document
icon in the previous display. The Work.Prddoc document was written
to the Work library. If it had been written to a permanent location
(such as
c:\temp\output
), in Windows
Explorer, the document store would have a file extension of SAS7BITM.
After you have created
a document with the ODS DOCUMENT statement, you can use the LIST statement
in a PROC DOCUMENT step to view the contents of your document. The
LIST statement enables you to look at the object list and folder structure
in the ODS document. The following code creates a list of all levels
of the Work.Prddoc document:
proc document name=work.prddoc;
list / levels=all;
run;
quit;
The LIST statement can list what is in an entire
document or in just one of the entries.
For more information
about the LIST statement, see The DOCUMENT Procedure in SAS Output Delivery System: User's Guide.