Using SAS Studio

About Using SAS Studio

When you sign on to SAS Studio, the main SAS Studio window appears with a blank program window so that you can start programming immediately. You also have access to all six sections of the navigation pane.
SAS Studio Main Window
The main window of SAS Studio consists of a navigation pane on the left and a work area on the right. The navigation pane provides access to the search feature, your folder shortcuts and folders, your tasks and snippets, the libraries that you have access to, and your file shortcuts. The Folders section is displayed by default.
The work area is used to display your data, code, tasks, logs, and results. As you open these items, they are added to the work area as windows in a tabbed interface.

Using the Navigation Pane

About Using the Navigation Pane

You can expand the sections of the navigation pane by clicking the section that you want to view.

Using the Search Section

The Search section of the navigation pane enables you to search the directory that is specified by the Authentication Provider for filenames, folder names, table names and descriptions, column names and labels, and library names. You can open items directly from your search results by double-clicking them or dragging them to the work area.
To use the search option:
  1. In the navigation pane, click Search to open the Search section.
  2. In the search box, enter the text that you want to search for.
  3. Click Search options button to open the Search Options window and specify the types of items that you want to search. By default, all types of items are searched.
    Search Options Window
  4. Click Search.

Working with Folders

The Folders section of the navigation pane enables you to access your folders, create folder shortcuts, download and upload files, and create a new SAS program. You can expand and collapse folders, and you can open items in the folders, such as a SAS program or table, by double-clicking them or dragging them to the work area.
To create a new folder shortcut, click New button in the Folders section and select Folder Shortcut. Enter the shortcut name and full path and click Save. The new shortcut is added to the list of folder shortcuts.
To download a file, select the file that you want to download and click Download button. You are prompted to open the file in the default application or save it to your local computer.
To upload one or more files from your local computer, click Upload button. Specify the folder to which you want to upload the files, and click Choose Files to browse for the files that you want to upload.

Working with Tasks

The Tasks section of the navigation pane enables you to access tasks in SAS Studio. Tasks are based on SAS procedures and generate SAS code and formatted results for you. SAS Studio is shipped with several predefined tasks that you can run. You can also edit a copy of these predefined tasks, and you can create your own new tasks.
To create a new task, click New task button. SAS Studio creates a template in the work area that you can use to create custom tasks for your site. Custom tasks can be accessed from the My Tasks folder. For more information, see Understanding Tasks in SAS Studio.
To edit a task that you have created, select the task from the My Tasks folder and click Edit button. The XML code that is used to create the task is opened in the work area. If you want to edit a predefined task, you must first right-click the task and select Add to My Tasks. For more information, see Edit a Predefined Task.
Note: You can edit only the tasks that are in the My Tasks folder.

Working with Snippets

The Snippets section of the navigation pane enables you to access your code snippets. Code snippets are samples of commonly used SAS code that you can insert into your SAS program. SAS Studio is shipped with several predefined code snippets that you can use. You can also edit a copy of these snippets and create your own custom snippets. Your custom snippets can be accessed from the My Snippets folder. For more information, see Working with Programs.
To edit a snippet that you have created, select the snippet from the My Snippets folder and click Edit button. If you want to edit a predefined snippet, you must first right-click the snippet and select Add to My Snippets.
Note: You can edit only the snippets that are in the My Snippets folder.

Working with Libraries

The Libraries section of the navigation pane enables you to access all of your libraries and the tables in the libraries. You can use the Libraries section to expand a table and view the columns in that table. The icon in front of the column name indicates the type.
Here are examples of common icons for the column types.
Icon
Type of Column
Character icon
Character
Numeric icon
Numeric
Date icon
Date
Datetime icon
Datetime
You can drag tables and columns from the Libraries section to a program, and SAS Studio adds code for the dragged items to your program. For more information, see Opening and Creating Programs.
You can also create new libraries and assign existing libraries.
To create a new library:
  1. Click Libraries in the navigation pane and then click New library button. The New Library window appears.
    New Library Window
  2. In the Name box, enter the libref for the library. The libref must be eight characters or fewer.
  3. In the Path box, enter the physical path where the library resides.
  4. In the Options box, specify any configuration options that you need. For the appropriate options, see the documentation for your operating environment.
  5. If you want to access this library each time you use SAS Studio, select Re-create this library at start-up.
  6. Click OK to create the library. The new library is added to the list of libraries in the navigation pane.
To assign unassigned libraries, click Assign libraries button. If you want to access the selected libraries each time you use SAS Studio, select Assign selected libraries at start-up. If a library is unassigned, then you cannot access the tables in that library.

Using File Shortcuts

File shortcuts enable you to quickly access files that you specify. You can create a file shortcut to a file on your SAS server or via a URL.
To create a new file shortcut, click New file shortcut button. You can define the shortcut by specifying a complete path and filename or by specifying a URL. If you want this shortcut to be available the next time you use SAS Studio, select Re-create this file shortcut at start-up.
You can open a file from a file shortcut by double-clicking it or dragging it to the work area.

Customizing the Navigation Pane

By default, all six sections of the navigation pane are displayed when you open SAS Studio. To customize which sections are displayed, click More application options button and select View. Select or clear any sections that you want to add or remove. The navigation pane is updated immediately.

Using the Work Area

About Using the Work Area

The work area is the main portion of the SAS Studio application for accessing programs and tasks and for viewing data. The work area is always displayed and cannot be minimized. When you open a program, task, or table, the windows open as new tabs in the work area. The code, log, and results that are associated with programs and tasks are grouped together under the main tab for the program or task.
Work Area with One Program, One Table, and Two Tasks

Customizing the Work Area

By default, the work area is displayed beside the navigation pane, but you can use the options menu to maximize the work area and hide the navigation pane. You can also close all of the tabs in the work area at once.
To maximize the work area, click More application options button and select Maximize View.
Note: To reopen the navigation pane, click More application options button and select Exit Maximized View.
To close all tabs that are open in the work area, click More application options button and select Close All Tabs. You are prompted to save any unsaved programs or tasks.

Customizing the View of the Program Tab

On the Program tab, you can rearrange the tabs by using a drag-and-drop operation to move them to the left or right. You can also dock a tab on the right side or bottom of the work area to view more than one tab at a time.
To rearrange a tab:
  1. Select the tab that you want to move.
  2. Move the tab icon to the location where you want to view this content. The Okay Cursor iconicon indicates a valid location.
    Example of Moving the Code Tab to the Bottom of the Program Tab
    New Location of the Code Tab

Setting General Preferences

The Preferences window enables you to change several options that affect SAS Studio.
To access the general options, click More application options button and select Preferences. Click General.
Option
Description
Show generated code in the SAS log
displays the ODS statements, %LET statements, and any other code that is automatically generated by SAS in the log file. This option applies to both SAS tasks and SAS program files.
Include a Show Details button in error messages
adds a Show Details button to any error messages that SAS Studio generates.
Time-out interval: (hours)
specifies the amount of time that SAS Studio allows you to be logged on without any activity. The default value is one hour.
Start new programs in interactive mode
opens new programs with the interactive mode on. This option is available only if you are running the first maintenance release for SAS 9.4. For more information, see Working in Interactive Mode.

Changing Your SAS Workspace Server

If you have access to more than one SAS workspace server, you can change the server that SAS Studio connects to. To change the server, click More application options button and select Change SAS Workspace Server. Select the server that you want to use. When you change servers, any libraries and file shortcuts that you created are deleted. For more information, see SAS Studio 3.1: Administrator's Guide.