But, ODS OUTPUT will create an output dataset from the output object MEMBERS. If you use ODS TRACE ON/ODS TRACE OFF around PROC DATASETS, you will see the following output:
[pre]
893 ods trace on;
894 proc datasets library=work memtype=data;
Output Added:
-------------
Name: Directory
Label: Directory Information
Template: Base.Datasets.Directory
Path: Datasets.Directory
-------------
Directory
Libref WORK
Engine V9
Physical Name C:\DOCUME~1\Temp\SAS Temporary Files\_TD5040
Filename C:\DOCUME~1\Temp\SAS Temporary Files\_TD5040
Output Added:
-------------
Name: Members
Label: Library Members
Template: Base.Datasets.Members
Path: Datasets.Members
-------------
Member File
# Name Type Size Last Modified
1 MEMBERS DATA 5120 22Nov10:15:50:19
2 PRDSALE DATA 50176 22Nov10:10:57:31
3 REPORT_DATA DATA 209920 22Nov10:08:45:15
895 run;
896 quit;
NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
897 ods trace off;
[/pre]
The "Output Added" means that the procedure created an "output object" and it is this ODS output object that gets routed to ODS destinations. Not all ODS destinations are report destinations like LISTING, RTF and PDF and HTML. ODS DOCUMENT and ODS OUTPUT are destinations that are NOT report destinations. ODS OUTPUT is the destination that creates output datasets.
That means that you can write the output object "MEMBERS" to a dataset with the ODS OUTPUT statement, as shown in data _null_'s code. One of the great features of the Output Delivery System is the fact that if a procedure creates an output object you can make a dataset from that output object -- EVEN IF the dataset itself does not support or have an OUT= option or OUTPUT statement.
Check it out. There are a lot of good papers and examples out there on the use of ODS OUTPUT.
cynthia