SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 23181: How can I create multiple output files in the same ODS destination?

DetailsAboutRate It

Beginning in SAS Version 8, you can assign an ID to an ODS destination. This ID enables you to open multiple files in the same ODS destination concurrently. It also allows you to choose individual objects to be selected or excluded from specified output files.

Here is an example:

    ods rtf(1) file="first report.rtf";
    ods rtf(2) file="second report.rtf";

    ods rtf(1) select modelanova;

    proc glm data=sashelp.class;
	       class sex;
	       model weight=age; 

    run;
    quit;

    ods rtf(1) close;
    ods rtf(2) close;

Note: Remember to close each file that you open. In this example, only the MODELANOVA object of the GLM is sent to the "first report.rtf" file.

This tip is reprinted from the Views Newsletter. View the issue that introduced this tip.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASAlln/a
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.