ODS and the NOPRINT Option

Many SAS procedures support a NOPRINT option that you can use when you want to create an output data set without displaying any output. You use an option (such as the OUTEST= option or an OUTPUT statement with an OUT= option) in addition to the procedure’s NOPRINT option to create a data set and suppress displayed output.

You can also use the ODS OUTPUT statement to create output data sets. However, if you specify the NOPRINT option, the procedure might not send any output to ODS. In most procedures that support a NOPRINT option, NOPRINT means no ODS. (However, there are a few procedures that for historical reasons still might produce some output even when NOPRINT is specified.) When you want to create output data sets through the ODS OUTPUT statement and you want to suppress the display of all output, specify the following statement instead of using the NOPRINT option:

ods select none;

Alternatively, you can close the active ODS destinations like this:

ods _all_ close;

ODS statements do not instruct a procedure to generate output. Instead, they specify how ODS should manage output after it is created. You must ensure that the proper procedure options are in effect, or the output is not generated. For example, the following statements do not create the requested data set Parms because the SOLUTION option is not specified in the MODEL statement:

proc glm data=sashelp.class;
   ods output ParameterEstimates=Parms;
   class sex;
   model height=sex;
run; quit;

Since PROC GLM did not create the table, ODS cannot make the output data set. When you execute these statements, the following message is displayed in the log:

   WARNING: Output 'ParameterEstimates' was not created.


The following step creates the output data set:

proc glm data=sashelp.class;
   ods output ParameterEstimates=Parms;
   class sex;
   model height=sex / solution;
run; quit;