Selecting Variables to Include in the Output

The default action of the PUT _ODS_ statement is to list in tabular form all the variables in the Program Data Vector (PDV). This example shows you two ways to select the variables that you want the PUT _ODS_ statement to list.

The standard DROP/KEEP statement and data set option methods allow you to select the variables to include in the output, but they do not allow you to control the order in which the variables appear. The KEEP= data set option in the SET statement in the following DATA step specifies five of the seven variables in data set TRAFFIC to list in the output. Figure 9.8 shows the HTML results.

ODS HTML file='keepvar.html' STYLE=sasweb; ODS PDF file='keepvar.pdf'; title 'Using the KEEP= ...

Get Output Delivery System: The Basics and Beyond now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.