Add Column Names to Your Program

SAS Studio is designed to help you write your SAS programs as quickly and accurately as possible. From the Libraries section of the navigation pane, you can access all of your libraries and the tables in the libraries. If you want to see the names of the columns in a table, you can expand the table and view all of the columns. You can save time when you are writing a program by dragging items from the Libraries section to your program. SAS Studio adds code for the dragged items to your program for you.
To see how this works, let’s go back to the original program that you started with:
proc print data=sashelp.class;
run;
Next, add the VAR statement to the program to specify which variables, or columns, to include in the results. After the first line of code, add the following new line of code:
var  
Your program should look like this:
proc print data=sashelp.class;
var 
run;
Now you can use the Libraries section to help complete the VAR statement. Click the Libraries section in the navigation pane and expand the Sashelp library. Locate the Class table and expand it to view the columns.
Libraries Section with the Class Table Expanded
Hold down the Ctrl key and select the Name, Age, and Height columns and then drag them to the end of the VAR statement in your program. A green check mark icon indicates where you can drop the selected columns.
Program Window That Shows Drag Operation from Libraries Section
When you drop the selected columns, SAS Studio adds the column names to your program. The SAS programming language requires that each statement end with a semicolon. To avoid another error when you run your program, you must add a semicolon to the end of the VAR statement.
Program Window with Completed VAR Statement
By using the Libraries section, you can easily see the names of the columns in a table, and you can save time by dragging table and column names to your programs instead of entering them.