SAS Extension for Visual Studio Code
Welcome to the SAS Extension for Visual Studio Code! This extension provides support for the SAS language, including the following features:
To install the SAS extension, open the Extensions view by clicking the Extensions icon in the Activity Bar on the left side of the Visual Studio Code window. Search for the SAS extension, and click the Install button. Once the installation is complete, the Install button changes to the Manage button.
SAS Syntax Highlighting
The SAS extension highlights these syntax elements in your program:
You can choose from among different color themes that control the color of the application and syntax elements.
To specify the color theme:
The SAS extension includes automatic code completion and pop-up syntax help for SAS keywords. The autocomplete, or code completion, feature in the code editor can predict the next word that you want to enter in your SAS program before you enter it completely.
To use the autocomplete feature:
Pop-up Syntax Help
The syntax help can get you started with a hint about the syntax or a brief description of the keyword. You can get additional help by clicking the links in the syntax help window.
To view the syntax help:
In the following example, the help panel displays syntax help for the DATA= option in the PROC PRINT statement.
Tip: Click the links in the syntax help window to navigate to the SAS online help.
Snippets are lines of commonly used code or text that you can insert into your program. The SAS extension includes a few snippets for SAS functions and procedures to help you write SAS programs more quickly.
To access the list of snippets for a function or procedure:
Code Folding and Code Outline
Regions of code are identified in your SAS program as blocks of code that can be collapsed and expanded. You can also view an outline of your program that identifies DATA steps, procedures, macro sections, and user-defined regions of code.
Tip: You can define a custom region by adding
Configuring the SAS Extension
Before you can run SAS code, you must configure the SAS extension to access a SAS Viya server. You must license SAS Viya to run SAS code.
To configure the SAS extension:
Running SAS Code
After you configure the SAS extension, you can run your SAS program and view the log and results.
To run a SAS program:
Contributing to the SAS Extension
We welcome your contributions! Please read CONTRIBUTING.md for details on how to submit contributions to this project.
This project is subject to the SAS Code Extension Terms, a copy of which is included as Code_Extension_Agreement.pdf