An ODS document is a
hierarchical file of output objects that is created from a procedure
or data query. The ODS document holds these output objects in their
original structures, but you can rearrange the hierarchy and structure
of these objects. ODS documents are stored in a proprietary format
(a document
store) and can be viewed only
with SAS software. To view or modify what is in the document store,
you must use either the
Documents window
or the DOCUMENT procedure.
To create an ODS
document, you must use the ODS DOCUMENT Statement. 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 document Work.Prddoc and its contents. To view the
Documents window,
submit this command in the command bar:
odsdocuments
SAS Documents Window Showing Document and Documents Icon
The following display
shows the properties of Table 1. You can see the document name and
the document path, among 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
preceding display. This ODS document was written to the Work library.
However, if it had been written to a permanent location (such as c:\temp\output),
you would see in Windows Explorer that the document store has a file
extension of SAS7BITM.