Creating
the ODS document with the ODS DOCUMENT statement is the first step
toward ODS document functionality. The ODS DOCUMENT statement has
the following form:
ODS DOCUMENT action | option;
In
the ODS DOCUMENT statement below, the NAME= option assigns the document
the name PrdDocument, and the WRITE option specifies that the document
has Write access. Note that using Write access will overwrite existing
documents in the library. You must always specify an ODS
destination CLOSE
statement when using ODS global statements. The ODS DOCUMENT CLOSE
statement below closes the document so that it can be viewed in the
Documents window.
The
Documents window displays
ODS documents in a hierarchical tree structure. To open the
Documents window,
issue the following command on the command line:
odsdocuments
proc sort data=sashelp.prdsale out=prdsale;
by Country;
run;
ods document name=work.prddocument(write);
proc tabulate data=prdsale;
class region division prodtype;
classlev region division prodtype;
var actual;
keyword all sum;
keylabel all='Total';
table (region all)*(division all),
(prodtype all)*(actual*f=dollar10.) /
misstext=[label='Missing']
box=[label='Region by Division and Type'];
title 'Actual Product Sales';
title2 '(millions of dollars)';
run;
proc univariate data=prdsale;
by Country;
var actual;
run;
title 'Sales Figures for First Quarter by Product';
proc sgpanel data=prdsale;
where quarter=1;
panelby product / novarname;
vbar region / response=predict;
vline region / response=actual lineattrs=GraphFit;
colaxis fitpolicy=thin;
rowaxis label='Sales';
run;
ods document close;
Documents Window Expanded