Let SAS Studio Do the Programming for You!

If you’re not an experienced SAS programmer or if you need an existing program to help you get started, SAS Studio can help. You can open a table in the table viewer, select which columns to display, and filter and sort the data. Behind the scenes, SAS Studio writes all the code that is needed to display the table and makes that code available to you.
From the Libraries section, double-click the Class table to open it in the table viewer.
Table Viewer with the CLASS Table
In the Columns area of the table viewer, all of the columns are selected by default. Clear the Weight column and notice that it is immediately removed from the table viewer.
Table Viewer That Shows the CLASS Table with the Weight Column Removed
Next, you can add a filter and sort the data. Right-click the Age column heading, and select Add Filter. From the list of column values, hold down the Ctrl key and select three values: 11, 12, 13.
Add Filter Window with Ages 11, 12, and 13 Selected
Click Filter. The table viewer is updated and now displays only the rows for ages 11, 12, and 13.
Note: The filter criteria are displayed at the top of the table viewer. You can click Filter table rows button to edit the filter and Clear filter button to delete the filter.
Table Viewer with the CLASS Table Filtered
Finally, right-click the Height column heading and select Sort Ascending. The table is sorted by the values of the Height column from smallest to largest.
Table Viewer with the CLASS Table Sorted
While you’ve been selecting options and customizing the table to get it just the way you want it, SAS Studio has been generating SAS code that you can use. To view the code, click Display the query that creates the current table button on the toolbar. A new program window appears with the code that was used to create the view of the table in the table viewer.
Program Window with the Query That Creates the Table in the Table Viewer
This program is a copy of the code that SAS Studio created and is no longer associated with the table viewer. Editing this program does not affect the data that is displayed in the table viewer, and modifying the table viewer does not affect the contents of this code. You can edit this code, or use it as the basis for another program.