BookmarkSubscribeRSS Feed

Visual Studio Code for SAS Analytics Pro Users (Part 1)

Started yesterday by
Modified yesterday by
Views 68

SAS Analytics Pro now gives you more flexibility in how and where you write code. In addition to SAS Enterprise Guide, you can now connect and code in Visual Studio Code (VS Code) using the SAS Extension for Visual Studio Code. This modern development environment offers a customizable and efficient coding experience, combining familiar SAS functionality with the features and flexibility of a full-featured code editor.

 

This post is the first in a series that will help SAS Analytics Pro Users become familiar with the Visual Studio Code interface. Part 2 of this series will detail how to connect to SAS Analytics Pro, run SAS programs and notebooks, and customize the interface.

 

 

Overview of the VS Code Interface

 

When you open Visual Studio Code, you'll notice there are six areas of interest:

 

  • a toolbar on the top
  • an activity bar on the left
  • a work area in the middle
  • a panel below the work area
  • a secondary side pane on the right
  • a status bar at the bottom

 

01_ST_diagram2-1-2048x1090.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

 

Work Area

 

The work area displays your tables, code, and results. As you open or generate items, they appear as tabbed windows, similar to browser tabs.

 

02_ST_aproblog2-1.png

 

When VS Code first opens, you’ll see shortcut options in the work area for quick actions such as viewing all commands, opening a file or folder, or starting a chat with GitHub Copilot.

 

03_ST_aproblog3-1024x576.png

 

 

Activity Bar

 

On the far left, you’ll find the activity bar, which gives you access to different parts of your VS Code environment.

 

The Explorer view lets you connect to folders on your local machine or SAS server. Once connected, you can browse your files, view outlines, and see a history of file changes, such as when the file was last saved.

 

04_ST_explorer-2.png

 

The Search view in VS Code searches through text files in your current workspace to find and replace text.

 

05_ST_search-3.png

 

Source Control integrates with Git, letting you manage repositories and commits directly within VS Code.

 

06_ST_sourcecontrol.png

 

The Extensions view allows you to install and manage your VS Code extensions, such as the SAS extension.

 

07_ST_extensions-1.png

 

From the SAS Extension page, you can:

 

  • Change the color theme and manage the extension 
  • View details about the extension, including features and recent updates
  • Adjust settings including how results and the log are displayed
    1.  

08_ST_SASPage-1024x576.png

 

SAS Extension for VS Code

 

The SAS Extension gives you access to any files on your SAS Server and displays your SAS libraries.  Just like in SAS Studio or Enterprise Guide, you can expand a library and double-click a table to view it. The table view shows the data along with an icon indicating each column type. You can also use the refresh icon to refresh the SAS Server files or Libraries to see the latest updates. 

 

09_ST_extpage.png

 

 

Log and Error Output

 

The pane below the work area diplays log information when you run a SAS program, while the status bar on the bottom notes how many error and warnings the program produced. We will explore running a SAS program and fixing errors in more detail later in this series.

 

10_ST_errors2-1024x452.png

 

 

Toolbar

 

The toolbar at the top gives you quick access to things like creating, opening, and saving files. The search bar, officially called the Command Palette, lets you search for and run commands, open files, or access settings without navigating through menus. 

 

In the top right corner, you’ll find icons that let you split the editor, change layouts, toggle the bottom panel, or close files. 

 

11_ST_compal-1024x157.png

 

 

Secondary Side Pane

 

The secondary side pane on the right is where you can access GitHub Copilot. GitHub Copilot is an AI-powered coding assistant integrated into Visual Studio Code. It provides code suggestions, explanations, and automated implementations, although it is better suited for other programming languages like R and Python. Soon SAS Viya Copilot will be available as a VS Code Extension, which will provide better SAS-specific suggestions than GitHub Copilot does currently. 

 

12_ST_githubcp-1024x550.png

 

 

Conclusion

 

Getting started with Visual Studio Code opens up a powerful new way to work with your data with SAS. This modern coding environment combines the flexibility of VS Code with the capabilities of SAS Analytics Pro, giving you an interface that’s both customizable and familiar.

 

In the next post in this series, we’ll walk through how to connect to SAS Analytics Pro from VS Code, run a SAS program, and interpret log output. We’ll also show how to customize how your results are displayed and explore how to run a SAS Notebook.

 

For more information on SAS Analytics Pro and the Visual Studio Code SAS Extension, visit:

 

SAS Analytics Pro: Choose Your Interface

 

SAS Analytics Pro – Toolset for Professionals | SAS

 

SAS Extension for Visual Studio Code

 

SAS Extension for Visual Studio Code | SAS Developer Portal

 

Sharing SAS Notebooks on GitHub

 

 

Acknowledgements

Thank you to the SAS Enterprise Guide Product Manager, Wilbram-SAS, for valuable suggestions and editing to improve this article.

 

 

Find more articles from SAS Global Enablement and Learning here.

Contributors
Version history
Last update:
yesterday
Updated by:

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Labels