Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Open-SAS: SAS-Like Statistical NotebookNew to Visual Studio Code? Get it now.
Open-SAS: SAS-Like Statistical Notebook

Open-SAS: SAS-Like Statistical Notebook

Ryan Blake Story

|
2 installs
| (0) | Free
Run SAS-style programs in VS Code with a fast, Python-powered interpreter.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Open-SAS VS Code Extension

SAS-style statistical analysis syntax highlighting and execution support for VS Code

SAS® is a registered trademark of SAS Institute Inc. Open-SAS is not affiliated with, endorsed by, or sponsored by SAS Institute Inc.

Features

  • Syntax Highlighting: Full SAS-style statistical analysis syntax highlighting for .osas and .sas files
  • Code Snippets: Common statistical analysis patterns and procedures
  • File Execution: Run SAS-style Open-SAS files directly from VS Code
  • Notebook Support: Interactive statistical notebooks (both .ipynb with osas kernel and .osasnb files)
  • IntelliSense: Code completion and syntax checking
  • Integrated Terminal: View results in VS Code's integrated terminal

Installation

  1. Install the extension from the VS Code Marketplace
  2. Install the Open-SAS Python package:
    pip install open-sas
    
  3. Install the Jupyter kernel (optional, for notebook support):
    python -m open_sas.kernel install
    

Usage

Basic SAS-Style Files (.osas)

  1. Create a new file with .osas extension
  2. Write your SAS-style code
  3. Use Ctrl+Shift+P → "Open-SAS: Run File" to execute
  4. View results in the integrated terminal

Interactive Notebooks

Option 1: Standard Jupyter Notebooks (.ipynb)

  1. Install the Open-SAS kernel: python -m open_sas.kernel install
  2. Create a new Jupyter notebook (.ipynb)
  3. Select "osas" as the kernel
  4. Write SAS-style code in cells and execute

Option 2: Open-SAS Notebooks (.osasnb)

  1. Create a new file with .osasnb extension
  2. Write SAS-style code in cells
  3. Execute cells individually or run all
  4. View formatted output and datasets

Code Snippets

Type common statistical analysis patterns and press Tab to expand:

  • data → DATA step template
  • proc → Statistical procedure template
  • means → PROC MEANS template
  • freq → PROC FREQ template
  • reg → PROC REG template
  • sql → PROC SQL template
  • macro → Macro definition template

Supported Features

  • DATA Steps: Variable creation, conditional logic, DATALINES
  • PROC MEANS: Descriptive statistics with CLASS variables and OUTPUT statements
  • PROC FREQ: Frequency tables and cross-tabulations with options
  • PROC SORT: Data sorting with ascending/descending order
  • PROC PRINT: Data display and formatting
  • PROC REG: Linear regression analysis with MODEL, OUTPUT, and SCORE statements
  • PROC SURVEYSELECT: Random sampling with SRS method, SAMPRATE/N options, and OUTALL flag
  • PROC UNIVARIATE: Detailed univariate analysis with distribution diagnostics
  • PROC CORR: Correlation analysis (Pearson, Spearman)
  • PROC FACTOR: Principal component analysis and factor analysis
  • PROC CLUSTER: Clustering methods (k-means, hierarchical)
  • PROC NPAR1WAY: Nonparametric tests (Mann-Whitney, Kruskal-Wallis)
  • PROC TTEST: T-tests (independent and paired)
  • PROC LOGIT: Logistic regression modeling
  • PROC TIMESERIES: Time series analysis and seasonal decomposition
  • PROC TREE/FOREST/BOOST: Machine learning (decision trees, random forests, gradient boosting)
  • PROC SQL: SQL query processing with DuckDB backend
  • PROC LANGUAGE: Built-in LLM integration for text generation and analysis
  • SAS Macro System: %MACRO/%MEND, %LET, & substitution, %PUT, %IF/%THEN/%ELSE, %DO/%END
  • SAS Format System: Built-in date/time, numeric, and currency formats with metadata persistence
  • Macro Variables: %LET, %PUT statements
  • Libraries: LIBNAME functionality
  • TITLE Statements: Title support for output formatting

Configuration

The extension can be configured through VS Code settings:

  • open-sas.pythonPath: Path to Python executable
  • open-sas.openSASPath: Path to Open-SAS runner script
  • open-sas.showOutputOnRun: Show output channel when running code

Requirements

  • Python 3.8 or higher
  • Open-SAS Python package
  • VS Code 1.60.0 or higher

Demo

Check out the comprehensive demo in examples/osas_walkthrough.ipynb to see all features in action.

Contributing

Contributions are welcome! Please see the main project repository for contribution guidelines.

License

MIT License - see LICENSE for details.

Support

  • 📖 Documentation
  • 🐛 Issue Tracker
  • 💬 Discussions

⚖️ Legal Disclaimer

SAS® is a registered trademark of SAS Institute Inc. Open-SAS is not affiliated with, endorsed by, or sponsored by SAS Institute Inc.

This extension uses original, independently developed code to implement statistical functionality using SAS-like syntax for educational and analytical use. It is not a clone, derivative, or replacement for SAS software and does not use any proprietary code from SAS Institute.

Open-SAS is provided as-is, under an open-source license, for research and community contribution purposes.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft